Cornelia Huck
2015-Oct-12 08:48 UTC
[PATCH 1/2] kvm/x86: Hyper-V synthetic interrupt controller
On Mon, 12 Oct 2015 09:54:41 +0200 Christian Borntraeger <borntraeger at de.ibm.com> wrote:> Am 09.10.2015 um 16:42 schrieb Paolo Bonzini: > > Christian, the question for you is towards the end... > > > > [....] > > > >> --- a/virt/kvm/irqchip.c > >> +++ b/virt/kvm/irqchip.c > >> @@ -144,11 +144,13 @@ static int setup_routing_entry(struct kvm_irq_routing_table *rt, > >> > >> /* > >> * Do not allow GSI to be mapped to the same irqchip more than once. > >> - * Allow only one to one mapping between GSI and MSI. > >> + * Allow only one to one mapping between GSI and MSI/Hyper-V SINT. > >> */ > >> hlist_for_each_entry(ei, &rt->map[ue->gsi], link) > >> if (ei->type == KVM_IRQ_ROUTING_MSI || > >> ue->type == KVM_IRQ_ROUTING_MSI || > >> + ei->type == KVM_IRQ_ROUTING_HV_SINT || > >> + ue->type == KVM_IRQ_ROUTING_HV_SINT || > >> ue->u.irqchip.irqchip == ei->irqchip.irqchip) > >> return r; > > > > Christian, what's the desired behavior for s390 adapter interrupts here? > > Should this actually become > > > > if (ei->type != KVM_IRQ_ROUTING_IRQCHIP || > > ue->type != KVM_IRQ_ROUTING_IRQCHIP || > > ue->u.irqchip.irqchip == ei->irqchip.irqchip) > > Hmm, this is the failure path if we already have one routing entry, Right? > This will work with virtio ccw as we only setup one route, but I am not > sure about the upcoming PCI irqfd support which might add a 2nd adapter > route. > > Adding Conny, Jens,Not sure about PC, > As soon as we wire up the PCI irgfd, we want to register a 2nd route for > the same irqchip via flic, which will also be of type > KVM_IRQ_ROUTING_S390_ADAPTER. Correct?It's a bit different. The kernel basically does not see msi routes for s390 pci at all, as qemu already transforms the msi route into an adapter route before registering it (see kvm_arch_fixup_msi_route() in qemu's target-s390x/kvm.c). So, in the end, all s390 kernels end up using adapter routes, and none of them are duplicate (just one irqchip). Going back to Paolo's original question, I think changing the check to !KVM_IRQ_ROUTING_IRQCHIP makes sense, if I understand the code correctly. They seem to be the only special one.
Paolo Bonzini
2015-Oct-12 08:58 UTC
[PATCH 1/2] kvm/x86: Hyper-V synthetic interrupt controller
On 12/10/2015 10:48, Cornelia Huck wrote:> Going back to Paolo's original question, I think changing the check > to !KVM_IRQ_ROUTING_IRQCHIP makes sense, if I understand the code > correctly. They seem to be the only special one.Great. Roman, Denis, can you do this then? Thanks, Paolo
Roman Kagan
2015-Oct-12 11:05 UTC
[PATCH 1/2] kvm/x86: Hyper-V synthetic interrupt controller
On Mon, Oct 12, 2015 at 10:58:36AM +0200, Paolo Bonzini wrote:> On 12/10/2015 10:48, Cornelia Huck wrote: > > Going back to Paolo's original question, I think changing the check > > to !KVM_IRQ_ROUTING_IRQCHIP makes sense, if I understand the code > > correctly. They seem to be the only special one. > > Great. Roman, Denis, can you do this then?Sure, gonna be in the next round. Thanks, Roman.
Maybe Matching Threads
- [PATCH 1/2] kvm/x86: Hyper-V synthetic interrupt controller
- [PATCH 1/2] kvm/x86: Hyper-V synthetic interrupt controller
- [PATCH 1/2] kvm/x86: Hyper-V synthetic interrupt controller
- [PATCH 1/2] kvm/x86: Hyper-V synthetic interrupt controller
- [PATCH 1/2] kvm/x86: Hyper-V synthetic interrupt controller