summaryrefslogtreecommitdiffstats
path: root/arch/x86/.gitignore
diff options
context:
space:
mode:
authorSean Christopherson <sean.j.christopherson@intel.com>2019-04-02 08:10:47 -0700
committerPaolo Bonzini <pbonzini@redhat.com>2019-04-16 15:37:37 +0200
commit8f4dc2e77cdfaf7e644ef29693fa229db29ee1de (patch)
treeadd5a9e7f4fcef67fffaf8f40358d20b114c2419 /arch/x86/.gitignore
parent9ec19493fb86d6d5fbf9286b94ff21e56ef66376 (diff)
downloadtalos-op-linux-8f4dc2e77cdfaf7e644ef29693fa229db29ee1de.tar.gz
talos-op-linux-8f4dc2e77cdfaf7e644ef29693fa229db29ee1de.zip
KVM: x86: Don't clear EFER during SMM transitions for 32-bit vCPU
Neither AMD nor Intel CPUs have an EFER field in the legacy SMRAM save state area, i.e. don't save/restore EFER across SMM transitions. KVM somewhat models this, e.g. doesn't clear EFER on entry to SMM if the guest doesn't support long mode. But during RSM, KVM unconditionally clears EFER so that it can get back to pure 32-bit mode in order to start loading CRs with their actual non-SMM values. Clear EFER only when it will be written when loading the non-SMM state so as to preserve bits that can theoretically be set on 32-bit vCPUs, e.g. KVM always emulates EFER_SCE. And because CR4.PAE is cleared only to play nice with EFER, wrap that code in the long mode check as well. Note, this may result in a compiler warning about cr4 being consumed uninitialized. Re-read CR4 even though it's technically unnecessary, as doing so allows for more readable code and RSM emulation is not a performance critical path. Fixes: 660a5d517aaab ("KVM: x86: save/load state on SMM switch") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/.gitignore')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud