qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@citrix.com>
To: qemu-devel@nongnu.org
Cc: Julien Grall <julien.grall@citrix.com>,
	christian.limpach@gmail.com, Stefano.Stabellini@eu.citrix.com,
	xen-devel@lists.xen.org
Subject: [Qemu-devel] [QEMU][RFC V2 03/10] xen: add wrappers for new Xen disaggregation hypercalls
Date: Wed, 22 Aug 2012 13:30:16 +0100	[thread overview]
Message-ID: <60e94dfc4ce6ebcd07e3256e314b9d0c99a13d1d.1345637459.git.julien.grall@citrix.com> (raw)
In-Reply-To: <cover.1345637459.git.julien.grall@citrix.com>

QEMU disaggregation is not supported on old Xen versions.

Signed-off-by: Julien Grall <julien.grall@citrix.com>
---
 hw/xen_common.h |   58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 58 insertions(+), 0 deletions(-)

diff --git a/hw/xen_common.h b/hw/xen_common.h
index 727757a..b2525ad 100644
--- a/hw/xen_common.h
+++ b/hw/xen_common.h
@@ -152,6 +152,64 @@ static inline int xen_xc_hvm_inject_msi(XenXC xen_xc, domid_t dom,
 }
 #endif
 
+/* Xen before 4.3 */
+#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 430
+static inline int xen_xc_hvm_register_pcidev(XenXC xen_xc, domid_t dom,
+        unsigned int serverid, uint8_t domain,
+        uint8_t bus, uint8_t device, uint8_t function)
+{
+    return 0;
+}
+
+static inline int xen_xc_hvm_map_io_range_to_ioreq_server(XenXC xen_xc,
+        domid_t dom, unsigned int serverid, int is_mmio,
+        uint64_t start, uint64_t end)
+{
+    return 1;
+}
+
+static inline int xen_xc_hvm_unmap_io_range_from_ioreq_server(XenXC xen_xc,
+        domid_t dom, unsigned int serverid, int is_mmio, uint64_t start)
+{
+    return 1;
+}
+
+static inline int xen_xc_hvm_register_ioreq_server(XenXC xen_xc, domid_t dom)
+{
+    return 0;
+}
+
+#else
+static inline int xen_xc_hvm_register_pcidev(XenXC xen_xc, domid_t dom,
+        unsigned int serverid, uint8_t domain,
+        uint8_t bus, uint8_t device, uint8_t function)
+{
+    return xc_hvm_register_pcidev(xen_xc, dom, serverid, domain,
+                                  bus, device, function);
+}
+
+static inline int xen_xc_hvm_map_io_range_to_ioreq_server(XenXC xen_xc,
+        domid_t dom, unsigned int serverid, int is_mmio,
+        uint64_t start, uint64_t end)
+{
+    return xc_hvm_map_io_range_to_ioreq_server(xen_xc, dom, serverid, is_mmio,
+                                               start, end);
+}
+
+static inline int xen_xc_hvm_unmap_io_range_from_ioreq_server(XenXC xen_xc,
+        domid_t dom, unsigned int serverid, int is_mmio, uint64_t start)
+{
+    return xc_hvm_unmap_io_range_from_ioreq_server(xen_xc, dom, serverid,
+                                                   is_mmio, start);
+}
+
+static inline int xen_xc_hvm_register_ioreq_server(XenXC xen_xc, domid_t dom)
+{
+    return xc_hvm_register_ioreq_server(xen_xc, dom);
+}
+
+#endif
+
 void destroy_hvm_domain(bool reboot);
 
 /* shutdown/destroy current domain because of an error */
-- 
Julien Grall

  parent reply	other threads:[~2012-08-22 18:54 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-22 12:30 [Qemu-devel] [QEMU][RFC V2 00/10] QEMU disaggregation in Xen environment Julien Grall
2012-08-22 12:30 ` [Qemu-devel] [QEMU][RFC V2 01/10] xen: add new machine options to support " Julien Grall
2012-08-23 14:40   ` Stefano Stabellini
2012-08-22 12:30 ` [Qemu-devel] [QEMU][RFC V2 02/10] xen: modify QEMU status path in XenStore Julien Grall
2012-08-22 12:30 ` Julien Grall [this message]
2012-08-22 12:30 ` [Qemu-devel] [QEMU][RFC V2 04/10] xen-hvm: register qemu as ioreq server and retrieve shared pages Julien Grall
2012-08-22 12:30 ` [Qemu-devel] [QEMU][RFC V2 05/10] xen-memory: register memory/IO range in Xen Julien Grall
2012-08-23 14:41   ` Stefano Stabellini
2012-08-23 17:18     ` Julien Grall
2012-08-22 12:30 ` [Qemu-devel] [QEMU][RFC V2 06/10] xen-pci: register PCI device in Xen and handle IOREQ_TYPE_PCI_CONFIG Julien Grall
2012-08-23 14:41   ` Stefano Stabellini
2012-08-24 12:59     ` Julien Grall
2012-08-22 12:30 ` [Qemu-devel] [QEMU][RFC V2 07/10] xen: specify which device is part of default devices Julien Grall
2012-08-23 14:42   ` Stefano Stabellini
2012-08-22 12:30 ` [Qemu-devel] [QEMU][RFC V2 08/10] xen: audio is not a " Julien Grall
2012-08-23 14:42   ` Stefano Stabellini
2012-08-22 12:30 ` [Qemu-devel] [QEMU][RFC V2 09/10] xen-memory: handle node "device_model" for physical mapping Julien Grall
2012-08-22 12:30 ` [Qemu-devel] [QEMU][RFC V2 10/10] xen: emulate IDE outside default device set Julien Grall
2012-08-23 14:43   ` Stefano Stabellini

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=60e94dfc4ce6ebcd07e3256e314b9d0c99a13d1d.1345637459.git.julien.grall@citrix.com \
    --to=julien.grall@citrix.com \
    --cc=Stefano.Stabellini@eu.citrix.com \
    --cc=christian.limpach@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=xen-devel@lists.xen.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).