[libvirt] [PATCH 0/2] Domain object lookup improvements
by Peter Krempa
This series finishes refactoring of domain object retrieval in the qemu driver
and improves error message if the domain object can't be found.
This is a prequel for changing of the locking model of virDomain objects.
Peter Krempa (2):
qemu: Refactor lookup of domain object
qemu: Report also domain name in error message when domain object
wasn't found
src/qemu/qemu_driver.c | 343 +++++++++++--------------------------------------
1 file changed, 75 insertions(+), 268 deletions(-)
--
1.8.1.5
11 years, 7 months
[libvirt] [PATCH v4 1/2] Add USB option capability
by Li Zhang
From: Li Zhang <zhlcindy(a)linux.vnet.ibm.com>
To avoid the collision for creating USB controllers in machine->init()
and -device xx command line, it needs to set usb=off to avoid one USB
controller created in machine->init(). So that libvirt can use -device
or -usb to create USB controller sucessfully.
So QEMU_CAPS_MACHINE_USB_OPT capability is added, and it is for QEMU
v1.3.0 onwards which supports USB option.
Signed-off-by: Li Zhang <zhlcindy(a)linux.vnet.ibm.com>
---
v4 -> v3:
* Add one new test case for USB option
* Rebase it with latest version
v3 -> v2:
* Set QEMU_CAPS_MACHINE_USB_OPT with help string
v2 -> v1:
* Rename QEMU_CAPS_USB_OPT to QEMU_CAPS_MACHINE_USB_OPT suggested by Daniel
* Corret QEMU version with v1.3.0 suggested by Daniel
src/qemu/qemu_capabilities.c | 9 +++++++++
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 6 ++++++
3 files changed, 16 insertions(+)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 50712b0..07cda1f 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -216,6 +216,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
"ipv6-migration", /* 135 */
"machine-opt",
+ "machine-usb-opt",
);
struct _virQEMUCaps {
@@ -1078,6 +1079,10 @@ virQEMUCapsComputeCmdFlags(const char *help,
if (strstr(help, "-machine"))
virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACHINE_OPT);
+ /* USB option is supported v1.3.0 onwards */
+ if (qemuCaps->version >= 1003000)
+ virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACHINE_USB_OPT);
+
/*
* Handling of -incoming arg with varying features
* -incoming tcp (kvm >= 79, qemu >= 0.10.0)
@@ -2435,6 +2440,10 @@ virQEMUCapsInitQMP(virQEMUCapsPtr qemuCaps,
virQEMUCapsInitQMPBasic(qemuCaps);
+ /* USB option is supported v1.3.0 onwards */
+ if (qemuCaps->version >= 1003000)
+ virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACHINE_USB_OPT);
+
if (!(archstr = qemuMonitorGetTargetArch(mon)))
goto cleanup;
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index b2dc588..9f24d6a 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -176,6 +176,7 @@ enum virQEMUCapsFlags {
QEMU_CAPS_SCSI_MEGASAS = 134, /* -device megasas */
QEMU_CAPS_IPV6_MIGRATION = 135, /* -incoming [::] */
QEMU_CAPS_MACHINE_OPT = 136, /* -machine xxxx*/
+ QEMU_CAPS_MACHINE_USB_OPT = 137, /* -machine xxx,usb=on/off */
QEMU_CAPS_LAST, /* this must always be the last item */
};
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 53caba5..d051056 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -5234,6 +5234,12 @@ qemuBuildMachineArgStr(virCommandPtr cmd,
virCommandAddArg(cmd, "-machine");
virBufferAdd(&buf, def->os.machine, -1);
+ /* To avoid the collision of creating USB controllers when calling
+ * machine->init in QEMU, it needs to set usb=off
+ */
+ if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_USB_OPT))
+ virBufferAsprintf(&buf, ",usb=off");
+
if (def->mem.dump_core) {
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DUMP_GUEST_CORE)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
--
1.8.1.4
11 years, 7 months
[libvirt] [PATCH 0/4] cleanup: Use bool type instead of bitfield - More
by Osier Yang
Which are missed with pattern ": 1" in the previous cleanup series.
After these, all the bitfield use under src/conf/ are destroyed, except
the ones which are required by the existing APIs.
Osier Yang (4):
cleanup: Change datatype of accel's members to boolean
cleanup: Change datatype of graphic's members to boolean
cleanup: Change datatype of usbdev->allow to boolean
cleanup: Change datatype of net->stp to boolean
src/conf/domain_conf.c | 44 ++++++++++++++++++++--------------------
src/conf/domain_conf.h | 20 +++++++++---------
src/conf/network_conf.c | 2 +-
src/conf/network_conf.h | 2 +-
src/parallels/parallels_driver.c | 4 ++--
src/qemu/qemu_command.c | 6 +++---
src/vbox/vbox_tmpl.c | 6 +++---
src/vmx/vmx.c | 4 ++--
src/xenxs/xen_sxpr.c | 4 ++--
src/xenxs/xen_xm.c | 2 +-
10 files changed, 47 insertions(+), 47 deletions(-)
--
1.8.1.4
11 years, 7 months
[libvirt] [RFC] Fix https://bugzilla.redhat.com/show_bug.cgi?id=461931
by harryxiyou
Hi Osier,
>From the actual bug messages like fowllowing
Actual results:
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/createvol.py", line 191,
in _async_vol_create
poolobj = self.vol.install(meter=meter)
File "/usr/lib/python2.5/site-packages/virtinst/Storage.py", line
893, in install
(self.name, str(e)))
RuntimeError: Couldn't create storage volume
'virt-stor-dir-bochs.img': '/usr/bin/qemu-img exited with non-zero
status 1 and signal 0'
It seems that libvirt calls command 'qemu-img' to create a volume of bochs but
it failed. So the problem may no matter with Libvirt itself. I am not
sure if qemu
supports to create a volume of bochs. Or something wrong with QEMU?
--
Thanks
Harry Wei
11 years, 7 months
[libvirt] [PATCH v6 00/11] Add support for guests with TPM passthrough device
by Stefan Berger
Hello!
The following set of patches adds support to libvirt for
adding a TPM passthrough device to a QEMU guest. Support for
this was recently accepted into QEMU.
This set of patches borrows a lot from the recently added support
for rng's.
Regards,
Stefan
---
v5->v6:
- followed tree to 039a3283
- simplified virTPMFindCancelPath in 4/11 following D. Berrange's comments
v4->v5:
- followed tree to b83b31d8
- addressed D. Berrange's comments on patches 4, 7, 10, 11 & nit on 6
- droped code to parse QEMU cmd line with TPM since this requires
editing of the resulting XML
v3->v4:
- followed tree to ce65b435
- followed comments on v3
v2->v3:
- followed tree to 03122d7b
- some nits I found fixed
v1->v2:
- Followed Daniel Berrange's comments
(except for the one on de-consolidating the JSON monitor code)
11 years, 7 months
[libvirt] [libvirt-designer v3] Add Vala API
by Zeeshan Ali (Khattak)
From: "Zeeshan Ali (Khattak)" <zeeshanak(a)gnome.org>
This is mostly (modified) copy&paste from libvirt-glib.
---
v3: Added .metadata file to correct init functions vapi.
Makefile.am | 2 +-
configure.ac | 37 +++++++++++++++++++++++++++++++++++++
vapi/LibvirtDesigner-1.0.metadata | 2 ++
vapi/Makefile.am | 28 ++++++++++++++++++++++++++++
vapi/libvirt-designer-1.0.deps | 2 ++
5 files changed, 70 insertions(+), 1 deletion(-)
create mode 100644 vapi/LibvirtDesigner-1.0.metadata
create mode 100644 vapi/Makefile.am
create mode 100644 vapi/libvirt-designer-1.0.deps
diff --git a/Makefile.am b/Makefile.am
index 7801b63..b928f83 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,5 @@
-SUBDIRS = libvirt-designer examples docs
+SUBDIRS = libvirt-designer vapi examples docs
ACLOCAL_AMFLAGS = -I m4
diff --git a/configure.ac b/configure.ac
index a9c5c34..c999826 100644
--- a/configure.ac
+++ b/configure.ac
@@ -71,10 +71,46 @@ if test "x$enable_examples" != "xno" ; then
fi
AM_CONDITIONAL(WITH_EXAMPLES, [test "x$enable_examples" = "xyes"])
+AC_ARG_ENABLE([vala],
+ AS_HELP_STRING([--enable-vala], [enable Vala binding generation]),
+ [], [enable_vala=check])
+if test "x$enable_introspection" = "xyes" ; then
+ if test "x$enable_vala" != "xno" ; then
+ AC_PATH_PROG(VAPIGEN, vapigen, no)
+ if test "x$VAPIGEN" == "xno"; then
+ if test "x$enable_vala" == "xcheck" ; then
+ enable_vala=no
+ else
+ AC_MSG_ERROR([Cannot find the "vapigen" binary in your PATH])
+ fi
+ fi
+ AC_SUBST(VAPIGEN)
+ fi
+ if test "x$enable_vala" != "xno" ; then
+ AC_MSG_CHECKING([$VAPIGEN support for --metadatadir])
+ $VAPIGEN --help | grep metadatadir 1>/dev/null 2>&1
+ if test $? != 0 ; then
+ if test "x$enable_vala" == "xcheck" ; then
+ enable_vala=no
+ AC_MSG_RESULT([no])
+ else
+ AC_MSG_ERROR(["vapigen" binary in your PATH is too old (< 0.13)])
+ fi
+ else
+ AC_MSG_RESULT([no])
+ fi
+ fi
+ if test "x$enable_vala" = "xcheck" ; then
+ enable_vala=yes
+ fi
+fi
+AM_CONDITIONAL([WITH_VALA], [test "x$enable_vala" = "xyes"])
+
AC_OUTPUT(Makefile
libvirt-designer/Makefile
libvirt-designer.spec
libvirt-designer-1.0.pc
+ vapi/Makefile
docs/Makefile
examples/Makefile)
@@ -83,6 +119,7 @@ AC_MSG_NOTICE([Configuration summary])
AC_MSG_NOTICE([=====================])
AC_MSG_NOTICE([])
AC_MSG_NOTICE([])
+AC_MSG_NOTICE([ Vala API: $enable_vala])
AC_MSG_NOTICE([ examples: $enable_examples])
AC_MSG_NOTICE([])
AC_MSG_NOTICE([])
diff --git a/vapi/LibvirtDesigner-1.0.metadata b/vapi/LibvirtDesigner-1.0.metadata
new file mode 100644
index 0000000..44f6726
--- /dev/null
+++ b/vapi/LibvirtDesigner-1.0.metadata
@@ -0,0 +1,2 @@
+init.argv unowned
+init_check.argv unowned
diff --git a/vapi/Makefile.am b/vapi/Makefile.am
new file mode 100644
index 0000000..6136216
--- /dev/null
+++ b/vapi/Makefile.am
@@ -0,0 +1,28 @@
+NULL =
+
+if WITH_VALA
+vapidir = $(datadir)/vala/vapi
+vapi_DATA = \
+ libvirt-designer-1.0.deps \
+ libvirt-designer-1.0.vapi \
+ $(NULL)
+
+libvirt-designer-1.0.vapi: $(top_builddir)/libvirt-designer/LibvirtDesigner-1.0.gir
+ $(AM_V_GEN)$(VAPIGEN) \
+ --vapidir=$(builddir) \
+ --pkg gio-2.0 \
+ --pkg libosinfo-1.0 \
+ --pkg libvirt-gconfig-1.0 \
+ --library libvirt-designer-1.0 \
+ --metadatadir=$(srcdir) \
+ $<
+endif
+
+CLEANFILES = \
+ libvirt-designer-1.0.vapi \
+ $(NULL)
+
+EXTRA_DIST = \
+ LibvirtDesigner-1.0.metadata \
+ libvirt-designer-1.0.deps \
+ $(NULL)
diff --git a/vapi/libvirt-designer-1.0.deps b/vapi/libvirt-designer-1.0.deps
new file mode 100644
index 0000000..ba30bfd
--- /dev/null
+++ b/vapi/libvirt-designer-1.0.deps
@@ -0,0 +1,2 @@
+libosinfo-1.0
+libvirt-gconfig-1.0
--
1.8.1.4
11 years, 7 months
[libvirt] Shared desktop: grant permission to start/stop/pause/resume guests only
by Thorsten Hesemeyer
Hi all,
for a shared desktop configuration, is there an option to grant the permission to start, stop, pause or resume the kvm guest only?
User roles in shared desktop environment configuration:
Power user - fully manage libvirt / KVM guests
Regular user - start, stop, pause and resume libvirt / KVM guests
In other words, we are looking for an opportunity to:
a) prevent regular users from modifying the libvirt / kvm guest but
b) enable them to start, stop, pause, resume libvirt / kvm guests
Currently I see two options:
a) No specific libvirt permission:
Regular users cannot start a virtual guest (without help).
If users forget to shutdown the kvm client and try to poweroff the Linux
system, they are asked for an admin/management user password to stop the
virtual machine. So they need help to shutdown their machine - not good.
b) Enable libvirt manage via policy kit:
"manage" permission can be granted via overruling the
default org.libvirt.unix.manage policy kit action.
The manage right enables to modify the libvirt / kvm guest, which is too much in our case.
Is there an option to grant the start/stop/pause/resume permission only? Does libvirt offer this kind of granularity?
Kind regards,
Thorsten Hesemeyer
11 years, 7 months
[libvirt] [PATCH v5 00/11] Add support for guests with TPM passthrough device
by Stefan Berger
Hello!
The following set of patches adds support to libvirt for
adding a TPM passthrough device to a QEMU guest. Support for
this was recently accepted into QEMU.
This set of patches borrows a lot from the recently added support
for rng's.
Regards,
Stefan
---
v4->v5:
- followed tree to b83b31d8
- addressed D. Berrange's comments on patches 4, 7, 10, 11 & nit on 6
- droped code to parse QEMU cmd line with TPM since this requires
editing of the resulting XML
v3->v4:
- followed tree to ce65b435
- followed comments on v3
v2->v3:
- followed tree to 03122d7b
- some nits I found fixed
v1->v2:
- Followed Daniel Berrange's comments
(except for the one on de-consolidating the JSON monitor code)
11 years, 7 months
[libvirt] [PATCH] conf: Allow for non-contiguous device boot orders
by Peter Krempa
This patch adds the ability to configure non-contiguous boot orders on boot
devices. This allows unplugging devices that have boot order specified without
breaking migration.
The new code now uses a slightly less memory efficient approach to store the
boot order fields in a hashtable instead of a bitmap.
---
src/conf/domain_conf.c | 66 ++++++++++++++++++++++++--------------------------
1 file changed, 32 insertions(+), 34 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index cc26f21..80a90e1 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -2876,7 +2876,7 @@ cleanup:
static int
virDomainDeviceBootParseXML(xmlNodePtr node,
int *bootIndex,
- virBitmapPtr bootMap)
+ virHashTablePtr bootHash)
{
char *order;
int boot;
@@ -2895,18 +2895,19 @@ virDomainDeviceBootParseXML(xmlNodePtr node,
goto cleanup;
}
- if (bootMap) {
- bool set;
- if (virBitmapGetBit(bootMap, boot - 1, &set) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("boot orders have to be contiguous and starting from 1"));
+ if (bootHash) {
+ if (virHashLookup(bootHash, order)) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("boot order '%s' used for more than one device"),
+ order);
goto cleanup;
- } else if (set) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("boot order %d used for more than one device"), boot);
+ }
+
+ if (virHashAddEntry(bootHash, order, (void *) 1) < 0) {
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Failed to add element to boot order hash"));
goto cleanup;
}
- ignore_value(virBitmapSetBit(bootMap, boot - 1));
}
*bootIndex = boot;
@@ -2922,7 +2923,7 @@ cleanup:
*/
static int
virDomainDeviceInfoParseXML(xmlNodePtr node,
- virBitmapPtr bootMap,
+ virHashTablePtr bootHash,
virDomainDeviceInfoPtr info,
unsigned int flags)
{
@@ -2973,7 +2974,7 @@ virDomainDeviceInfoParseXML(xmlNodePtr node,
}
if (boot) {
- if (virDomainDeviceBootParseXML(boot, &info->bootIndex, bootMap))
+ if (virDomainDeviceBootParseXML(boot, &info->bootIndex, bootHash))
goto cleanup;
}
@@ -3945,7 +3946,7 @@ static virDomainDiskDefPtr
virDomainDiskDefParseXML(virCapsPtr caps,
xmlNodePtr node,
xmlXPathContextPtr ctxt,
- virBitmapPtr bootMap,
+ virHashTablePtr bootHash,
virSecurityLabelDefPtr* vmSeclabels,
int nvmSeclabels,
unsigned int flags)
@@ -4660,7 +4661,7 @@ virDomainDiskDefParseXML(virCapsPtr caps,
}
def->info.type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI;
} else {
- if (virDomainDeviceInfoParseXML(node, bootMap, &def->info,
+ if (virDomainDeviceInfoParseXML(node, bootHash, &def->info,
flags | VIR_DOMAIN_XML_INTERNAL_ALLOW_BOOT) < 0)
goto error;
}
@@ -5318,7 +5319,7 @@ static virDomainNetDefPtr
virDomainNetDefParseXML(virCapsPtr caps,
xmlNodePtr node,
xmlXPathContextPtr ctxt,
- virBitmapPtr bootMap,
+ virHashTablePtr bootHash,
unsigned int flags)
{
virDomainNetDefPtr def;
@@ -5513,7 +5514,7 @@ virDomainNetDefParseXML(virCapsPtr caps,
}
def->info.type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI;
} else {
- if (virDomainDeviceInfoParseXML(node, bootMap, &def->info,
+ if (virDomainDeviceInfoParseXML(node, bootHash, &def->info,
flags | VIR_DOMAIN_XML_INTERNAL_ALLOW_BOOT
| VIR_DOMAIN_XML_INTERNAL_ALLOW_ROM) < 0)
goto error;
@@ -7988,7 +7989,7 @@ error:
static virDomainHostdevDefPtr
virDomainHostdevDefParseXML(const xmlNodePtr node,
xmlXPathContextPtr ctxt,
- virBitmapPtr bootMap,
+ virHashTablePtr bootHash,
unsigned int flags)
{
virDomainHostdevDefPtr def;
@@ -8029,7 +8030,7 @@ virDomainHostdevDefParseXML(const xmlNodePtr node,
}
if (def->info->type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) {
- if (virDomainDeviceInfoParseXML(node, bootMap, def->info,
+ if (virDomainDeviceInfoParseXML(node, bootHash, def->info,
flags | VIR_DOMAIN_XML_INTERNAL_ALLOW_BOOT
| VIR_DOMAIN_XML_INTERNAL_ALLOW_ROM) < 0)
goto error;
@@ -8063,7 +8064,7 @@ error:
static virDomainRedirdevDefPtr
virDomainRedirdevDefParseXML(const xmlNodePtr node,
- virBitmapPtr bootMap,
+ virHashTablePtr bootHash,
unsigned int flags)
{
xmlNodePtr cur;
@@ -8113,7 +8114,7 @@ virDomainRedirdevDefParseXML(const xmlNodePtr node,
def->source.chr.data.spicevmc = VIR_DOMAIN_CHR_SPICEVMC_USBREDIR;
}
- if (virDomainDeviceInfoParseXML(node, bootMap, &def->info,
+ if (virDomainDeviceInfoParseXML(node, bootHash, &def->info,
flags | VIR_DOMAIN_XML_INTERNAL_ALLOW_BOOT) < 0)
goto error;
@@ -9098,8 +9099,7 @@ static char *virDomainDefDefaultEmulator(virDomainDefPtr def,
static int
virDomainDefParseBootXML(xmlXPathContextPtr ctxt,
- virDomainDefPtr def,
- unsigned long *bootCount)
+ virDomainDefPtr def)
{
xmlNodePtr *nodes = NULL;
int i, n;
@@ -9196,7 +9196,6 @@ virDomainDefParseBootXML(xmlXPathContextPtr ctxt,
def->os.bios.rt_set = true;
}
- *bootCount = deviceBoot;
ret = 0;
cleanup:
@@ -9394,8 +9393,7 @@ virDomainDefParseXML(virCapsPtr caps,
virDomainDefPtr def;
unsigned long count;
bool uuid_generated = false;
- virBitmapPtr bootMap = NULL;
- unsigned long bootMapSize = 0;
+ virHashTablePtr bootHash = NULL;
xmlNodePtr cur;
bool usb_none = false;
bool usb_other = false;
@@ -10289,10 +10287,10 @@ virDomainDefParseXML(virCapsPtr caps,
}
if (STREQ(def->os.type, "hvm")) {
- if (virDomainDefParseBootXML(ctxt, def, &bootMapSize) < 0)
+ if (virDomainDefParseBootXML(ctxt, def) < 0)
+ goto error;
+ if (!(bootHash = virHashCreate(5, NULL)))
goto error;
- if (bootMapSize && !(bootMap = virBitmapNew(bootMapSize)))
- goto no_memory;
}
def->emulator = virXPathString("string(./devices/emulator[1])", ctxt);
@@ -10313,7 +10311,7 @@ virDomainDefParseXML(virCapsPtr caps,
virDomainDiskDefPtr disk = virDomainDiskDefParseXML(caps,
nodes[i],
ctxt,
- bootMap,
+ bootHash,
def->seclabels,
def->nseclabels,
flags);
@@ -10413,7 +10411,7 @@ virDomainDefParseXML(virCapsPtr caps,
virDomainNetDefPtr net = virDomainNetDefParseXML(caps,
nodes[i],
ctxt,
- bootMap,
+ bootHash,
flags);
if (!net)
goto error;
@@ -10796,7 +10794,7 @@ virDomainDefParseXML(virCapsPtr caps,
for (i = 0 ; i < n ; i++) {
virDomainHostdevDefPtr hostdev;
- hostdev = virDomainHostdevDefParseXML(nodes[i], ctxt, bootMap, flags);
+ hostdev = virDomainHostdevDefParseXML(nodes[i], ctxt, bootHash, flags);
if (!hostdev)
goto error;
@@ -10912,7 +10910,7 @@ virDomainDefParseXML(virCapsPtr caps,
goto no_memory;
for (i = 0 ; i < n ; i++) {
virDomainRedirdevDefPtr redirdev = virDomainRedirdevDefParseXML(nodes[i],
- bootMap,
+ bootHash,
flags);
if (!redirdev)
goto error;
@@ -11029,7 +11027,7 @@ virDomainDefParseXML(virCapsPtr caps,
if (virDomainDefAddImplicitControllers(def) < 0)
goto error;
- virBitmapFree(bootMap);
+ virHashFree(bootHash);
return def;
@@ -11038,7 +11036,7 @@ no_memory:
error:
VIR_FREE(tmp);
VIR_FREE(nodes);
- virBitmapFree(bootMap);
+ virHashFree(bootHash);
virDomainDefFree(def);
return NULL;
}
--
1.8.1.5
11 years, 7 months
[libvirt] libvirt libxl driver leaking libxl_event's?
by Ian Campbell
Hi Jim,
I don't see any calls to libxl_event_dispose in libvirt.git,
libxl_event.h says in relation to the event_occurs callback:
* event becomes owned by the application and must be freed, either
* by event_occurs or later.
so does this mean the memory referenced by event is leaked by
libxlEventHandler?
libxl_event only contains dynamic allocations for
LIBXL_EVENT_TYPE_DISK_EJECT which you don't seem to register for so the
issue is probably benign but worth noting I think.
Ian.
11 years, 7 months