]> 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)
commit3896796b91f28bd8201ed4e2533a8a0d21d9848f
treea465339e30e3c5416b247f1c54418b77b0d854dc
parenta0c695444c408521984b93ac7fde92d559261893
KVM: x86: use guest maxphyaddr to check MTRR values

The check introduced in commit 30dae5de3f2b (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