From 94fe22da622336749e2fe0a7510b8420c0c57cfc Mon Sep 17 00:00:00 2001 From: Jinank Jain Date: Thu, 23 May 2024 08:35:25 +0530 Subject: [PATCH] hypervisor: mshv: Only set unimplemented MSR for x86 partition This partition property is only supported for x86 partition. Thus, reduce the scope of it. Signed-off-by: Jinank Jain --- hypervisor/src/mshv/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/hypervisor/src/mshv/mod.rs b/hypervisor/src/mshv/mod.rs index 001f7499c..879695e18 100644 --- a/hypervisor/src/mshv/mod.rs +++ b/hypervisor/src/mshv/mod.rs @@ -304,6 +304,7 @@ impl hypervisor::Hypervisor for MshvHypervisor { // to override this behavior with a more suitable option i.e., ignore // writes from the guest and return zero in attempt to read unimplemented // MSR. + #[cfg(target_arch = "x86_64")] fd.set_partition_property( hv_partition_property_code_HV_PARTITION_PROPERTY_UNIMPLEMENTED_MSR_ACTION, hv_unimplemented_msr_action_HV_UNIMPLEMENTED_MSR_ACTION_IGNORE_WRITE_READ_ZERO as u64,