]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit - arch/x86/kvm/x86.c
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)
commitfd2752352bbc98850d83b5448a288d8991590317
treea465339e30e3c5416b247f1c54418b77b0d854dc
parent13a34e067eab24fec882e1834fbf2cc31911d474
KVM: x86: use guest maxphyaddr to check MTRR values

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