xen: drop XenXC and associated interface wrappers

Now that 4.2 and earlier are no longer supported "xc_interface *" is
always the right type for the xc interface handle.

With this we can also simplify the handling of the xenforeignmemory
compatibility wrapper by making xenforeignmemory_handle ==
xc_interface, instead of an xc_interface* and remove various uses of &
and *h.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
This commit is contained in:
Ian Campbell authored and Stefano Stabellini committed 2016-02-10 12:01:24 +00:00
1 parent 2ac9f6d4b1
commit 81daba5880
5 files changed
+44 -64

No files matched your search

+8 -8
View File
@@ -1224,7 +1224,7 @@ void xen_hvm_init(PCMachineState *pcms, MemoryRegion **ram_memory)
&ioreq_pfn, &bufioreq_pfn,
&bufioreq_evtchn);
if (rc < 0) {
error_report("failed to get ioreq server info: error %d handle=" XC_INTERFACE_FMT,
error_report("failed to get ioreq server info: error %d handle=%p",
errno, xen_xc);
goto err;
}
@@ -1237,7 +1237,7 @@ void xen_hvm_init(PCMachineState *pcms, MemoryRegion **ram_memory)
PROT_READ|PROT_WRITE,
1, &ioreq_pfn, NULL);
if (state->shared_page == NULL) {
error_report("map shared IO page returned error %d handle=" XC_INTERFACE_FMT,
error_report("map shared IO page returned error %d handle=%p",
errno, xen_xc);
goto err;
}
@@ -1249,8 +1249,8 @@ void xen_hvm_init(PCMachineState *pcms, MemoryRegion **ram_memory)
xenforeignmemory_map(xen_fmem, xen_domid, PROT_READ|PROT_WRITE,
1, &ioreq_pfn, NULL);
if (state->shared_vmport_page == NULL) {
error_report("map shared vmport IO page returned error %d handle="
XC_INTERFACE_FMT, errno, xen_xc);
error_report("map shared vmport IO page returned error %d handle=%p",
errno, xen_xc);
goto err;
}
} else if (rc != -ENOSYS) {
@@ -1272,7 +1272,7 @@ void xen_hvm_init(PCMachineState *pcms, MemoryRegion **ram_memory)
rc = xen_set_ioreq_server_state(xen_xc, xen_domid, state->ioservid, true);
if (rc < 0) {
error_report("failed to enable ioreq server info: error %d handle=" XC_INTERFACE_FMT,
error_report("failed to enable ioreq server info: error %d handle=%p",
errno, xen_xc);
goto err;
}
@@ -1333,11 +1333,11 @@ err:
void destroy_hvm_domain(bool reboot)
{
XenXC xc_handle;
xc_interface *xc_handle;
int sts;
xc_handle = xen_xc_interface_open(0, 0, 0);
if (xc_handle == XC_HANDLER_INITIAL_VALUE) {
xc_handle = xc_interface_open(0, 0, 0);
if (xc_handle == NULL) {
fprintf(stderr, "Cannot acquire xenctrl handle\n");
} else {
sts = xc_domain_shutdown(xc_handle, xen_domid,