On Thu, Dec 6, 2012 at 1:10 PM, Cam Macdonell <c...@cs.ualberta.ca> wrote:
> On Wed, Dec 5, 2012 at 1:50 AM, Jan Kiszka <jan.kis...@siemens.com> 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