Accepting request 503752 from Virtualization

Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/503752
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libvirt?expand=0&rev=230
This commit is contained in:
Dominique Leuenberger 2017-06-20 08:58:43 +00:00 committed by Git OBS Bridge
commit 09d14da8f4
48 changed files with 394 additions and 2922 deletions

View File

@ -1,686 +0,0 @@
commit 04028a9db9f2657e8d57d1e4705073c908aa248c
Author: Ján Tomko <jtomko@redhat.com>
Date: Wed May 3 15:23:12 2017 +0200
qemu: format intel-iommu,intremap on the command line
https://bugzilla.redhat.com/show_bug.cgi?id=1427005
Index: libvirt-3.3.0/src/qemu/qemu_capabilities.c
===================================================================
--- libvirt-3.3.0.orig/src/qemu/qemu_capabilities.c
+++ libvirt-3.3.0/src/qemu/qemu_capabilities.c
@@ -369,6 +369,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAS
"kernel-irqchip", /* 255 */
"kernel-irqchip.split",
+ "intel-iommu.intremap",
);
@@ -1720,6 +1721,10 @@ static struct virQEMUCapsStringFlags vir
{ "p3", QEMU_CAPS_NEC_USB_XHCI_PORTS },
};
+static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsIntelIOMMU[] = {
+ { "intremap", QEMU_CAPS_INTEL_IOMMU_INTREMAP },
+};
+
/* see documentation for virQEMUCapsQMPSchemaGetByPath for the query format */
static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] = {
{ "blockdev-add/arg-type/options/+gluster/debug-level", QEMU_CAPS_GLUSTER_DEBUG_LEVEL},
@@ -1827,6 +1832,9 @@ static struct virQEMUCapsObjectTypeProps
{ "nec-usb-xhci", virQEMUCapsObjectPropsUSBNECXHCI,
ARRAY_CARDINALITY(virQEMUCapsObjectPropsUSBNECXHCI),
-1 },
+ { "intel-iommu", virQEMUCapsObjectPropsIntelIOMMU,
+ ARRAY_CARDINALITY(virQEMUCapsObjectPropsIntelIOMMU),
+ QEMU_CAPS_DEVICE_INTEL_IOMMU},
};
struct virQEMUCapsPropTypeObjects {
Index: libvirt-3.3.0/src/qemu/qemu_capabilities.h
===================================================================
--- libvirt-3.3.0.orig/src/qemu/qemu_capabilities.h
+++ libvirt-3.3.0/src/qemu/qemu_capabilities.h
@@ -407,6 +407,7 @@ typedef enum {
/* 255 */
QEMU_CAPS_MACHINE_KERNEL_IRQCHIP, /* -machine kernel_irqchip */
QEMU_CAPS_MACHINE_KERNEL_IRQCHIP_SPLIT, /* -machine kernel_irqchip=split */
+ QEMU_CAPS_INTEL_IOMMU_INTREMAP, /* intel-iommu.intremap */
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;
Index: libvirt-3.3.0/src/qemu/qemu_command.c
===================================================================
--- libvirt-3.3.0.orig/src/qemu/qemu_command.c
+++ libvirt-3.3.0/src/qemu/qemu_command.c
@@ -6685,6 +6685,20 @@ qemuBuildIOMMUCommandLine(virCommandPtr
if (!iommu)
return 0;
+ switch (iommu->model) {
+ case VIR_DOMAIN_IOMMU_MODEL_INTEL:
+ if (iommu->intremap != VIR_TRISTATE_SWITCH_ABSENT &&
+ !virQEMUCapsGet(qemuCaps, QEMU_CAPS_INTEL_IOMMU_INTREMAP)) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("iommu: interrupt remapping is not supported "
+ "with this QEMU binary"));
+ return -1;
+ }
+ break;
+ case VIR_DOMAIN_IOMMU_MODEL_LAST:
+ break;
+ }
+
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_IOMMU))
return 0; /* Already handled via -machine */
@@ -6705,6 +6719,10 @@ qemuBuildIOMMUCommandLine(virCommandPtr
return -1;
}
virBufferAddLit(&opts, "intel-iommu");
+ if (iommu->intremap != VIR_TRISTATE_SWITCH_ABSENT) {
+ virBufferAsprintf(&opts, ",intremap=%s",
+ virTristateSwitchTypeToString(iommu->intremap));
+ }
case VIR_DOMAIN_IOMMU_MODEL_LAST:
break;
}
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.replies
===================================================================
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.replies
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.replies
@@ -3123,6 +3123,16 @@
{
"return": [
{
+ "name": "version",
+ "type": "uint32"
+ }
+ ],
+ "id": "libvirt-41"
+}
+
+{
+ "return": [
+ {
"name": "pc-i440fx-2.4",
"is-default": true,
"cpu-max": 255,
@@ -3246,7 +3256,7 @@
"cpu-max": 255
}
],
- "id": "libvirt-41"
+ "id": "libvirt-42"
}
{
@@ -3336,21 +3346,21 @@
"name": "qemu64"
}
],
- "id": "libvirt-42"
+ "id": "libvirt-43"
}
{
"return": [
"tpm-tis"
],
- "id": "libvirt-43"
+ "id": "libvirt-44"
}
{
"return": [
"passthrough"
],
- "id": "libvirt-44"
+ "id": "libvirt-45"
}
{
@@ -4358,7 +4368,7 @@
"option": "drive"
}
],
- "id": "libvirt-45"
+ "id": "libvirt-46"
}
{
@@ -4388,7 +4398,7 @@
"capability": "events"
}
],
- "id": "libvirt-46"
+ "id": "libvirt-47"
}
{
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.replies
===================================================================
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.replies
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.replies
@@ -3286,6 +3286,16 @@
{
"return": [
{
+ "name": "version",
+ "type": "uint32"
+ }
+ ],
+ "id": "libvirt-41"
+}
+
+{
+ "return": [
+ {
"name": "pc-i440fx-2.4",
"cpu-max": 255
},
@@ -3417,7 +3427,7 @@
"cpu-max": 255
}
],
- "id": "libvirt-41"
+ "id": "libvirt-42"
}
{
@@ -3507,21 +3517,21 @@
"name": "qemu64"
}
],
- "id": "libvirt-42"
+ "id": "libvirt-43"
}
{
"return": [
"tpm-tis"
],
- "id": "libvirt-43"
+ "id": "libvirt-44"
}
{
"return": [
"passthrough"
],
- "id": "libvirt-44"
+ "id": "libvirt-45"
}
{
@@ -4566,7 +4576,7 @@
"option": "drive"
}
],
- "id": "libvirt-45"
+ "id": "libvirt-46"
}
{
@@ -4600,7 +4610,7 @@
"capability": "x-postcopy-ram"
}
],
- "id": "libvirt-46"
+ "id": "libvirt-47"
}
{
@@ -12145,7 +12155,7 @@
"meta-type": "array"
}
],
- "id": "libvirt-47"
+ "id": "libvirt-48"
}
{
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.replies
===================================================================
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.replies
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.replies
@@ -3368,6 +3368,16 @@
{
"return": [
{
+ "name": "version",
+ "type": "uint32"
+ }
+ ],
+ "id": "libvirt-41"
+}
+
+{
+ "return": [
+ {
"name": "pc-0.12",
"cpu-max": 255
},
@@ -3475,7 +3485,7 @@
"cpu-max": 255
}
],
- "id": "libvirt-41"
+ "id": "libvirt-42"
}
{
@@ -3565,21 +3575,21 @@
"name": "qemu64"
}
],
- "id": "libvirt-42"
+ "id": "libvirt-43"
}
{
"return": [
"tpm-tis"
],
- "id": "libvirt-43"
+ "id": "libvirt-44"
}
{
"return": [
"passthrough"
],
- "id": "libvirt-44"
+ "id": "libvirt-45"
}
{
@@ -4673,7 +4683,7 @@
"option": "drive"
}
],
- "id": "libvirt-45"
+ "id": "libvirt-46"
}
{
@@ -4707,7 +4717,7 @@
"capability": "postcopy-ram"
}
],
- "id": "libvirt-46"
+ "id": "libvirt-47"
}
{
@@ -12712,7 +12722,7 @@
"meta-type": "array"
}
],
- "id": "libvirt-47"
+ "id": "libvirt-48"
}
{
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.replies
===================================================================
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.replies
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.replies
@@ -3559,6 +3559,20 @@
{
"return": [
{
+ "name": "version",
+ "type": "uint32"
+ },
+ {
+ "name": "intremap",
+ "type": "bool"
+ }
+ ],
+ "id": "libvirt-41"
+}
+
+{
+ "return": [
+ {
"hotpluggable-cpus": true,
"name": "pc-0.12",
"cpu-max": 255
@@ -3702,7 +3716,7 @@
"cpu-max": 255
}
],
- "id": "libvirt-41"
+ "id": "libvirt-42"
}
{
@@ -3795,21 +3809,21 @@
"name": "qemu64"
}
],
- "id": "libvirt-42"
+ "id": "libvirt-43"
}
{
"return": [
"tpm-tis"
],
- "id": "libvirt-43"
+ "id": "libvirt-44"
}
{
"return": [
"passthrough"
],
- "id": "libvirt-44"
+ "id": "libvirt-45"
}
{
@@ -4907,7 +4921,7 @@
"option": "drive"
}
],
- "id": "libvirt-45"
+ "id": "libvirt-46"
}
{
@@ -4941,7 +4955,7 @@
"capability": "postcopy-ram"
}
],
- "id": "libvirt-46"
+ "id": "libvirt-47"
}
{
@@ -13297,7 +13311,7 @@
"meta-type": "object"
}
],
- "id": "libvirt-47"
+ "id": "libvirt-48"
}
{
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
===================================================================
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
@@ -204,6 +204,7 @@
<flag name='query-named-block-nodes'/>
<flag name='kernel-irqchip'/>
<flag name='kernel-irqchip.split'/>
+ <flag name='intel-iommu.intremap'/>
<version>2007000</version>
<kvmVersion>0</kvmVersion>
<package> (v2.7.0)</package>
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.replies
===================================================================
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.replies
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.replies
@@ -3692,6 +3692,29 @@
{
"return": [
{
+ "name": "eim",
+ "description": "on/off/auto",
+ "type": "OnOffAuto"
+ },
+ {
+ "name": "x-buggy-eim",
+ "type": "bool"
+ },
+ {
+ "name": "intremap",
+ "type": "bool"
+ },
+ {
+ "name": "version",
+ "type": "uint32"
+ }
+ ],
+ "id": "libvirt-41"
+}
+
+{
+ "return": [
+ {
"hotpluggable-cpus": true,
"name": "pc-0.12",
"cpu-max": 255
@@ -3855,7 +3878,7 @@
"cpu-max": 255
}
],
- "id": "libvirt-41"
+ "id": "libvirt-42"
}
{
@@ -4061,21 +4084,21 @@
"static": false
}
],
- "id": "libvirt-42"
+ "id": "libvirt-43"
}
{
"return": [
"tpm-tis"
],
- "id": "libvirt-43"
+ "id": "libvirt-44"
}
{
"return": [
"passthrough"
],
- "id": "libvirt-44"
+ "id": "libvirt-45"
}
{
@@ -5198,7 +5221,7 @@
"option": "drive"
}
],
- "id": "libvirt-45"
+ "id": "libvirt-46"
}
{
@@ -5236,7 +5259,7 @@
"capability": "x-colo"
}
],
- "id": "libvirt-46"
+ "id": "libvirt-47"
}
{
@@ -14006,7 +14029,7 @@
"meta-type": "object"
}
],
- "id": "libvirt-47"
+ "id": "libvirt-48"
}
{
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
===================================================================
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
@@ -205,6 +205,7 @@
<flag name='query-named-block-nodes'/>
<flag name='kernel-irqchip'/>
<flag name='kernel-irqchip.split'/>
+ <flag name='intel-iommu.intremap'/>
<version>2008000</version>
<kvmVersion>0</kvmVersion>
<package> (v2.8.0)</package>
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.replies
===================================================================
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.replies
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.replies
@@ -4003,6 +4003,37 @@
{
"return": [
{
+ "name": "eim",
+ "description": "on/off/auto",
+ "type": "OnOffAuto"
+ },
+ {
+ "name": "caching-mode",
+ "type": "bool"
+ },
+ {
+ "name": "x-buggy-eim",
+ "type": "bool"
+ },
+ {
+ "name": "intremap",
+ "type": "bool"
+ },
+ {
+ "name": "version",
+ "type": "uint32"
+ },
+ {
+ "name": "device-iotlb",
+ "type": "bool"
+ }
+ ],
+ "id": "libvirt-41"
+}
+
+{
+ "return": [
+ {
"hotpluggable-cpus": true,
"name": "pc-0.12",
"cpu-max": 255
@@ -4176,7 +4207,7 @@
"cpu-max": 255
}
],
- "id": "libvirt-41"
+ "id": "libvirt-42"
}
{
@@ -4458,21 +4489,21 @@
"migration-safe": true
}
],
- "id": "libvirt-42"
+ "id": "libvirt-43"
}
{
"return": [
"tpm-tis"
],
- "id": "libvirt-43"
+ "id": "libvirt-44"
}
{
"return": [
"passthrough"
],
- "id": "libvirt-44"
+ "id": "libvirt-45"
}
{
@@ -5721,7 +5752,7 @@
"option": "drive"
}
],
- "id": "libvirt-45"
+ "id": "libvirt-46"
}
{
@@ -5763,7 +5794,7 @@
"capability": "release-ram"
}
],
- "id": "libvirt-46"
+ "id": "libvirt-47"
}
{
@@ -15049,7 +15080,7 @@
"meta-type": "object"
}
],
- "id": "libvirt-47"
+ "id": "libvirt-48"
}
{
@@ -15228,7 +15259,7 @@
}
}
},
- "id": "libvirt-48"
+ "id": "libvirt-49"
}
{
@@ -15469,7 +15500,7 @@
}
}
},
- "id": "libvirt-49"
+ "id": "libvirt-50"
}
{
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
===================================================================
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
@@ -212,6 +212,7 @@
<flag name='qemu-xhci'/>
<flag name='kernel-irqchip'/>
<flag name='kernel-irqchip.split'/>
+ <flag name='intel-iommu.intremap'/>
<version>2009000</version>
<kvmVersion>0</kvmVersion>
<package> (v2.9.0)</package>
Index: libvirt-3.3.0/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-ioapic.args
===================================================================
--- libvirt-3.3.0.orig/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-ioapic.args
+++ libvirt-3.3.0/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-ioapic.args
@@ -16,4 +16,4 @@ QEMU_AUDIO_DRV=none \
-monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \
-no-acpi \
-boot c \
--device intel-iommu
+-device intel-iommu,intremap=on
Index: libvirt-3.3.0/tests/qemuxml2argvtest.c
===================================================================
--- libvirt-3.3.0.orig/tests/qemuxml2argvtest.c
+++ libvirt-3.3.0/tests/qemuxml2argvtest.c
@@ -2513,6 +2513,7 @@ mymain(void)
QEMU_CAPS_MACHINE_OPT,
QEMU_CAPS_MACHINE_KERNEL_IRQCHIP,
QEMU_CAPS_MACHINE_KERNEL_IRQCHIP_SPLIT,
+ QEMU_CAPS_INTEL_IOMMU_INTREMAP,
QEMU_CAPS_DEVICE_INTEL_IOMMU);
DO_TEST("cpu-hotplug-startup", QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS);

View File

