From 73ea53368b463f05166b93bff7d3eaaed4d417b4 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Thu, 28 Jan 2016 14:56:58 +0000 Subject: [PATCH] tools: libxc: remove functions made obsolete by libxendevicemodel This removes those functions which are obsolete _and_ are backed by a stable hypercall interface. xc_{set,get}_hvm_param were already deprecated in favour of xc_hvm_param_{set,get} and were only retained due to QEMU's use. Various functions relating to management of emulated IRQs are no longer needed here now. Signed-off-by: Ian Campbell --- Must be applied after qemu-trad has been updated to include: Switch from xc_{set,get}_hvm_param to xc_hvm_param_{set,get} Port to use libxendevicemodel but this needn't happen in lockstep (i.e. in this exact commit) --- tools/libxc/include/xenctrl.h | 16 ------- tools/libxc/xc_domain.c | 17 ------- tools/libxc/xc_misc.c | 86 ----------------------------------- 3 files changed, 119 deletions(-) diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h index 1a5f4ec940..f907bf209b 100644 --- a/tools/libxc/include/xenctrl.h +++ b/tools/libxc/include/xenctrl.h @@ -1526,18 +1526,6 @@ int xc_physdev_unmap_pirq(xc_interface *xch, int domid, int pirq); -int xc_hvm_set_pci_intx_level( - xc_interface *xch, domid_t dom, - uint8_t domain, uint8_t bus, uint8_t device, uint8_t intx, - unsigned int level); -int xc_hvm_set_isa_irq_level( - xc_interface *xch, domid_t dom, - uint8_t isa_irq, - unsigned int level); - -int xc_hvm_set_pci_link_route( - xc_interface *xch, domid_t dom, uint8_t link, uint8_t isa_irq); - int xc_hvm_inject_msi( xc_interface *xch, domid_t dom, uint64_t addr, uint32_t data); @@ -1619,10 +1607,6 @@ void xc_clear_last_error(xc_interface *xch); int xc_hvm_param_set(xc_interface *handle, domid_t dom, uint32_t param, uint64_t value); int xc_hvm_param_get(xc_interface *handle, domid_t dom, uint32_t param, uint64_t *value); -/* Deprecated: use xc_hvm_param_set/get() instead. */ -int xc_set_hvm_param(xc_interface *handle, domid_t dom, int param, unsigned long value); -int xc_get_hvm_param(xc_interface *handle, domid_t dom, int param, unsigned long *value); - /* * IOREQ Server API. (See section on IOREQ Servers in public/hvm_op.h). */ diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c index e21b602bd1..82a47daf54 100644 --- a/tools/libxc/xc_domain.c +++ b/tools/libxc/xc_domain.c @@ -1394,23 +1394,6 @@ int xc_hvm_param_get(xc_interface *handle, domid_t dom, uint32_t param, uint64_t return rc; } -int xc_set_hvm_param(xc_interface *handle, domid_t dom, int param, unsigned long value) -{ - return xc_hvm_param_set(handle, dom, param, value); -} - -int xc_get_hvm_param(xc_interface *handle, domid_t dom, int param, unsigned long *value) -{ - uint64_t v; - int ret; - - ret = xc_hvm_param_get(handle, dom, param, &v); - if (ret < 0) - return ret; - *value = v; - return 0; -} - int xc_hvm_create_ioreq_server(xc_interface *xch, domid_t domid, int handle_bufioreq, diff --git a/tools/libxc/xc_misc.c b/tools/libxc/xc_misc.c index 124537bdc1..a36d71b024 100644 --- a/tools/libxc/xc_misc.c +++ b/tools/libxc/xc_misc.c @@ -464,92 +464,6 @@ int xc_getcpuinfo(xc_interface *xch, int max_cpus, return rc; } - -int xc_hvm_set_pci_intx_level( - xc_interface *xch, domid_t dom, - uint8_t domain, uint8_t bus, uint8_t device, uint8_t intx, - unsigned int level) -{ - DECLARE_HYPERCALL_BUFFER(struct xen_hvm_set_pci_intx_level, arg); - int rc; - - arg = xc_hypercall_buffer_alloc(xch, arg, sizeof(*arg)); - if ( arg == NULL ) - { - PERROR("Could not allocate memory for xc_hvm_set_pci_intx_level hypercall"); - return -1; - } - - arg->domid = dom; - arg->domain = domain; - arg->bus = bus; - arg->device = device; - arg->intx = intx; - arg->level = level; - - rc = xencall2(xch->xcall, __HYPERVISOR_hvm_op, - HVMOP_set_pci_intx_level, - HYPERCALL_BUFFER_AS_ARG(arg)); - - xc_hypercall_buffer_free(xch, arg); - - return rc; -} - -int xc_hvm_set_isa_irq_level( - xc_interface *xch, domid_t dom, - uint8_t isa_irq, - unsigned int level) -{ - DECLARE_HYPERCALL_BUFFER(struct xen_hvm_set_isa_irq_level, arg); - int rc; - - arg = xc_hypercall_buffer_alloc(xch, arg, sizeof(*arg)); - if ( arg == NULL ) - { - PERROR("Could not allocate memory for xc_hvm_set_isa_irq_level hypercall"); - return -1; - } - - arg->domid = dom; - arg->isa_irq = isa_irq; - arg->level = level; - - rc = xencall2(xch->xcall, __HYPERVISOR_hvm_op, - HVMOP_set_isa_irq_level, - HYPERCALL_BUFFER_AS_ARG(arg)); - - xc_hypercall_buffer_free(xch, arg); - - return rc; -} - -int xc_hvm_set_pci_link_route( - xc_interface *xch, domid_t dom, uint8_t link, uint8_t isa_irq) -{ - DECLARE_HYPERCALL_BUFFER(struct xen_hvm_set_pci_link_route, arg); - int rc; - - arg = xc_hypercall_buffer_alloc(xch, arg, sizeof(*arg)); - if ( arg == NULL ) - { - PERROR("Could not allocate memory for xc_hvm_set_pci_link_route hypercall"); - return -1; - } - - arg->domid = dom; - arg->link = link; - arg->isa_irq = isa_irq; - - rc = xencall2(xch->xcall, __HYPERVISOR_hvm_op, - HVMOP_set_pci_link_route, - HYPERCALL_BUFFER_AS_ARG(arg)); - - xc_hypercall_buffer_free(xch, arg); - - return rc; -} - int xc_hvm_inject_msi( xc_interface *xch, domid_t dom, uint64_t addr, uint32_t data) { -- 2.39.5