]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: use guest maxphyaddr to check MTRR values
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 29 Aug 2014 16:56:01 +0000 (18:56 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 29 Aug 2014 16:56:24 +0000 (18:56 +0200)
commitff529c92222ba3f35643ebe305713d1cf147087b
treea465339e30e3c5416b247f1c54418b77b0d854dc
parent35e26a5f130c26ec6f82f7abb61d76d23b96028b
KVM: x86: use guest maxphyaddr to check MTRR values

The check introduced in commit 079343466ea0 (KVM: x86: #GP when attempts to write reserved bits of Variable Range MTRRs, 2014-08-19)
will break if the guest maxphyaddr is higher than the host's (which
sometimes happens depending on your hardware and how QEMU is
configured).

To fix this, use cpuid_maxphyaddr similar to how the APIC_BASE MSR
does already.

Reported-by: Jan Kiszka <jan.kiszka@siemens.com>
Tested-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c