projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fa97d7d
)
KVM: nVMX: Fail VMLAUNCH and VMRESUME on shadow VMCS
author
Liran Alon
<
[email protected]
>
Fri, 22 Jun 2018 23:35:04 +0000
(
02:35
+0300)
committer
Paolo Bonzini
<
[email protected]
>
Mon, 6 Aug 2018 15:58:39 +0000
(17:58 +0200)
Signed-off-by: Liran Alon <
[email protected]
>
Signed-off-by: Jim Mattson <
[email protected]
>
Signed-off-by: Paolo Bonzini <
[email protected]
>
arch/x86/kvm/vmx.c
patch
|
blob
|
history
diff --git
a/arch/x86/kvm/vmx.c
b/arch/x86/kvm/vmx.c
index 44e2b82f65198ef925df1c1985b7e53b4d3e291c..f6ec898ac53981ab3df8612bb8ad3e66abe84df6 100644
(file)
--- a/
arch/x86/kvm/vmx.c
+++ b/
arch/x86/kvm/vmx.c
@@
-11876,6
+11876,17
@@
static int nested_vmx_run(struct kvm_vcpu *vcpu, bool launch)
vmcs12 = get_vmcs12(vcpu);
+ /*
+ * Can't VMLAUNCH or VMRESUME a shadow VMCS. Despite the fact
+ * that there *is* a valid VMCS pointer, RFLAGS.CF is set
+ * rather than RFLAGS.ZF, and no error number is stored to the
+ * VM-instruction error field.
+ */
+ if (vmcs12->hdr.shadow_vmcs) {
+ nested_vmx_failInvalid(vcpu);
+ goto out;
+ }
+
if (enable_shadow_vmcs)
copy_shadow_to_vmcs12(vmx);