提交 8a395363 编写于 作者: R Radim Krčmář 提交者: Paolo Bonzini

KVM: x86: fix x2apic logical address matching

We cannot hit the bug now, but future patches will expose this path.
Signed-off-by: NRadim Krčmář <rkrcmar@redhat.com>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 3697f302
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册