|
@@ -24,23 +24,11 @@
|
|
extern xc_interface *xen_xc;
|
|
extern xc_interface *xen_xc;
|
|
|
|
|
|
/*
|
|
/*
|
|
- * We don't support Xen prior to 4.2.0.
|
|
|
|
|
|
+ * We don't support Xen prior to 4.7.1.
|
|
*/
|
|
*/
|
|
|
|
|
|
-/* Xen 4.2 through 4.6 */
|
|
|
|
-#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 40701
|
|
|
|
-
|
|
|
|
-typedef xc_interface xenforeignmemory_handle;
|
|
|
|
-
|
|
|
|
-#define xenforeignmemory_open(l, f) xen_xc
|
|
|
|
-#define xenforeignmemory_close(h)
|
|
|
|
-
|
|
|
|
-#else /* CONFIG_XEN_CTRL_INTERFACE_VERSION >= 40701 */
|
|
|
|
-
|
|
|
|
#include <xenforeignmemory.h>
|
|
#include <xenforeignmemory.h>
|
|
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
extern xenforeignmemory_handle *xen_fmem;
|
|
extern xenforeignmemory_handle *xen_fmem;
|
|
|
|
|
|
#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 40900
|
|
#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 40900
|
|
@@ -148,8 +136,6 @@ static inline xendevicemodel_handle *xendevicemodel_open(
|
|
return xen_xc;
|
|
return xen_xc;
|
|
}
|
|
}
|
|
|
|
|
|
-#if CONFIG_XEN_CTRL_INTERFACE_VERSION >= 40500
|
|
|
|
-
|
|
|
|
static inline int xendevicemodel_create_ioreq_server(
|
|
static inline int xendevicemodel_create_ioreq_server(
|
|
xendevicemodel_handle *dmod, domid_t domid, int handle_bufioreq,
|
|
xendevicemodel_handle *dmod, domid_t domid, int handle_bufioreq,
|
|
ioservid_t *id)
|
|
ioservid_t *id)
|
|
@@ -211,8 +197,6 @@ static inline int xendevicemodel_set_ioreq_server_state(
|
|
return xc_hvm_set_ioreq_server_state(dmod, domid, id, enabled);
|
|
return xc_hvm_set_ioreq_server_state(dmod, domid, id, enabled);
|
|
}
|
|
}
|
|
|
|
|
|
-#endif /* CONFIG_XEN_CTRL_INTERFACE_VERSION >= 40500 */
|
|
|
|
-
|
|
|
|
static inline int xendevicemodel_set_pci_intx_level(
|
|
static inline int xendevicemodel_set_pci_intx_level(
|
|
xendevicemodel_handle *dmod, domid_t domid, uint16_t segment,
|
|
xendevicemodel_handle *dmod, domid_t domid, uint16_t segment,
|
|
uint8_t bus, uint8_t device, uint8_t intx, unsigned int level)
|
|
uint8_t bus, uint8_t device, uint8_t intx, unsigned int level)
|
|
@@ -340,15 +324,6 @@ static inline int xen_get_vmport_regs_pfn(xc_interface *xc, domid_t dom,
|
|
}
|
|
}
|
|
#endif
|
|
#endif
|
|
|
|
|
|
-/* Xen before 4.6 */
|
|
|
|
-#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 40600
|
|
|
|
-
|
|
|
|
-#ifndef HVM_IOREQSRV_BUFIOREQ_ATOMIC
|
|
|
|
-#define HVM_IOREQSRV_BUFIOREQ_ATOMIC 2
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
static inline int xen_get_default_ioreq_server_info(domid_t dom,
|
|
static inline int xen_get_default_ioreq_server_info(domid_t dom,
|
|
xen_pfn_t *ioreq_pfn,
|
|
xen_pfn_t *ioreq_pfn,
|
|
xen_pfn_t *bufioreq_pfn,
|
|
xen_pfn_t *bufioreq_pfn,
|
|
@@ -386,84 +361,6 @@ static inline int xen_get_default_ioreq_server_info(domid_t dom,
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
-/* Xen before 4.5 */
|
|
|
|
-#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 40500
|
|
|
|
-
|
|
|
|
-#ifndef HVM_PARAM_BUFIOREQ_EVTCHN
|
|
|
|
-#define HVM_PARAM_BUFIOREQ_EVTCHN 26
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
-#define IOREQ_TYPE_PCI_CONFIG 2
|
|
|
|
-
|
|
|
|
-typedef uint16_t ioservid_t;
|
|
|
|
-
|
|
|
|
-static inline void xen_map_memory_section(domid_t dom,
|
|
|
|
- ioservid_t ioservid,
|
|
|
|
- MemoryRegionSection *section)
|
|
|
|
-{
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-static inline void xen_unmap_memory_section(domid_t dom,
|
|
|
|
- ioservid_t ioservid,
|
|
|
|
- MemoryRegionSection *section)
|
|
|
|
-{
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-static inline void xen_map_io_section(domid_t dom,
|
|
|
|
- ioservid_t ioservid,
|
|
|
|
- MemoryRegionSection *section)
|
|
|
|
-{
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-static inline void xen_unmap_io_section(domid_t dom,
|
|
|
|
- ioservid_t ioservid,
|
|
|
|
- MemoryRegionSection *section)
|
|
|
|
-{
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-static inline void xen_map_pcidev(domid_t dom,
|
|
|
|
- ioservid_t ioservid,
|
|
|
|
- PCIDevice *pci_dev)
|
|
|
|
-{
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-static inline void xen_unmap_pcidev(domid_t dom,
|
|
|
|
- ioservid_t ioservid,
|
|
|
|
- PCIDevice *pci_dev)
|
|
|
|
-{
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-static inline void xen_create_ioreq_server(domid_t dom,
|
|
|
|
- ioservid_t *ioservid)
|
|
|
|
-{
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-static inline void xen_destroy_ioreq_server(domid_t dom,
|
|
|
|
- ioservid_t ioservid)
|
|
|
|
-{
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-static inline int xen_get_ioreq_server_info(domid_t dom,
|
|
|
|
- ioservid_t ioservid,
|
|
|
|
- xen_pfn_t *ioreq_pfn,
|
|
|
|
- xen_pfn_t *bufioreq_pfn,
|
|
|
|
- evtchn_port_t *bufioreq_evtchn)
|
|
|
|
-{
|
|
|
|
- return xen_get_default_ioreq_server_info(dom, ioreq_pfn,
|
|
|
|
- bufioreq_pfn,
|
|
|
|
- bufioreq_evtchn);
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-static inline int xen_set_ioreq_server_state(domid_t dom,
|
|
|
|
- ioservid_t ioservid,
|
|
|
|
- bool enable)
|
|
|
|
-{
|
|
|
|
- return 0;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-/* Xen 4.5 */
|
|
|
|
-#else
|
|
|
|
-
|
|
|
|
static bool use_default_ioreq_server;
|
|
static bool use_default_ioreq_server;
|
|
|
|
|
|
static inline void xen_map_memory_section(domid_t dom,
|
|
static inline void xen_map_memory_section(domid_t dom,
|
|
@@ -624,6 +521,4 @@ static inline int xen_set_ioreq_server_state(domid_t dom,
|
|
enable);
|
|
enable);
|
|
}
|
|
}
|
|
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
#endif /* QEMU_HW_XEN_NATIVE_H */
|
|
#endif /* QEMU_HW_XEN_NATIVE_H */
|