summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorRadim Krčmář2015-04-27 15:11:25 +0200
committerPaolo Bonzini2015-05-07 11:29:46 +0200
commit74545705cb2e398efc3cd751628c58f021323434 (patch)
treee9f946816e8cb963678db7fa5e9e0471b3590792 /arch/x86/kvm/x86.c
parentkvm,x86: load guest FPU context more eagerly (diff)
downloadkernel-qcow2-linux-74545705cb2e398efc3cd751628c58f021323434.tar.gz
kernel-qcow2-linux-74545705cb2e398efc3cd751628c58f021323434.tar.xz
kernel-qcow2-linux-74545705cb2e398efc3cd751628c58f021323434.zip
KVM: x86: fix initial PAT value
PAT should be 0007_0406_0007_0406h on RESET and not modified on INIT. VMX used a wrong value (host's PAT) and while SVM used the right one, it never got to arch.pat. This is not an issue with QEMU as it will force the correct value. Signed-off-by: Radim Krčmář <rkrcmar@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index c42134e98e31..cdccbe1749a5 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -7408,6 +7408,8 @@ int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu)
vcpu->arch.maxphyaddr = cpuid_query_maxphyaddr(vcpu);
+ vcpu->arch.pat = MSR_IA32_CR_PAT_DEFAULT;
+
kvm_async_pf_hash_reset(vcpu);
kvm_pmu_init(vcpu);