@ -0,0 +1,39 @@
commit 1a4b21f1c67a3ddf39d11bba39c1dee869131636
Author: Michal Privoznik <mprivozn@redhat.com>
Date: Tue Jun 6 14:45:55 2017 +0200
virNetClientStreamQueuePacket: Set st->incomingEOF on the end of stream
While reworking client side of streams, I had to postpone payload
decoding so that stream holes and stream data can be
distinguished in virNetClientStreamRecvPacket. That's merely what
18944b7aea46d does. However, I accidentally removed one important
bit: when server sends us an empty STREAM packet (with no
payload) - meaning end of stream - st->incomingEOF flag needs to
be set. It used to be before I touched the code. After I removed
it, virNetClientStreamRecvPacket will try to fetch more data from
the stream, but it will never come.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
Index: libvirt-3.4.0/src/rpc/virnetclientstream.c
===================================================================
--- libvirt-3.4.0.orig/src/rpc/virnetclientstream.c
+++ libvirt-3.4.0/src/rpc/virnetclientstream.c
@@ -278,6 +278,15 @@ int virNetClientStreamQueuePacket(virNet
VIR_DEBUG("Incoming stream message: stream=%p message=%p", st, msg);
+ if (msg->bufferLength == msg->bufferOffset) {
+ /* No payload means end of the stream. */
+ virObjectLock(st);
+ st->incomingEOF = true;
+ virNetClientStreamEventTimerUpdate(st);
+ virObjectUnlock(st);
+ return 0;
+ }
+
/* Unfortunately, we must allocate new message as the one we
* get in @msg is going to be cleared later in the process. */

View File

@ -1,185 +0,0 @@
commit 2020e2c6f2656ca1aa9032859ccde76185c37c39
Author: Ján Tomko <jtomko@redhat.com>
Date: Fri Mar 17 08:35:22 2017 +0100
conf: add <driver intremap> to <iommu>
Add a new attribute to control interrupt remapping.
https://bugzilla.redhat.com/show_bug.cgi?id=1427005
Index: libvirt-3.3.0/docs/formatdomain.html.in
===================================================================
--- libvirt-3.3.0.orig/docs/formatdomain.html.in
+++ libvirt-3.3.0/docs/formatdomain.html.in
@@ -7396,7 +7396,9 @@ qemu-kvm -net nic,model=? /dev/null
<pre>
...
&lt;devices&gt;
- &lt;iommu model='intel'/&gt;
+ &lt;iommu model='intel'&gt;
+ &lt;driver intremap='on'/&gt;
+ &lt;/iommu&gt;
&lt;/devices&gt;
...
</pre>
@@ -7407,6 +7409,26 @@ qemu-kvm -net nic,model=? /dev/null
Currently only the <code>intel</code> model is supported.
</p>
</dd>
+ <dt><code>driver</code></dt>
+ <dd>
+ <p>
+ The <code>driver</code> subelement can be used to configure
+ additional options:
+ </p>
+ <dl>
+ <dt><code>intremap</code></dt>
+ <dd>
+ <p>
+ The <code>intremap</code> attribute with possible values
+ <code>on</code> and <code>off</code> can be used to
+ turn on interrupt remapping, a part of the VT-d functionality.
+ Currently this requires split I/O APIC
+ (<code>&lt;ioapic driver='qemu'/&gt;</code>).
+ <span class="since">Since 3.4.0</span> (QEMU/KVM only)
+ </p>
+ </dd>
+ </dl>
+ </dd>
</dl>
<h3><a name="seclabel">Security label</a></h3>
Index: libvirt-3.3.0/docs/schemas/domaincommon.rng
===================================================================
--- libvirt-3.3.0.orig/docs/schemas/domaincommon.rng
+++ libvirt-3.3.0/docs/schemas/domaincommon.rng
@@ -3947,6 +3947,15 @@
<attribute name="model">
<value>intel</value>
</attribute>
+ <optional>
+ <element name="driver">
+ <optional>
+ <attribute name="intremap">
+ <ref name="virOnOff"/>
+ </attribute>
+ </optional>
+ </element>
+ </optional>
</element>
</define>
Index: libvirt-3.3.0/src/conf/domain_conf.c
===================================================================
--- libvirt-3.3.0.orig/src/conf/domain_conf.c
+++ libvirt-3.3.0/src/conf/domain_conf.c
@@ -14141,12 +14141,16 @@ virDomainMemoryDefParseXML(xmlNodePtr me
static virDomainIOMMUDefPtr
-virDomainIOMMUDefParseXML(xmlNodePtr node)
+virDomainIOMMUDefParseXML(xmlNodePtr node,
+ xmlXPathContextPtr ctxt)
{
virDomainIOMMUDefPtr iommu = NULL, ret = NULL;
+ xmlNodePtr save = ctxt->node;
char *tmp = NULL;
int val;
+ ctxt->node = node;
+
if (VIR_ALLOC(iommu) < 0)
goto cleanup;
@@ -14163,10 +14167,20 @@ virDomainIOMMUDefParseXML(xmlNodePtr nod
iommu->model = val;
+ VIR_FREE(tmp);
+ if ((tmp = virXPathString("string(./driver/@intremap)", ctxt))) {
+ if ((val = virTristateSwitchTypeFromString(tmp)) < 0) {
+ virReportError(VIR_ERR_XML_ERROR, _("unknown intremap value: %s"), tmp);
+ goto cleanup;
+ }
+ iommu->intremap = val;
+ }
+
ret = iommu;
iommu = NULL;
cleanup:
+ ctxt->node = save;
VIR_FREE(iommu);
VIR_FREE(tmp);
return ret;
@@ -14319,7 +14333,7 @@ virDomainDeviceDefParse(const char *xmlS
goto error;
break;
case VIR_DOMAIN_DEVICE_IOMMU:
- if (!(dev->data.iommu = virDomainIOMMUDefParseXML(node)))
+ if (!(dev->data.iommu = virDomainIOMMUDefParseXML(node, ctxt)))
goto error;
break;
case VIR_DOMAIN_DEVICE_NONE:
@@ -18449,7 +18463,7 @@ virDomainDefParseXML(xmlDocPtr xml,
}
if (n > 0) {
- if (!(def->iommu = virDomainIOMMUDefParseXML(nodes[0])))
+ if (!(def->iommu = virDomainIOMMUDefParseXML(nodes[0], ctxt)))
goto error;
}
VIR_FREE(nodes);
@@ -24125,8 +24139,24 @@ static void
virDomainIOMMUDefFormat(virBufferPtr buf,
const virDomainIOMMUDef *iommu)
{
- virBufferAsprintf(buf, "<iommu model='%s'/>\n",
+ virBuffer childBuf = VIR_BUFFER_INITIALIZER;
+
+ virBufferAdjustIndent(&childBuf, virBufferGetIndent(buf, false) + 2);
+
+ if (iommu->intremap != VIR_TRISTATE_SWITCH_ABSENT) {
+ virBufferAsprintf(&childBuf, "<driver intremap='%s'/>\n",
+ virTristateSwitchTypeToString(iommu->intremap));
+ }
+
+ virBufferAsprintf(buf, "<iommu model='%s'",
virDomainIOMMUModelTypeToString(iommu->model));
+ if (virBufferUse(&childBuf)) {
+ virBufferAddLit(buf, ">\n");
+ virBufferAddBuffer(buf, &childBuf);
+ virBufferAddLit(buf, "</iommu>\n");
+ } else {
+ virBufferAddLit(buf, "/>\n");
+ }
}
Index: libvirt-3.3.0/src/conf/domain_conf.h
===================================================================
--- libvirt-3.3.0.orig/src/conf/domain_conf.h
+++ libvirt-3.3.0/src/conf/domain_conf.h
@@ -2209,6 +2209,7 @@ typedef enum {
struct _virDomainIOMMUDef {
virDomainIOMMUModel model;
+ virTristateSwitch intremap;
};
/*
* Guest VM main configuration
Index: libvirt-3.3.0/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-ioapic.xml
===================================================================
--- libvirt-3.3.0.orig/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-ioapic.xml
+++ libvirt-3.3.0/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-ioapic.xml
@@ -24,6 +24,8 @@
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<memballoon model='none'/>
- <iommu model='intel'/>
+ <iommu model='intel'>
+ <driver intremap='on'/>
+ </iommu>
</devices>
</domain>

View File

@ -1,49 +0,0 @@
commit 3a276c6524026b661ed7bee4539fc5387b963611
Author: Ján Tomko <jtomko@redhat.com>
Date: Fri May 12 16:59:09 2017 +0200
conf: split out virDomainIOMMUDefCheckABIStability
Index: libvirt-3.3.0/src/conf/domain_conf.c
===================================================================
--- libvirt-3.3.0.orig/src/conf/domain_conf.c
+++ libvirt-3.3.0/src/conf/domain_conf.c
@@ -19819,6 +19819,22 @@ virDomainMemoryDefCheckABIStability(virD
static bool
+virDomainIOMMUDefCheckABIStability(virDomainIOMMUDefPtr src,
+ virDomainIOMMUDefPtr dst)
+{
+ if (src->model != dst->model) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("Target domain IOMMU device model '%s' "
+ "does not match source '%s'"),
+ virDomainIOMMUModelTypeToString(dst->model),
+ virDomainIOMMUModelTypeToString(src->model));
+ return false;
+ }
+ return true;
+}
+
+
+static bool
virDomainDefVcpuCheckAbiStability(virDomainDefPtr src,
virDomainDefPtr dst)
{
@@ -20284,14 +20300,8 @@ virDomainDefCheckABIStabilityFlags(virDo
}
if (src->iommu &&
- src->iommu->model != dst->iommu->model) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Target domain IOMMU device model '%s' "
- "does not match source '%s'"),
- virDomainIOMMUModelTypeToString(dst->iommu->model),
- virDomainIOMMUModelTypeToString(src->iommu->model));
+ !virDomainIOMMUDefCheckABIStability(src->iommu, dst->iommu))
goto error;
- }
/* Coverity is not very happy with this - all dead_error_condition */
#if !STATIC_ANALYSIS

View File

@ -1,54 +0,0 @@
commit 4cd3f241399eb691a7fc9a1279938bfe76215a77
Author: Wim ten Have <wim.ten.have@oracle.com>
Date: Fri May 19 16:38:43 2017 +0200
xenconfig: fix handling of NULL disk source
It is possible to crash libvirtd when converting xl native config to
domXML when the xl config contains an empty disk source, e.g. an empty
CDROM. Fix by checking that the disk source is non-NULL before parsing it.
Signed-off-by: Wim ten Have <wim.ten.have@oracle.com>
Index: libvirt-3.3.0/src/xenconfig/xen_xl.c
===================================================================
--- libvirt-3.3.0.orig/src/xenconfig/xen_xl.c
+++ libvirt-3.3.0/src/xenconfig/xen_xl.c
@@ -316,6 +316,10 @@ xenParseXLDiskSrc(virDomainDiskDefPtr di
char *tmpstr = NULL;
int ret = -1;
+ /* A NULL source is valid, e.g. an empty CDROM */
+ if (srcstr == NULL)
+ return 0;
+
if (STRPREFIX(srcstr, "rbd:")) {
if (!(tmpstr = virStringReplace(srcstr, "\\\\", "\\")))
goto cleanup;
Index: libvirt-3.3.0/tests/xlconfigdata/test-disk-positional-parms-partial.cfg
===================================================================
--- libvirt-3.3.0.orig/tests/xlconfigdata/test-disk-positional-parms-partial.cfg
+++ libvirt-3.3.0/tests/xlconfigdata/test-disk-positional-parms-partial.cfg
@@ -22,4 +22,4 @@ parallel = "none"
serial = "none"
builder = "hvm"
boot = "d"
-disk = [ "/dev/HostVG/XenGuest2,,hda,,backendtype=phy", "/var/lib/libvirt/images/XenGuest2-home,,hdb,,", "/root/boot.iso,,hdc,,devtype=cdrom" ]
+disk = [ "/dev/HostVG/XenGuest2,,hda,,backendtype=phy", "/var/lib/libvirt/images/XenGuest2-home,,hdb,,", "/root/boot.iso,,hdc,,devtype=cdrom" , "format=raw,vdev=hdd,access=ro,devtype=cdrom" ]
Index: libvirt-3.3.0/tests/xlconfigdata/test-disk-positional-parms-partial.xml
===================================================================
--- libvirt-3.3.0.orig/tests/xlconfigdata/test-disk-positional-parms-partial.xml
+++ libvirt-3.3.0/tests/xlconfigdata/test-disk-positional-parms-partial.xml
@@ -39,6 +39,12 @@
<readonly/>
<address type='drive' controller='0' bus='1' target='0' unit='0'/>
</disk>
+ <disk type='file' device='cdrom'>
+ <driver name='qemu' type='raw'/>
+ <target dev='hdd' bus='ide'/>
+ <readonly/>
+ <address type='drive' controller='0' bus='1' target='0' unit='1'/>
+ </disk>
<controller type='ide' index='0'/>
<interface type='bridge'>
<mac address='00:16:3e:66:92:9c'/>

View File

@ -0,0 +1,85 @@
commit 5004f121bc572c58d9721bf7bf3c3a1988720ba8
Author: Michal Privoznik <mprivozn@redhat.com>
Date: Mon Jun 5 13:22:23 2017 +0200
virFDStreamThread: Make sure we won't exceed @length
There's a problem with current streams after I switched them from
iohelper to thread implementation. Previously, iohelper made sure
not to exceed specified @length resulting in the pipe EOF
appearing at the exact right moment (the pipe was used to tunnel
the data from the iohelper to the daemon). Anyway, when switching
to thread I had to write the I/O code from scratch. Whilst doing
that I took an inspiration from the iohelper code, but since the
usage of pipe switched to slightly different meaning, there was
no 1:1 relationship between the codes.
Moreover, after introducing VIR_FDSTREAM_MSG_TYPE_HOLE, the
condition that should made sure we won't exceed @length was
completely wrong.
The fix is to:
a) account for holes for @length
b) cap not just data sections but holes too (if @length would be
exceeded)
For this purpose, the condition needs to be brought closer to the
code that handles holes and data sections.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Index: libvirt-3.4.0/src/util/virfdstream.c
===================================================================
--- libvirt-3.4.0.orig/src/util/virfdstream.c
+++ libvirt-3.4.0/src/util/virfdstream.c
@@ -420,6 +420,8 @@ virFDStreamThreadDoRead(virFDStreamDataP
const int fdout,
const char *fdinname,
const char *fdoutname,
+ size_t length,
+ size_t total,
size_t *dataLen,
size_t buflen)
{
@@ -433,10 +435,18 @@ virFDStreamThreadDoRead(virFDStreamDataP
if (virFileInData(fdin, &inData, &sectionLen) < 0)
goto error;
+ if (length &&
+ sectionLen > length - total)
+ sectionLen = length - total;
+
if (inData)
*dataLen = sectionLen;
}
+ if (length &&
+ buflen > length - total)
+ buflen = length - total;
+
if (VIR_ALLOC(msg) < 0)
goto error;
@@ -578,13 +588,6 @@ virFDStreamThread(void *opaque)
while (1) {
ssize_t got;
- if (length &&
- (length - total) < buflen)
- buflen = length - total;
-
- if (buflen == 0)
- break; /* End of requested data from client */
-
while (doRead == (fdst->msg != NULL) &&
!fdst->threadQuit) {
if (virCondWait(&fdst->threadCond, &fdst->parent.lock)) {
@@ -608,6 +611,7 @@ virFDStreamThread(void *opaque)
got = virFDStreamThreadDoRead(fdst, sparse,
fdin, fdout,
fdinname, fdoutname,
+ length, total,
&dataLen, buflen);
else
got = virFDStreamThreadDoWrite(fdst, sparse,

View File

@ -1,363 +0,0 @@
commit 6b5c6314b2f7a3b54c94a591e6b0dcd13ef1c6ce
Author: Ján Tomko <jtomko@redhat.com>
Date: Fri Mar 17 08:26:49 2017 +0100
qemu: format kernel_irqchip on the command line
Add kernel_irqchip=split/on to the QEMU command line
and a capability that looks for it in query-command-line-options
output. For the 'split' option, use a version check
since it cannot be reasonably probed.
https://bugzilla.redhat.com/show_bug.cgi?id=1427005
Index: libvirt-3.3.0/src/qemu/qemu_capabilities.c
===================================================================
--- libvirt-3.3.0.orig/src/qemu/qemu_capabilities.c
+++ libvirt-3.3.0/src/qemu/qemu_capabilities.c
@@ -366,6 +366,9 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAS
"query-named-block-nodes",
"cpu-cache",
"qemu-xhci",
+
+ "kernel-irqchip", /* 255 */
+ "kernel-irqchip.split",
);
@@ -3127,6 +3130,7 @@ static struct virQEMUCapsCommandLineProp
{ "drive", "throttling.bps-total-max-length", QEMU_CAPS_DRIVE_IOTUNE_MAX_LENGTH },
{ "drive", "throttling.group", QEMU_CAPS_DRIVE_IOTUNE_GROUP },
{ "spice", "rendernode", QEMU_CAPS_SPICE_RENDERNODE },
+ { "machine", "kernel_irqchip", QEMU_CAPS_MACHINE_KERNEL_IRQCHIP },
};
static int
@@ -4739,6 +4743,10 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr
if (qemuCaps->version >= 2004050)
virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACH_VIRT_GIC_VERSION);
+ /* no way to query if -machine kernel_irqchip supports split */
+ if (qemuCaps->version >= 2006000)
+ virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACHINE_KERNEL_IRQCHIP_SPLIT);
+
if (virQEMUCapsProbeQMPCommands(qemuCaps, mon) < 0)
goto cleanup;
Index: libvirt-3.3.0/src/qemu/qemu_capabilities.h
===================================================================
--- libvirt-3.3.0.orig/src/qemu/qemu_capabilities.h
+++ libvirt-3.3.0/src/qemu/qemu_capabilities.h
@@ -404,6 +404,10 @@ typedef enum {
QEMU_CAPS_CPU_CACHE, /* -cpu supports host-cache-info and l3-cache properties */
QEMU_CAPS_DEVICE_QEMU_XHCI, /* -device qemu-xhci */
+ /* 255 */
+ QEMU_CAPS_MACHINE_KERNEL_IRQCHIP, /* -machine kernel_irqchip */
+ QEMU_CAPS_MACHINE_KERNEL_IRQCHIP_SPLIT, /* -machine kernel_irqchip=split */
+
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;
Index: libvirt-3.3.0/src/qemu/qemu_command.c
===================================================================
--- libvirt-3.3.0.orig/src/qemu/qemu_command.c
+++ libvirt-3.3.0/src/qemu/qemu_command.c
@@ -7422,6 +7422,31 @@ qemuBuildMachineCommandLine(virCommandPt
}
}
+ if (def->features[VIR_DOMAIN_FEATURE_IOAPIC] == VIR_TRISTATE_SWITCH_ON) {
+ if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_KERNEL_IRQCHIP)) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("I/O APIC tuning is not supported by this "
+ "QEMU binary"));
+ goto cleanup;
+ }
+ switch (def->ioapic) {
+ case VIR_DOMAIN_IOAPIC_QEMU:
+ if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_KERNEL_IRQCHIP_SPLIT)) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("split I/O APIC is not supported by this "
+ "QEMU binary"));
+ goto cleanup;
+ }
+ virBufferAddLit(&buf, ",kernel_irqchip=split");
+ break;
+ case VIR_DOMAIN_IOAPIC_KVM:
+ virBufferAddLit(&buf, ",kernel_irqchip=on");
+ break;
+ case VIR_DOMAIN_IOAPIC_LAST:
+ break;
+ }
+ }
+
virCommandAddArgBuffer(cmd, &buf);
}
Index: libvirt-3.3.0/src/qemu/qemu_domain.c
===================================================================
--- libvirt-3.3.0.orig/src/qemu/qemu_domain.c
+++ libvirt-3.3.0/src/qemu/qemu_domain.c
@@ -2807,6 +2807,22 @@ qemuDomainDefCPUPostParse(virDomainDefPt
static int
+qemuDomainDefVerifyFeatures(const virDomainDef *def)
+{
+ if (def->features[VIR_DOMAIN_FEATURE_IOAPIC] == VIR_TRISTATE_SWITCH_ON &&
+ !ARCH_IS_X86(def->os.arch)) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("I/O APIC tuning is not supported "
+ "for '%s' architecture"),
+ virArchToString(def->os.arch));
+ return -1;
+ }
+
+ return 0;
+}
+
+
+static int
qemuDomainDefPostParse(virDomainDefPtr def,
virCapsPtr caps,
unsigned int parseFlags,
@@ -2861,6 +2877,9 @@ qemuDomainDefPostParse(virDomainDefPtr d
qemuDomainDefEnableDefaultFeatures(def, qemuCaps);
+ if (qemuDomainDefVerifyFeatures(def) < 0)
+ goto cleanup;
+
if (qemuDomainRecheckInternalPaths(def, cfg, parseFlags) < 0)
goto cleanup;
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml
===================================================================
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml
@@ -140,6 +140,7 @@
<flag name='display'/>
<flag name='vhost-scsi'/>
<flag name='query-cpu-definitions'/>
+ <flag name='kernel-irqchip'/>
<version>1005003</version>
<kvmVersion>0</kvmVersion>
<package></package>
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml
===================================================================
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml
@@ -145,6 +145,7 @@
<flag name='display'/>
<flag name='vhost-scsi'/>
<flag name='query-cpu-definitions'/>
+ <flag name='kernel-irqchip'/>
<version>1006000</version>
<kvmVersion>0</kvmVersion>
<package></package>
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml
===================================================================
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml
@@ -147,6 +147,7 @@
<flag name='display'/>
<flag name='vhost-scsi'/>
<flag name='query-cpu-definitions'/>
+ <flag name='kernel-irqchip'/>
<version>1007000</version>
<kvmVersion>0</kvmVersion>
<package></package>
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml
===================================================================
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml
@@ -163,6 +163,7 @@
<flag name='vhost-scsi'/>
<flag name='query-cpu-definitions'/>
<flag name='query-named-block-nodes'/>
+ <flag name='kernel-irqchip'/>
<version>2001001</version>
<kvmVersion>0</kvmVersion>
<package></package>
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
===================================================================
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml
@@ -185,6 +185,7 @@
<flag name='query-cpu-definitions'/>
<flag name='block-write-threshold'/>
<flag name='query-named-block-nodes'/>
+ <flag name='kernel-irqchip'/>
<version>2004000</version>
<kvmVersion>0</kvmVersion>
<package></package>
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
===================================================================
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml
@@ -191,6 +191,7 @@
<flag name='query-cpu-definitions'/>
<flag name='block-write-threshold'/>
<flag name='query-named-block-nodes'/>
+ <flag name='kernel-irqchip'/>
<version>2005000</version>
<kvmVersion>0</kvmVersion>
<package></package>
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml
===================================================================
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.6.0-gicv2.aarch64.xml
@@ -168,6 +168,8 @@
<flag name='query-cpu-definitions'/>
<flag name='block-write-threshold'/>
<flag name='query-named-block-nodes'/>
+ <flag name='kernel-irqchip'/>
+ <flag name='kernel-irqchip.split'/>
<version>2006000</version>
<kvmVersion>0</kvmVersion>
<package></package>
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml
===================================================================
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.6.0-gicv3.aarch64.xml
@@ -168,6 +168,8 @@
<flag name='query-cpu-definitions'/>
<flag name='block-write-threshold'/>
<flag name='query-named-block-nodes'/>
+ <flag name='kernel-irqchip'/>
+ <flag name='kernel-irqchip.split'/>
<version>2006000</version>
<kvmVersion>0</kvmVersion>
<package></package>
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml
===================================================================
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml
@@ -162,6 +162,8 @@
<flag name='query-cpu-definitions'/>
<flag name='block-write-threshold'/>
<flag name='query-named-block-nodes'/>
+ <flag name='kernel-irqchip'/>
+ <flag name='kernel-irqchip.split'/>
<version>2006000</version>
<kvmVersion>0</kvmVersion>
<package></package>
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
===================================================================
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml
@@ -200,6 +200,8 @@
<flag name='query-cpu-definitions'/>
<flag name='block-write-threshold'/>
<flag name='query-named-block-nodes'/>
+ <flag name='kernel-irqchip'/>
+ <flag name='kernel-irqchip.split'/>
<version>2006000</version>
<kvmVersion>0</kvmVersion>
<package></package>
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml
===================================================================
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml
@@ -130,6 +130,8 @@
<flag name='query-cpu-definitions'/>
<flag name='block-write-threshold'/>
<flag name='query-named-block-nodes'/>
+ <flag name='kernel-irqchip'/>
+ <flag name='kernel-irqchip.split'/>
<version>2007000</version>
<kvmVersion>0</kvmVersion>
<package></package>
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
===================================================================
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml
@@ -202,6 +202,8 @@
<flag name='query-cpu-definitions'/>
<flag name='block-write-threshold'/>
<flag name='query-named-block-nodes'/>
+ <flag name='kernel-irqchip'/>
+ <flag name='kernel-irqchip.split'/>
<version>2007000</version>
<kvmVersion>0</kvmVersion>
<package> (v2.7.0)</package>
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml
===================================================================
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml
@@ -132,6 +132,8 @@
<flag name='query-cpu-definitions'/>
<flag name='block-write-threshold'/>
<flag name='query-named-block-nodes'/>
+ <flag name='kernel-irqchip'/>
+ <flag name='kernel-irqchip.split'/>
<version>2007093</version>
<kvmVersion>0</kvmVersion>
<package></package>
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
===================================================================
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml
@@ -203,6 +203,8 @@
<flag name='query-cpu-definitions'/>
<flag name='block-write-threshold'/>
<flag name='query-named-block-nodes'/>
+ <flag name='kernel-irqchip'/>
+ <flag name='kernel-irqchip.split'/>
<version>2008000</version>
<kvmVersion>0</kvmVersion>
<package> (v2.8.0)</package>
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
===================================================================
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
@@ -210,6 +210,8 @@
<flag name='query-named-block-nodes'/>
<flag name='cpu-cache'/>
<flag name='qemu-xhci'/>
+ <flag name='kernel-irqchip'/>
+ <flag name='kernel-irqchip.split'/>
<version>2009000</version>
<kvmVersion>0</kvmVersion>
<package> (v2.9.0)</package>
Index: libvirt-3.3.0/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-ioapic.args
===================================================================
--- /dev/null
+++ libvirt-3.3.0/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-ioapic.args
@@ -0,0 +1,19 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu-system-x86_64 \
+-name QEMUGuest1 \
+-S \
+-machine q35,accel=kvm,kernel_irqchip=split \
+-m 214 \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-nodefaults \
+-monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \
+-no-acpi \
+-boot c \
+-device intel-iommu
Index: libvirt-3.3.0/tests/qemuxml2argvtest.c
===================================================================
--- libvirt-3.3.0.orig/tests/qemuxml2argvtest.c
+++ libvirt-3.3.0/tests/qemuxml2argvtest.c
@@ -2509,6 +2509,11 @@ mymain(void)
DO_TEST("intel-iommu-machine",
QEMU_CAPS_MACHINE_OPT,
QEMU_CAPS_MACHINE_IOMMU);
+ DO_TEST("intel-iommu-ioapic",
+ QEMU_CAPS_MACHINE_OPT,
+ QEMU_CAPS_MACHINE_KERNEL_IRQCHIP,
+ QEMU_CAPS_MACHINE_KERNEL_IRQCHIP_SPLIT,
+ QEMU_CAPS_DEVICE_INTEL_IOMMU);
DO_TEST("cpu-hotplug-startup", QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS);

View File

@ -1,229 +0,0 @@
commit 8023b21a95f271e51810de7f1362e609eaadc1e4
Author: Ján Tomko <jtomko@redhat.com>
Date: Fri Mar 17 08:26:35 2017 +0100
conf: add <ioapic driver> to <features>
Add a new <ioapic> element with a driver attribute.
Possible values are qemu and kvm. With 'qemu', the I/O
APIC can be put in the userspace even for KVM domains.
https://bugzilla.redhat.com/show_bug.cgi?id=1427005
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 8c884f4af..bfc1df390 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -1678,6 +1678,7 @@
&lt;/kvm&gt;
&lt;pvspinlock state='on'/&gt;
&lt;gic version='2'/&gt;
+ &lt;ioapic driver='qemu'/&gt;
&lt;/features&gt;
...</pre>
@@ -1839,6 +1840,14 @@
for hypervisor to decide.
<span class="since">Since 2.1.0</span>
</dd>
+ <dt><code>ioapic</code></dt>
+ <dd>Tune the I/O APIC. Possible values for the
+ <code>driver</code> attribute are:
+ <code>kvm</code> (default for KVM domains)
+ and <code>qemu</code> which puts I/O APIC in userspace
+ which is also known as a split I/O APIC mode.
+ <span class="since">Since 3.4.0</span> (QEMU/KVM only)
+ </dd>
</dl>
<h3><a name="elementsTime">Time keeping</a></h3>
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 281309ec0..64f718b70 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -4569,6 +4569,9 @@
</optional>
</element>
</optional>
+ <optional>
+ <ref name="ioapic"/>
+ </optional>
</interleave>
</element>
</optional>
@@ -4747,6 +4750,18 @@
</element>
</define>
+ <define name="ioapic">
+ <element name="ioapic">
+ <attribute name="driver">
+ <choice>
+ <value>qemu</value>
+ <value>kvm</value>
+ </choice>
+ </attribute>
+ <empty/>
+ </element>
+ </define>
+
<define name="address">
<element name="address">
<choice>
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 0ff216e3a..29b04d362 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -141,7 +141,8 @@ VIR_ENUM_IMPL(virDomainFeature, VIR_DOMAIN_FEATURE_LAST,
"pmu",
"vmport",
"gic",
- "smm")
+ "smm",
+ "ioapic")
VIR_ENUM_IMPL(virDomainCapabilitiesPolicy, VIR_DOMAIN_CAPABILITIES_POLICY_LAST,
"default",
@@ -859,6 +860,11 @@ VIR_ENUM_IMPL(virDomainLoader,
"rom",
"pflash")
+VIR_ENUM_IMPL(virDomainIOAPIC,
+ VIR_DOMAIN_IOAPIC_LAST,
+ "qemu",
+ "kvm")
+
/* Internal mapping: subset of block job types that can be present in
* <mirror> XML (remaining types are not two-phase). */
VIR_ENUM_DECL(virDomainBlockJob)
@@ -17527,6 +17533,24 @@ virDomainDefParseXML(xmlDocPtr xml,
ctxt->node = node;
break;
+ case VIR_DOMAIN_FEATURE_IOAPIC:
+ node = ctxt->node;
+ ctxt->node = nodes[i];
+ tmp = virXPathString("string(./@driver)", ctxt);
+ if (tmp) {
+ int value = virDomainIOAPICTypeFromString(tmp);
+ if (value < 0) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("Unknown driver mode: %s"),
+ tmp);
+ goto error;
+ }
+ def->ioapic = value;
+ def->features[val] = VIR_TRISTATE_SWITCH_ON;
+ }
+ ctxt->node = node;
+ break;
+
/* coverity[dead_error_begin] */
case VIR_DOMAIN_FEATURE_LAST:
break;
@@ -24627,6 +24651,13 @@ virDomainDefFormatInternal(virDomainDefPtr def,
}
break;
+ case VIR_DOMAIN_FEATURE_IOAPIC:
+ if (def->features[i] == VIR_TRISTATE_SWITCH_ON) {
+ virBufferAsprintf(buf, "<ioapic driver='%s'/>\n",
+ virDomainIOAPICTypeToString(def->ioapic));
+ }
+ break;
+
/* coverity[dead_error_begin] */
case VIR_DOMAIN_FEATURE_LAST:
break;
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 09fb7aada..82b4785a6 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -1670,6 +1670,7 @@ typedef enum {
VIR_DOMAIN_FEATURE_VMPORT,
VIR_DOMAIN_FEATURE_GIC,
VIR_DOMAIN_FEATURE_SMM,
+ VIR_DOMAIN_FEATURE_IOAPIC,
VIR_DOMAIN_FEATURE_LAST
} virDomainFeature;
@@ -1809,6 +1810,15 @@ struct _virDomainLoaderDef {
void virDomainLoaderDefFree(virDomainLoaderDefPtr loader);
+typedef enum {
+ VIR_DOMAIN_IOAPIC_QEMU = 0,
+ VIR_DOMAIN_IOAPIC_KVM,
+
+ VIR_DOMAIN_IOAPIC_LAST
+} virDomainIOAPIC;
+
+VIR_ENUM_DECL(virDomainIOAPIC);
+
/* Operating system configuration data & machine / arch */
typedef struct _virDomainOSDef virDomainOSDef;
typedef virDomainOSDef *virDomainOSDefPtr;
@@ -2258,6 +2268,7 @@ struct _virDomainDef {
unsigned int hyperv_spinlocks;
virGICVersion gic_version;
char *hyperv_vendor_id;
+ virDomainIOAPIC ioapic;
/* These options are of type virTristateSwitch: ON = keep, OFF = drop */
int caps_features[VIR_DOMAIN_CAPS_FEATURE_LAST];
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-ioapic.xml b/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-ioapic.xml
new file mode 100644
index 000000000..284d63a30
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-ioapic.xml
@@ -0,0 +1,29 @@
+<domain type='kvm'>
+ <name>QEMUGuest1</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+ <memory unit='KiB'>219100</memory>
+ <currentMemory unit='KiB'>219100</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='x86_64' machine='q35'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <features>
+ <ioapic driver='qemu'/>
+ </features>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
+ <controller type='pci' index='0' model='pcie-root'/>
+ <controller type='sata' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
+ </controller>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+ <memballoon model='none'/>
+ <iommu model='intel'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-intel-iommu-ioapic.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-intel-iommu-ioapic.xml
new file mode 120000
index 000000000..42d17b2c0
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-intel-iommu-ioapic.xml
@@ -0,0 +1 @@
+../qemuxml2argvdata/qemuxml2argv-intel-iommu-ioapic.xml
\ No newline at end of file
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 2dccde746..0f00b20d3 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -1122,6 +1122,7 @@ mymain(void)
DO_TEST("intel-iommu-machine",
QEMU_CAPS_MACHINE_OPT,
QEMU_CAPS_MACHINE_IOMMU);
+ DO_TEST("intel-iommu-ioapic", NONE);
DO_TEST("cpu-check-none", NONE);
DO_TEST("cpu-check-partial", NONE);

View File

@ -1,52 +0,0 @@
commit 935d927aa881753fff30f6236eedcf9680bca638
Author: Ján Tomko <jtomko@redhat.com>
Date: Fri May 12 16:59:45 2017 +0200
conf: add ABI stability checks for IOMMU options
https://bugzilla.redhat.com/show_bug.cgi?id=1427005
Index: libvirt-3.3.0/src/conf/domain_conf.c
===================================================================
--- libvirt-3.3.0.orig/src/conf/domain_conf.c
+++ libvirt-3.3.0/src/conf/domain_conf.c
@@ -19691,6 +19691,16 @@ virDomainDefFeaturesCheckABIStability(vi
}
}
+ /* ioapic */
+ if (src->ioapic != dst->ioapic) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("State of ioapic differs: "
+ "source: '%s', destination: '%s'"),
+ virDomainIOAPICTypeToString(src->ioapic),
+ virDomainIOAPICTypeToString(dst->ioapic));
+ return false;
+ }
+
return true;
}
@@ -19830,6 +19840,22 @@ virDomainIOMMUDefCheckABIStability(virDo
virDomainIOMMUModelTypeToString(src->model));
return false;
}
+ if (src->intremap != dst->intremap) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("Target domain IOMMU device intremap value '%s' "
+ "does not match source '%s'"),
+ virTristateSwitchTypeToString(dst->intremap),
+ virTristateSwitchTypeToString(src->intremap));
+ return false;
+ }
+ if (src->caching_mode != dst->caching_mode) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("Target domain IOMMU device caching mode '%s' "
+ "does not match source '%s'"),
+ virTristateSwitchTypeToString(dst->caching_mode),
+ virTristateSwitchTypeToString(src->caching_mode));
+ return false;
+ }
return true;
}

