diff options
author | Babu Moger <[email protected]> | 2020-05-12 18:59:06 -0500 |
---|---|---|
committer | Paolo Bonzini <[email protected]> | 2020-05-13 11:27:41 -0400 |
commit | 37486135d3a7b03acc7755b63627a130437f066a (patch) | |
tree | d2466828e16813eef80e938f8c354ce7fa0fa2be /tools/perf/scripts/python/bin/export-to-postgresql-report | |
parent | 7d611233b01613c866259d6e6f44c67f7f7eb2a3 (diff) |
KVM: x86: Fix pkru save/restore when guest CR4.PKE=0, move it to x86.c
Though rdpkru and wrpkru are contingent upon CR4.PKE, the PKRU
resource isn't. It can be read with XSAVE and written with XRSTOR.
So, if we don't set the guest PKRU value here(kvm_load_guest_xsave_state),
the guest can read the host value.
In case of kvm_load_host_xsave_state, guest with CR4.PKE clear could
potentially use XRSTOR to change the host PKRU value.
While at it, move pkru state save/restore to common code and the
host_pkru field to kvm_vcpu_arch. This will let SVM support protection keys.
Cc: [email protected]
Reported-by: Jim Mattson <[email protected]>
Signed-off-by: Babu Moger <[email protected]>
Message-Id: <158932794619.44260.14508381096663848853.stgit@naples-babu.amd.com>
Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/export-to-postgresql-report')
0 files changed, 0 insertions, 0 deletions