Re: registering ioeventfd in qemu/kvm

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

 



Il 23/08/2012 05:35, Shesha Sreenivasamurthy ha scritto:
> Hi,
> I am trying to generate eventfd upon a IO write from the guest, say it
> is at offset IO_NOTIFY_REG (0x10). When the guest writes to this
> register, I get control to QEMU's to the write function associated in
> mypci_iomem_ops. However, instead of this I would like to register an
> eventfd.
> 
> To achieve that, first I tried:
>        memory_region_add_eventfd(&mypci->bar_iomem, IO_NOTIFY_REG, 4,
> true, 1, fd);

This is the right way.  You can look (in the git tree of QEMU) at
hw/ivshmem.c, which is the simplest user of the eventfd API.

Note that recently the API was changed to accept an EventNotifier rather
than the raw eventfd.

Paolo

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux