Skip to content

Commit c4201bd

Browse files
up2wingsean-jc
authored andcommitted
KVM: s390: Don't re-setup dummy routing when KVM_CREATE_IRQCHIP
Now that KVM sets up empty irq routing in kvm_create_vm(), there's no need to setup dummy routing when KVM_CREATE_IRQCHIP. Note, userspace could very theoretically use KVM_CREATE_IRQCHIP after KVM_SET_GSI_ROUTING to reset to empty IRQ routing, but it's extremely unlikely any VMM does that, e.g. the main reason s390 does anything for KVM_CREATE_IRQCHIP is to that s390 doesn't need to be special cased by the VMM. Signed-off-by: Yi Wang <foxywang@tencent.com> Acked-by: Christian Borntraeger <borntraeger@linux.ibm.com> Link: https://lore.kernel.org/r/20240506101751.3145407-4-foxywang@tencent.com [sean: keep use_irqchip check, call out KVM_SET_GSI_ROUTING impact] Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent e3c89f5 commit c4201bd

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

arch/s390/kvm/kvm-s390.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2996,14 +2996,9 @@ int kvm_arch_vm_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg)
29962996
break;
29972997
}
29982998
case KVM_CREATE_IRQCHIP: {
2999-
struct kvm_irq_routing_entry routing;
3000-
30012999
r = -EINVAL;
3002-
if (kvm->arch.use_irqchip) {
3003-
/* Set up dummy routing. */
3004-
memset(&routing, 0, sizeof(routing));
3005-
r = kvm_set_irq_routing(kvm, &routing, 0, 0);
3006-
}
3000+
if (kvm->arch.use_irqchip)
3001+
r = 0;
30073002
break;
30083003
}
30093004
case KVM_SET_DEVICE_ATTR: {

0 commit comments

Comments
 (0)