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

[Xen-devel] [QEMU][RFC PATCH 2/6] xen: Add functions to register PCI and IO in Xen



Add interface for the new xen hypercalls

Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>
---
 hw/xen.h   |    3 +++
 xen-all.c  |    2 ++
 xen-stub.c |   13 +++++++++++++
 3 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/hw/xen.h b/hw/xen.h
index b056b13..a76616f 100644
--- a/hw/xen.h
+++ b/hw/xen.h
@@ -35,6 +35,9 @@ static inline int xen_enabled(void)
 int xen_pci_slot_get_pirq(PCIDevice *pci_dev, int irq_num);
 void xen_piix3_set_irq(void *opaque, int irq_num, int level);
 void xen_piix_pci_write_config_client(uint32_t address, uint32_t val, int len);
+int xen_register_pcidev(PCIDevice *pci_dev);
+void xen_map_iorange(uint64_t addr, uint64_t size, int is_mmio);
+void xen_unmap_iorange(uint64_t addr, uint64_t size, int is_mmio);
 void xen_cmos_set_s3_resume(void *opaque, int irq, int level);
 
 qemu_irq *xen_interrupt_controller_init(void);
diff --git a/xen-all.c b/xen-all.c
index 493112b..f007278 100644
--- a/xen-all.c
+++ b/xen-all.c
@@ -36,6 +36,8 @@
 
 static MemoryRegion ram_memory, ram_640k, ram_lo, ram_hi;
 static MemoryRegion *framebuffer;
+static unsigned int serverid;
+static int is_running = 0;
 
 /* Compatibility with older version */
 #if __XEN_LATEST_INTERFACE_VERSION__ < 0x0003020a
diff --git a/xen-stub.c b/xen-stub.c
index 9ea02d4..235640f 100644
--- a/xen-stub.c
+++ b/xen-stub.c
@@ -25,10 +25,23 @@ void xen_piix3_set_irq(void *opaque, int irq_num, int level)
 {
 }
 
+int xen_register_pcidev(PCIDevice *pci_dev)
+{
+    return 1;
+}
+
 void xen_piix_pci_write_config_client(uint32_t address, uint32_t val, int len)
 {
 }
 
+void xen_map_iorange(uint64_t addr, uint64_t size, int is_mmio)
+{
+}
+
+void xen_unmap_iorange(uint64_t addr, uint64_t size, int is_mmio)
+{
+}
+
 void xen_cmos_set_s3_resume(void *opaque, int irq, int level)
 {
 }
-- 
Julien Grall


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.