]> 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)
commit4b320143a24109417ef8e2100bd91274c00aa964
tree2e1f466ee6a60218518586f64058f23a0b3fb68f
parent78818363a2a99c56a8a012f210b1faa026fbfe16
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