mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 13:45:20 +00:00
hypervisor: Add VmExit::Debug
for x86/KVM
This commit adds `VmExit::Debug` for x86/KVM. When the guest hits a hardware breakpoint, `VcpuExit::Debug` vm exit occurs. This vm exit will be handled with code implemented in the following commits. Signed-off-by: Akira Moroo <retrage01@gmail.com>
This commit is contained in:
parent
9f27954fbd
commit
9f111388c0
@ -266,6 +266,8 @@ pub enum VmExit<'a> {
|
||||
Hyperv,
|
||||
#[cfg(feature = "tdx")]
|
||||
Tdx,
|
||||
#[cfg(feature = "kvm")]
|
||||
Debug,
|
||||
}
|
||||
|
||||
///
|
||||
|
@ -1074,6 +1074,8 @@ impl cpu::Vcpu for KvmVcpu {
|
||||
VcpuExit::Hyperv => Ok(cpu::VmExit::Hyperv),
|
||||
#[cfg(feature = "tdx")]
|
||||
VcpuExit::Unsupported(KVM_EXIT_TDX) => Ok(cpu::VmExit::Tdx),
|
||||
VcpuExit::Debug(_) => Ok(cpu::VmExit::Debug),
|
||||
|
||||
r => Err(cpu::HypervisorCpuError::RunVcpu(anyhow!(
|
||||
"Unexpected exit reason on vcpu run: {:?}",
|
||||
r
|
||||
|
Loading…
Reference in New Issue
Block a user