Commit 895b1d0e authored by Sean Christopherson's avatar Sean Christopherson Committed by rminmin
Browse files

KVM: nVMX: Set LDTR to its architecturally defined value on nested VM-Exit

mainline inclusion
from mainline-v5.15
commit afc8de01
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I6SN2F
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=afc8de0118be84f4058b9977d481aeb3e0758dbb



------------------------------

Set L1's LDTR on VM-Exit per the Intel SDM:

  The host-state area does not contain a selector field for LDTR. LDTR is
  established as follows on all VM exits: the selector is cleared to
  0000H, the segment is marked unusable and is otherwise undefined
  (although the base address is always canonical).

This is likely a benign bug since the LDTR is unusable, as it means the
L1 VMM is conditioned to reload its LDTR in order to function properly on
bare metal.

Fixes: 4704d0be ("KVM: nVMX: Exiting from L2 to L1")
Reviewed-by: default avatarReiji Watanabe <reijiw@google.com>
Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
Message-Id: <20210713163324.627647-3-seanjc@google.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: default avatarrminmin <renmm6@chinaunicom.cn>
parent 44384492
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment