runtime-rs: add an option dbg_monitor_socket for HMP support

This option allows to add a debug monitor socket when
`enable_debug = true` to control QEMU within debugging case.

Fixes: #9603

Signed-off-by: Alex Lyn <alex.lyn@antgroup.com>
This commit is contained in:
Alex Lyn
2024-05-16 17:53:18 +08:00
parent d73876252e
commit 7ed6c6896b
2 changed files with 15 additions and 1 deletions

View File

@@ -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 {

View File

@@ -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