From: Paolo Bonzini Date: Mon, 10 Nov 2014 12:53:25 +0000 (+0100) Subject: KVM: x86: fix warning on 32-bit compilation X-Git-Tag: v3.19-rc1~36^2~67 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=ac146235d47c20dbb1da7f0f8ef35c73e24590e3;p=~emulex%2Finfiniband.git 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 --- diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index f85da5cb6aa..aae5969370d 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -750,7 +750,9 @@ EXPORT_SYMBOL_GPL(kvm_set_cr4); int kvm_set_cr3(struct kvm_vcpu *vcpu, unsigned long cr3) { +#ifdef CONFIG_X86_64 cr3 &= ~CR3_PCID_INVD; +#endif if (cr3 == kvm_read_cr3(vcpu) && !pdptrs_changed(vcpu)) { kvm_mmu_sync_roots(vcpu);