[libvirt PATCH 0/4] libxl: clean up more LIBXL_HAVE constants

We still were checking for some that were introduced before Xen 4.9 Ján Tomko (4): libxl: assume LIBXL_HAVE_DEVICE_BACKEND_DOMNAME libxl: remove LIBXL_ATTR_UNUSED libxl: assume LIBXL_HAVE_SRM_V2 libxl: assume LIBXL_HAVE_PVUSB src/libxl/libxl_conf.c | 20 ++------------------ src/libxl/libxl_conf.h | 13 +------------ 2 files changed, 3 insertions(+), 30 deletions(-) -- 2.34.1

Introduced in 4.3.0 by xen commit: commit ef496b81f0336f09968a318e7f81151dd4f5a0cc libxl: postpone backend name resolution Signed-off-by: Ján Tomko <jtomko@redhat.com> --- src/libxl/libxl_conf.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index 5d87b999f2..f062f8e958 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -1191,16 +1191,8 @@ libxlMakeDisk(virDomainDiskDef *l_disk, libxl_device_disk *x_disk) return -1; } - if (l_disk->domain_name) { -#ifdef LIBXL_HAVE_DEVICE_BACKEND_DOMNAME + if (l_disk->domain_name) x_disk->backend_domname = g_strdup(l_disk->domain_name); -#else - virReportError(VIR_ERR_XML_DETAIL, "%s", - _("this version of libxenlight does not " - "support backend domain name")); - return -1; -#endif - } return 0; } @@ -1408,16 +1400,8 @@ libxlMakeNic(virDomainDef *def, goto cleanup; } - if (l_nic->domain_name) { -#ifdef LIBXL_HAVE_DEVICE_BACKEND_DOMNAME + if (l_nic->domain_name) x_nic->backend_domname = g_strdup(l_nic->domain_name); -#else - virReportError(VIR_ERR_XML_DETAIL, "%s", - _("this version of libxenlight does not " - "support backend domain name")); - goto cleanup; -#endif - } /* * Set bandwidth. -- 2.34.1

Unused as of: commit 446d09149802677546449fa2dd253f3ebce377ac libxl: pass driver config to libxlMakeDomBuildInfo All other usage of LIBXL_HAVE_DEVICE_CHANNEL was removed by: commit e58004d70aceb560fba64803e566b8be3ef93940 Xen: Remove unneeded LIBXL_HAVE_* ifdefs Signed-off-by: Ján Tomko <jtomko@redhat.com> --- src/libxl/libxl_conf.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/libxl/libxl_conf.h b/src/libxl/libxl_conf.h index f833daf669..b74fedc2c8 100644 --- a/src/libxl/libxl_conf.h +++ b/src/libxl/libxl_conf.h @@ -220,11 +220,6 @@ libxlMakeUSB(virDomainHostdevDef *hostdev, libxl_device_usbdev *usbdev); virDomainXMLOption * libxlCreateXMLConf(libxlDriverPrivate *driver); -#ifdef LIBXL_HAVE_DEVICE_CHANNEL -# define LIBXL_ATTR_UNUSED -#else -# define LIBXL_ATTR_UNUSED G_GNUC_UNUSED -#endif int libxlBuildDomainConfig(virPortAllocatorRange *graphicsports, virDomainDef *def, -- 2.34.1

Introduced in Xen 4.6.0 by: commit 3a9ace0147d48af49ffd34628f9510f248f2f588 tools/libxc+libxl+xl: Restore v2 streams Signed-off-by: Ján Tomko <jtomko@redhat.com> --- src/libxl/libxl_conf.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/libxl/libxl_conf.h b/src/libxl/libxl_conf.h index b74fedc2c8..e0662d90b3 100644 --- a/src/libxl/libxl_conf.h +++ b/src/libxl/libxl_conf.h @@ -149,11 +149,7 @@ struct _libxlDriverPrivate { }; #define LIBXL_SAVE_MAGIC "libvirt-xml\n \0 \r" -#ifdef LIBXL_HAVE_SRM_V2 -# define LIBXL_SAVE_VERSION 2 -#else -# define LIBXL_SAVE_VERSION 1 -#endif +#define LIBXL_SAVE_VERSION 2 typedef struct _libxlSavefileHeader libxlSavefileHeader; struct _libxlSavefileHeader { -- 2.34.1

Introduced in Xen 4.7 by commit: commit bf7628f087b212052a0e9f024044b2790c33f820 libxl: add pvusb API Signed-off-by: Ján Tomko <jtomko@redhat.com> --- src/libxl/libxl_conf.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/libxl/libxl_conf.h b/src/libxl/libxl_conf.h index e0662d90b3..b74f455b69 100644 --- a/src/libxl/libxl_conf.h +++ b/src/libxl/libxl_conf.h @@ -204,14 +204,12 @@ libxlMakeVfb(virPortAllocatorRange *graphicsports, int libxlMakePCI(virDomainHostdevDef *hostdev, libxl_device_pci *pcidev); -#ifdef LIBXL_HAVE_PVUSB int libxlMakeUSBController(virDomainControllerDef *controller, libxl_device_usbctrl *usbctrl); int libxlMakeUSB(virDomainHostdevDef *hostdev, libxl_device_usbdev *usbdev); -#endif virDomainXMLOption * libxlCreateXMLConf(libxlDriverPrivate *driver); -- 2.34.1

On 1/28/22 20:19, Ján Tomko wrote:
We still were checking for some that were introduced before Xen 4.9
Ján Tomko (4): libxl: assume LIBXL_HAVE_DEVICE_BACKEND_DOMNAME libxl: remove LIBXL_ATTR_UNUSED libxl: assume LIBXL_HAVE_SRM_V2 libxl: assume LIBXL_HAVE_PVUSB
src/libxl/libxl_conf.c | 20 ++------------------ src/libxl/libxl_conf.h | 13 +------------ 2 files changed, 3 insertions(+), 30 deletions(-)
Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Michal
participants (2)
-
Ján Tomko
-
Michal Prívozník