diff options
author | Sean Christopherson <sean.j.christopherson@intel.com> | 2020-07-13 18:57:32 -0700 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-08-09 12:51:50 -0400 |
commit | 05487215e6b9732cc4ad0e83e465b33182200ad5 (patch) | |
tree | c0ad298056442f7b6a6bf4a192db1dca9d61b42d /arch/x86/kvm/i8254.c | |
parent | 06a81c1c7db9bd5de0bd38cd5acc44bb22b99150 (diff) | |
download | linux-05487215e6b9732cc4ad0e83e465b33182200ad5.tar.bz2 |
KVM: x86: Don't attempt to load PDPTRs when 64-bit mode is enabled
Don't attempt to load PDPTRs if EFER.LME=1, i.e. if 64-bit mode is
enabled. A recent change to reload the PDTPRs when CR0.CD or CR0.NW is
toggled botched the EFER.LME handling and sends KVM down the PDTPR path
when is_paging() is true, i.e. when the guest toggles CD/NW in 64-bit
mode.
Split the CR0 checks for 64-bit vs. 32-bit PAE into separate paths. The
64-bit path is specifically checking state when paging is toggled on,
i.e. CR0.PG transititions from 0->1. The PDPTR path now needs to run if
the new CR0 state has paging enabled, irrespective of whether paging was
already enabled. Trying to shave a few cycles to make the PDPTR path an
"else if" case is a mess.
Fixes: d42e3fae6faed ("kvm: x86: Read PDPTEs on CR0.CD and CR0.NW changes")
Cc: Jim Mattson <jmattson@google.com>
Cc: Oliver Upton <oupton@google.com>
Cc: Peter Shier <pshier@google.com>
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Reviewed-by: Jim Mattson <jmattson@google.com>
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20200714015732.32426-1-sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/i8254.c')
0 files changed, 0 insertions, 0 deletions