summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/svm.c
diff options
context:
space:
mode:
authorRadim Krčmář <rkrcmar@redhat.com>2015-04-27 16:11:25 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2015-05-07 12:29:46 +0300
commit74545705cb2e398efc3cd751628c58f021323434 (patch)
treee9f946816e8cb963678db7fa5e9e0471b3590792 /arch/x86/kvm/svm.c
parent653f52c316a49c5ee2701bc13b15879f20790662 (diff)
downloadlinux-74545705cb2e398efc3cd751628c58f021323434.tar.xz
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/svm.c')
-rw-r--r--arch/x86/kvm/svm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index b6ad0f9de80a..8954d7a07703 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -1176,7 +1176,7 @@ static void init_vmcb(struct vcpu_svm *svm, bool init_event)
clr_exception_intercept(svm, PF_VECTOR);
clr_cr_intercept(svm, INTERCEPT_CR3_READ);
clr_cr_intercept(svm, INTERCEPT_CR3_WRITE);
- save->g_pat = 0x0007040600070406ULL;
+ save->g_pat = svm->vcpu.arch.pat;
save->cr3 = 0;
save->cr4 = 0;
}