Skip to content
  • Krish Sadhukhan's avatar
    nVMX: Test Selector and Base Address fields of Guest Segment Registers on vmentry of nested guests · 7820ac52
    Krish Sadhukhan authored
    
    
    According to section "Checks on Guest Segment Registers" in Intel SDM vol 3C,
    the following checks are performed on the Guest Segment Registers on vmentry
    of nested guests:
    
        Selector fields:
    	— TR. The TI flag (bit 2) must be 0.
    	— LDTR. If LDTR is usable, the TI flag (bit 2) must be 0.
    	— SS. If the guest will not be virtual-8086 and the "unrestricted
    	  guest" VM-execution control is 0, the RPL (bits 1:0) must equal
    	  the RPL of the selector field for CS.1
    
        Base-address fields:
    	— CS, SS, DS, ES, FS, GS. If the guest will be virtual-8086, the
    	  address must be the selector field shifted left 4 bits (multiplied
    	  by 16).
    	— The following checks are performed on processors that support Intel
    	  64 architecture:
    		TR, FS, GS. The address must be canonical.
    		LDTR. If LDTR is usable, the address must be canonical.
    		CS. Bits 63:32 of the address must be zero.
    		SS, DS, ES. If the register is usable, bits 63:32 of the
    		address must be zero.
    
    Signed-off-by: default avatarKrish Sadhukhan <krish.sadhukhan@oracle.com>
    Message-Id: <20200921081027.23047-3-krish.sadhukhan@oracle.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    7820ac52