Skip to content

Instantly share code, notes, and snippets.

@luqmana

luqmana/foo.diff Secret

Created December 20, 2020 08:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luqmana/552baa8be026e67bef2d223076b81636 to your computer and use it in GitHub Desktop.
Save luqmana/552baa8be026e67bef2d223076b81636 to your computer and use it in GitHub Desktop.
diff --git a/target/i386/kvm.c b/target/i386/kvm.c
index 91cd4976e2..3ed0a3ec08 100644
--- a/target/i386/kvm.c
+++ b/target/i386/kvm.c
@@ -518,6 +518,12 @@ uint64_t kvm_arch_get_supported_msr_feature(KVMState *s, uint32_t index)
case MSR_IA32_VMX_TRUE_PROCBASED_CTLS:
case MSR_IA32_VMX_TRUE_ENTRY_CTLS:
case MSR_IA32_VMX_TRUE_EXIT_CTLS:
+
+ if (index == MSR_IA32_VMX_TRUE_ENTRY_CTLS)
+ value |= (uint64_t)VMX_VM_ENTRY_LOAD_BNDCFGS << 32;
+ if (index == MSR_IA32_VMX_TRUE_EXIT_CTLS)
+ value |= (uint64_t)VMX_VM_EXIT_CLEAR_BNDCFGS << 32;
+
/*
* Return true for bits that can be one, but do not have to be one.
* The SDM tells us which bits could have a "must be one" setting,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment