Skip to content

Commit 1fbe686

Browse files
sean-jcMarc Zyngier
authored andcommitted
KVM: arm64: Explicitly treat routing entry type changes as changes
Explicitly treat type differences as GSI routing changes, as comparing MSI data between two entries could get a false negative, e.g. if userspace changed the type but left the type-specific data as- Note, the same bug was fixed in x86 by commit bcda70c ("KVM: x86: Explicitly treat routing entry type changes as changes"). Fixes: 4bf3693 ("KVM: arm64: Unmap vLPIs affected by changes to GSI routing information") Signed-off-by: Sean Christopherson <[email protected]> Reviewed-by: Oliver Upton <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Zyngier <[email protected]>
1 parent 8a8ff06 commit 1fbe686

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/arm64/kvm/arm.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2764,7 +2764,8 @@ void kvm_arch_irq_bypass_del_producer(struct irq_bypass_consumer *cons,
27642764
bool kvm_arch_irqfd_route_changed(struct kvm_kernel_irq_routing_entry *old,
27652765
struct kvm_kernel_irq_routing_entry *new)
27662766
{
2767-
if (new->type != KVM_IRQ_ROUTING_MSI)
2767+
if (old->type != KVM_IRQ_ROUTING_MSI ||
2768+
new->type != KVM_IRQ_ROUTING_MSI)
27682769
return true;
27692770

27702771
return memcmp(&old->msi, &new->msi, sizeof(new->msi));

0 commit comments

Comments
 (0)