From: Paolo Bonzini <pbonzini@redhat.com>
To: Shesha Sreenivasamurthy <sheshas@gmail.com>
Cc: kvm@vger.kernel.org
Subject: Re: registering ioeventfd in qemu/kvm
Date: Mon, 27 Aug 2012 10:51:10 +0200 [thread overview]
Message-ID: <503B34FE.5060608@redhat.com> (raw)
In-Reply-To: <CABL7MgGOvhpPowt2fyMii3dYjMq7NiCRf1Bja0tP61SPEH+X5w@mail.gmail.com>
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
prev parent reply other threads:[~2012-08-27 8:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-23 3:35 registering ioeventfd in qemu/kvm Shesha Sreenivasamurthy
2012-08-27 8:51 ` Paolo Bonzini [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=503B34FE.5060608@redhat.com \
--to=pbonzini@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=sheshas@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.