View File

@ -1,70 +0,0 @@
commit 975ea20f85987855686a683c1840e56b7270c570
Author: Jim Fehlig <jfehlig@suse.com>
Date: Fri May 19 15:31:48 2017 -0600
maint: define a macro for IPv4 loopback address
Use a macro instead of hardcoding "127.0.0.1" throughout the
sources.
Index: libvirt-3.3.0/src/internal.h
===================================================================
--- libvirt-3.3.0.orig/src/internal.h
+++ libvirt-3.3.0/src/internal.h
@@ -79,6 +79,8 @@
# define INET_ADDRSTRLEN 16
# endif
+# define VIR_LOOPBACK_IPV4_ADDR "127.0.0.1"
+
/* String equality tests, suggested by Jim Meyering. */
# define STREQ(a, b) (strcmp(a, b) == 0)
# define STRCASEEQ(a, b) (c_strcasecmp(a, b) == 0)
Index: libvirt-3.3.0/src/qemu/qemu_conf.c
===================================================================
--- libvirt-3.3.0.orig/src/qemu/qemu_conf.c
+++ libvirt-3.3.0/src/qemu/qemu_conf.c
@@ -250,10 +250,10 @@ virQEMUDriverConfigPtr virQEMUDriverConf
SYSCONFDIR "/pki/qemu") < 0)
goto error;
- if (VIR_STRDUP(cfg->vncListen, "127.0.0.1") < 0)
+ if (VIR_STRDUP(cfg->vncListen, VIR_LOOPBACK_IPV4_ADDR) < 0)
goto error;
- if (VIR_STRDUP(cfg->spiceListen, "127.0.0.1") < 0)
+ if (VIR_STRDUP(cfg->spiceListen, VIR_LOOPBACK_IPV4_ADDR) < 0)
goto error;
/*
Index: libvirt-3.3.0/src/util/virsocketaddr.c
===================================================================
--- libvirt-3.3.0.orig/src/util/virsocketaddr.c
+++ libvirt-3.3.0/src/util/virsocketaddr.c
@@ -383,11 +383,11 @@ virSocketAddrFormatFull(const virSocketA
* nicely for UNIX sockets */
if (addr->data.sa.sa_family == AF_UNIX) {
if (withService) {
- if (virAsprintf(&addrstr, "127.0.0.1%s0",
+ if (virAsprintf(&addrstr, VIR_LOOPBACK_IPV4_ADDR"%s0",
separator ? separator : ":") < 0)
goto error;
} else {
- if (VIR_STRDUP(addrstr, "127.0.0.1") < 0)
+ if (VIR_STRDUP(addrstr, VIR_LOOPBACK_IPV4_ADDR) < 0)
goto error;
}
return addrstr;
Index: libvirt-3.3.0/src/vz/vz_sdk.c
===================================================================
--- libvirt-3.3.0.orig/src/vz/vz_sdk.c
+++ libvirt-3.3.0/src/vz/vz_sdk.c
@@ -3084,7 +3084,7 @@ static int prlsdkApplyGraphicsParams(PRL
glisten = virDomainGraphicsGetListen(gr, 0);
pret = PrlVmCfg_SetVNCHostName(sdkdom, glisten && glisten->address ?
- glisten->address : "127.0.0.1");
+ glisten->address : VIR_LOOPBACK_IPV4_ADDR);
prlsdkCheckRetGoto(pret, cleanup);
ret = 0;

View File

@ -1,136 +0,0 @@
commit a56914486ca67f921ee6e3ce26b5787fccb47155
Author: Ján Tomko <jtomko@redhat.com>
Date: Fri Mar 17 08:28:04 2017 +0100
qemu: format caching-mode on iommu command line
Format the caching-mode option for the intel-iommu device,
based on its <driver caching> attribute value.
https://bugzilla.redhat.com/show_bug.cgi?id=1427005
Index: libvirt-3.3.0/src/qemu/qemu_capabilities.c
===================================================================
--- libvirt-3.3.0.orig/src/qemu/qemu_capabilities.c
+++ libvirt-3.3.0/src/qemu/qemu_capabilities.c
@@ -370,6 +370,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAS
"kernel-irqchip", /* 255 */
"kernel-irqchip.split",
"intel-iommu.intremap",
+ "intel-iommu.caching-mode",
);
@@ -1723,6 +1724,7 @@ static struct virQEMUCapsStringFlags vir
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsIntelIOMMU[] = {
{ "intremap", QEMU_CAPS_INTEL_IOMMU_INTREMAP },
+ { "caching-mode", QEMU_CAPS_INTEL_IOMMU_CACHING_MODE },
};
/* see documentation for virQEMUCapsQMPSchemaGetByPath for the query format */
Index: libvirt-3.3.0/src/qemu/qemu_capabilities.h
===================================================================
--- libvirt-3.3.0.orig/src/qemu/qemu_capabilities.h
+++ libvirt-3.3.0/src/qemu/qemu_capabilities.h
@@ -408,6 +408,7 @@ typedef enum {
QEMU_CAPS_MACHINE_KERNEL_IRQCHIP, /* -machine kernel_irqchip */
QEMU_CAPS_MACHINE_KERNEL_IRQCHIP_SPLIT, /* -machine kernel_irqchip=split */
QEMU_CAPS_INTEL_IOMMU_INTREMAP, /* intel-iommu.intremap */
+ QEMU_CAPS_INTEL_IOMMU_CACHING_MODE, /* intel-iommu.caching-mode */
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;
Index: libvirt-3.3.0/src/qemu/qemu_command.c
===================================================================
--- libvirt-3.3.0.orig/src/qemu/qemu_command.c
+++ libvirt-3.3.0/src/qemu/qemu_command.c
@@ -6694,6 +6694,13 @@ qemuBuildIOMMUCommandLine(virCommandPtr
"with this QEMU binary"));
return -1;
}
+ if (iommu->caching_mode != VIR_TRISTATE_SWITCH_ABSENT &&
+ !virQEMUCapsGet(qemuCaps, QEMU_CAPS_INTEL_IOMMU_CACHING_MODE)) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("iommu: caching mode is not supported "
+ "with this QEMU binary"));
+ return -1;
+ }
break;
case VIR_DOMAIN_IOMMU_MODEL_LAST:
break;
@@ -6723,6 +6730,10 @@ qemuBuildIOMMUCommandLine(virCommandPtr
virBufferAsprintf(&opts, ",intremap=%s",
virTristateSwitchTypeToString(iommu->intremap));
}
+ if (iommu->caching_mode != VIR_TRISTATE_SWITCH_ABSENT) {
+ virBufferAsprintf(&opts, ",caching-mode=%s",
+ virTristateSwitchTypeToString(iommu->caching_mode));
+ }
case VIR_DOMAIN_IOMMU_MODEL_LAST:
break;
}
Index: libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
===================================================================
--- libvirt-3.3.0.orig/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
+++ libvirt-3.3.0/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml
@@ -213,6 +213,7 @@
<flag name='kernel-irqchip'/>
<flag name='kernel-irqchip.split'/>
<flag name='intel-iommu.intremap'/>
+ <flag name='intel-iommu.caching-mode'/>
<version>2009000</version>
<kvmVersion>0</kvmVersion>
<package> (v2.9.0)</package>
Index: libvirt-3.3.0/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-caching-mode.args
===================================================================
--- /dev/null
+++ libvirt-3.3.0/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-caching-mode.args
@@ -0,0 +1,25 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu-system-x86_64 \
+-name QEMUGuest1 \
+-S \
+-machine q35,accel=tcg \
+-m 214 \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-nodefaults \
+-monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \
+-no-acpi \
+-boot c \
+-device intel-iommu,intremap=on,caching-mode=on \
+-device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \
+-device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \
+-device ioh3420,port=0x10,chassis=3,id=pci.3,bus=pcie.0,addr=0x2 \
+-device ich9-usb-ehci1,id=usb,bus=pci.2,addr=0x2.0x7 \
+-device rtl8139,vlan=0,id=net0,mac=52:54:00:ab:0c:5c,bus=pci.2,addr=0x1 \
+-net user,vlan=0,name=hostnet0
Index: libvirt-3.3.0/tests/qemuxml2argvtest.c
===================================================================
--- libvirt-3.3.0.orig/tests/qemuxml2argvtest.c
+++ libvirt-3.3.0/tests/qemuxml2argvtest.c
@@ -2515,6 +2515,17 @@ mymain(void)
QEMU_CAPS_MACHINE_KERNEL_IRQCHIP_SPLIT,
QEMU_CAPS_INTEL_IOMMU_INTREMAP,
QEMU_CAPS_DEVICE_INTEL_IOMMU);
+ DO_TEST("intel-iommu-caching-mode",
+ QEMU_CAPS_MACHINE_OPT,
+ QEMU_CAPS_DEVICE_PCI_BRIDGE,
+ QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
+ QEMU_CAPS_DEVICE_IOH3420,
+ QEMU_CAPS_ICH9_AHCI,
+ QEMU_CAPS_PCI_MULTIFUNCTION,
+ QEMU_CAPS_ICH9_USB_EHCI1,
+ QEMU_CAPS_DEVICE_INTEL_IOMMU,
+ QEMU_CAPS_INTEL_IOMMU_INTREMAP,
+ QEMU_CAPS_INTEL_IOMMU_CACHING_MODE);
DO_TEST("cpu-hotplug-startup", QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS);

View File

