From: Cam Macdonell <cam@cs.ualberta.ca>
To: qemu-devel@nongnu.org
Cc: Cam Macdonell <cam@cs.ualberta.ca>, kvm@vger.kernel.org
Subject: [Qemu-devel] [PATCH v6 2/6] Add function to assign ioeventfd to MMIO.
Date: Fri, 4 Jun 2010 15:45:38 -0600 [thread overview]
Message-ID: <1275687942-12312-3-git-send-email-cam@cs.ualberta.ca> (raw)
In-Reply-To: <1275687942-12312-2-git-send-email-cam@cs.ualberta.ca>
---
kvm-all.c | 32 ++++++++++++++++++++++++++++++++
kvm.h | 1 +
2 files changed, 33 insertions(+), 0 deletions(-)
diff --git a/kvm-all.c b/kvm-all.c
index 47f58a6..2982631 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1257,6 +1257,38 @@ int kvm_set_signal_mask(CPUState *env, const sigset_t *sigset)
return r;
}
+int kvm_set_ioeventfd_mmio_long(int fd, uint32_t addr, uint32_t val, bool assign)
+{
+#ifdef KVM_IOEVENTFD
+ int ret;
+ struct kvm_ioeventfd iofd;
+
+ iofd.datamatch = val;
+ iofd.addr = addr;
+ iofd.len = 4;
+ iofd.flags = KVM_IOEVENTFD_FLAG_DATAMATCH;
+ iofd.fd = fd;
+
+ if (!kvm_enabled()) {
+ return -ENOSYS;
+ }
+
+ if (!assign) {
+ iofd.flags |= KVM_IOEVENTFD_FLAG_DEASSIGN;
+ }
+
+ ret = kvm_vm_ioctl(kvm_state, KVM_IOEVENTFD, &iofd);
+
+ if (ret < 0) {
+ return -errno;
+ }
+
+ return 0;
+#else
+ return -ENOSYS;
+#endif
+}
+
int kvm_set_ioeventfd_pio_word(int fd, uint16_t addr, uint16_t val, bool assign)
{
#ifdef KVM_IOEVENTFD
diff --git a/kvm.h b/kvm.h
index aab5118..52e3a7f 100644
--- a/kvm.h
+++ b/kvm.h
@@ -181,6 +181,7 @@ static inline void cpu_synchronize_post_init(CPUState *env)
}
#endif
+int kvm_set_ioeventfd_mmio_long(int fd, uint32_t adr, uint32_t val, bool assign);
#if defined(KVM_IRQFD) && defined(CONFIG_KVM)
int kvm_set_irqfd(int gsi, int fd, bool assigned);
--
1.6.3.2.198.g6096d
next prev parent reply other threads:[~2010-06-04 21:46 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-04 21:45 [Qemu-devel] [PATCH v6 0/6] Inter-VM Shared Memory Device with migration support Cam Macdonell
2010-06-04 21:45 ` [Qemu-devel] [PATCH v6 1/6] Device specification for shared memory PCI device Cam Macdonell
2010-06-04 21:45 ` Cam Macdonell [this message]
2010-06-04 21:45 ` [Qemu-devel] [PATCH v6 3/6] Change phys_ram_dirty to phys_ram_status Cam Macdonell
2010-06-04 21:45 ` [Qemu-devel] [PATCH v6 4/6] Add support for marking memory to not be migrated. On migration, memory is checked for the NO_MIGRATION_FLAG Cam Macdonell
2010-06-04 21:45 ` [Qemu-devel] [PATCH v6 5/6] Inter-VM shared memory PCI device Cam Macdonell
2010-06-04 21:45 ` [Qemu-devel] [PATCH v6 6/6] the stand-alone shared memory server for inter-VM shared memory Cam Macdonell
2010-06-04 21:47 ` [Qemu-devel] [PATCH v6] Shared memory uio_pci driver Cam Macdonell
2010-06-14 15:53 ` [Qemu-devel] [PATCH v6 6/6] the stand-alone shared memory server for inter-VM shared memory Anthony Liguori
2010-06-14 22:03 ` Cam Macdonell
2010-06-23 13:12 ` Avi Kivity
2010-06-23 21:54 ` Anthony Liguori
2010-06-05 9:44 ` [Qemu-devel] [PATCH v6 5/6] Inter-VM shared memory PCI device Blue Swirl
2010-06-06 15:02 ` Avi Kivity
2010-06-07 16:41 ` Cam Macdonell
2010-06-09 20:12 ` Blue Swirl
2010-06-14 15:51 ` [Qemu-devel] [PATCH v6 4/6] Add support for marking memory to not be migrated. On migration, memory is checked for the NO_MIGRATION_FLAG Anthony Liguori
2010-06-14 16:08 ` Cam Macdonell
2010-06-14 16:15 ` Anthony Liguori
2010-06-15 16:16 ` [Qemu-devel] [PATCH RFC] Mark a device as non-migratable Cam Macdonell
2010-06-15 16:32 ` [Qemu-devel] " Anthony Liguori
2010-06-15 17:45 ` Markus Armbruster
2010-06-15 22:26 ` Cam Macdonell
2010-06-15 22:33 ` Anthony Liguori
2010-06-16 5:05 ` Cam Macdonell
2010-06-16 12:34 ` Anthony Liguori
2010-06-17 4:18 ` Cam Macdonell
2010-06-11 22:03 ` [Qemu-devel] Re: [PATCH v6 0/6] Inter-VM Shared Memory Device with migration support Cam Macdonell
2010-06-14 15:54 ` Anthony Liguori
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=1275687942-12312-3-git-send-email-cam@cs.ualberta.ca \
--to=cam@cs.ualberta.ca \
--cc=kvm@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).