]> 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)
commitd1563a373db13bc6209512d9857f2caae65710f7
treed005b7ef405dccba17f0c9ddc3211264d24c715f
parente9a0f5c9d032a4b6bb60e87b1bbbf84cb7999e0f
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