KVM: nVMX: Verify VMCS shadowing VMCS link pointer
authorLiran Alon <liran.alon@oracle.com>
Fri, 22 Jun 2018 23:35:07 +0000 (02:35 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 6 Aug 2018 15:58:41 +0000 (17:58 +0200)
commitf145d90d97bab0e11b78da1739e5db742575037c
treeaaebd41bae4f7096762e45c7f94b07da67a05d21
parenta8a7c02bf7b70cda6face6321a45de56519c24bf
KVM: nVMX: Verify VMCS shadowing VMCS link pointer

Intel SDM considers these checks to be part of
"Checks on Guest Non-Register State".

Note that it is legal for vmcs->vmcs_link_pointer to be -1ull
when VMCS shadowing is enabled. In this case, any VMREAD/VMWRITE to
shadowed-field sets the ALU flags for VMfailInvalid (i.e. CF=1).

Signed-off-by: Liran Alon <liran.alon@oracle.com>
Signed-off-by: Jim Mattson <jmattson@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx.c