Skip to content

Commit ac14623

Browse files
committed
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 <[email protected]>
1 parent ce1a5e6 commit ac14623

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/x86/kvm/x86.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,9 @@ EXPORT_SYMBOL_GPL(kvm_set_cr4);
750750

751751
int kvm_set_cr3(struct kvm_vcpu *vcpu, unsigned long cr3)
752752
{
753+
#ifdef CONFIG_X86_64
753754
cr3 &= ~CR3_PCID_INVD;
755+
#endif
754756

755757
if (cr3 == kvm_read_cr3(vcpu) && !pdptrs_changed(vcpu)) {
756758
kvm_mmu_sync_roots(vcpu);

0 commit comments

Comments
 (0)