@ -1,55 +0,0 @@
commit aeda1b8c56dc58b0a413acc61bbea938b40499e1
Author: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Date: Thu Mar 9 10:54:32 2017 +0100
qemu: monitor: do not report error on shutdown
If a shutdown is expected because it was triggered via libvirt we can
also expect the monitor to close. In those cases do not report an
internal error like:
"internal error: End of file from qemu monitor"
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Index: libvirt-3.3.0/src/qemu/qemu_monitor.c
===================================================================
--- libvirt-3.3.0.orig/src/qemu/qemu_monitor.c
+++ libvirt-3.3.0/src/qemu/qemu_monitor.c
@@ -63,6 +63,7 @@ struct _qemuMonitor {
int fd;
int watch;
int hasSendFD;
+ int willhangup;
virDomainObjPtr vm;
@@ -693,8 +694,10 @@ qemuMonitorIO(int watch, int fd, int eve
if (events & VIR_EVENT_HANDLE_HANGUP) {
hangup = true;
if (!error) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("End of file from qemu monitor"));
+ if (!mon->willhangup) {
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("End of file from qemu monitor"));
+ }
eof = true;
events &= ~VIR_EVENT_HANDLE_HANGUP;
}
@@ -733,7 +736,7 @@ qemuMonitorIO(int watch, int fd, int eve
if (mon->lastError.code != VIR_ERR_OK) {
/* Already have an error, so clear any new error */
virResetLastError();
- } else {
+ } else if (!mon->willhangup) {
virErrorPtr err = virGetLastError();
if (!err)
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
@@ -1327,6 +1330,7 @@ qemuMonitorEmitShutdown(qemuMonitorPtr m
{
int ret = -1;
VIR_DEBUG("mon=%p", mon);
+ mon->willhangup = 1;
QEMU_MONITOR_CALLBACK(mon, ret, domainShutdown, mon->vm);
return ret;

View File

@ -1,7 +1,7 @@
Index: libvirt-3.3.0/examples/apparmor/libvirt-qemu Index: libvirt-3.4.0/examples/apparmor/libvirt-qemu
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/examples/apparmor/libvirt-qemu --- libvirt-3.4.0.orig/examples/apparmor/libvirt-qemu
+++ libvirt-3.3.0/examples/apparmor/libvirt-qemu +++ libvirt-3.4.0/examples/apparmor/libvirt-qemu
@@ -146,6 +146,9 @@ @@ -146,6 +146,9 @@
# for restore # for restore
/{usr/,}bin/bash rmix, /{usr/,}bin/bash rmix,

View File

@ -1,7 +1,7 @@
Index: libvirt-3.3.0/examples/apparmor/libvirt-lxc Index: libvirt-3.4.0/examples/apparmor/libvirt-lxc
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/examples/apparmor/libvirt-lxc --- libvirt-3.4.0.orig/examples/apparmor/libvirt-lxc
+++ libvirt-3.3.0/examples/apparmor/libvirt-lxc +++ libvirt-3.4.0/examples/apparmor/libvirt-lxc
@@ -2,39 +2,15 @@ @@ -2,39 +2,15 @@
#include <abstractions/base> #include <abstractions/base>

View File

@ -11,11 +11,11 @@ Signed-off-by: Chunyan Liu <cyliu@suse.com>
src/qemu/qemu_driver.c | 7 +++++++ src/qemu/qemu_driver.c | 7 +++++++
1 file changed, 7 insertions(+) 1 file changed, 7 insertions(+)
Index: libvirt-3.3.0/src/qemu/qemu_driver.c Index: libvirt-3.4.0/src/qemu/qemu_driver.c
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/src/qemu/qemu_driver.c --- libvirt-3.4.0.orig/src/qemu/qemu_driver.c
+++ libvirt-3.3.0/src/qemu/qemu_driver.c +++ libvirt-3.4.0/src/qemu/qemu_driver.c
@@ -16566,6 +16566,15 @@ qemuDomainBlockCopyCommon(virDomainObjPt @@ -16586,6 +16586,15 @@ qemuDomainBlockCopyCommon(virDomainObjPt
_("non-file destination not supported yet")); _("non-file destination not supported yet"));
goto endjob; goto endjob;
} }

View File

@ -1,222 +0,0 @@
commit d12781b47eb0c9f3a498d88b632c327aa08aaf8a
Author: Ján Tomko <jtomko@redhat.com>
Date: Fri Mar 17 08:27:49 2017 +0100
conf: add caching_mode attribute to iommu device
Add a new attribute to control the caching mode.
https://bugzilla.redhat.com/show_bug.cgi?id=1427005
Index: libvirt-3.3.0/docs/formatdomain.html.in
===================================================================
--- libvirt-3.3.0.orig/docs/formatdomain.html.in
+++ libvirt-3.3.0/docs/formatdomain.html.in
@@ -7427,6 +7427,15 @@ qemu-kvm -net nic,model=? /dev/null
<span class="since">Since 3.4.0</span> (QEMU/KVM only)
</p>
</dd>
+ <dt><code>caching_mode</code></dt>
+ <dd>
+ <p>
+ The <code>caching_mode</code> attribute with possible values
+ <code>on</code> and <code>off</code> can be used to
+ turn on the VT-d caching mode (useful for assigned devices).
+ <span class="since">Since 3.4.0</span> (QEMU/KVM only)
+ </p>
+ </dd>
</dl>
</dd>
</dl>
Index: libvirt-3.3.0/docs/schemas/domaincommon.rng
===================================================================
--- libvirt-3.3.0.orig/docs/schemas/domaincommon.rng
+++ libvirt-3.3.0/docs/schemas/domaincommon.rng
@@ -3954,6 +3954,11 @@
<ref name="virOnOff"/>
</attribute>
</optional>
+ <optional>
+ <attribute name="caching_mode">
+ <ref name="virOnOff"/>
+ </attribute>
+ </optional>
</element>
</optional>
</element>
Index: libvirt-3.3.0/src/conf/domain_conf.c
===================================================================
--- libvirt-3.3.0.orig/src/conf/domain_conf.c
+++ libvirt-3.3.0/src/conf/domain_conf.c
@@ -14176,6 +14176,15 @@ virDomainIOMMUDefParseXML(xmlNodePtr nod
iommu->intremap = val;
}
+ VIR_FREE(tmp);
+ if ((tmp = virXPathString("string(./driver/@caching_mode)", ctxt))) {
+ if ((val = virTristateSwitchTypeFromString(tmp)) < 0) {
+ virReportError(VIR_ERR_XML_ERROR, _("unknown caching_mode value: %s"), tmp);
+ goto cleanup;
+ }
+ iommu->caching_mode = val;
+ }
+
ret = iommu;
iommu = NULL;
@@ -24143,9 +24152,18 @@ virDomainIOMMUDefFormat(virBufferPtr buf
virBufferAdjustIndent(&childBuf, virBufferGetIndent(buf, false) + 2);
- if (iommu->intremap != VIR_TRISTATE_SWITCH_ABSENT) {
- virBufferAsprintf(&childBuf, "<driver intremap='%s'/>\n",
- virTristateSwitchTypeToString(iommu->intremap));
+ if (iommu->intremap != VIR_TRISTATE_SWITCH_ABSENT ||
+ iommu->caching_mode != VIR_TRISTATE_SWITCH_ABSENT) {
+ virBufferAddLit(&childBuf, "<driver");
+ if (iommu->intremap != VIR_TRISTATE_SWITCH_ABSENT) {
+ virBufferAsprintf(&childBuf, " intremap='%s'",
+ virTristateSwitchTypeToString(iommu->intremap));
+ }
+ if (iommu->caching_mode != VIR_TRISTATE_SWITCH_ABSENT) {
+ virBufferAsprintf(&childBuf, " caching_mode='%s'",
+ virTristateSwitchTypeToString(iommu->caching_mode));
+ }
+ virBufferAddLit(&childBuf, "/>\n");
}
virBufferAsprintf(buf, "<iommu model='%s'",
Index: libvirt-3.3.0/src/conf/domain_conf.h
===================================================================
--- libvirt-3.3.0.orig/src/conf/domain_conf.h
+++ libvirt-3.3.0/src/conf/domain_conf.h
@@ -2210,6 +2210,7 @@ typedef enum {
struct _virDomainIOMMUDef {
virDomainIOMMUModel model;
virTristateSwitch intremap;
+ virTristateSwitch caching_mode;
};
/*
* Guest VM main configuration
Index: libvirt-3.3.0/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-caching-mode.xml
===================================================================
--- /dev/null
+++ libvirt-3.3.0/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-caching-mode.xml
@@ -0,0 +1,50 @@
+<domain type='qemu'>
+ <name>QEMUGuest1</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+ <memory unit='KiB'>219100</memory>
+ <currentMemory unit='KiB'>219100</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='x86_64' machine='q35'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
+ <controller type='pci' index='0' model='pcie-root'/>
+ <controller type='pci' index='1' model='dmi-to-pci-bridge'>
+ <model name='i82801b11-bridge'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
+ </controller>
+ <controller type='pci' index='2' model='pci-bridge'>
+ <model name='pci-bridge'/>
+ <target chassisNr='2'/>
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+ </controller>
+ <controller type='pci' index='3' model='pcie-root-port'>
+ <model name='ioh3420'/>
+ <target chassis='3' port='0x10'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+ </controller>
+ <controller type='sata' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
+ </controller>
+ <controller type='usb' index='0' model='ich9-ehci1'>
+ <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x7'/>
+ </controller>
+ <interface type='user'>
+ <mac address='52:54:00:ab:0c:5c'/>
+ <model type='rtl8139'/>
+ <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>
+ </interface>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+ <memballoon model='none'/>
+ <iommu model='intel'>
+ <driver intremap='on' caching_mode='on'/>
+ </iommu>
+ </devices>
+</domain>
Index: libvirt-3.3.0/tests/qemuxml2xmloutdata/qemuxml2xmlout-intel-iommu-caching-mode.xml
===================================================================
--- /dev/null
+++ libvirt-3.3.0/tests/qemuxml2xmloutdata/qemuxml2xmlout-intel-iommu-caching-mode.xml
@@ -0,0 +1,50 @@
+<domain type='qemu'>
+ <name>QEMUGuest1</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+ <memory unit='KiB'>219100</memory>
+ <currentMemory unit='KiB'>219100</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='x86_64' machine='q35'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
+ <controller type='pci' index='0' model='pcie-root'/>
+ <controller type='pci' index='1' model='dmi-to-pci-bridge'>
+ <model name='i82801b11-bridge'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
+ </controller>
+ <controller type='pci' index='2' model='pci-bridge'>
+ <model name='pci-bridge'/>
+ <target chassisNr='2'/>
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+ </controller>
+ <controller type='pci' index='3' model='pcie-root-port'>
+ <model name='ioh3420'/>
+ <target chassis='3' port='0x10'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+ </controller>
+ <controller type='sata' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
+ </controller>
+ <controller type='usb' index='0' model='ich9-ehci1'>
+ <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x7'/>
+ </controller>
+ <interface type='user'>
+ <mac address='52:54:00:ab:0c:5c'/>
+ <model type='rtl8139'/>
+ <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>
+ </interface>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+ <memballoon model='none'/>
+ <iommu model='intel'>
+ <driver intremap='on' caching_mode='on'/>
+ </iommu>
+ </devices>
+</domain>
Index: libvirt-3.3.0/tests/qemuxml2xmltest.c
===================================================================
--- libvirt-3.3.0.orig/tests/qemuxml2xmltest.c
+++ libvirt-3.3.0/tests/qemuxml2xmltest.c
@@ -1123,6 +1123,7 @@ mymain(void)
QEMU_CAPS_MACHINE_OPT,
QEMU_CAPS_MACHINE_IOMMU);
DO_TEST("intel-iommu-ioapic", NONE);
+ DO_TEST("intel-iommu-caching-mode", NONE);
DO_TEST("cpu-check-none", NONE);
DO_TEST("cpu-check-partial", NONE);

View File

@ -1,64 +0,0 @@
commit dbb85e0c15593661ee8e5d95a6160ebdbaa2c9b5
Author: Jim Fehlig <jfehlig@suse.com>
Date: Fri May 19 15:52:04 2017 -0600
libxl: add default listen address for VNC and spice
If a VNC listen address is not specified in domXML, libxl
will default to 127.0.0.1, but this is never reflected in the domXML.
In the case of spice, a missing listen address resulted in listening
on all interfaces, i.e. '0.0.0.0'. If not specified, set the listen
address in virDomainGraphicsDef struct to the libxl default when
creating the frame buffer device. Additionally, set default spice
listen address to 127.0.0.1.
Index: libvirt-3.3.0/src/libxl/libxl_conf.c
===================================================================
--- libvirt-3.3.0.orig/src/libxl/libxl_conf.c
+++ libvirt-3.3.0/src/libxl/libxl_conf.c
@@ -1227,13 +1227,18 @@ libxlMakeVfb(virPortAllocatorPtr graphic
}
x_vfb->vnc.display = l_vfb->data.vnc.port - LIBXL_VNC_PORT_MIN;
- if ((glisten = virDomainGraphicsGetListen(l_vfb, 0)) &&
- glisten->address) {
- /* libxl_device_vfb_init() does VIR_STRDUP("127.0.0.1") */
- VIR_FREE(x_vfb->vnc.listen);
- if (VIR_STRDUP(x_vfb->vnc.listen, glisten->address) < 0)
- return -1;
+ if ((glisten = virDomainGraphicsGetListen(l_vfb, 0))) {
+ if (glisten->address) {
+ /* libxl_device_vfb_init() does VIR_STRDUP("127.0.0.1") */
+ VIR_FREE(x_vfb->vnc.listen);
+ if (VIR_STRDUP(x_vfb->vnc.listen, glisten->address) < 0)
+ return -1;
+ } else {
+ if (VIR_STRDUP(glisten->address, VIR_LOOPBACK_IPV4_ADDR) < 0)
+ return -1;
+ }
}
+
if (VIR_STRDUP(x_vfb->vnc.passwd, l_vfb->data.vnc.auth.passwd) < 0)
return -1;
if (VIR_STRDUP(x_vfb->keymap, l_vfb->data.vnc.keymap) < 0)
@@ -1335,10 +1340,16 @@ libxlMakeBuildInfoVfb(virPortAllocatorPt
}
b_info->u.hvm.spice.port = l_vfb->data.spice.port;
- if ((glisten = virDomainGraphicsGetListen(l_vfb, 0)) &&
- glisten->address &&
- VIR_STRDUP(b_info->u.hvm.spice.host, glisten->address) < 0)
- return -1;
+ if ((glisten = virDomainGraphicsGetListen(l_vfb, 0))) {
+ if (glisten->address) {
+ if (VIR_STRDUP(b_info->u.hvm.spice.host, glisten->address) < 0)
+ return -1;
+ } else {
+ if (VIR_STRDUP(b_info->u.hvm.spice.host, VIR_LOOPBACK_IPV4_ADDR) < 0 ||
+ VIR_STRDUP(glisten->address, VIR_LOOPBACK_IPV4_ADDR) < 0)
+ return -1;
+ }
+ }
if (VIR_STRDUP(b_info->u.hvm.keymap, l_vfb->data.spice.keymap) < 0)
return -1;

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:29e00984174e33cf2183b478382c017de26860452ffee17b73871051264ebb1b
size 14043384

View File

@ -1,10 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQEcBAABAgAGBQJZDNY6AAoJEBVYiyZZa+pdBgEIAKfTozMEi/ZI2NTtpjoZXzDn
gGcSEAZUJj3Chp9LkY/daAgL8RCNKU3c9Y/QgmTflJYEsAZsIRW9rJ3zsCHfPnC1
rty3NulfCujrsLsZEqXHADjbmiTQ/H7WUoStIPBYLkERxrZ+qQ0egsA6qSqe8hy5
6u/cXm8Yav9QvIfp8ikdKcJl+SUQT/yGXXzR7udr/ra8rCfqgvJqKkg+NDLNXB17
kAz4guvjivfAOEel1RASoTyvnXjLzMtG4InfTz0+8cGomLDS1sWmCW+gW519juPm
6TaHbQ1hDnLZvCy3h7TmeUJxLgvyV8Ul2VlZRCytXlJ//IcVlvgDq2+7SpBvjgA=
=fQOM
-----END PGP SIGNATURE-----

3
libvirt-3.4.0.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:42186af6225904d2ada0b494fda4fa777fe5e662a9134686816e7919332c248d
size 14630904

10
libvirt-3.4.0.tar.xz.asc Normal file
View File

@ -0,0 +1,10 @@
-----BEGIN PGP SIGNATURE-----
iQEcBAABAgAGBQJZMQ/gAAoJEBVYiyZZa+pdv+sH/0K892tvUFgjvCwv1nsZih6c
u9h/4VRdCXYBD/ND3rhTitW5hWnNITxrf/Cqz5I4H5vinn9i04AqDC6Nj2WA3g3z
uRXD+X4sd4Uv5A7MI6ySVW5B7KKyWXoRq+NjRd1XPdflnqpznlDI+n32TgkFf+OG
S8vZyPv9IKUa4NW2tkr7rYNhPS8KIck4IJj0cU502yCygWDwJN1yOTHsVFZdTpEV
mx4HbQozPg/4isOqcicfdGJEy+5D4kGxzjxoiw13vMC02mjLxQqWcui1kJW3uuv1
AF4M4VERMcPDQWGN6oCw4aahg8YvLcEOSonoYSpoxdqBmhkPHQ0dZcdG9zY4zMU=
=X6h6
-----END PGP SIGNATURE-----

View File

@ -1,9 +1,9 @@
Adjust libvirt-guests init files to conform to SUSE standards Adjust libvirt-guests init files to conform to SUSE standards
Index: libvirt-3.3.0/tools/libvirt-guests.init.in Index: libvirt-3.4.0/tools/libvirt-guests.init.in
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/tools/libvirt-guests.init.in --- libvirt-3.4.0.orig/tools/libvirt-guests.init.in
+++ libvirt-3.3.0/tools/libvirt-guests.init.in +++ libvirt-3.4.0/tools/libvirt-guests.init.in
@@ -4,27 +4,27 @@ @@ -4,27 +4,27 @@
# http://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/initscrcomconv.html # http://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/initscrcomconv.html
# #
@ -45,10 +45,10 @@ Index: libvirt-3.3.0/tools/libvirt-guests.init.in
# #
exec @libexecdir@/libvirt-guests.sh "$@" exec @libexecdir@/libvirt-guests.sh "$@"
Index: libvirt-3.3.0/tools/libvirt-guests.sh.in Index: libvirt-3.4.0/tools/libvirt-guests.sh.in
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/tools/libvirt-guests.sh.in --- libvirt-3.4.0.orig/tools/libvirt-guests.sh.in
+++ libvirt-3.3.0/tools/libvirt-guests.sh.in +++ libvirt-3.4.0/tools/libvirt-guests.sh.in
@@ -16,14 +16,13 @@ @@ -16,14 +16,13 @@
# License along with this library. If not, see # License along with this library. If not, see
# <http://www.gnu.org/licenses/>. # <http://www.gnu.org/licenses/>.
@ -208,10 +208,10 @@ Index: libvirt-3.3.0/tools/libvirt-guests.sh.in
esac esac
-exit $RETVAL -exit $RETVAL
+rc_exit +rc_exit
Index: libvirt-3.3.0/tools/libvirt-guests.sysconf Index: libvirt-3.4.0/tools/libvirt-guests.sysconf
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/tools/libvirt-guests.sysconf --- libvirt-3.4.0.orig/tools/libvirt-guests.sysconf
+++ libvirt-3.3.0/tools/libvirt-guests.sysconf +++ libvirt-3.4.0/tools/libvirt-guests.sysconf
@@ -1,19 +1,29 @@ @@ -1,19 +1,29 @@
+## Path: System/Virtualization/libvirt-guests +## Path: System/Virtualization/libvirt-guests
+ +

View File

@ -2,10 +2,10 @@ Add POWER8 v2.0 and v2.1 to cpu map XML
From: <ro@suse.de> From: <ro@suse.de>
Index: libvirt-3.3.0/src/cpu/cpu_map.xml Index: libvirt-3.4.0/src/cpu/cpu_map.xml
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/src/cpu/cpu_map.xml --- libvirt-3.4.0.orig/src/cpu/cpu_map.xml
+++ libvirt-3.3.0/src/cpu/cpu_map.xml +++ libvirt-3.4.0/src/cpu/cpu_map.xml
@@ -1569,6 +1569,8 @@ @@ -1569,6 +1569,8 @@
<pvr value='0x004b0000' mask='0xffff0000'/> <pvr value='0x004b0000' mask='0xffff0000'/>
<pvr value='0x004c0000' mask='0xffff0000'/> <pvr value='0x004c0000' mask='0xffff0000'/>
@ -14,4 +14,4 @@ Index: libvirt-3.3.0/src/cpu/cpu_map.xml
+ <pvr value='0x004b0201' mask='0xffffffff'/> + <pvr value='0x004b0201' mask='0xffffffff'/>
</model> </model>
<!-- Freescale-based CPU models --> <model name='POWER9'>

View File

@ -1,7 +1,7 @@
Index: libvirt-3.3.0/configure.ac Index: libvirt-3.4.0/configure.ac
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/configure.ac --- libvirt-3.4.0.orig/configure.ac
+++ libvirt-3.3.0/configure.ac +++ libvirt-3.4.0/configure.ac
@@ -256,6 +256,7 @@ LIBVIRT_ARG_LIBSSH @@ -256,6 +256,7 @@ LIBVIRT_ARG_LIBSSH
LIBVIRT_ARG_LIBXML LIBVIRT_ARG_LIBXML
LIBVIRT_ARG_MACVTAP LIBVIRT_ARG_MACVTAP
@ -18,7 +18,7 @@ Index: libvirt-3.3.0/configure.ac
LIBVIRT_CHECK_NUMACTL LIBVIRT_CHECK_NUMACTL
LIBVIRT_CHECK_NWFILTER LIBVIRT_CHECK_NWFILTER
LIBVIRT_CHECK_OPENWSMAN LIBVIRT_CHECK_OPENWSMAN
@@ -969,6 +971,7 @@ LIBVIRT_RESULT_LIBXL @@ -979,6 +981,7 @@ LIBVIRT_RESULT_LIBXL
LIBVIRT_RESULT_LIBXML LIBVIRT_RESULT_LIBXML
LIBVIRT_RESULT_MACVTAP LIBVIRT_RESULT_MACVTAP
LIBVIRT_RESULT_NETCF LIBVIRT_RESULT_NETCF
@ -26,10 +26,10 @@ Index: libvirt-3.3.0/configure.ac
LIBVIRT_RESULT_NSS LIBVIRT_RESULT_NSS
LIBVIRT_RESULT_NUMACTL LIBVIRT_RESULT_NUMACTL
LIBVIRT_RESULT_OPENWSMAN LIBVIRT_RESULT_OPENWSMAN
Index: libvirt-3.3.0/src/Makefile.am Index: libvirt-3.4.0/src/Makefile.am
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/src/Makefile.am --- libvirt-3.4.0.orig/src/Makefile.am
+++ libvirt-3.3.0/src/Makefile.am +++ libvirt-3.4.0/src/Makefile.am
@@ -1034,6 +1034,10 @@ if WITH_NETCF @@ -1034,6 +1034,10 @@ if WITH_NETCF
INTERFACE_DRIVER_SOURCES += \ INTERFACE_DRIVER_SOURCES += \
interface/interface_backend_netcf.c interface/interface_backend_netcf.c
@ -52,11 +52,11 @@ Index: libvirt-3.3.0/src/Makefile.am
if WITH_UDEV if WITH_UDEV
libvirt_driver_interface_la_CFLAGS += $(UDEV_CFLAGS) libvirt_driver_interface_la_CFLAGS += $(UDEV_CFLAGS)
libvirt_driver_interface_la_LIBADD += $(UDEV_LIBS) libvirt_driver_interface_la_LIBADD += $(UDEV_LIBS)
Index: libvirt-3.3.0/tools/virsh.c Index: libvirt-3.4.0/tools/virsh.c
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/tools/virsh.c --- libvirt-3.4.0.orig/tools/virsh.c
+++ libvirt-3.3.0/tools/virsh.c +++ libvirt-3.4.0/tools/virsh.c
@@ -567,6 +567,8 @@ virshShowVersion(vshControl *ctl ATTRIBU @@ -570,6 +570,8 @@ virshShowVersion(vshControl *ctl ATTRIBU
vshPrint(ctl, " Interface"); vshPrint(ctl, " Interface");
# if defined(WITH_NETCF) # if defined(WITH_NETCF)
vshPrint(ctl, " netcf"); vshPrint(ctl, " netcf");
@ -65,10 +65,10 @@ Index: libvirt-3.3.0/tools/virsh.c
# elif defined(WITH_UDEV) # elif defined(WITH_UDEV)
vshPrint(ctl, " udev"); vshPrint(ctl, " udev");
# endif # endif
Index: libvirt-3.3.0/src/interface/interface_backend_netcf.c Index: libvirt-3.4.0/src/interface/interface_backend_netcf.c
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/src/interface/interface_backend_netcf.c --- libvirt-3.4.0.orig/src/interface/interface_backend_netcf.c
+++ libvirt-3.3.0/src/interface/interface_backend_netcf.c +++ libvirt-3.4.0/src/interface/interface_backend_netcf.c
@@ -23,7 +23,12 @@ @@ -23,7 +23,12 @@
#include <config.h> #include <config.h>
@ -152,10 +152,10 @@ Index: libvirt-3.3.0/src/interface/interface_backend_netcf.c
if (virSetSharedInterfaceDriver(&interfaceDriver) < 0) if (virSetSharedInterfaceDriver(&interfaceDriver) < 0)
return -1; return -1;
if (virRegisterStateDriver(&interfaceStateDriver) < 0) if (virRegisterStateDriver(&interfaceStateDriver) < 0)
Index: libvirt-3.3.0/src/interface/interface_driver.c Index: libvirt-3.4.0/src/interface/interface_driver.c
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/src/interface/interface_driver.c --- libvirt-3.4.0.orig/src/interface/interface_driver.c
+++ libvirt-3.3.0/src/interface/interface_driver.c +++ libvirt-3.4.0/src/interface/interface_driver.c
@@ -30,8 +30,15 @@ interfaceRegister(void) @@ -30,8 +30,15 @@ interfaceRegister(void)
if (netcfIfaceRegister() == 0) if (netcfIfaceRegister() == 0)
return 0; return 0;
@ -173,10 +173,10 @@ Index: libvirt-3.3.0/src/interface/interface_driver.c
if (udevIfaceRegister() == 0) if (udevIfaceRegister() == 0)
return 0; return 0;
#endif /* WITH_UDEV */ #endif /* WITH_UDEV */
Index: libvirt-3.3.0/m4/virt-netcontrol.m4 Index: libvirt-3.4.0/m4/virt-netcontrol.m4
=================================================================== ===================================================================
--- /dev/null --- /dev/null
+++ libvirt-3.3.0/m4/virt-netcontrol.m4 +++ libvirt-3.4.0/m4/virt-netcontrol.m4
@@ -0,0 +1,39 @@ @@ -0,0 +1,39 @@
+dnl The libnetcontrol library +dnl The libnetcontrol library
+dnl +dnl

View File

@ -1,3 +1,39 @@
-------------------------------------------------------------------
Wed Jun 7 22:07:38 UTC 2017 - jfehlig@suse.com
- misc spec file cleanup
- remove checks for old distros well beyond EOL
- enable wireshark dissector for Leap >= 42.2 and Factory
- remove support for old, non-systemd distros
- replace $RPM_ shell vars with modern macros
-------------------------------------------------------------------
Tue Jun 6 22:01:24 UTC 2017 - jfehlig@suse.com
- Don't exceed specified length when reading from stream
5004f121-virFdStreamThread-dont-exceed-length.patch,
1a4b21f1-set-EOF-on-end-of-stream.patch
-------------------------------------------------------------------
Fri Jun 2 17:23:04 UTC 2017 - jfehlig@suse.com
- Update to libvirt 3.4.0
- Many incremental improvements and bug fixes, see
http://libvirt.org/news.html
- Dropped patches:
aeda1b8c-qemu-no-error-shutdown.patch,
8023b21a-conf-ioapic.patch, 6b5c6314-qemu-irqchip.patch,
2020e2c6-conf-intremap.patch, 04028a9d-qemu-intremap.patch,
d12781b4-conf-iommu-cache-mode-attr.patch,
a5691448-qemu-iommu-cache-mode.patch,
3a276c65-conf-iommu-def-stability-check.patch,
935d927a-conf-iommu-ABI-stability-check.patch,
4cd3f241-fix-NULL-disk-source.patch,
975ea20f-loopback-macro.patch,
dbb85e0c-libxl-graphics-listen-addr.patch,
libxl-def-usbctrl.patch, revert-2841e675-mtu.patch
- FATE#321335, bsc#1031056, bsc#1037774, bsc#1040207, bsc#1040213
------------------------------------------------------------------- -------------------------------------------------------------------
Mon May 22 17:30:44 UTC 2017 - jfehlig@suse.com Mon May 22 17:30:44 UTC 2017 - jfehlig@suse.com

View File

@ -19,12 +19,6 @@
# The configuration of libvirt is modified slightly for SLE # The configuration of libvirt is modified slightly for SLE
%define with_sle_build %{?is_opensuse:0}%{!?is_opensuse:1} %define with_sle_build %{?is_opensuse:0}%{!?is_opensuse:1}
# openSUSE13.1 and 13.2 do not understand %is_opensuse. Check for those
# explicitly and disable SLE build
%if 0%{?suse_version} == 1310 || 0%{?suse_version} == 1320
%define with_sle_build 0
%endif
# The hypervisor drivers that run in libvirtd # The hypervisor drivers that run in libvirtd
%define with_xen 0%{!?_without_xen:1} %define with_xen 0%{!?_without_xen:1}
%define with_qemu 0%{!?_without_qemu:1} %define with_qemu 0%{!?_without_qemu:1}
@ -52,7 +46,6 @@
# A few optional bits off by default, we enable later # A few optional bits off by default, we enable later
%define with_cgconfig 0%{!?_without_cgconfig:0} %define with_cgconfig 0%{!?_without_cgconfig:0}
%define with_systemd 0%{!?_without_systemd:0}
%define with_numactl 0%{!?_without_numactl:0} %define with_numactl 0%{!?_without_numactl:0}
%define with_numad 0%{!?_without_numad:0} %define with_numad 0%{!?_without_numad:0}
%define with_firewalld 0%{!?_without_firewalld:0} %define with_firewalld 0%{!?_without_firewalld:0}
@ -70,7 +63,7 @@
%define with_libxl 0 %define with_libxl 0
%endif %endif
# For SLE, further restrice Xen support to x86_64 only # For SLE, further restrict Xen support to x86_64 only
%if %{with_sle_build} %if %{with_sle_build}
%ifarch %arm aarch64 %ifarch %arm aarch64
%define with_xen 0 %define with_xen 0
@ -136,16 +129,13 @@
%endif %endif
%endif %endif
# Support systemd on 12.1 and later # libvirt commit 37397320 changed the configure check for wireshark to use
%if 0%{?suse_version} >= 1210 # pkgconfig. Currently only the Leap 42.2 and Factory wireshark-devel packages
%define with_systemd 0%{!?_without_systemd:1} # provide wireshark.pc. Disable the dissector for SLE and Leap <= 42.1
%if 0%{?sle_version} < 120200 && %{with_sle_build}
%define with_wireshark 0
%endif %endif
# libvirt commit 37397320 changed the configure check for wireshark to
# use pkgconfig, but our wireshark packages do not provide wireshark.pc.
# Disable the dissector for now
%define with_wireshark 0
# numad is used to manage the CPU and memory placement dynamically for # numad is used to manage the CPU and memory placement dynamically for
# qemu, lxc, and uml drivers # qemu, lxc, and uml drivers
%if %{with_qemu} || %{with_lxc} || %{with_uml} %if %{with_qemu} || %{with_lxc} || %{with_uml}
@ -175,7 +165,7 @@
Name: libvirt Name: libvirt
Url: http://libvirt.org/ Url: http://libvirt.org/
Version: 3.3.0 Version: 3.4.0
Release: 0 Release: 0
Summary: Library providing a simple virtualization API Summary: Library providing a simple virtualization API
License: LGPL-2.1+ License: LGPL-2.1+
@ -219,10 +209,8 @@ BuildRequires: gettext-tools
BuildRequires: libtool BuildRequires: libtool
# Needed for virkmodtest in 'make check' # Needed for virkmodtest in 'make check'
BuildRequires: modutils BuildRequires: modutils
%if %{with_systemd}
BuildRequires: systemd BuildRequires: systemd
BuildRequires: pkgconfig(systemd) BuildRequires: pkgconfig(systemd)
%endif
%if %{with_xen} || %{with_libxl} %if %{with_xen} || %{with_libxl}
BuildRequires: xen-devel BuildRequires: xen-devel
%endif %endif
@ -312,27 +300,15 @@ BuildRequires: libssh-devel >= 0.7.0
Source0: %{name}-%{version}.tar.xz Source0: %{name}-%{version}.tar.xz
Source1: %{name}-%{version}.tar.xz.asc Source1: %{name}-%{version}.tar.xz.asc
Source2: %{name}.keyring Source2: %{name}.keyring
Source3: libvirtd.init Source3: libvirtd-relocation-server.fw
Source4: libvirtd-relocation-server.fw
Source99: baselibs.conf Source99: baselibs.conf
Source100: %{name}-rpmlintrc Source100: %{name}-rpmlintrc
# Upstream patches # Upstream patches
Patch0: aeda1b8c-qemu-no-error-shutdown.patch Patch0: 5004f121-virFdStreamThread-dont-exceed-length.patch
Patch1: 8023b21a-conf-ioapic.patch Patch1: 1a4b21f1-set-EOF-on-end-of-stream.patch
Patch2: 6b5c6314-qemu-irqchip.patch
Patch3: 2020e2c6-conf-intremap.patch
Patch4: 04028a9d-qemu-intremap.patch
Patch5: d12781b4-conf-iommu-cache-mode-attr.patch
Patch6: a5691448-qemu-iommu-cache-mode.patch
Patch7: 3a276c65-conf-iommu-def-stability-check.patch
Patch8: 935d927a-conf-iommu-ABI-stability-check.patch
Patch9: 4cd3f241-fix-NULL-disk-source.patch
Patch10: 975ea20f-loopback-macro.patch
Patch11: dbb85e0c-libxl-graphics-listen-addr.patch
# Patches pending upstream review # Patches pending upstream review
Patch100: libxl-dom-reset.patch Patch100: libxl-dom-reset.patch
Patch101: network-don-t-use-dhcp-authoritative-on-static-netwo.patch Patch101: network-don-t-use-dhcp-authoritative-on-static-netwo.patch
Patch102: libxl-def-usbctrl.patch
# Need to go upstream # Need to go upstream
Patch150: xen-pv-cdrom.patch Patch150: xen-pv-cdrom.patch
Patch151: blockcopy-check-dst-identical-device.patch Patch151: blockcopy-check-dst-identical-device.patch
@ -341,7 +317,6 @@ Patch153: ppc64le-canonical-name.patch
Patch154: libxl-set-migration-constraints.patch Patch154: libxl-set-migration-constraints.patch
Patch155: libxl-set-cach-mode.patch Patch155: libxl-set-cach-mode.patch
Patch156: apparmor-fixes.patch Patch156: apparmor-fixes.patch
Patch157: revert-2841e675-mtu.patch
# Our patches # Our patches
Patch200: libvirtd-defaults.patch Patch200: libvirtd-defaults.patch
Patch201: libvirtd-init-script.patch Patch201: libvirtd-init-script.patch
@ -403,10 +378,8 @@ Recommends: polkit >= 0.93
# For virConnectGetSysinfo # For virConnectGetSysinfo
Requires: dmidecode Requires: dmidecode
%endif %endif
%if %{with_systemd}
# For service management # For service management
%{?systemd_requires} %{?systemd_requires}
%endif
%if %{with_numad} %if %{with_numad}
Requires: numad Requires: numad
%endif %endif
@ -901,19 +874,8 @@ libvirt plugin for NSS for translating domain names into IP addresses.
%setup -q %setup -q
%patch0 -p1 %patch0 -p1
%patch1 -p1 %patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch100 -p1 %patch100 -p1
%patch101 -p1 %patch101 -p1
%patch102 -p1
%patch150 -p1 %patch150 -p1
%patch151 -p1 %patch151 -p1
%patch152 -p1 %patch152 -p1
@ -921,7 +883,6 @@ libvirt plugin for NSS for translating domain names into IP addresses.
%patch154 -p1 %patch154 -p1
%patch155 -p1 %patch155 -p1
%patch156 -p1 %patch156 -p1
%patch157 -p1
%patch200 -p1 %patch200 -p1
%patch201 -p1 %patch201 -p1
%patch202 -p1 %patch202 -p1
@ -1034,11 +995,6 @@ libvirt plugin for NSS for translating domain names into IP addresses.
%else %else
%define arg_sanlock --without-sanlock %define arg_sanlock --without-sanlock
%endif %endif
%if %{with_systemd}
%define arg_init_script --with-init-script=systemd
%else
%define arg_init_script --with-init-script=redhat
%endif
%if %{with_firewalld} %if %{with_firewalld}
%define arg_firewalld --with-firewalld %define arg_firewalld --with-firewalld
%else %else
@ -1061,7 +1017,7 @@ LOADERS="$LOADERS:/usr/share/qemu/aavmf-aarch64-code.bin:/usr/share/qemu/aavmf-a
%define arg_loader_nvram --with-loader-nvram="$LOADERS" %define arg_loader_nvram --with-loader-nvram="$LOADERS"
autoreconf -f -i autoreconf -f -i
export CFLAGS="$RPM_OPT_FLAGS" export CFLAGS="%{optflags}"
%configure --disable-static --with-pic \ %configure --disable-static --with-pic \
%{?arg_xen} \ %{?arg_xen} \
%{?arg_qemu} \ %{?arg_qemu} \
@ -1120,7 +1076,7 @@ export CFLAGS="$RPM_OPT_FLAGS"
--with-qemu-group=%{qemu_group} \ --with-qemu-group=%{qemu_group} \
%{?arg_loader_nvram} \ %{?arg_loader_nvram} \
--without-login-shell \ --without-login-shell \
%{arg_init_script} \ --with-init-script=systemd \
ac_cv_path_MODPROBE=/sbin/modprobe \ ac_cv_path_MODPROBE=/sbin/modprobe \
ac_cv_path_UDEVADM=/sbin/udevadm \ ac_cv_path_UDEVADM=/sbin/udevadm \
ac_cv_path_SHOWMOUNT=/usr/sbin/showmount \ ac_cv_path_SHOWMOUNT=/usr/sbin/showmount \
@ -1132,146 +1088,124 @@ gzip -9 ChangeLog
%install %install
%makeinstall SYSTEMD_UNIT_DIR=%{_unitdir} HTML_DIR=%{_docdir}/%{name} %makeinstall SYSTEMD_UNIT_DIR=%{_unitdir} HTML_DIR=%{_docdir}/%{name}
make %{?jobs:-j%jobs} -C examples distclean make %{?jobs:-j%jobs} -C examples distclean
cp examples/lxcconvert/virt-lxc-convert $RPM_BUILD_ROOT%{_bindir} cp examples/lxcconvert/virt-lxc-convert %{buildroot}/%{_bindir}
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la rm -f %{buildroot}/%{_libdir}/*.la
%if %{with_wireshark} %if %{with_wireshark}
rm -f $RPM_BUILD_ROOT%{_libdir}/wireshark/plugins/libvirt.la rm -f %{buildroot}/%{_libdir}/wireshark/plugins/libvirt.la
%endif %endif
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a rm -f %{buildroot}/%{_libdir}/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/lock-driver/*.la rm -f %{buildroot}/%{_libdir}/%{name}/lock-driver/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/lock-driver/*.a rm -f %{buildroot}/%{_libdir}/%{name}/lock-driver/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/connection-driver/*.la rm -f %{buildroot}/%{_libdir}/%{name}/connection-driver/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/connection-driver/*.a rm -f %{buildroot}/%{_libdir}/%{name}/connection-driver/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/storage-backend/*.la rm -f %{buildroot}/%{_libdir}/%{name}/storage-backend/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/storage-backend/*.a rm -f %{buildroot}/%{_libdir}/%{name}/storage-backend/*.a
# remove currently unsupported locale(s) # remove currently unsupported locale(s)
for dir in $RPM_BUILD_ROOT/usr/share/locale/* for dir in %{buildroot}/usr/share/locale/*
do do
sdir=`echo $dir | sed "s|$RPM_BUILD_ROOT||"` sdir=`echo $dir | sed "s|%{buildroot}||"`
if test -d $sdir ; then continue ; fi if test -d $sdir ; then continue ; fi
rm -rfv "$dir" rm -rfv "$dir"
done done
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/libvirt mkdir -p %{buildroot}/%{_localstatedir}/lib/libvirt
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/hooks mkdir -p %{buildroot}/%{_sysconfdir}/libvirt/hooks
%find_lang %{name} %find_lang %{name}
# Add a README to the libvirt package with a note about the empty # Add a README to the libvirt package with a note about the empty
# file list # file list
cat > $RPM_BUILD_ROOT%{_docdir}/libvirt/libvirt.README << 'EOF' cat > %{buildroot}/%{_docdir}/libvirt/libvirt.README << 'EOF'
The libvirt package no longer contains any files. It exists now The libvirt package no longer contains any files. It exists now
only to fulfill its 'Provides' contract. only to fulfill its 'Provides' contract.
EOF EOF
install -d -m 0755 $RPM_BUILD_ROOT%{_localstatedir}/lib/libvirt/dnsmasq/ install -d -m 0755 %{buildroot}/%{_localstatedir}/lib/libvirt/dnsmasq/
install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/libvirt/networks/ install -d -m 0755 %{buildroot}/%{_datadir}/libvirt/networks/
cp $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml \ cp %{buildroot}/%{_sysconfdir}/libvirt/qemu/networks/default.xml \
$RPM_BUILD_ROOT%{_datadir}/libvirt/networks/default.xml %{buildroot}/%{_datadir}/libvirt/networks/default.xml
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/default.xml rm -f %{buildroot}/%{_sysconfdir}/libvirt/qemu/networks/default.xml
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml rm -f %{buildroot}/%{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml
# Strip auto-generated UUID - we need it generated per-install # Strip auto-generated UUID - we need it generated per-install
sed -i -e "/<uuid>/d" $RPM_BUILD_ROOT%{_datadir}/libvirt/networks/default.xml sed -i -e "/<uuid>/d" %{buildroot}/%{_datadir}/libvirt/networks/default.xml
%if %{with_lxc} %if %{with_lxc}
cat > $RPM_BUILD_ROOT%{_docdir}/libvirt/libvirt-daemon-lxc.README << 'EOF' cat > %{buildroot}/%{_docdir}/libvirt/libvirt-daemon-lxc.README << 'EOF'
Any empty package encapsulating requirements for a libvirtd capable Any empty package encapsulating requirements for a libvirtd capable
of managing LXC. of managing LXC.
EOF EOF
%else %else
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/lxc.conf rm -rf %{buildroot}/%{_sysconfdir}/libvirt/lxc.conf
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_lxc.aug rm -f %{buildroot}/%{_datadir}/augeas/lenses/libvirtd_lxc.aug
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_lxc.aug rm -f %{buildroot}/%{_datadir}/augeas/lenses/tests/test_libvirtd_lxc.aug
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.lxc rm -rf %{buildroot}/%{_sysconfdir}/logrotate.d/libvirtd.lxc
%endif %endif
%if %{with_qemu} %if %{with_qemu}
cat > $RPM_BUILD_ROOT%{_docdir}/libvirt/libvirt-daemon-qemu.README << 'EOF' cat > %{buildroot}/%{_docdir}/libvirt/libvirt-daemon-qemu.README << 'EOF'
Any empty package encapsulating requirements for a libvirtd capable Any empty package encapsulating requirements for a libvirtd capable
of managing QEMU/KVM. of managing QEMU/KVM.
EOF EOF
%else %else
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu.conf rm -rf %{buildroot}/%{_sysconfdir}/libvirt/qemu.conf
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_qemu.aug rm -f %{buildroot}/%{_datadir}/augeas/lenses/libvirtd_qemu.aug
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug rm -f %{buildroot}/%{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.qemu rm -rf %{buildroot}/%{_sysconfdir}/logrotate.d/libvirtd.qemu
%endif %endif
%if %{with_uml} %if %{with_uml}
cat > $RPM_BUILD_ROOT%{_docdir}/libvirt/libvirt-daemon-uml.README << 'EOF' cat > %{buildroot}/%{_docdir}/libvirt/libvirt-daemon-uml.README << 'EOF'
Any empty package encapsulating requirements for a libvirtd capable Any empty package encapsulating requirements for a libvirtd capable
of managing UML. of managing UML.
EOF EOF
%else %else
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.uml rm -rf %{buildroot}/%{_sysconfdir}/logrotate.d/libvirtd.uml
%endif %endif
%if %{with_vbox} %if %{with_vbox}
cat > $RPM_BUILD_ROOT%{_docdir}/libvirt/libvirt-daemon-vbox.README << 'EOF' cat > %{buildroot}/%{_docdir}/libvirt/libvirt-daemon-vbox.README << 'EOF'
Any empty package encapsulating requirements for a libvirtd capable Any empty package encapsulating requirements for a libvirtd capable
of managing VirtualBox. of managing VirtualBox.
EOF EOF
%endif %endif
%if %{with_xen} || %{with_libxl} %if %{with_xen} || %{with_libxl}
cat > $RPM_BUILD_ROOT%{_docdir}/libvirt/libvirt-daemon-xen.README << 'EOF' cat > %{buildroot}/%{_docdir}/libvirt/libvirt-daemon-xen.README << 'EOF'
Any empty package encapsulating requirements for a libvirtd capable Any empty package encapsulating requirements for a libvirtd capable
of managing Xen. of managing Xen.
EOF EOF
%endif %endif
%if ! %{with_libxl} %if ! %{with_libxl}
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/libxl.conf rm -f %{buildroot}/%{_sysconfdir}/libvirt/libxl.conf
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.libxl rm -f %{buildroot}/%{_sysconfdir}/logrotate.d/libvirtd.libxl
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_libxl.aug rm -f %{buildroot}/%{_datadir}/augeas/lenses/libvirtd_libxl.aug
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_libxl.aug rm -f %{buildroot}/%{_datadir}/augeas/lenses/tests/test_libvirtd_libxl.aug
%endif %endif
%if ! %{with_sanlock} %if ! %{with_sanlock}
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirt_sanlock.aug rm -f %{buildroot}/%{_datadir}/augeas/lenses/libvirt_sanlock.aug
rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirt_sanlock.aug rm -f %{buildroot}/%{_datadir}/augeas/lenses/tests/test_libvirt_sanlock.aug
%endif %endif
# init scripts # init scripts
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/init.d mkdir -p %{buildroot}/%{_localstatedir}/adm/fillup-templates
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/adm/fillup-templates rm -f %{buildroot}/usr/lib/sysctl.d/60-libvirtd.conf
# Currently using our own libvirtd init script mv %{buildroot}/%{_sysconfdir}/sysconfig/libvirtd %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.libvirtd
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/libvirtd mv %{buildroot}/%{_sysconfdir}/sysconfig/virtlogd %{buildroot}/%{_localstatedir}/adm/fillup-templates/sysconfig.virtlogd
%if %{with_systemd} mv %{buildroot}/%{_sysconfdir}/sysconfig/virtlockd %{buildroot}/%{_localstatedir}/adm/fillup-templates/sysconfig.virtlockd
ln -s %{_sbindir}/service $RPM_BUILD_ROOT%{_sbindir}/rclibvirtd mv %{buildroot}/%{_sysconfdir}/sysconfig/libvirt-guests %{buildroot}/%{_localstatedir}/adm/fillup-templates/sysconfig.libvirt-guests
%else # Provide rc symlink backward compatibility
install %SOURCE3 $RPM_BUILD_ROOT%{_sysconfdir}/init.d/libvirtd ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rclibvirtd
ln -s /etc/init.d/libvirtd $RPM_BUILD_ROOT%{_sbindir}/rclibvirtd ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcvirtlogd
%endif ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rcvirtlockd
mv $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/libvirtd $RPM_BUILD_ROOT%{_localstatedir}/adm/fillup-templates/sysconfig.libvirtd ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rclibvirt-guests
rm -f $RPM_BUILD_ROOT/usr/lib/sysctl.d/60-libvirtd.conf
# For other services, use the in-tree scripts
%if %{with_systemd}
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/virtlogd
ln -s %{_sbindir}/service $RPM_BUILD_ROOT%{_sbindir}/rcvirtlogd
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/virtlockd
ln -s %{_sbindir}/service $RPM_BUILD_ROOT%{_sbindir}/rcvirtlockd
%else
mv $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/virtlogd $RPM_BUILD_ROOT%{_sysconfdir}/init.d/virtlogd
ln -s /etc/init.d/virtlogd $RPM_BUILD_ROOT%{_sbindir}/rcvirtlogd
mv $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/virtlockd $RPM_BUILD_ROOT%{_sysconfdir}/init.d/virtlockd
ln -s /etc/init.d/virtlockd $RPM_BUILD_ROOT%{_sbindir}/rcvirtlockd
%endif
mv $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/virtlogd $RPM_BUILD_ROOT%{_localstatedir}/adm/fillup-templates/sysconfig.virtlogd
mv $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/virtlockd $RPM_BUILD_ROOT%{_localstatedir}/adm/fillup-templates/sysconfig.virtlockd
#install firewall definitions format is described here: #install firewall definitions format is described here:
#/usr/share/SuSEfirewall2/services/TEMPLATE #/usr/share/SuSEfirewall2/services/TEMPLATE
mkdir -p $RPM_BUILD_ROOT%{_fwdefdir} mkdir -p %{buildroot}/%{_fwdefdir}
install -m 644 %{S:4} $RPM_BUILD_ROOT%{_fwdefdir}/libvirtd-relocation-server install -m 644 %{S:3} %{buildroot}/%{_fwdefdir}/libvirtd-relocation-server
%if %{with_systemd}
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/libvirt-guests
ln -s %{_sbindir}/service $RPM_BUILD_ROOT%{_sbindir}/rclibvirt-guests
%else
mv $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/libvirt-guests $RPM_BUILD_ROOT%{_sysconfdir}/init.d/libvirt-guests
mkdir -p $RPM_BUILD_ROOT%{_sbindir}
ln -s %{_sysconfdir}/init.d/libvirt-guests $RPM_BUILD_ROOT%{_sbindir}/rclibvirt-guests
%endif
mv $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/libvirt-guests $RPM_BUILD_ROOT%{_localstatedir}/adm/fillup-templates/sysconfig.libvirt-guests
%ifarch %{power64} s390x x86_64 %ifarch %{power64} s390x x86_64
mv $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_probes.stp \ mv %{buildroot}/%{_datadir}/systemtap/tapset/libvirt_probes.stp \
$RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_probes-64.stp %{buildroot}/%{_datadir}/systemtap/tapset/libvirt_probes-64.stp
mv $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_qemu_probes.stp \ mv %{buildroot}/%{_datadir}/systemtap/tapset/libvirt_qemu_probes.stp \
$RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_qemu_probes-64.stp %{buildroot}/%{_datadir}/systemtap/tapset/libvirt_qemu_probes-64.stp
%endif %endif
%fdupes -s $RPM_BUILD_ROOT %fdupes -s %{buildroot}
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf %{buildroot}
%check %check
cd tests cd tests
@ -1297,39 +1231,28 @@ then
fi fi
%pre daemon %pre daemon
%if %{with_systemd}
%service_add_pre libvirtd.service %service_add_pre libvirtd.service
%service_add_pre virtlockd.service virtlockd.socket %service_add_pre virtlockd.service virtlockd.socket
%service_add_pre virtlogd.service virtlogd.socket %service_add_pre virtlogd.service virtlogd.socket
%endif
%{_bindir}/getent group libvirt >/dev/null || \ %{_bindir}/getent group libvirt >/dev/null || \
%{_sbindir}/groupadd -r libvirt || : %{_sbindir}/groupadd -r libvirt || :
%post daemon %post daemon
/sbin/ldconfig /sbin/ldconfig
%if %{with_systemd}
%service_add_post libvirtd.service %service_add_post libvirtd.service
%service_add_post virtlockd.service virtlockd.socket %service_add_post virtlockd.service virtlockd.socket
%service_add_post virtlogd.service virtlogd.socket %service_add_post virtlogd.service virtlogd.socket
%endif
%{fillup_only -n libvirtd} %{fillup_only -n libvirtd}
%{fillup_only -n virtlockd} %{fillup_only -n virtlockd}
%{fillup_only -n virtlogd} %{fillup_only -n virtlogd}
%preun daemon %preun daemon
%if %{with_systemd}
%service_del_preun libvirtd.service %service_del_preun libvirtd.service
%service_del_preun virtlockd.service virtlockd.socket %service_del_preun virtlockd.service virtlockd.socket
%service_del_preun virtlogd.service virtlogd.socket %service_del_preun virtlogd.service virtlogd.socket
%else
%stop_on_removal libvirtd
%stop_on_removal virtlockd
%stop_on_removal virtlogd
%endif
%postun daemon %postun daemon
/sbin/ldconfig /sbin/ldconfig
%if %{with_systemd}
# On upgrade, defer restarting daemons until %posttrans # On upgrade, defer restarting daemons until %posttrans
if test $1 -eq 0 ; then if test $1 -eq 0 ; then
for service in libvirtd virtlockd virtlogd ; do for service in libvirtd virtlockd virtlogd ; do
@ -1337,29 +1260,18 @@ if test $1 -eq 0 ; then
done done
/usr/bin/systemctl daemon-reload >/dev/null 2>&1 || : /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi fi
%else
%restart_on_update libvirtd
%restart_on_update virtlockd
%restart_on_update virtlogd
%endif
%if %{with_systemd}
%service_del_postun libvirtd.service %service_del_postun libvirtd.service
%service_del_postun virtlockd.service virtlockd.socket %service_del_postun virtlockd.service virtlockd.socket
%service_del_postun virtlogd.service virtlogd.socket %service_del_postun virtlogd.service virtlogd.socket
%else
%insserv_cleanup
%endif
%posttrans daemon %posttrans daemon
# All connection drivers should be installed post transaction. # All connection drivers should be installed post transaction.
# Time to restart daemons. # Time to restart daemons.
%if %{with_systemd}
if test "$YAST_IS_RUNNING" != "instsys" -a "$DISABLE_RESTART_ON_UPDATE" != yes ; then if test "$YAST_IS_RUNNING" != "instsys" -a "$DISABLE_RESTART_ON_UPDATE" != yes ; then
for service in libvirtd virtlockd virtlogd ; do for service in libvirtd virtlockd virtlogd ; do
/usr/bin/systemctl try-restart ${service}.service >/dev/null 2>&1 || : /usr/bin/systemctl try-restart ${service}.service >/dev/null 2>&1 || :
done done
fi fi
%endif
# In upgrade scenario we must explicitly enable virtlockd/virtlogd # In upgrade scenario we must explicitly enable virtlockd/virtlogd
# sockets, if libvirtd is already enabled and start them if # sockets, if libvirtd is already enabled and start them if
@ -1367,17 +1279,10 @@ fi
# guests # guests
%triggerpostun daemon -- libvirt-daemon < 1.3.0 %triggerpostun daemon -- libvirt-daemon < 1.3.0
if [ $1 -ge 1 ] ; then if [ $1 -ge 1 ] ; then
%if %{with_systemd}
/usr/bin/systemctl is-enabled libvirtd.service 1>/dev/null 2>&1 && /usr/bin/systemctl is-enabled libvirtd.service 1>/dev/null 2>&1 &&
/usr/bin/systemctl enable virtlogd.socket || : /usr/bin/systemctl enable virtlogd.socket || :
/usr/bin/systemctl is-active libvirtd.service 1>/dev/null 2>&1 && /usr/bin/systemctl is-active libvirtd.service 1>/dev/null 2>&1 &&
/usr/bin/systemctl start virtlogd.socket || : /usr/bin/systemctl start virtlogd.socket || :
%else
/sbin/chkconfig libvirtd 1>/dev/null 2>&1 &&
/sbin/chkconfig virtlogd on || :
/sbin/service libvirtd status 1>/dev/null 2>&1 &&
/sbin/service virtlogd start || :
%endif
fi fi
%post daemon-config-network %post daemon-config-network
@ -1390,32 +1295,20 @@ if test $1 -eq 1 && test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml ;
fi fi
%pre client %pre client
%if %{with_systemd}
%service_add_pre libvirt-guests.service %service_add_pre libvirt-guests.service
%endif
%post client %post client
%if %{with_systemd}
%service_add_post libvirt-guests.service %service_add_post libvirt-guests.service
%endif
%{fillup_only -n libvirt-guests} %{fillup_only -n libvirt-guests}
%preun client %preun client
%if %{with_systemd}
%service_del_preun libvirt-guests.service %service_del_preun libvirt-guests.service
%else
%stop_on_removal libvirt-guests
%endif
if [ $1 = 0 ]; then if [ $1 = 0 ]; then
rm -f /var/lib/libvirt/libvirt-guests rm -f /var/lib/libvirt/libvirt-guests
fi fi
%postun client %postun client
%if %{with_systemd}
%service_del_postun libvirt-guests.service %service_del_postun libvirt-guests.service
%else
%insserv_cleanup
%endif
%post libs %post libs
/sbin/ldconfig /sbin/ldconfig
@ -1442,18 +1335,12 @@ fi
%{_localstatedir}/adm/fillup-templates/sysconfig.libvirtd %{_localstatedir}/adm/fillup-templates/sysconfig.libvirtd
%{_localstatedir}/adm/fillup-templates/sysconfig.virtlogd %{_localstatedir}/adm/fillup-templates/sysconfig.virtlogd
%{_localstatedir}/adm/fillup-templates/sysconfig.virtlockd %{_localstatedir}/adm/fillup-templates/sysconfig.virtlockd
%if %{with_systemd}
%{_unitdir}/libvirtd.service %{_unitdir}/libvirtd.service
%{_unitdir}/virt-guest-shutdown.target %{_unitdir}/virt-guest-shutdown.target
%{_unitdir}/virtlogd.service %{_unitdir}/virtlogd.service
%{_unitdir}/virtlogd.socket %{_unitdir}/virtlogd.socket
%{_unitdir}/virtlockd.service %{_unitdir}/virtlockd.service
%{_unitdir}/virtlockd.socket %{_unitdir}/virtlockd.socket
%else
%config /etc/init.d/libvirtd
%config /etc/init.d/virtlogd
%config /etc/init.d/virtlockd
%endif
%{_sbindir}/rclibvirtd %{_sbindir}/rclibvirtd
%{_sbindir}/rcvirtlogd %{_sbindir}/rcvirtlogd
%{_sbindir}/rcvirtlockd %{_sbindir}/rcvirtlockd
@ -1694,11 +1581,7 @@ fi
%dir %{_libdir}/%{name} %dir %{_libdir}/%{name}
%attr(0755, root, root) %{_libdir}/%{name}/libvirt-guests.sh %attr(0755, root, root) %{_libdir}/%{name}/libvirt-guests.sh
%{_localstatedir}/adm/fillup-templates/sysconfig.libvirt-guests %{_localstatedir}/adm/fillup-templates/sysconfig.libvirt-guests
%if %{with_systemd}
%{_unitdir}/libvirt-guests.service %{_unitdir}/libvirt-guests.service
%else
%config /etc/init.d/libvirt-guests
%endif
%{_sbindir}/rclibvirt-guests %{_sbindir}/rclibvirt-guests
%files libs -f %{name}.lang %files libs -f %{name}.lang
@ -1765,6 +1648,7 @@ fi
%doc %{_docdir}/%{name}/html %doc %{_docdir}/%{name}/html
%doc %{_docdir}/%{name}/internals %doc %{_docdir}/%{name}/internals
%doc %{_docdir}/%{name}/logos %doc %{_docdir}/%{name}/logos
%doc %{_docdir}/%{name}/fonts
# API docs # API docs
%dir %{_datadir}/gtk-doc/html/libvirt/ %dir %{_datadir}/gtk-doc/html/libvirt/

View File

@ -1,7 +1,7 @@
Index: libvirt-3.3.0/daemon/libvirtd.conf Index: libvirt-3.4.0/daemon/libvirtd.conf
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/daemon/libvirtd.conf --- libvirt-3.4.0.orig/daemon/libvirtd.conf
+++ libvirt-3.3.0/daemon/libvirtd.conf +++ libvirt-3.4.0/daemon/libvirtd.conf
@@ -18,8 +18,8 @@ @@ -18,8 +18,8 @@
# It is necessary to setup a CA and issue server certificates before # It is necessary to setup a CA and issue server certificates before
# using this capability. # using this capability.
@ -13,10 +13,10 @@ Index: libvirt-3.3.0/daemon/libvirtd.conf
# Listen for unencrypted TCP connections on the public TCP/IP port. # Listen for unencrypted TCP connections on the public TCP/IP port.
# NB, must pass the --listen flag to the libvirtd process for this to # NB, must pass the --listen flag to the libvirtd process for this to
Index: libvirt-3.3.0/daemon/libvirtd-config.c Index: libvirt-3.4.0/daemon/libvirtd-config.c
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/daemon/libvirtd-config.c --- libvirt-3.4.0.orig/daemon/libvirtd-config.c
+++ libvirt-3.3.0/daemon/libvirtd-config.c +++ libvirt-3.4.0/daemon/libvirtd-config.c
@@ -110,7 +110,7 @@ daemonConfigNew(bool privileged ATTRIBUT @@ -110,7 +110,7 @@ daemonConfigNew(bool privileged ATTRIBUT
if (VIR_ALLOC(data) < 0) if (VIR_ALLOC(data) < 0)
return NULL; return NULL;
@ -26,10 +26,10 @@ Index: libvirt-3.3.0/daemon/libvirtd-config.c
data->listen_tcp = 0; data->listen_tcp = 0;
if (VIR_STRDUP(data->tls_port, LIBVIRTD_TLS_PORT) < 0 || if (VIR_STRDUP(data->tls_port, LIBVIRTD_TLS_PORT) < 0 ||
Index: libvirt-3.3.0/daemon/test_libvirtd.aug.in Index: libvirt-3.4.0/daemon/test_libvirtd.aug.in
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/daemon/test_libvirtd.aug.in --- libvirt-3.4.0.orig/daemon/test_libvirtd.aug.in
+++ libvirt-3.3.0/daemon/test_libvirtd.aug.in +++ libvirt-3.4.0/daemon/test_libvirtd.aug.in
@@ -2,7 +2,7 @@ module Test_libvirtd = @@ -2,7 +2,7 @@ module Test_libvirtd =
::CONFIG:: ::CONFIG::

View File

@ -1,9 +1,9 @@
Adjust libvirtd sysconfig file to conform to SUSE standards Adjust libvirtd sysconfig file to conform to SUSE standards
Index: libvirt-3.3.0/daemon/libvirtd.sysconf Index: libvirt-3.4.0/daemon/libvirtd.sysconf
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/daemon/libvirtd.sysconf --- libvirt-3.4.0.orig/daemon/libvirtd.sysconf
+++ libvirt-3.3.0/daemon/libvirtd.sysconf +++ libvirt-3.4.0/daemon/libvirtd.sysconf
@@ -1,16 +1,25 @@ @@ -1,16 +1,25 @@
+## Path: System/Virtualization/libvirt +## Path: System/Virtualization/libvirt
+ +

View File

@ -1,93 +0,0 @@
#!/bin/sh
# the following is the LSB init header see
# http://www.linux-foundation.org/spec//booksets/LSB-Core-generic/LSB-Core-generic.html#INITSCRCOMCONV
#
### BEGIN INIT INFO
# Provides: libvirtd
# Required-Start: $network $remote_fs
# Should-Start: xend cgconfig
# Default-Start: 3 5
# Required-Stop: $network $remote_fs
# Should-Stop: xend cgconfig
# Default-Stop: 0 1 2 4 6
# Short-Description: daemon for libvirt virtualization API
# Description: This is a daemon for managing QEMU guest instances
# and libvirt virtual networks
# See http://libvirt.org
### END INIT INFO
LIBVIRTD_BIN=/usr/sbin/libvirtd
LIBVIRTD_PIDFILE=/var/run/libvirtd.pid
test -x $LIBVIRTD_BIN || { echo "$LIBVIRD_BIN not installed";
if [ "$1" = "stop" ]; then exit 0;
else exit 5; fi; }
. /etc/rc.status
rc_reset
test -f /etc/sysconfig/libvirtd && . /etc/sysconfig/libvirtd
LIBVIRTD_CONFIG_ARGS=
if [ -n "$LIBVIRTD_CONFIG" ]
then
LIBVIRTD_CONFIG_ARGS="--config $LIBVIRTD_CONFIG"
fi
case "$1" in
start)
if [ -e $LIBVIRTD_PIDFILE ]; then
if checkproc $LIBVIRTD_BIN ; then
echo -n "libvirtd is already running."
rc_status -v
exit
else
echo "Removing stale PID file $LIBVIRTD_PIDFILE."
rm -f $LIBVIRTD_PIDFILE
fi
fi
echo -n "Starting libvirtd "
mkdir -p /var/cache/libvirt
rm -rf /var/cache/libvirt/*
# LIBVIRTD_NOFILES_LIMIT from /etc/sysconfig/libvirtd is not handled
# automatically
if [ -n "$LIBVIRTD_NOFILES_LIMIT" ]; then
ulimit -n "$LIBVIRTD_NOFILES_LIMIT"
fi
startproc $LIBVIRTD_BIN --daemon $LIBVIRTD_CONFIG_ARGS $LIBVIRTD_ARGS
rc_status -v
;;
stop)
echo -n "Shutting down libvirtd "
rm -rf /var/cache/libvirt/*
killproc -TERM $LIBVIRTD_BIN > /dev/null 2>&1
rm -f $LIBVIRTD_PIDFILE
rc_status -v
;;
try-restart)
$0 status >/dev/null && $0 restart
rc_status
;;
restart)
$0 stop
$0 start
rc_status
;;
reload)
killproc -HUP $LIBVIRTD_BIN
rc_status -v
;;
status)
echo -n "Checking status of libvirtd "
checkproc $LIBVIRTD_BIN
rc_status -v
;;
*)
echo "Usage: $0 {start|stop|restart|try-restart|reload|status}"
rc_failed 2
rc_exit
;;
esac
rc_exit

View File

@ -1,133 +0,0 @@
From c55c2ba0a26b0074e73f281810ad3e4a70bc4910 Mon Sep 17 00:00:00 2001
From: Jim Fehlig <jfehlig@suse.com>
Date: Tue, 28 Mar 2017 17:34:16 -0600
Subject: [PATCH] libxl: add default controllers for USB devices
Attempting to start a domain with USB hostdevs but no USB controllers
fails with the rather cryptic error
libxl: error: libxl_qmp.c:287:qmp_handle_error_response: received an
error message from QMP server: Bus 'xenusb-0.0' not found
This can be fixed by creating default USB controllers. When no USB
controllers are defined, create the number of 8 port controllers
necessary to accommodate the number of defined USB devices.
Note that USB controllers are already created as needed in the
domainAttachDevice code path. E.g. a USB controller will be created,
if necessary, when attaching a USB device with
'virsh attach-device dom usbdev.xml'.
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
---
src/libxl/libxl_conf.c | 82 +++++++++++++++++++++++++++++++++++++++++++-------
1 file changed, 71 insertions(+), 11 deletions(-)
Index: libvirt-3.3.0/src/libxl/libxl_conf.c
===================================================================
--- libvirt-3.3.0.orig/src/libxl/libxl_conf.c
+++ libvirt-3.3.0/src/libxl/libxl_conf.c
@@ -1833,34 +1833,94 @@ libxlMakeUSBController(virDomainControll
}
static int
+libxlMakeDefaultUSBControllers(virDomainDefPtr def,
+ libxl_domain_config *d_config)
+{
+ virDomainControllerDefPtr l_controller = NULL;
+ libxl_device_usbctrl *x_controllers = NULL;
+ size_t nusbdevs = 0;
+ size_t ncontrollers;
+ size_t i;
+
+ for (i = 0; i < def->nhostdevs; i++) {
+ if (def->hostdevs[i]->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS &&
+ def->hostdevs[i]->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_USB)
+ nusbdevs++;
+ }
+
+ /* No controllers needed if there are no USB devs */
+ if (nusbdevs == 0)
+ return 0;
+
+ /* Create USB controllers with 8 ports */
+ ncontrollers = VIR_DIV_UP(nusbdevs, 8);
+ if (VIR_ALLOC_N(x_controllers, ncontrollers) < 0)
+ return -1;
+
+ for (i = 0; i < ncontrollers; i++) {
+ if (!(l_controller = virDomainControllerDefNew(VIR_DOMAIN_CONTROLLER_TYPE_USB)))
+ goto error;
+
+ l_controller->model = VIR_DOMAIN_CONTROLLER_MODEL_USB_QUSB2;
+ l_controller->idx = i;
+ l_controller->opts.usbopts.ports = 8;
+
+ libxl_device_usbctrl_init(&x_controllers[i]);
+
+ if (libxlMakeUSBController(l_controller, &x_controllers[i]) < 0)
+ goto error;
+
+ if (virDomainControllerInsert(def, l_controller) < 0)
+ goto error;
+
+ l_controller = NULL;
+ }
+
+ d_config->usbctrls = x_controllers;
+ d_config->num_usbctrls = ncontrollers;
+ return 0;
+
+ error:
+ virDomainControllerDefFree(l_controller);
+ for (i = 0; i < ncontrollers; i++)
+ libxl_device_usbctrl_dispose(&x_controllers[i]);
+ VIR_FREE(x_controllers);
+ return -1;
+}
+
+static int
libxlMakeUSBControllerList(virDomainDefPtr def, libxl_domain_config *d_config)
{
virDomainControllerDefPtr *l_controllers = def->controllers;
size_t ncontrollers = def->ncontrollers;
size_t nusbctrls = 0;
libxl_device_usbctrl *x_usbctrls;
- size_t i;
+ size_t i, j;
- if (ncontrollers == 0)
- return 0;
+ for (i = 0; i < ncontrollers; i++) {
+ if (l_controllers[i]->type == VIR_DOMAIN_CONTROLLER_TYPE_USB)
+ nusbctrls++;
+ }
+
+ if (nusbctrls == 0)
+ return libxlMakeDefaultUSBControllers(def, d_config);
- if (VIR_ALLOC_N(x_usbctrls, ncontrollers) < 0)
+ if (VIR_ALLOC_N(x_usbctrls, nusbctrls) < 0)
return -1;
- for (i = 0; i < ncontrollers; i++) {
+ for (i = 0, j = 0; i < ncontrollers && j < nusbctrls; i++) {
if (l_controllers[i]->type != VIR_DOMAIN_CONTROLLER_TYPE_USB)
continue;
- libxl_device_usbctrl_init(&x_usbctrls[nusbctrls]);
+ libxl_device_usbctrl_init(&x_usbctrls[j]);
if (libxlMakeUSBController(l_controllers[i],
- &x_usbctrls[nusbctrls]) < 0)
+ &x_usbctrls[j]) < 0)
goto error;
- nusbctrls++;
+ j++;
}
- VIR_SHRINK_N(x_usbctrls, ncontrollers, ncontrollers - nusbctrls);
d_config->usbctrls = x_usbctrls;
d_config->num_usbctrls = nusbctrls;

View File

@ -8,10 +8,10 @@ Date: Mon Jun 23 15:51:20 2014 -0600
option, but domainReset can be implemented in the libxl driver by option, but domainReset can be implemented in the libxl driver by
forcibly destroying the domain and starting it again. forcibly destroying the domain and starting it again.
Index: libvirt-3.3.0/src/libxl/libxl_driver.c Index: libvirt-3.4.0/src/libxl/libxl_driver.c
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/src/libxl/libxl_driver.c --- libvirt-3.4.0.orig/src/libxl/libxl_driver.c
+++ libvirt-3.3.0/src/libxl/libxl_driver.c +++ libvirt-3.4.0/src/libxl/libxl_driver.c
@@ -1381,6 +1381,61 @@ libxlDomainReboot(virDomainPtr dom, unsi @@ -1381,6 +1381,61 @@ libxlDomainReboot(virDomainPtr dom, unsi
} }

View File

@ -8,10 +8,10 @@ as the default <emulator>, instead of the qemu-xen one.
See FATE#320638 for details. See FATE#320638 for details.
Index: libvirt-3.3.0/src/libxl/libxl_capabilities.c Index: libvirt-3.4.0/src/libxl/libxl_capabilities.c
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/src/libxl/libxl_capabilities.c --- libvirt-3.4.0.orig/src/libxl/libxl_capabilities.c
+++ libvirt-3.3.0/src/libxl/libxl_capabilities.c +++ libvirt-3.4.0/src/libxl/libxl_capabilities.c
@@ -38,6 +38,7 @@ @@ -38,6 +38,7 @@
#include "libxl_capabilities.h" #include "libxl_capabilities.h"
#include "cpu/cpu_x86.h" #include "cpu/cpu_x86.h"
@ -20,7 +20,7 @@ Index: libvirt-3.3.0/src/libxl/libxl_capabilities.c
#define VIR_FROM_THIS VIR_FROM_LIBXL #define VIR_FROM_THIS VIR_FROM_LIBXL
@@ -491,7 +492,7 @@ libxlCapsInitGuests(libxl_ctx *ctx, virC @@ -506,7 +507,7 @@ libxlCapsInitGuests(libxl_ctx *ctx, virC
if ((guest = virCapabilitiesAddGuest(caps, if ((guest = virCapabilitiesAddGuest(caps,
guest_archs[i].hvm ? VIR_DOMAIN_OSTYPE_HVM : VIR_DOMAIN_OSTYPE_XEN, guest_archs[i].hvm ? VIR_DOMAIN_OSTYPE_HVM : VIR_DOMAIN_OSTYPE_XEN,
guest_archs[i].arch, guest_archs[i].arch,

View File

@ -3,10 +3,10 @@ https://bugzilla.novell.com/show_bug.cgi?id=879425
src/libxl/libxl_conf.c | 25 +++++++++++++++++++++++++ src/libxl/libxl_conf.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+) 1 file changed, 25 insertions(+)
Index: libvirt-3.3.0/src/libxl/libxl_conf.c Index: libvirt-3.4.0/src/libxl/libxl_conf.c
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/src/libxl/libxl_conf.c --- libvirt-3.4.0.orig/src/libxl/libxl_conf.c
+++ libvirt-3.3.0/src/libxl/libxl_conf.c +++ libvirt-3.4.0/src/libxl/libxl_conf.c
@@ -645,6 +645,30 @@ libxlDiskSetDiscard(libxl_device_disk *x @@ -645,6 +645,30 @@ libxlDiskSetDiscard(libxl_device_disk *x
#endif #endif
} }

View File

@ -16,10 +16,10 @@ Signed-off-by: Jim Fehlig <jfehlig@suse.com>
tools/virsh.pod | 8 ++++++++ tools/virsh.pod | 8 ++++++++
6 files changed, 125 insertions(+), 6 deletions(-) 6 files changed, 125 insertions(+), 6 deletions(-)
Index: libvirt-3.3.0/include/libvirt/libvirt-domain.h Index: libvirt-3.4.0/include/libvirt/libvirt-domain.h
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/include/libvirt/libvirt-domain.h --- libvirt-3.4.0.orig/include/libvirt/libvirt-domain.h
+++ libvirt-3.3.0/include/libvirt/libvirt-domain.h +++ libvirt-3.4.0/include/libvirt/libvirt-domain.h
@@ -1008,6 +1008,31 @@ typedef enum { @@ -1008,6 +1008,31 @@ typedef enum {
*/ */
# define VIR_MIGRATE_PARAM_AUTO_CONVERGE_INCREMENT "auto_converge.increment" # define VIR_MIGRATE_PARAM_AUTO_CONVERGE_INCREMENT "auto_converge.increment"
@ -52,10 +52,10 @@ Index: libvirt-3.3.0/include/libvirt/libvirt-domain.h
/* Domain migration. */ /* Domain migration. */
virDomainPtr virDomainMigrate (virDomainPtr domain, virConnectPtr dconn, virDomainPtr virDomainMigrate (virDomainPtr domain, virConnectPtr dconn,
unsigned long flags, const char *dname, unsigned long flags, const char *dname,
Index: libvirt-3.3.0/src/libxl/libxl_driver.c Index: libvirt-3.4.0/src/libxl/libxl_driver.c
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/src/libxl/libxl_driver.c --- libvirt-3.4.0.orig/src/libxl/libxl_driver.c
+++ libvirt-3.3.0/src/libxl/libxl_driver.c +++ libvirt-3.4.0/src/libxl/libxl_driver.c
@@ -6105,6 +6105,9 @@ libxlDomainMigratePerform3Params(virDoma @@ -6105,6 +6105,9 @@ libxlDomainMigratePerform3Params(virDoma
const char *dname = NULL; const char *dname = NULL;
const char *uri = NULL; const char *uri = NULL;
@ -99,10 +99,10 @@ Index: libvirt-3.3.0/src/libxl/libxl_driver.c
goto cleanup; goto cleanup;
} }
Index: libvirt-3.3.0/src/libxl/libxl_migration.c Index: libvirt-3.4.0/src/libxl/libxl_migration.c
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/src/libxl/libxl_migration.c --- libvirt-3.4.0.orig/src/libxl/libxl_migration.c
+++ libvirt-3.3.0/src/libxl/libxl_migration.c +++ libvirt-3.4.0/src/libxl/libxl_migration.c
@@ -359,18 +359,39 @@ libxlMigrateReceive(virNetSocketPtr sock @@ -359,18 +359,39 @@ libxlMigrateReceive(virNetSocketPtr sock
static int static int
libxlDoMigrateSend(libxlDriverPrivatePtr driver, libxlDoMigrateSend(libxlDriverPrivatePtr driver,
@ -263,10 +263,10 @@ Index: libvirt-3.3.0/src/libxl/libxl_migration.c
virObjectLock(vm); virObjectLock(vm);
cleanup: cleanup:
Index: libvirt-3.3.0/src/libxl/libxl_migration.h Index: libvirt-3.4.0/src/libxl/libxl_migration.h
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/src/libxl/libxl_migration.h --- libvirt-3.4.0.orig/src/libxl/libxl_migration.h
+++ libvirt-3.3.0/src/libxl/libxl_migration.h +++ libvirt-3.4.0/src/libxl/libxl_migration.h
@@ -39,6 +39,10 @@ @@ -39,6 +39,10 @@
VIR_MIGRATE_PARAM_URI, VIR_TYPED_PARAM_STRING, \ VIR_MIGRATE_PARAM_URI, VIR_TYPED_PARAM_STRING, \
VIR_MIGRATE_PARAM_DEST_NAME, VIR_TYPED_PARAM_STRING, \ VIR_MIGRATE_PARAM_DEST_NAME, VIR_TYPED_PARAM_STRING, \
@ -311,11 +311,11 @@ Index: libvirt-3.3.0/src/libxl/libxl_migration.h
virDomainPtr virDomainPtr
libxlDomainMigrationFinish(virConnectPtr dconn, libxlDomainMigrationFinish(virConnectPtr dconn,
Index: libvirt-3.3.0/tools/virsh-domain.c Index: libvirt-3.4.0/tools/virsh-domain.c
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/tools/virsh-domain.c --- libvirt-3.4.0.orig/tools/virsh-domain.c
+++ libvirt-3.3.0/tools/virsh-domain.c +++ libvirt-3.4.0/tools/virsh-domain.c
@@ -10205,6 +10205,22 @@ static const vshCmdOptDef opts_migrate[] @@ -10213,6 +10213,22 @@ static const vshCmdOptDef opts_migrate[]
.type = VSH_OT_BOOL, .type = VSH_OT_BOOL,
.help = N_("use TLS for migration") .help = N_("use TLS for migration")
}, },
@ -338,7 +338,7 @@ Index: libvirt-3.3.0/tools/virsh-domain.c
{.name = NULL} {.name = NULL}
}; };
@@ -10228,6 +10244,7 @@ doMigrate(void *opaque) @@ -10236,6 +10252,7 @@ doMigrate(void *opaque)
unsigned long long ullOpt = 0; unsigned long long ullOpt = 0;
int rv; int rv;
virConnectPtr dconn = data->dconn; virConnectPtr dconn = data->dconn;
@ -346,7 +346,7 @@ Index: libvirt-3.3.0/tools/virsh-domain.c
sigemptyset(&sigmask); sigemptyset(&sigmask);
sigaddset(&sigmask, SIGINT); sigaddset(&sigmask, SIGINT);
@@ -10347,6 +10364,27 @@ doMigrate(void *opaque) @@ -10355,6 +10372,27 @@ doMigrate(void *opaque)
goto save_error; goto save_error;
} }
@ -374,13 +374,13 @@ Index: libvirt-3.3.0/tools/virsh-domain.c
if (vshCommandOptStringReq(ctl, cmd, "xml", &opt) < 0) if (vshCommandOptStringReq(ctl, cmd, "xml", &opt) < 0)
goto out; goto out;
if (opt) { if (opt) {
Index: libvirt-3.3.0/tools/virsh.pod Index: libvirt-3.4.0/tools/virsh.pod
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/tools/virsh.pod --- libvirt-3.4.0.orig/tools/virsh.pod
+++ libvirt-3.3.0/tools/virsh.pod +++ libvirt-3.4.0/tools/virsh.pod
@@ -1753,6 +1753,14 @@ compression. I<--comp-mt-threads> and I< @@ -1758,6 +1758,14 @@ Providing I<--tls> causes the migration
of compress threads on source and the number of decompress threads on target the migration of the domain. Usage requires proper TLS setup for both source
respectively. I<--comp-xbzrle-cache> sets size of page cache in bytes. and target.
+SUSE-specific options for Xen: I<--max_iters> B<num> allows specifying the maximum +SUSE-specific options for Xen: I<--max_iters> B<num> allows specifying the maximum
+number of iterations before final suspend. Default is 30. I<--max_factor> B<num> +number of iterations before final suspend. Default is 30. I<--max_factor> B<num>

View File

@ -7,10 +7,10 @@ and npiv.
For more details, see bsc#954872 and FATE#319810 For more details, see bsc#954872 and FATE#319810
Index: libvirt-3.3.0/src/libxl/libxl_conf.c Index: libvirt-3.4.0/src/libxl/libxl_conf.c
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/src/libxl/libxl_conf.c --- libvirt-3.4.0.orig/src/libxl/libxl_conf.c
+++ libvirt-3.3.0/src/libxl/libxl_conf.c +++ libvirt-3.4.0/src/libxl/libxl_conf.c
@@ -645,6 +645,25 @@ libxlDiskSetDiscard(libxl_device_disk *x @@ -645,6 +645,25 @@ libxlDiskSetDiscard(libxl_device_disk *x
#endif #endif
} }

View File

@ -13,10 +13,10 @@ device with the same name that is being created.
src/lxc/lxc_process.c | 1 + src/lxc/lxc_process.c | 1 +
3 files changed, 4 insertions(+) 3 files changed, 4 insertions(+)
Index: libvirt-3.3.0/src/lxc/lxc_controller.c Index: libvirt-3.4.0/src/lxc/lxc_controller.c
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/src/lxc/lxc_controller.c --- libvirt-3.4.0.orig/src/lxc/lxc_controller.c
+++ libvirt-3.3.0/src/lxc/lxc_controller.c +++ libvirt-3.4.0/src/lxc/lxc_controller.c
@@ -73,6 +73,7 @@ @@ -73,6 +73,7 @@
#include "rpc/virnetdaemon.h" #include "rpc/virnetdaemon.h"
#include "virstring.h" #include "virstring.h"
@ -33,10 +33,10 @@ Index: libvirt-3.3.0/src/lxc/lxc_controller.c
return ret; return ret;
} }
Index: libvirt-3.3.0/src/lxc/lxc_driver.c Index: libvirt-3.4.0/src/lxc/lxc_driver.c
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/src/lxc/lxc_driver.c --- libvirt-3.4.0.orig/src/lxc/lxc_driver.c
+++ libvirt-3.3.0/src/lxc/lxc_driver.c +++ libvirt-3.4.0/src/lxc/lxc_driver.c
@@ -76,6 +76,7 @@ @@ -76,6 +76,7 @@
#include "virtime.h" #include "virtime.h"
#include "virtypedparam.h" #include "virtypedparam.h"
@ -61,10 +61,10 @@ Index: libvirt-3.3.0/src/lxc/lxc_driver.c
break; break;
/* It'd be nice to support this, but with macvlan /* It'd be nice to support this, but with macvlan
Index: libvirt-3.3.0/src/lxc/lxc_process.c Index: libvirt-3.4.0/src/lxc/lxc_process.c
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/src/lxc/lxc_process.c --- libvirt-3.4.0.orig/src/lxc/lxc_process.c
+++ libvirt-3.3.0/src/lxc/lxc_process.c +++ libvirt-3.4.0/src/lxc/lxc_process.c
@@ -52,6 +52,7 @@ @@ -52,6 +52,7 @@
#include "viratomic.h" #include "viratomic.h"
#include "virprocess.h" #include "virprocess.h"

View File

@ -17,10 +17,10 @@ Signed-off-by: Martin Wilck <mwilck@suse.com>
tests/networkxml2confdata/dhcp6host-routed-network.conf | 1 - tests/networkxml2confdata/dhcp6host-routed-network.conf | 1 -
2 files changed, 8 insertions(+), 2 deletions(-) 2 files changed, 8 insertions(+), 2 deletions(-)
Index: libvirt-3.3.0/src/network/bridge_driver.c Index: libvirt-3.4.0/src/network/bridge_driver.c
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/src/network/bridge_driver.c --- libvirt-3.4.0.orig/src/network/bridge_driver.c
+++ libvirt-3.3.0/src/network/bridge_driver.c +++ libvirt-3.4.0/src/network/bridge_driver.c
@@ -1409,7 +1409,14 @@ networkDnsmasqConfContents(virNetworkObj @@ -1409,7 +1409,14 @@ networkDnsmasqConfContents(virNetworkObj
if (VIR_SOCKET_ADDR_IS_FAMILY(&ipdef->address, AF_INET)) { if (VIR_SOCKET_ADDR_IS_FAMILY(&ipdef->address, AF_INET)) {
if (ipdef->nranges || ipdef->nhosts) { if (ipdef->nranges || ipdef->nhosts) {
@ -37,10 +37,10 @@ Index: libvirt-3.3.0/src/network/bridge_driver.c
} }
if (ipdef->tftproot) { if (ipdef->tftproot) {
Index: libvirt-3.3.0/tests/networkxml2confdata/dhcp6host-routed-network.conf Index: libvirt-3.4.0/tests/networkxml2confdata/dhcp6host-routed-network.conf
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/tests/networkxml2confdata/dhcp6host-routed-network.conf --- libvirt-3.4.0.orig/tests/networkxml2confdata/dhcp6host-routed-network.conf
+++ libvirt-3.3.0/tests/networkxml2confdata/dhcp6host-routed-network.conf +++ libvirt-3.4.0/tests/networkxml2confdata/dhcp6host-routed-network.conf
@@ -10,7 +10,6 @@ bind-dynamic @@ -10,7 +10,6 @@ bind-dynamic
interface=virbr1 interface=virbr1
dhcp-range=192.168.122.1,static dhcp-range=192.168.122.1,static

View File

@ -2,10 +2,10 @@ Canonicalize hostarch name ppc64le to ppc64
See bnc#894956 See bnc#894956
Index: libvirt-3.3.0/src/util/virarch.c Index: libvirt-3.4.0/src/util/virarch.c
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/src/util/virarch.c --- libvirt-3.4.0.orig/src/util/virarch.c
+++ libvirt-3.3.0/src/util/virarch.c +++ libvirt-3.4.0/src/util/virarch.c
@@ -169,6 +169,8 @@ virArch virArchFromHost(void) @@ -169,6 +169,8 @@ virArch virArchFromHost(void)
arch = VIR_ARCH_I686; arch = VIR_ARCH_I686;
} else if (STREQ(ut.machine, "amd64")) { } else if (STREQ(ut.machine, "amd64")) {

View File

@ -1,7 +1,7 @@
Index: libvirt-3.3.0/examples/apparmor/libvirt-qemu Index: libvirt-3.4.0/examples/apparmor/libvirt-qemu
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/examples/apparmor/libvirt-qemu --- libvirt-3.4.0.orig/examples/apparmor/libvirt-qemu
+++ libvirt-3.3.0/examples/apparmor/libvirt-qemu +++ libvirt-3.4.0/examples/apparmor/libvirt-qemu
@@ -154,3 +154,6 @@ @@ -154,3 +154,6 @@
/etc/udev/udev.conf r, /etc/udev/udev.conf r,
/sys/bus/ r, /sys/bus/ r,

View File

@ -1,181 +0,0 @@
From 306b412857870d1952850b511011909066089af7 Mon Sep 17 00:00:00 2001
From: Jim Fehlig <jfehlig@suse.com>
Date: Mon, 15 May 2017 09:47:39 -0600
Subject: [PATCH] Revert "qemu: propagate bridge MTU into qemu "host_mtu"
option"
This reverts commit 2841e6756d5807a4119e004bc5fb8e7d70806458.
The change causes a guest ABI change. See following bugs for details
https://bugzilla.suse.com/show_bug.cgi?id=1037774
https://bugzilla.redhat.com/show_bug.cgi?id=1449346
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
---
src/qemu/qemu_command.c | 32 ++++++++++----------------------
src/qemu/qemu_command.h | 3 +--
src/qemu/qemu_hotplug.c | 5 ++---
src/qemu/qemu_interface.c | 5 ++---
src/qemu/qemu_interface.h | 3 +--
5 files changed, 16 insertions(+), 32 deletions(-)
Index: libvirt-3.3.0/src/qemu/qemu_command.c
===================================================================
--- libvirt-3.3.0.orig/src/qemu/qemu_command.c
+++ libvirt-3.3.0/src/qemu/qemu_command.c
@@ -3633,8 +3633,7 @@ qemuBuildNicDevStr(virDomainDefPtr def,
int vlan,
unsigned int bootindex,
size_t vhostfdSize,
- virQEMUCapsPtr qemuCaps,
- unsigned int mtu)
+ virQEMUCapsPtr qemuCaps)
{
virBuffer buf = VIR_BUFFER_INITIALIZER;
const char *nic = net->model;
@@ -3758,23 +3757,13 @@ qemuBuildNicDevStr(virDomainDefPtr def,
virBufferAsprintf(&buf, ",rx_queue_size=%u", net->driver.virtio.rx_queue_size);
}
- if (usingVirtio && mtu) {
- if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_NET_HOST_MTU)) {
-
- virBufferAsprintf(&buf, ",host_mtu=%u", mtu);
-
- } else {
- /* log an error if mtu was requested specifically for this
- * interface, otherwise, if it's just what was reported by
- * the attached network, ignore it.
- */
- if (net->mtu) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("setting MTU is not supported with "
- "this QEMU binary"));
- goto error;
- }
+ if (usingVirtio && net->mtu) {
+ if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_NET_HOST_MTU)) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("setting MTU is not supported with this QEMU binary"));
+ goto error;
}
+ virBufferAsprintf(&buf, ",host_mtu=%u", net->mtu);
}
if (vlan == -1)
@@ -8320,7 +8309,7 @@ qemuBuildVhostuserCommandLine(virQEMUDri
VIR_FREE(netdev);
if (!(nic = qemuBuildNicDevStr(def, net, -1, bootindex,
- queues, qemuCaps, net->mtu))) {
+ queues, qemuCaps))) {
virReportError(VIR_ERR_INTERNAL_ERROR,
"%s", _("Error generating NIC -device string"));
goto error;
@@ -8366,7 +8355,6 @@ qemuBuildInterfaceCommandLine(virQEMUDri
virDomainNetType actualType = virDomainNetGetActualType(net);
virNetDevBandwidthPtr actualBandwidth;
size_t i;
- unsigned int mtu = net->mtu;
if (!bootindex)
@@ -8421,7 +8409,7 @@ qemuBuildInterfaceCommandLine(virQEMUDri
memset(tapfd, -1, tapfdSize * sizeof(tapfd[0]));
if (qemuInterfaceBridgeConnect(def, driver, net,
- tapfd, &tapfdSize, &mtu) < 0)
+ tapfd, &tapfdSize) < 0)
goto cleanup;
break;
@@ -8601,7 +8589,7 @@ qemuBuildInterfaceCommandLine(virQEMUDri
}
if (qemuDomainSupportsNicdev(def, net)) {
if (!(nic = qemuBuildNicDevStr(def, net, vlan, bootindex,
- vhostfdSize, qemuCaps, mtu)))
+ vhostfdSize, qemuCaps)))
goto cleanup;
virCommandAddArgList(cmd, "-device", nic, NULL);
} else {
Index: libvirt-3.3.0/src/qemu/qemu_command.h
===================================================================
--- libvirt-3.3.0.orig/src/qemu/qemu_command.h
+++ libvirt-3.3.0/src/qemu/qemu_command.h
@@ -101,8 +101,7 @@ char *qemuBuildNicDevStr(virDomainDefPtr
int vlan,
unsigned int bootindex,
size_t vhostfdSize,
- virQEMUCapsPtr qemuCaps,
- unsigned int mtu);
+ virQEMUCapsPtr qemuCaps);
char *qemuDeviceDriveHostAlias(virDomainDiskDefPtr disk);
Index: libvirt-3.3.0/src/qemu/qemu_hotplug.c
===================================================================
--- libvirt-3.3.0.orig/src/qemu/qemu_hotplug.c
+++ libvirt-3.3.0/src/qemu/qemu_hotplug.c
@@ -968,7 +968,6 @@ qemuDomainAttachNetDevice(virQEMUDriverP
bool charDevPlugged = false;
bool netdevPlugged = false;
bool hostPlugged = false;
- unsigned int mtu = net->mtu;
/* preallocate new slot for device */
if (VIR_REALLOC_N(vm->def->nets, vm->def->nnets + 1) < 0)
@@ -1025,7 +1024,7 @@ qemuDomainAttachNetDevice(virQEMUDriverP
goto cleanup;
memset(vhostfd, -1, sizeof(*vhostfd) * vhostfdSize);
if (qemuInterfaceBridgeConnect(vm->def, driver, net,
- tapfd, &tapfdSize, &mtu) < 0)
+ tapfd, &tapfdSize) < 0)
goto cleanup;
iface_connected = true;
if (qemuInterfaceOpenVhostNet(vm->def, net, priv->qemuCaps,
@@ -1239,7 +1238,7 @@ qemuDomainAttachNetDevice(virQEMUDriverP
VIR_FORCE_CLOSE(vhostfd[i]);
if (!(nicstr = qemuBuildNicDevStr(vm->def, net, vlan, 0,
- queueSize, priv->qemuCaps, mtu)))
+ queueSize, priv->qemuCaps)))
goto try_remove;
qemuDomainObjEnterMonitor(driver, vm);
Index: libvirt-3.3.0/src/qemu/qemu_interface.c
===================================================================
--- libvirt-3.3.0.orig/src/qemu/qemu_interface.c
+++ libvirt-3.3.0/src/qemu/qemu_interface.c
@@ -503,8 +503,7 @@ qemuInterfaceBridgeConnect(virDomainDefP
virQEMUDriverPtr driver,
virDomainNetDefPtr net,
int *tapfd,
- size_t *tapfdSize,
- unsigned int *mtu)
+ size_t *tapfdSize)
{
const char *brname;
int ret = -1;
@@ -545,7 +544,7 @@ qemuInterfaceBridgeConnect(virDomainDefP
def->uuid, tunpath, tapfd, *tapfdSize,
virDomainNetGetActualVirtPortProfile(net),
virDomainNetGetActualVlan(net),
- net->coalesce, net->mtu, mtu,
+ NULL, 0, NULL,
tap_create_flags) < 0) {
virDomainAuditNetDevice(def, net, tunpath, false);
goto cleanup;
Index: libvirt-3.3.0/src/qemu/qemu_interface.h
===================================================================
--- libvirt-3.3.0.orig/src/qemu/qemu_interface.h
+++ libvirt-3.3.0/src/qemu/qemu_interface.h
@@ -51,8 +51,7 @@ int qemuInterfaceBridgeConnect(virDomain
virQEMUDriverPtr driver,
virDomainNetDefPtr net,
int *tapfd,
- size_t *tapfdSize,
- unsigned int *mtu)
+ size_t *tapfdSize)
ATTRIBUTE_NONNULL(2);
int qemuInterfaceOpenVhostNet(virDomainDefPtr def,

View File

@ -8,10 +8,10 @@ Subject: [PATCH] support managed pci devices in xen driver
src/xenxs/xen_xm.c | 28 +++++++++++++++++++++++++++- src/xenxs/xen_xm.c | 28 +++++++++++++++++++++++++++-
2 files changed, 35 insertions(+), 15 deletions(-) 2 files changed, 35 insertions(+), 15 deletions(-)
Index: libvirt-3.3.0/src/xenconfig/xen_common.c Index: libvirt-3.4.0/src/xenconfig/xen_common.c
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/src/xenconfig/xen_common.c --- libvirt-3.4.0.orig/src/xenconfig/xen_common.c
+++ libvirt-3.3.0/src/xenconfig/xen_common.c +++ libvirt-3.4.0/src/xenconfig/xen_common.c
@@ -394,6 +394,8 @@ xenParsePCI(virConfPtr conf, virDomainDe @@ -394,6 +394,8 @@ xenParsePCI(virConfPtr conf, virDomainDe
{ {
virConfValuePtr list = virConfGetValue(conf, "pci"); virConfValuePtr list = virConfGetValue(conf, "pci");
@ -66,10 +66,10 @@ Index: libvirt-3.3.0/src/xenconfig/xen_common.c
hostdev->source.subsys.type = VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI; hostdev->source.subsys.type = VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI;
hostdev->source.subsys.u.pci.addr.domain = domainID; hostdev->source.subsys.u.pci.addr.domain = domainID;
hostdev->source.subsys.u.pci.addr.bus = busID; hostdev->source.subsys.u.pci.addr.bus = busID;
Index: libvirt-3.3.0/src/xenconfig/xen_sxpr.c Index: libvirt-3.4.0/src/xenconfig/xen_sxpr.c
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/src/xenconfig/xen_sxpr.c --- libvirt-3.4.0.orig/src/xenconfig/xen_sxpr.c
+++ libvirt-3.3.0/src/xenconfig/xen_sxpr.c +++ libvirt-3.4.0/src/xenconfig/xen_sxpr.c
@@ -1062,6 +1062,7 @@ xenParseSxprPCI(virDomainDefPtr def, @@ -1062,6 +1062,7 @@ xenParseSxprPCI(virDomainDefPtr def,
int busID; int busID;
int slotID; int slotID;

View File

@ -5,10 +5,10 @@ tools. If a user installs libvirt on their SUSE Xen host, then libvirt
should be king and override xendomains. should be king and override xendomains.
bsc#1015348 bsc#1015348
Index: libvirt-3.3.0/daemon/libvirtd.service.in Index: libvirt-3.4.0/daemon/libvirtd.service.in
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/daemon/libvirtd.service.in --- libvirt-3.4.0.orig/daemon/libvirtd.service.in
+++ libvirt-3.3.0/daemon/libvirtd.service.in +++ libvirt-3.4.0/daemon/libvirtd.service.in
@@ -15,6 +15,7 @@ After=apparmor.service @@ -15,6 +15,7 @@ After=apparmor.service
After=local-fs.target After=local-fs.target
After=remote-fs.target After=remote-fs.target

View File

@ -7,10 +7,10 @@ suse-qemu-conf-secdriver.patch, suse-qemu-conf-lockmgr.patch,
etc.), but for now they are all lumped together in this etc.), but for now they are all lumped together in this
single patch. single patch.
Index: libvirt-3.3.0/src/qemu/qemu.conf Index: libvirt-3.4.0/src/qemu/qemu.conf
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/src/qemu/qemu.conf --- libvirt-3.4.0.orig/src/qemu/qemu.conf
+++ libvirt-3.3.0/src/qemu/qemu.conf +++ libvirt-3.4.0/src/qemu/qemu.conf
@@ -332,11 +332,20 @@ @@ -332,11 +332,20 @@
# isolation, but it cannot appear in a list of drivers. # isolation, but it cannot appear in a list of drivers.
# #

View File

@ -1,7 +1,7 @@
Index: libvirt-3.3.0/daemon/libvirtd.service.in Index: libvirt-3.4.0/daemon/libvirtd.service.in
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/daemon/libvirtd.service.in --- libvirt-3.4.0.orig/daemon/libvirtd.service.in
+++ libvirt-3.3.0/daemon/libvirtd.service.in +++ libvirt-3.4.0/daemon/libvirtd.service.in
@@ -14,6 +14,7 @@ After=iscsid.service @@ -14,6 +14,7 @@ After=iscsid.service
After=apparmor.service After=apparmor.service
After=local-fs.target After=local-fs.target

View File

@ -1,9 +1,9 @@
Adjust virtlockd init files to conform to SUSE standards Adjust virtlockd init files to conform to SUSE standards
Index: libvirt-3.3.0/src/locking/virtlockd.sysconf Index: libvirt-3.4.0/src/locking/virtlockd.sysconf
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/src/locking/virtlockd.sysconf --- libvirt-3.4.0.orig/src/locking/virtlockd.sysconf
+++ libvirt-3.3.0/src/locking/virtlockd.sysconf +++ libvirt-3.4.0/src/locking/virtlockd.sysconf
@@ -1,3 +1,7 @@ @@ -1,3 +1,7 @@
+## Path: System/Virtualization/virtlockd +## Path: System/Virtualization/virtlockd
+ +
@ -12,10 +12,10 @@ Index: libvirt-3.3.0/src/locking/virtlockd.sysconf
# #
# Pass extra arguments to virtlockd # Pass extra arguments to virtlockd
#VIRTLOCKD_ARGS= #VIRTLOCKD_ARGS=
Index: libvirt-3.3.0/src/locking/virtlockd.init.in Index: libvirt-3.4.0/src/locking/virtlockd.init.in
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/src/locking/virtlockd.init.in --- libvirt-3.4.0.orig/src/locking/virtlockd.init.in
+++ libvirt-3.3.0/src/locking/virtlockd.init.in +++ libvirt-3.4.0/src/locking/virtlockd.init.in
@@ -4,59 +4,57 @@ @@ -4,59 +4,57 @@
# http://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/initscrcomconv.html # http://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/initscrcomconv.html
# #

View File

@ -1,9 +1,9 @@
Adjust virtlogd init files to conform to SUSE standards Adjust virtlogd init files to conform to SUSE standards
Index: libvirt-3.3.0/src/logging/virtlogd.init.in Index: libvirt-3.4.0/src/logging/virtlogd.init.in
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/src/logging/virtlogd.init.in --- libvirt-3.4.0.orig/src/logging/virtlogd.init.in
+++ libvirt-3.3.0/src/logging/virtlogd.init.in +++ libvirt-3.4.0/src/logging/virtlogd.init.in
@@ -4,59 +4,56 @@ @@ -4,59 +4,56 @@
# http://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/initscrcomconv.html # http://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/initscrcomconv.html
# #
@ -126,10 +126,10 @@ Index: libvirt-3.3.0/src/logging/virtlogd.init.in
esac esac
-exit $RETVAL -exit $RETVAL
+rc_exit +rc_exit
Index: libvirt-3.3.0/src/logging/virtlogd.sysconf Index: libvirt-3.4.0/src/logging/virtlogd.sysconf
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/src/logging/virtlogd.sysconf --- libvirt-3.4.0.orig/src/logging/virtlogd.sysconf
+++ libvirt-3.3.0/src/logging/virtlogd.sysconf +++ libvirt-3.4.0/src/logging/virtlogd.sysconf
@@ -1,3 +1,7 @@ @@ -1,3 +1,7 @@
+## Path: System/Virtualization/virtlogd +## Path: System/Virtualization/virtlogd
+ +

View File

@ -1,7 +1,7 @@
Index: libvirt-3.3.0/src/xenconfig/xen_sxpr.c Index: libvirt-3.4.0/src/xenconfig/xen_sxpr.c
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/src/xenconfig/xen_sxpr.c --- libvirt-3.4.0.orig/src/xenconfig/xen_sxpr.c
+++ libvirt-3.3.0/src/xenconfig/xen_sxpr.c +++ libvirt-3.4.0/src/xenconfig/xen_sxpr.c
@@ -392,7 +392,7 @@ xenParseSxprVifRate(const char *rate, un @@ -392,7 +392,7 @@ xenParseSxprVifRate(const char *rate, un
static int static int
xenParseSxprDisks(virDomainDefPtr def, xenParseSxprDisks(virDomainDefPtr def,

View File

@ -6,10 +6,10 @@ and 'file'. This was implicitly done prior to commit 9673418c.
https://bugzilla.suse.com/show_bug.cgi?id=938228 https://bugzilla.suse.com/show_bug.cgi?id=938228
Index: libvirt-3.3.0/src/xenconfig/xen_sxpr.c Index: libvirt-3.4.0/src/xenconfig/xen_sxpr.c
=================================================================== ===================================================================
--- libvirt-3.3.0.orig/src/xenconfig/xen_sxpr.c --- libvirt-3.4.0.orig/src/xenconfig/xen_sxpr.c
+++ libvirt-3.3.0/src/xenconfig/xen_sxpr.c +++ libvirt-3.4.0/src/xenconfig/xen_sxpr.c
@@ -506,10 +506,11 @@ xenParseSxprDisks(virDomainDefPtr def, @@ -506,10 +506,11 @@ xenParseSxprDisks(virDomainDefPtr def,
omnipotent, we can revisit this, perhaps stat()'ing omnipotent, we can revisit this, perhaps stat()'ing
the src file in question */ the src file in question */