qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/2] kvm/x86: Hyper-V synthetic interrupt contro


From: Cornelia Huck
Subject: Re: [Qemu-devel] [PATCH 1/2] kvm/x86: Hyper-V synthetic interrupt controller
Date: Mon, 12 Oct 2015 10:48:48 +0200

On Mon, 12 Oct 2015 09:54:41 +0200
Christian Borntraeger <address@hidden> 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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]