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: Thu, 23 Apr 2015 11:40:41 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

Hi Paolo,
On 04/23/2015 11:30 AM, Paolo Bonzini wrote:
> 
> 
> On 23/04/2015 10:49, Eric Auger wrote:
>> This series introduces a new callback function in IRQState, named
>> get_gsi_cb. It is supposed to be populated by the interrupt controller
>> and its role is to convert the interrupt controller pin number into
>> the global system interrupt (gsi) number. The gsi is used when setting
>> irqfd up.
>>
>> With PCI there is a PCIINTxRoute bus lookup mechanism that enables to
>> retrieve the gsi from the PCI host controller/bridge pin. The conversion
>> is implemented by the PCI host controller. With platform devices, this
>> conversion function is implemented by the interrupt controller.
>>
>> Besides the callback member, a setter is introduced. First user is
>> arm_gic_kvm. A public function wraps the callback, qemu_irq_get_gsi.
>>
>> The first user of qemu_irq_get_gsi might be the VFIO platform device.
>> This will come in the "KVM platform device passthrough" series.
> 
> I'm sorry, I cannot understand the point of this without seeing a user.
no problem, I intend to send the KVM platform device passthrough v13
today which will illustrate the usage.
> 
> Why can't you just use a GHashTable?

You mean implementing this hash table in the interrupt controller?

The problem is my VFIO device currently has no link to the interrupt
controller object. Besides it has a platform bus in between. Previously
I devised a reset notifier called in the machine file to pass this link
but Alex was not keen about this method. So the idea here is when the
VFIO sysbus device qemuirq is getting connected, a notifier is called,
VFIO device can retrieve the gsi of this qemu_irq and call KVM_IRQFD
with that gsi.

Best Regards

Eric
  This mustn't be a hot path, since
> VFIO does all the signalling in the kernel via irqfds.
> 
> Paolo
> 




reply via email to

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