mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 13:45:20 +00:00
hypervisor: mshv: Restrict MshvEmulator to x86
Current MSHV emulator only works for x86 instruction decoder. So, let's restrict its usage to x86. Signed-off-by: Jinank Jain <jinankjain@microsoft.com>
This commit is contained in:
parent
7c6c45128d
commit
58e6a289ab
@ -1450,11 +1450,13 @@ impl MshvVcpu {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(target_arch = "x86_64")]
|
||||||
struct MshvEmulatorContext<'a> {
|
struct MshvEmulatorContext<'a> {
|
||||||
vcpu: &'a MshvVcpu,
|
vcpu: &'a MshvVcpu,
|
||||||
map: (u64, u64), // Initial GVA to GPA mapping provided by the hypervisor
|
map: (u64, u64), // Initial GVA to GPA mapping provided by the hypervisor
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(target_arch = "x86_64")]
|
||||||
impl<'a> MshvEmulatorContext<'a> {
|
impl<'a> MshvEmulatorContext<'a> {
|
||||||
// Do the actual gva -> gpa translation
|
// Do the actual gva -> gpa translation
|
||||||
#[allow(non_upper_case_globals)]
|
#[allow(non_upper_case_globals)]
|
||||||
@ -1478,6 +1480,7 @@ impl<'a> MshvEmulatorContext<'a> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(target_arch = "x86_64")]
|
||||||
/// Platform emulation for Hyper-V
|
/// Platform emulation for Hyper-V
|
||||||
impl<'a> PlatformEmulator for MshvEmulatorContext<'a> {
|
impl<'a> PlatformEmulator for MshvEmulatorContext<'a> {
|
||||||
type CpuState = EmulatorCpuState;
|
type CpuState = EmulatorCpuState;
|
||||||
|
Loading…
Reference in New Issue
Block a user