Commit ac146235 authored by Paolo Bonzini's avatar Paolo Bonzini

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: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent ce1a5e60
...@@ -750,7 +750,9 @@ EXPORT_SYMBOL_GPL(kvm_set_cr4); ...@@ -750,7 +750,9 @@ EXPORT_SYMBOL_GPL(kvm_set_cr4);
int kvm_set_cr3(struct kvm_vcpu *vcpu, unsigned long cr3) int kvm_set_cr3(struct kvm_vcpu *vcpu, unsigned long cr3)
{ {
#ifdef CONFIG_X86_64
cr3 &= ~CR3_PCID_INVD; cr3 &= ~CR3_PCID_INVD;
#endif
if (cr3 == kvm_read_cr3(vcpu) && !pdptrs_changed(vcpu)) { if (cr3 == kvm_read_cr3(vcpu) && !pdptrs_changed(vcpu)) {
kvm_mmu_sync_roots(vcpu); kvm_mmu_sync_roots(vcpu);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment