]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: MMU: check guest CR3 reserved bits based on its physical address width.
authorYu Zhang <yu.c.zhang@linux.intel.com>
Thu, 24 Aug 2017 12:27:53 +0000 (20:27 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 24 Aug 2017 16:09:16 +0000 (18:09 +0200)
commit71212799be68bba26afee840754159fb31019de9
tree2e1f466ee6a60218518586f64058f23a0b3fb68f
parent7353c6cd01515315d8227d05dbbcabc0d263895a
KVM: MMU: check guest CR3 reserved bits based on its physical address width.

Currently, KVM uses CR3_L_MODE_RESERVED_BITS to check the
reserved bits in CR3. Yet the length of reserved bits in
guest CR3 should be based on the physical address width
exposed to the VM. This patch changes CR3 check logic to
calculate the reserved bits at runtime.

Signed-off-by: Yu Zhang <yu.c.zhang@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/emulate.c
arch/x86/kvm/mmu.h
arch/x86/kvm/x86.c