From: Sheng Yang <sheng@linux.intel.com>
To: Avi Kivity <avi@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm@vger.kernel.org, "Michael S. Tsirkin" <mst@redhat.com>,
Sheng Yang <sheng@linux.intel.com>
Subject: [PATCH 1/4] KVM: Move struct kvm_io_device to kvm_host.h
Date: Fri, 18 Feb 2011 16:53:10 +0800 [thread overview]
Message-ID: <1298019193-12742-2-git-send-email-sheng@linux.intel.com> (raw)
In-Reply-To: <1298019193-12742-1-git-send-email-sheng@linux.intel.com>
Then it can be used by other struct in kvm_host.h
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
---
include/linux/kvm_host.h | 23 +++++++++++++++++++++++
virt/kvm/iodev.h | 25 +------------------------
2 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index b5021db..7d313e0 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -98,6 +98,29 @@ int kvm_setup_async_pf(struct kvm_vcpu *vcpu, gva_t gva, gfn_t gfn,
int kvm_async_pf_wakeup_all(struct kvm_vcpu *vcpu);
#endif
+struct kvm_io_device;
+
+/**
+ * kvm_io_device_ops are called under kvm slots_lock.
+ * read and write handlers return 0 if the transaction has been handled,
+ * or non-zero to have it passed to the next device.
+ **/
+struct kvm_io_device_ops {
+ int (*read)(struct kvm_io_device *this,
+ gpa_t addr,
+ int len,
+ void *val);
+ int (*write)(struct kvm_io_device *this,
+ gpa_t addr,
+ int len,
+ const void *val);
+ void (*destructor)(struct kvm_io_device *this);
+};
+
+struct kvm_io_device {
+ const struct kvm_io_device_ops *ops;
+};
+
struct kvm_vcpu {
struct kvm *kvm;
#ifdef CONFIG_PREEMPT_NOTIFIERS
diff --git a/virt/kvm/iodev.h b/virt/kvm/iodev.h
index 12fd3ca..d1f5651 100644
--- a/virt/kvm/iodev.h
+++ b/virt/kvm/iodev.h
@@ -17,32 +17,9 @@
#define __KVM_IODEV_H__
#include <linux/kvm_types.h>
+#include <linux/kvm_host.h>
#include <asm/errno.h>
-struct kvm_io_device;
-
-/**
- * kvm_io_device_ops are called under kvm slots_lock.
- * read and write handlers return 0 if the transaction has been handled,
- * or non-zero to have it passed to the next device.
- **/
-struct kvm_io_device_ops {
- int (*read)(struct kvm_io_device *this,
- gpa_t addr,
- int len,
- void *val);
- int (*write)(struct kvm_io_device *this,
- gpa_t addr,
- int len,
- const void *val);
- void (*destructor)(struct kvm_io_device *this);
-};
-
-
-struct kvm_io_device {
- const struct kvm_io_device_ops *ops;
-};
-
static inline void kvm_iodevice_init(struct kvm_io_device *dev,
const struct kvm_io_device_ops *ops)
{
--
1.7.0.1
next prev parent reply other threads:[~2011-02-18 8:51 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-18 8:53 [PATCH 0/4 v9] MSI-X MMIO support for KVM Sheng Yang
2011-02-18 8:53 ` Sheng Yang [this message]
2011-02-18 8:53 ` [PATCH 2/4] KVM: Add kvm_io_ext_data to IO handler Sheng Yang
2011-02-18 8:53 ` [PATCH 3/4] KVM: Emulate MSI-X table in kernel Sheng Yang
2011-02-18 8:53 ` [PATCH 4/4] KVM: Add documents for MSI-X MMIO API Sheng Yang
2011-02-22 18:08 ` [PATCH 0/4 v9] MSI-X MMIO support for KVM Marcelo Tosatti
2011-09-01 11:27 ` Jan Kiszka
2011-09-06 7:52 ` Avi Kivity
2011-09-06 8:12 ` Michael S. Tsirkin
2011-09-06 8:36 ` Jan Kiszka
2011-09-06 8:46 ` Sasha Levin
2011-09-06 8:49 ` Jan Kiszka
2011-09-06 9:00 ` Sasha Levin
2011-09-06 9:05 ` Jan Kiszka
2011-09-06 9:16 ` Sasha Levin
2011-09-06 9:30 ` Michael S. Tsirkin
2011-09-06 8:36 ` Jan Kiszka
-- strict thread matches above, loose matches on Subject: below --
2011-02-24 9:51 [PATCH 0/4 v10] " Sheng Yang
2011-02-24 9:51 ` [PATCH 1/4] KVM: Move struct kvm_io_device to kvm_host.h Sheng Yang
2011-02-28 7:20 [PATCH 0/4 v11] MSI-X MMIO support for KVM Sheng Yang
2011-02-28 7:20 ` [PATCH 1/4] KVM: Move struct kvm_io_device to kvm_host.h Sheng Yang
2011-03-02 7:26 [PATCH 0/4 v12] MSI-X MMIO support for KVM Sheng Yang
2011-03-02 7:26 ` [PATCH 1/4] KVM: Move struct kvm_io_device to kvm_host.h Sheng Yang
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=1298019193-12742-2-git-send-email-sheng@linux.intel.com \
--to=sheng@linux.intel.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
--cc=mtosatti@redhat.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 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).