mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
hypervisor: Set destination vCPU TSC frequency to source
Include the TSC frequency as part of the KVM state so that it will be restored at the destination. This ensures migration works correctly between hosts that have a different TSC frequency if the guest is running with TSC as the source of timekeeping. Fixes: #5786 Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
This commit is contained in:
@@ -366,6 +366,7 @@ fn create_vmm_ioctl_seccomp_rule_kvm() -> Result<Vec<SeccompRule>, BackendError>
|
||||
const KVM_SET_LAPIC: u64 = 0x4400_ae8f;
|
||||
const KVM_SET_MSRS: u64 = 0x4008_ae89;
|
||||
const KVM_SET_SREGS: u64 = 0x4138_ae84;
|
||||
const KVM_SET_TSC_KHZ: u64 = 0xaea2;
|
||||
const KVM_SET_TSS_ADDR: u64 = 0xae47;
|
||||
const KVM_SET_XCRS: u64 = 0x4188_aea7;
|
||||
const KVM_SET_XSAVE: u64 = 0x5000_aea5;
|
||||
@@ -392,6 +393,7 @@ fn create_vmm_ioctl_seccomp_rule_kvm() -> Result<Vec<SeccompRule>, BackendError>
|
||||
and![Cond::new(1, ArgLen::Dword, Eq, KVM_SET_IDENTITY_MAP_ADDR)?],
|
||||
and![Cond::new(1, ArgLen::Dword, Eq, KVM_SET_LAPIC)?],
|
||||
and![Cond::new(1, ArgLen::Dword, Eq, KVM_SET_SREGS)?],
|
||||
and![Cond::new(1, ArgLen::Dword, Eq, KVM_SET_TSC_KHZ)?],
|
||||
and![Cond::new(1, ArgLen::Dword, Eq, KVM_SET_TSS_ADDR,)?],
|
||||
and![Cond::new(1, ArgLen::Dword, Eq, KVM_SET_MSRS)?],
|
||||
and![Cond::new(1, ArgLen::Dword, Eq, KVM_SET_XCRS,)?],
|
||||
|
||||
Reference in New Issue
Block a user