Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8a395363 authored by Radim Krčmář's avatar Radim Krčmář Committed by Paolo Bonzini
Browse files

KVM: x86: fix x2apic logical address matching



We cannot hit the bug now, but future patches will expose this path.

Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 3697f302
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -599,7 +599,8 @@ static bool kvm_apic_match_logical_addr(struct kvm_lapic *apic, u32 mda)
	logical_id = kvm_apic_get_reg(apic, APIC_LDR);

	if (apic_x2apic_mode(apic))
		return (logical_id & mda) != 0;
		return ((logical_id >> 16) == (mda >> 16))
		       && (logical_id & mda & 0xffff) != 0;

	logical_id = GET_APIC_LOGICAL_ID(logical_id);