diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kvm/svm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index d7439ceb2ac2..8af463b91526 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
@@ -878,9 +878,12 @@ set: | |||
878 | 878 | ||
879 | static void svm_set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4) | 879 | static void svm_set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4) |
880 | { | 880 | { |
881 | unsigned long host_cr4_mce = read_cr4() & X86_CR4_MCE; | ||
882 | |||
881 | vcpu->arch.cr4 = cr4; | 883 | vcpu->arch.cr4 = cr4; |
882 | if (!npt_enabled) | 884 | if (!npt_enabled) |
883 | cr4 |= X86_CR4_PAE; | 885 | cr4 |= X86_CR4_PAE; |
886 | cr4 |= host_cr4_mce; | ||
884 | to_svm(vcpu)->vmcb->save.cr4 = cr4; | 887 | to_svm(vcpu)->vmcb->save.cr4 = cr4; |
885 | } | 888 | } |
886 | 889 | ||