From 81daba58803cd11a27c2b4684ee3642302c14351 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Wed, 10 Feb 2016 11:07:03 +0000 Subject: 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 Reviewed-by: Stefano Stabellini Signed-off-by: Stefano Stabellini --- xen-hvm.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'xen-hvm.c') diff --git a/xen-hvm.c b/xen-hvm.c index 918cabc1aa..fbe0e3a8c0 100644 --- a/xen-hvm.c +++ b/xen-hvm.c @@ -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, -- cgit v1.2.1