qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 2/2] ivshmem: use irqfd to interrupt among VM


From: liu ping fan
Subject: Re: [Qemu-devel] [PATCH v2 2/2] ivshmem: use irqfd to interrupt among VMs
Date: Thu, 6 Dec 2012 14:26:55 +0800

On Thu, Dec 6, 2012 at 1:10 PM, Cam Macdonell <address@hidden> wrote:
> On Wed, Dec 5, 2012 at 1:50 AM, Jan Kiszka <address@hidden> wrote:
>> On 2012-12-05 06:34, Cam Macdonell wrote:
>>>>  static void ivshmem_write_config(PCIDevice *pci_dev, uint32_t address,
>>>>                                  uint32_t val, int len)
>>>>  {
>>>> +    bool is_enabled, was_enabled = msi_enabled(pci_dev);
>>>> +
>>>>      pci_default_write_config(pci_dev, address, val, len);
>>>> +    is_enabled = msi_enabled(pci_dev);
>>>
>>> Problem 1)  in my tests is_enabled is always 0, so I don't think the
>>> irqfds are getting setup
>>
>> You likely want to call msix_enabled here.
>
> Yup, that gets it working.
>
> Liu Ping, can you update the patch to use msix_enabled()?
>
:-) , I just finish my test on uio before reading this

> Also, it seems that with irqfd enabled the user-level handlers are not
> triggered, but it may still be a better idea to not add the user-level
> handlers to the char devices at all if irqfd is enabled.
>
Here, in ivshmem_vector_use(),
qemu_chr_add_handlers(s->eventfd_chr[vector], NULL, NULL, NULL, NULL)
serves this purpose. When irqfd enabled, the fake_irqfd will be
removed from eventfd's listeners.

I will fix the msix_enabled, and send out next version.

Regards,
Pingfan
> Cam
>
>>
>> Jan
>>
>> --
>> Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
>> Corporate Competence Center Embedded Linux
>>



reply via email to

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