diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2014-11-10 07:53:25 -0500 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-11-10 07:53:25 -0500 |
commit | ac146235d47c20dbb1da7f0f8ef35c73e24590e3 (patch) | |
tree | 1df58d96c9d146b14f6ea5bfa2ebb6f0a8486b8d | |
parent | ce1a5e60a62f21a6b5ad3e1dee60c10f0cb2aa37 (diff) |
KVM: x86: fix warning on 32-bit compilation
PCIDs are only supported in 64-bit mode. No need to clear bit 63
of CR3 unless the host is 64-bit.
Reported by Fengguang Wu's autobuilder.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | arch/x86/kvm/x86.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index f85da5cb6aa6..aae5969370d1 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -750,7 +750,9 @@ EXPORT_SYMBOL_GPL(kvm_set_cr4); | |||
750 | 750 | ||
751 | int kvm_set_cr3(struct kvm_vcpu *vcpu, unsigned long cr3) | 751 | int kvm_set_cr3(struct kvm_vcpu *vcpu, unsigned long cr3) |
752 | { | 752 | { |
753 | #ifdef CONFIG_X86_64 | ||
753 | cr3 &= ~CR3_PCID_INVD; | 754 | cr3 &= ~CR3_PCID_INVD; |
755 | #endif | ||
754 | 756 | ||
755 | if (cr3 == kvm_read_cr3(vcpu) && !pdptrs_changed(vcpu)) { | 757 | if (cr3 == kvm_read_cr3(vcpu) && !pdptrs_changed(vcpu)) { |
756 | kvm_mmu_sync_roots(vcpu); | 758 | kvm_mmu_sync_roots(vcpu); |