diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2016-02-10 11:07:03 +0000 |
---|---|---|
committer | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2016-02-10 12:01:24 +0000 |
commit | 81daba58803cd11a27c2b4684ee3642302c14351 (patch) | |
tree | a5784483a4d1e7dba504daf44aa80d075ef10f15 /xen-hvm.c | |
parent | 2ac9f6d4b1de075f2ac34eb54b18ddda7a414a2b (diff) |
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>
Diffstat (limited to 'xen-hvm.c')
-rw-r--r-- | xen-hvm.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -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, |