Hello community, here is the log from the commit of package libvirt for openSUSE:11.3 checked in at Mon Feb 21 16:47:14 CET 2011.
-------- --- old-versions/11.3/UPDATES/all/libvirt/libvirt.changes 2010-07-28 17:23:37.000000000 +0200 +++ 11.3/libvirt/libvirt.changes 2011-01-18 23:46:24.000000000 +0100 @@ -1,0 +2,38 @@ +Tue Jan 18 14:57:18 MST 2011 - [email protected] + +- Add support for specifying Hardware Assisted Paging (HAP) in + libvirt domain XML. + 48a5dccd-hap1.patch + 04197350-hap2.patch + af521a01-hap3.patch + 79f56c66-hap4.patch + 094c6f4a-hap-fix.patch + bnc#659665 + +------------------------------------------------------------------- +Wed Dec 22 14:38:29 MST 2010 - [email protected] + +- Fix VNC port reservation race in qemu driver + c58b1056-init-bitmap-size.patch + bnc#659431 + +------------------------------------------------------------------- +Wed Dec 22 14:35:33 MST 2010 - [email protected] + +- Disable building openvz driver + +------------------------------------------------------------------- +Thu Sep 23 02:34:28 MDT 2010 - [email protected] + +- Fix CDROM media change for Xen PV domains + modified xen-pv-cdrom.patch + bnc#636231 + +------------------------------------------------------------------- +Tue Aug 10 19:16:05 MDT 2010 - [email protected] + +- qemu: Report cmdline output if VM dies early + 83be6403-qemu-early-error.patch + bnc#625333 + +------------------------------------------------------------------- calling whatdependson for 11.3-i586 New: ---- 04197350-hap2.patch 094c6f4a-hap-fix.patch 48a5dccd-hap1.patch 79f56c66-hap4.patch 83be6403-qemu-early-error.patch af521a01-hap3.patch c58b1056-init-bitmap-size.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libvirt.spec ++++++ --- /var/tmp/diff_new_pack.RtEiSx/_old 2011-02-21 16:43:58.000000000 +0100 +++ /var/tmp/diff_new_pack.RtEiSx/_new 2011-02-21 16:43:58.000000000 +0100 @@ -1,7 +1,7 @@ # -# spec file for package libvirt (Version 0.8.1) +# spec file for package libvirt # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -21,8 +21,8 @@ %define with_xen 1 %define with_qemu 1 %define with_lxc 1 -%define with_openvz 1 %define with_vbox 1 +%define with_openvz 0 %define with_uml 0 %define with_one 0 # hypervisor drivers that use a native remote protocol @@ -117,7 +117,7 @@ Group: Development/Libraries/C and C++ AutoReqProv: yes Version: 0.8.1 -Release: 4.<RELEASE2> +Release: 4.<RELEASE4> Summary: A C toolkit to interract with the virtualization capabilities of Linux # The client side, i.e. shared libs and virsh are in a subpackage Requires: %{name}-client = %{version}-%{release} @@ -161,6 +161,13 @@ Patch17: CVE-2010-223x-0010.patch Patch18: CVE-2010-2242-nat.patch Patch19: 9749d94f-qemu-help.patch +Patch20: 83be6403-qemu-early-error.patch +Patch21: c58b1056-init-bitmap-size.patch +Patch22: 48a5dccd-hap1.patch +Patch23: 04197350-hap2.patch +Patch24: af521a01-hap3.patch +Patch25: 79f56c66-hap4.patch +Patch26: 094c6f4a-hap-fix.patch # Need to go upstream Patch100: xen-name-for-devid.patch Patch102: clone.patch @@ -293,6 +300,13 @@ %patch17 -p1 %patch18 -p1 %patch19 -p1 +%patch20 -p1 +%patch21 -p1 +%patch22 -p1 +%patch23 -p1 +%patch24 -p1 +%patch25 -p1 +%patch26 -p1 %patch100 -p1 %patch102 %patch103 -p1 ++++++ 04197350-hap2.patch ++++++ commit 041973504f715bcff7de3b17cd258617244b79c4 Author: Jim Fehlig <[email protected]> Date: Wed Jan 5 15:16:57 2011 -0700 Add support for HAP feature to xen drivers xen-unstable c/s 16931 introduced a per-domain setting for hvm guests to enable/disable hardware assisted paging. If disabled, software techniques such as shadow page tables are used. If enabled, and the feature exists in underlying hardware, hardware support for paging is used. This provides implementation for mapping HAP setting to/from domxml/native formats in xen drivers. Index: libvirt-0.8.1/src/xen/xend_internal.c =================================================================== --- libvirt-0.8.1.orig/src/xen/xend_internal.c +++ libvirt-0.8.1/src/xen/xend_internal.c @@ -2445,6 +2445,8 @@ xenDaemonParseSxpr(virConnectPtr conn, def->features |= (1 << VIR_DOMAIN_FEATURE_APIC); if (sexpr_int(root, "domain/image/hvm/pae")) def->features |= (1 << VIR_DOMAIN_FEATURE_PAE); + if (sexpr_int(root, "domain/image/hvm/hap")) + def->features |= (1 << VIR_DOMAIN_FEATURE_HAP); /* Old XenD only allows localtime here for HVM */ if (sexpr_int(root, "domain/image/hvm/localtime")) @@ -6027,6 +6029,8 @@ xenDaemonFormatSxpr(virConnectPtr conn, virBufferAddLit(&buf, "(apic 1)"); if (def->features & (1 << VIR_DOMAIN_FEATURE_PAE)) virBufferAddLit(&buf, "(pae 1)"); + if (def->features & (1 << VIR_DOMAIN_FEATURE_HAP)) + virBufferAddLit(&buf, "(hap 1)"); virBufferAddLit(&buf, "(usb 1)"); Index: libvirt-0.8.1/src/xen/xm_internal.c =================================================================== --- libvirt-0.8.1.orig/src/xen/xm_internal.c +++ libvirt-0.8.1/src/xen/xm_internal.c @@ -824,6 +824,10 @@ xenXMDomainConfigParse(virConnectPtr con goto cleanup; else if (val) def->features |= (1 << VIR_DOMAIN_FEATURE_APIC); + if (xenXMConfigGetBool(conf, "hap", &val, 0) < 0) + goto cleanup; + else if (val) + def->features |= (1 << VIR_DOMAIN_FEATURE_HAP); } if (xenXMConfigGetBool(conf, "localtime", &vmlocaltime, 0) < 0) goto cleanup; @@ -2304,6 +2308,10 @@ virConfPtr xenXMDomainConfigFormat(virCo (1 << VIR_DOMAIN_FEATURE_APIC)) ? 1 : 0) < 0) goto no_memory; + if (xenXMConfigSetInt(conf, "hap", + (def->features & + (1 << VIR_DOMAIN_FEATURE_HAP)) ? 1 : 0) < 0) + goto no_memory; if (def->clock.offset == VIR_DOMAIN_CLOCK_OFFSET_LOCALTIME) { if (def->clock.data.timezone) { Index: libvirt-0.8.1/src/xenapi/xenapi_driver.c =================================================================== --- libvirt-0.8.1.orig/src/xenapi/xenapi_driver.c +++ libvirt-0.8.1/src/xenapi/xenapi_driver.c @@ -1311,6 +1311,8 @@ xenapiDomainDumpXML (virDomainPtr dom, i defPtr->features = defPtr->features | (1<<VIR_DOMAIN_FEATURE_APIC); else if (STREQ(result->contents[i].key, "pae")) defPtr->features = defPtr->features | (1<<VIR_DOMAIN_FEATURE_PAE); + else if (STREQ(result->contents[i].key, "hap")) + defPtr->features = defPtr->features | (1<<VIR_DOMAIN_FEATURE_HAP); } } xen_string_string_map_free(result); Index: libvirt-0.8.1/src/xenapi/xenapi_utils.c =================================================================== --- libvirt-0.8.1.orig/src/xenapi/xenapi_utils.c +++ libvirt-0.8.1/src/xenapi/xenapi_utils.c @@ -521,6 +521,8 @@ createVMRecordFromXml (virConnectPtr con allocStringMap(&strings, (char *)"apic", (char *)"true"); if (def->features & (1 << VIR_DOMAIN_FEATURE_PAE)) allocStringMap(&strings, (char *)"pae", (char *)"true"); + if (def->features & (1 << VIR_DOMAIN_FEATURE_HAP)) + allocStringMap(&strings, (char *)"hap", (char *)"true"); } if (strings != NULL) (*record)->platform = strings; ++++++ 094c6f4a-hap-fix.patch ++++++ commit 094c6f4a24165d2d07f64bbd70243b3306a34d5b Author: Jim Fehlig <[email protected]> Date: Fri Jan 14 11:12:46 2011 -0700 Fix 'make check' after commit 04197350 I broke 'make check' with commit 04197350 by unconditionally emitting 'hap=' in xen xm driver. Only emit 'hap=' if xendConfigVersion >= 3. I've tested sending 'hap=' to a Xen 3.2 machine without support for hap setting and verified that xend silently drops the unrecognized setting. Index: libvirt-0.8.1/src/xen/xm_internal.c =================================================================== --- libvirt-0.8.1.orig/src/xen/xm_internal.c +++ libvirt-0.8.1/src/xen/xm_internal.c @@ -2308,10 +2308,11 @@ virConfPtr xenXMDomainConfigFormat(virCo (1 << VIR_DOMAIN_FEATURE_APIC)) ? 1 : 0) < 0) goto no_memory; - if (xenXMConfigSetInt(conf, "hap", - (def->features & - (1 << VIR_DOMAIN_FEATURE_HAP)) ? 1 : 0) < 0) - goto no_memory; + if (priv->xendConfigVersion >= 3) + if (xenXMConfigSetInt(conf, "hap", + (def->features & + (1 << VIR_DOMAIN_FEATURE_HAP)) ? 1 : 0) < 0) + goto no_memory; if (def->clock.offset == VIR_DOMAIN_CLOCK_OFFSET_LOCALTIME) { if (def->clock.data.timezone) { ++++++ 48a5dccd-hap1.patch ++++++ commit 48a5dccda905b5c6e8a02a37c093c42a9ef4e350 Author: Jim Fehlig <[email protected]> Date: Wed Jan 5 14:56:48 2011 -0700 Add HAP to virDomainFeature enum Extend the virDomainFeature enumeration to include HAP (hardware assisted paging) feature. Hardware features such as Extended Page Table and Nested Page Table augment hypervisor software techniques such as shadow page table. Adding HAP to the virDomainFeature enumeration allows users to select between hardware and software memory management mechanisms for their guests. Index: libvirt-0.8.1/src/conf/domain_conf.c =================================================================== --- libvirt-0.8.1.orig/src/conf/domain_conf.c +++ libvirt-0.8.1/src/conf/domain_conf.c @@ -75,7 +75,8 @@ VIR_ENUM_IMPL(virDomainBoot, VIR_DOMAIN_ VIR_ENUM_IMPL(virDomainFeature, VIR_DOMAIN_FEATURE_LAST, "acpi", "apic", - "pae") + "pae", + "hap") VIR_ENUM_IMPL(virDomainLifecycle, VIR_DOMAIN_LIFECYCLE_LAST, "destroy", Index: libvirt-0.8.1/src/conf/domain_conf.h =================================================================== --- libvirt-0.8.1.orig/src/conf/domain_conf.h +++ libvirt-0.8.1/src/conf/domain_conf.h @@ -601,6 +601,7 @@ enum virDomainFeature { VIR_DOMAIN_FEATURE_ACPI, VIR_DOMAIN_FEATURE_APIC, VIR_DOMAIN_FEATURE_PAE, + VIR_DOMAIN_FEATURE_HAP, VIR_DOMAIN_FEATURE_LAST }; ++++++ 79f56c66-hap4.patch ++++++ commit 79f56c669f0f4d554cec3137d0a6aadf7c5f2bec Author: Jim Fehlig <[email protected]> Date: Wed Jan 5 16:07:54 2011 -0700 Document HAP domain feature Add HAP feature to schema and documentation. Index: libvirt-0.8.1/docs/formatdomain.html.in =================================================================== --- libvirt-0.8.1.orig/docs/formatdomain.html.in +++ libvirt-0.8.1/docs/formatdomain.html.in @@ -363,6 +363,7 @@ <pae/> <acpi/> <apic/> + <hap/> </features> ...</pre> @@ -382,6 +383,10 @@ <dd>ACPI is useful for power management, for example, with KVM guests it is required for graceful shutdown to work. </dd> + <dt><code>hap</code></dt> + <dd>Enable use of Hardware Assisted Paging if available in + the hardware. + </dd> </dl> <h3><a name="elementsTime">Time keeping</a></h3> Index: libvirt-0.8.1/docs/schemas/domain.rng =================================================================== --- libvirt-0.8.1.orig/docs/schemas/domain.rng +++ libvirt-0.8.1/docs/schemas/domain.rng @@ -1462,7 +1462,7 @@ </element> </define> <!-- - A set of optional features: PAE, APIC and ACPI support + A set of optional features: PAE, APIC, ACPI, and HAP support --> <define name="features"> <optional> @@ -1483,6 +1483,11 @@ <empty/> </element> </optional> + <optional> + <element name="hap"> + <empty/> + </element> + </optional> </interleave> </element> </optional> ++++++ 83be6403-qemu-early-error.patch ++++++ commit 83be64034a0b530c904ceb4fd1ed1c10b5cdf4bf Author: Cole Robinson <[email protected]> Date: Mon May 17 10:15:53 2010 -0400 qemu: Report cmdline output if VM dies early qemuReadLogOutput early VM death detection is racy and won't always work. Startup then errors when connecting to the VM monitor. This won't report the emulator cmdline output which is typically the most useful diagnostic. Check if the VM has died at the very end of the monitor connection step, and if so, report the cmdline output. See also: https://bugzilla.redhat.com/show_bug.cgi?id=581381 Index: libvirt-0.8.1/src/qemu/qemu_driver.c =================================================================== --- libvirt-0.8.1.orig/src/qemu/qemu_driver.c +++ libvirt-0.8.1/src/qemu/qemu_driver.c @@ -2053,39 +2053,47 @@ static void qemudFreePtyPath(void *paylo VIR_FREE(payload); } +static void +qemuReadLogFD(int logfd, char *buf, int maxlen, int off) +{ + int ret; + char *tmpbuf = buf + off; + + ret = saferead(logfd, tmpbuf, maxlen - off - 1); + if (ret < 0) { + ret = 0; + } + + tmpbuf[ret] = '\0'; +} + static int qemudWaitForMonitor(struct qemud_driver* driver, virDomainObjPtr vm, off_t pos) { - char buf[4096]; /* Plenty of space to get startup greeting */ + char buf[4096] = ""; /* Plenty of space to get startup greeting */ int logfd; int ret = -1; + virHashTablePtr paths = NULL; - if ((logfd = qemudLogReadFD(driver->logDir, vm->def->name, pos)) - < 0) + if ((logfd = qemudLogReadFD(driver->logDir, vm->def->name, pos)) < 0) return -1; - ret = qemudReadLogOutput(vm, logfd, buf, sizeof(buf), - qemudFindCharDevicePTYs, - "console", 30); - if (close(logfd) < 0) { - char ebuf[4096]; - VIR_WARN(_("Unable to close logfile: %s"), - virStrerror(errno, ebuf, sizeof ebuf)); - } - - if (ret < 0) - return -1; + if (qemudReadLogOutput(vm, logfd, buf, sizeof(buf), + qemudFindCharDevicePTYs, + "console", 30) < 0) + goto closelog; VIR_DEBUG("Connect monitor to %p '%s'", vm, vm->def->name); - if (qemuConnectMonitor(driver, vm) < 0) - return -1; + if (qemuConnectMonitor(driver, vm) < 0) { + goto cleanup; + } /* Try to get the pty path mappings again via the monitor. This is much more * reliable if it's available. * Note that the monitor itself can be on a pty, so we still need to try the * log output method. */ - virHashTablePtr paths = virHashCreate(0); + paths = virHashCreate(0); if (paths == NULL) { virReportOOMError(); goto cleanup; @@ -2106,6 +2114,23 @@ cleanup: virHashFree(paths, qemudFreePtyPath); } + if (kill(vm->pid, 0) == -1 && errno == ESRCH) { + /* VM is dead, any other error raised in the interim is probably + * not as important as the qemu cmdline output */ + qemuReadLogFD(logfd, buf, sizeof(buf), strlen(buf)); + qemuReportError(VIR_ERR_INTERNAL_ERROR, + _("process exited while connecting to monitor: %s"), + buf); + ret = -1; + } + +closelog: + if (close(logfd) < 0) { + char ebuf[4096]; + VIR_WARN(_("Unable to close logfile: %s"), + virStrerror(errno, ebuf, sizeof ebuf)); + } + return ret; } ++++++ af521a01-hap3.patch ++++++ commit af521a0182a0d6867796c65b1b0cd83fb14032a9 Author: Jim Fehlig <[email protected]> Date: Wed Jan 5 15:20:01 2011 -0700 Add HAP to xen hypervisor capabilities xen-unstable c/s 16931 introduced a per-domain setting for hvm guests to enable/disable hardware assisted paging. If disabled, software techniques such as shadow page tables are used. If enabled, and the feature exists in underlying hardware, hardware support for paging is used. Xen does not provide a mechanism to discover the HAP capability, so we advertise its availability for hvm guests on Xen >= 3.3. Index: libvirt-0.8.1/src/xen/xen_hypervisor.c =================================================================== --- libvirt-0.8.1.orig/src/xen/xen_hypervisor.c +++ libvirt-0.8.1/src/xen/xen_hypervisor.c @@ -2339,6 +2339,16 @@ xenHypervisorBuildCapabilities(virConnec hv_minor > 0 ? 0 : 1)) == NULL) goto no_memory; + + /* Xen 3.3.x and beyond supports enabling/disabling + * hardware assisted paging. Default is off. + */ + if ((hv_major == 3 && hv_minor >= 3) || (hv_major > 3)) + if (virCapabilitiesAddGuestFeature(guest, + "hap", + 0, + 1) == NULL) + goto no_memory; } } ++++++ c58b1056-init-bitmap-size.patch ++++++ commit c58b105625acf3404d75376b070903139e3346a3 Author: Jim Fehlig <[email protected]> Date: Wed Dec 22 11:15:32 2010 -0700 Set bitmap size when allocating a bitmap I began noticing a race when reserving VNC ports as described here https://www.redhat.com/archives/libvir-list/2010-November/msg00379.html Turns out that we were not initializing the size field of bitmap struct when allocating the bitmap. This subsequently caused virBitmapSetBit() to fail since bitmap->size is 0, hence we never actually reserved the port. diff --git a/src/util/bitmap.c b/src/util/bitmap.c index 1b0c9da..9741668 100644 --- a/src/util/bitmap.c +++ b/src/util/bitmap.c @@ -73,6 +73,7 @@ virBitmapPtr virBitmapAlloc(size_t size) return NULL; } + bitmap->size = size; return bitmap; } ++++++ xen-name-for-devid.patch ++++++ --- /var/tmp/diff_new_pack.RtEiSx/_old 2011-02-21 16:43:59.000000000 +0100 +++ /var/tmp/diff_new_pack.RtEiSx/_new 2011-02-21 16:43:59.000000000 +0100 @@ -25,7 +25,7 @@ virDomainDeviceDefPtr dev, char *class, char *ref, -@@ -4178,7 +4179,7 @@ xenDaemonAttachDeviceFlags(virDomainPtr +@@ -4180,7 +4181,7 @@ xenDaemonAttachDeviceFlags(virDomainPtr sexpr = virBufferContentAndReset(&buf); @@ -34,7 +34,7 @@ /* device doesn't exist, define it */ ret = xend_op(domain->conn, domain->name, "op", "device_create", "config", sexpr, NULL); -@@ -4295,7 +4296,7 @@ xenDaemonUpdateDeviceFlags(virDomainPtr +@@ -4297,7 +4298,7 @@ xenDaemonUpdateDeviceFlags(virDomainPtr sexpr = virBufferContentAndReset(&buf); @@ -43,7 +43,7 @@ virXendError(VIR_ERR_OPERATION_INVALID, "%s", _("requested device does not exist")); goto cleanup; -@@ -4387,7 +4388,7 @@ xenDaemonDetachDeviceFlags(virDomainPtr +@@ -4389,7 +4390,7 @@ xenDaemonDetachDeviceFlags(virDomainPtr def, xml, VIR_DOMAIN_XML_INACTIVE))) goto cleanup; @@ -52,7 +52,7 @@ goto cleanup; if (dev->type == VIR_DOMAIN_DEVICE_HOSTDEV) { -@@ -6135,6 +6136,7 @@ error: +@@ -6139,6 +6140,7 @@ error: */ static int virDomainXMLDevID(virDomainPtr domain, @@ -60,7 +60,7 @@ virDomainDeviceDefPtr dev, char *class, char *ref, -@@ -6143,27 +6145,33 @@ virDomainXMLDevID(virDomainPtr domain, +@@ -6147,27 +6149,33 @@ virDomainXMLDevID(virDomainPtr domain, xenUnifiedPrivatePtr priv = domain->conn->privateData; char *xref; char *tmp; ++++++ xen-pv-cdrom.patch ++++++ --- /var/tmp/diff_new_pack.RtEiSx/_old 2011-02-21 16:43:59.000000000 +0100 +++ /var/tmp/diff_new_pack.RtEiSx/_new 2011-02-21 16:43:59.000000000 +0100 @@ -2,15 +2,11 @@ =================================================================== --- libvirt-0.8.1.orig/src/xen/xend_internal.c +++ libvirt-0.8.1/src/xen/xend_internal.c -@@ -5545,7 +5545,10 @@ xenDaemonFormatSxprDisk(virConnectPtr co - } else if (def->device == VIR_DOMAIN_DISK_DEVICE_CDROM) { - virBufferVSprintf(buf, "(dev '%s:cdrom')", def->dst); - } else { -- virBufferVSprintf(buf, "(dev '%s')", def->dst); -+ if (def->device == VIR_DOMAIN_DISK_DEVICE_CDROM) -+ virBufferVSprintf(buf, "(dev '%s:cdrom')", def->dst); -+ else -+ virBufferVSprintf(buf, "(dev '%s')", def->dst); - } - - if (def->src) { +@@ -1640,7 +1640,6 @@ xenDaemonParseSxprDisks(virDomainDefPtr + /* There is a case without the uname to the CD-ROM device */ + offset = strchr(dst, ':'); + if (!offset || +- !hvm || + STRNEQ(offset, ":cdrom")) { + virXendError(VIR_ERR_INTERNAL_ERROR, + "%s", _("domain information incomplete, vbd has no src")); ++++++ xend-disk-order.patch ++++++ --- /var/tmp/diff_new_pack.RtEiSx/_old 2011-02-21 16:43:59.000000000 +0100 +++ /var/tmp/diff_new_pack.RtEiSx/_new 2011-02-21 16:43:59.000000000 +0100 @@ -27,7 +27,7 @@ } if (VIR_ALLOC(disk) < 0) -@@ -1754,7 +1758,12 @@ xenDaemonParseSxprDisks(virDomainDefPtr +@@ -1753,7 +1757,12 @@ xenDaemonParseSxprDisks(virDomainDefPtr if (VIR_REALLOC_N(def->disks, def->ndisks+1) < 0) goto no_memory; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
