qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RESEND PATCH v16 6/6] hw/vfio/platform: add irqfd supp


From: Eric Auger
Subject: Re: [Qemu-devel] [RESEND PATCH v16 6/6] hw/vfio/platform: add irqfd support
Date: Fri, 26 Jun 2015 18:31:31 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

On 06/26/2015 06:26 PM, Paolo Bonzini wrote:
> 
> 
> On 26/06/2015 18:21, Alex Williamson wrote:
>>>> +#ifdef CONFIG_KVM
>>>> +    if (kvm_irqfds_enabled() && kvm_resamplefds_enabled() &&
>>>> +        vdev->irqfd_allowed) {
>>>> +        sbc->connect_irq_notifier = vfio_start_irqfd_injection;
>> Should we be abstracting this to a
>> sysbus_register_connect_irq_notifier()?  It seems a littler personal to
>> be reaching in and setting it ourselves and would avoid us needing to
>> reference the class.
> 
> It's your class, so it's not too bad to touch it from that point of
> view; on the other hand it's ugly to do it here nevertheless. :)
> 
> I think you should always set "sbc->connect_irq_notifier =
> vfio_start_irqfd_injection" in the class_init function.  The
> vfio_start_irqfd_injection function can just exit if it finds
> "!kvm_enabled() || !kvm_irqfds_enabled() || !kvm_resamplefds_enabled()
> || !vdev->irqfd_allowed".
OK thanks for the guidance. Alex, are you OK with that solution. It
avoids touching the other patch

Thanks

Eric
> 
> Paolo
> 




reply via email to

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