qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 0/2] irq: add get_gsi callback


From: Eric Auger
Subject: Re: [Qemu-devel] [PATCH 0/2] irq: add get_gsi callback
Date: Fri, 24 Apr 2015 11:18:05 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

On 04/24/2015 11:11 AM, Paolo Bonzini wrote:
> 
> 
> On 24/04/2015 11:01, Eric Auger wrote:
>>>> void sysbus_init_irq(SysBusDevice *dev, qemu_irq *p)
>>>> {
>>>>     SysBusDeviceClass *sdc = SYSBUS_DEVICE_GET_CLASS(dev);
>>>>     qdev_init_gpio_out_named(DEVICE(dev), p, SYSBUS_DEVICE_GPIO_IRQ, 1,
>>>>                              sdc->irq_set_hook);
>>>> }
>> Hi Paolo
>>
>> I implemented this alternative but my concern is the check method is
>> called before the qemu_irq setting. So on this callback I cannot
>> retrieve the qemu_irq VFIOINTp struct container object needed to setup
>> irqfd hence does not work for me.
> 
> Isn't the qemu_irq passed as the third argument to the callback?  I
> thought this solution was fine because you weren't passing the "int n"
> from sysbus_connect_irq to your notifier.
Yes it is. But I need to access the EventNotifiers for trigger &
resample which were initialized before for eventfd trigger and stored in
the container object. Will study if I can restructure the code ...

Thanks

Eric

> 
> If you really cannot make it work, I guess your "sysbus: add
> irq_routing_notifier" patch would be okay.  I would only ask you to move
> the function pointer from SysBusDevice to SysBusDeviceClass.
> 
> Thanks,
> 
> Paolo
> 
>> I would need a post_check cb. Do you
>> think it it sensible to add another cb?




reply via email to

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