]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commita8b1389110887e4b34f16a936efba56f22d59ad2
treed005b7ef405dccba17f0c9ddc3211264d24c715f
parentc1296c17be119360959895616056990ceff7fc95
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