KVM: x86: assign two bits to track SPTE kinds
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 24 Sep 2019 10:43:08 +0000 (12:43 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 27 Sep 2019 11:13:24 +0000 (13:13 +0200)
commit6eeb4ef049e7cd89783e8ebe1ea2f1dac276f82c
treed005b7ef405dccba17f0c9ddc3211264d24c715f
parent504ce1954fba888936c9d13ccc1e3db9b8f613d5
KVM: x86: assign two bits to track SPTE kinds

Currently, we are overloading SPTE_SPECIAL_MASK to mean both
"A/D bits unavailable" and MMIO, where the difference between the
two is determined by mio_mask and mmio_value.

However, the next patch will need two bits to distinguish
availability of A/D bits from write protection.  So, while at
it give MMIO its own bit pattern, and move the two bits from
bit 62 to bits 52..53 since Intel is allocating EPT page table
bits from the top.

Reviewed-by: Junaid Shahid <junaids@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/mmu.c