mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: Restrict the maximum number of HW breakpoints
Set the maximum number of HW breakpoints according to the value returned from `Hypervisor::get_guest_debug_hw_bps()`. Signed-off-by: Michael Zhao <michael.zhao@arm.com>
This commit is contained in:
committed by
Sebastien Boeuf
parent
223b1f6c51
commit
d66d64c325
+8
-1
@@ -272,6 +272,8 @@ pub fn start_vmm_thread(
|
||||
seccomp_action: &SeccompAction,
|
||||
hypervisor: Arc<dyn hypervisor::Hypervisor>,
|
||||
) -> Result<thread::JoinHandle<Result<()>>> {
|
||||
#[cfg(feature = "gdb")]
|
||||
let gdb_hw_breakpoints = hypervisor.get_guest_debug_hw_bps();
|
||||
#[cfg(feature = "gdb")]
|
||||
let (gdb_sender, gdb_receiver) = std::sync::mpsc::channel();
|
||||
#[cfg(feature = "gdb")]
|
||||
@@ -344,7 +346,12 @@ pub fn start_vmm_thread(
|
||||
|
||||
#[cfg(feature = "gdb")]
|
||||
if let Some(debug_path) = debug_path {
|
||||
let target = gdb::GdbStub::new(gdb_sender, gdb_debug_event, gdb_vm_debug_event);
|
||||
let target = gdb::GdbStub::new(
|
||||
gdb_sender,
|
||||
gdb_debug_event,
|
||||
gdb_vm_debug_event,
|
||||
gdb_hw_breakpoints,
|
||||
);
|
||||
thread::Builder::new()
|
||||
.name("gdb".to_owned())
|
||||
.spawn(move || gdb::gdb_thread(target, &debug_path))
|
||||
|
||||
Reference in New Issue
Block a user