Skip to content

Commit

Permalink
runtime-rs: add an option dbg_monitor_socket for HMP support
Browse files Browse the repository at this point in the history
This option allows to add a debug monitor socket when
`enable_debug = true` to control QEMU within debugging case.

Fixes: kata-containers#9603

Signed-off-by: Alex Lyn <alex.lyn@antgroup.com>
  • Loading branch information
Apokleos authored and zaymat committed Jun 17, 2024
1 parent 073df1d commit 4a819ab
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions src/libs/kata-types/src/config/hypervisor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,20 @@ pub struct DebugInfo {
/// much disk space.
#[serde(default)]
pub guest_memory_dump_path: String,

/// This option allows to add a debug monitor socket when `enable_debug = true`
/// WARNING: Anyone with access to the monitor socket can take full control of
/// Qemu. This is for debugging purpose only and must *NEVER* be used in
/// production.
/// Valid values are :
/// - "hmp"
/// - "qmp"
/// - "qmp-pretty" (same as "qmp" with pretty json formatting)
/// If set to the empty string "", no debug monitor socket is added. This is
/// the default.
/// dbg_monitor_socket = "hmp"
#[serde(default)]
pub dbg_monitor_socket: String,
}

impl DebugInfo {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ pflashes = []
#
# If set to the empty string "", no extra monitor socket is added. This is
# the default.
#extra_monitor_socket = hmp
#extra_monitor_socket = "hmp"

# Disable the customizations done in the runtime when it detects
# that it is running on top a VMM. This will result in the runtime
Expand Down

0 comments on commit 4a819ab

Please sign in to comment.