]> asedeno.scripts.mit.edu Git - linux.git/commit
KVM nVMX: Check Host Segment Registers and Descriptor Tables on vmentry of nested guests
authorKrish Sadhukhan <krish.sadhukhan@oracle.com>
Wed, 3 Jul 2019 23:54:35 +0000 (19:54 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 5 Jul 2019 12:01:51 +0000 (14:01 +0200)
commit1ef23e1f16088f5a91b25bb17585c2d532a097f7
tree0e02a07c86c7d236ea03562d8985e706eae9e2b3
parentf087a02941feacf7d6f097522bc67c602fda18e6
KVM nVMX: Check Host Segment Registers and Descriptor Tables on vmentry of nested guests

According to section "Checks on Host Segment and Descriptor-Table
Registers" in Intel SDM vol 3C, the following checks are performed on
vmentry of nested guests:

   - In the selector field for each of CS, SS, DS, ES, FS, GS and TR, the
     RPL (bits 1:0) and the TI flag (bit 2) must be 0.
   - The selector fields for CS and TR cannot be 0000H.
   - The selector field for SS cannot be 0000H if the "host address-space
     size" VM-exit control is 0.
   - On processors that support Intel 64 architecture, the base-address
     fields for FS, GS and TR must contain canonical addresses.

Signed-off-by: Krish Sadhukhan <krish.sadhukhan@oracle.com>
Reviewed-by: Karl Heubaum <karl.heubaum@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/nested.c