[libvirt] [dbus PATCH] AUTHORS: Update maintainers list
by Andrea Bolognani
List Katerina, who is currently the top libvirt-dbus
contributor by number of commits, among the maintainers.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
AUTHORS.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/AUTHORS.in b/AUTHORS.in
index 988dd6a..bb09e0e 100644
--- a/AUTHORS.in
+++ b/AUTHORS.in
@@ -5,6 +5,7 @@ The primary maintainers of libvirt-dbus are:
Lars Karlitski <lars(a)karlitski.net>
Pavel Hrdina <phrdina(a)redhat.com>
+ Katerina Koukiou <kkoukiou(a)redhat.com>
Patches have been received from:
--
2.17.1
6 years, 4 months
[libvirt] [PATCH 0/4] domain_addr: make functions static
by Anya Harter
which are unused outside domain_addr.c
The commit where the last external use was removed is linked in each
commit when it exists
Anya Harter (4):
domain_addr: make virDomainPCIAddressBusIsEmpty static
domain_addr: make virDomainCCWAddress funcs static
domain_addr: make virDomainVirtioSerialAddr funcs static
domain_addr: make virDomainUSBAddressPortFormat static
src/conf/domain_addr.c | 197 +++++++++++++++++++--------------------
src/conf/domain_addr.h | 39 --------
src/libvirt_private.syms | 8 --
3 files changed, 98 insertions(+), 146 deletions(-)
--
2.17.1
6 years, 4 months
[libvirt] [dbus PATCH] connect: fix g_free order in virtDBusConnectFree
by Anya Harter
so that g_free(connect->nodeDevPath) line appears in alphabetical order
with the rest of the lines
Signed-off-by: Anya Harter <aharter(a)redhat.com>
---
src/connect.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/connect.c b/src/connect.c
index 9ebceaa..9275121 100644
--- a/src/connect.c
+++ b/src/connect.c
@@ -1808,9 +1808,9 @@ virtDBusConnectFree(virtDBusConnect *connect)
if (connect->connection)
virtDBusConnectClose(connect, TRUE);
- g_free(connect->nodeDevPath);
g_free(connect->domainPath);
g_free(connect->networkPath);
+ g_free(connect->nodeDevPath);
g_free(connect->nwfilterPath);
g_free(connect->secretPath);
g_free(connect->storagePoolPath);
--
2.17.1
6 years, 4 months
[libvirt] [PATCH] qemu: Added support L2 table cache for qcow2 disk.
by dujiancheng
From: Dujiancheng <dujiancheng10(a)gmail.com>
dujiancheng (1):
qemu: Added support L2 table cache for qcow2 disk.
L2 table cache can be set by the new element diskCache.
Use the following methods to set the L2 table cache
and cache clean interval:
<diskCache>
<cache level='2'>
<size unit='KiB'>10240</size>
</cache>
<clean interval='900'/>
</diskCache>
Signed-off-by: dujiancheng <dujiancheng10(a)gmail.com>
---
docs/formatdomain.html.in | 25 +++++++++++++
docs/schemas/domaincommon.rng | 26 ++++++++++++++
src/conf/domain_conf.c | 63 ++++++++++++++++++++++++++++++++-
src/conf/domain_conf.h | 5 +++
src/qemu/qemu_command.c | 6 ++++
src/qemu/qemu_domain.c | 6 ++++
tests/qemuxml2argvdata/disk-cache.args | 30 ++++++++++++++++
tests/qemuxml2argvdata/disk-cache.xml | 40 +++++++++++++++++++++
tests/qemuxml2argvtest.c | 1 +
tests/qemuxml2xmloutdata/disk-cache.xml | 46 ++++++++++++++++++++++++
tests/qemuxml2xmltest.c | 1 +
11 files changed, 248 insertions(+), 1 deletion(-)
create mode 100644 tests/qemuxml2argvdata/disk-cache.args
create mode 100644 tests/qemuxml2argvdata/disk-cache.xml
create mode 100644 tests/qemuxml2xmloutdata/disk-cache.xml
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 0d68596..2afeb2b 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -2719,6 +2719,12 @@
<backingStore type='file'>
<format type='qcow2'/>
<source file='/var/lib/libvirt/images/snapshot.qcow'/>
+ <diskCache>
+ <cache level='2'>
+ <size unit='KiB'>128</size>
+ </cache>
+ <clean interval='8'/>
+ </diskCache>
<backingStore type='block'>
<format type='raw'/>
<source dev='/dev/mapper/base'/>
@@ -3582,6 +3588,25 @@
</dd>
</dl>
</dd>
+ <dt><code>diskCache</code></dt>
+ <dd>The <code>diskCache</code> allows setting the L2 cache
+ and cache clean interval values of the qcow2 image with
+ the following properties.
+ <span class="since">Since 2.5(QEMU and KVM)</span>
+ <dl>
+ <dt><code>cache</code></dt>
+ <dd>The <code>level</code> attribute allows you to set the
+ level of the cache, temporarily only supports level 2 cache.
+ The <code>size</code> allows you to set the size of the cache
+ and can specify the unit
+ </dd>
+ <dt><code>clean</code></dt>
+ <dd>The <code>interval</code> allow setting cache expiration time
+ in seconds
+ </dd>
+ </dl>
+
+ </dd>
</dl>
<h4><a id="elementsFilesystems">Filesystems</a></h4>
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index f46145c..04bc9e1 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -1388,8 +1388,34 @@
</data>
</element>
</optional>
+ <optional>
+ <ref name="diskCache"/>
+ </optional>
</interleave>
</define>
+<define name="diskCache">
+ <element name="diskCache">
+ <interleave>
+ <optional>
+ <element name="cache">
+ <attribute name="level">
+ <ref name="unsignedInt"/>
+ </attribute>
+ <element name="size">
+ <ref name='scaledInteger'/>
+ </element>
+ </element>
+ </optional>
+ <optional>
+ <element name="clean">
+ <attribute name="interval">
+ <ref name="unsignedInt"/>
+ </attribute>
+ </element>
+ </optional>
+ </interleave>
+ </element>
+</define>
<define name="snapshot">
<attribute name="snapshot">
<choice>
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index b8b5345..9b6f445 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -8894,6 +8894,37 @@ virDomainDiskSourceParse(xmlNodePtr node,
return 0;
}
+static int
+virDomainDiskCacheParse(xmlNodePtr node,
+ xmlXPathContextPtr ctxt,
+ virDomainDiskDefPtr def)
+{
+ int ret = -1;
+ xmlNodePtr saveNode = ctxt->node;
+ ctxt->node = node;
+ if (virXPathUInt("string(./clean/@interval)", ctxt, &def->disk_cache.clean_interval) < -1) {
+ virReportError(VIR_ERR_XML_ERROR, "%s",
+ _("malformed disk cache clean interval"));
+ goto cleanup;
+ }
+
+ if (virXPathUInt("string(./cache/@level)", ctxt, &def->disk_cache.cache_level) < -1) {
+ virReportError(VIR_ERR_XML_ERROR, "%s",
+ _("malformed disk cache level"));
+ goto cleanup;
+ }
+
+ if (virDomainParseMemory("./cache/size", NULL, ctxt,
+ &def->disk_cache.cache_size, false, true) < 0)
+ goto cleanup;
+
+ ret = 0;
+
+ cleanup:
+ ctxt->node = saveNode;
+ return ret;
+
+}
static int
virDomainDiskBackingStoreParse(xmlXPathContextPtr ctxt,
@@ -9701,6 +9732,10 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
}
} else if (virXMLNodeNameEqual(cur, "boot")) {
/* boot is parsed as part of virDomainDeviceInfoParseXML */
+ } else if (virXMLNodeNameEqual(cur, "diskCache")) {
+
+ if (virDomainDiskCacheParse(cur, ctxt, def) < 0)
+ goto error;
}
}
@@ -23369,7 +23404,32 @@ virDomainDiskBlockIoDefFormat(virBufferPtr buf,
virBufferAddLit(buf, "/>\n");
}
}
-
+static void
+virDomainDiskCacheDefFormat(virBufferPtr buf,
+ virDomainDiskDefPtr def)
+{
+ if (def->disk_cache.cache_size > 0 ||
+ def->disk_cache.clean_interval > 0) {
+ virBufferAddLit(buf, "<diskCache>\n");
+ virBufferAdjustIndent(buf, 2);
+ if (def->disk_cache.cache_level == 2 && def->disk_cache.cache_size > 0) {
+ virBufferAddLit(buf, "<cache level='2'>\n");
+ virBufferAdjustIndent(buf, 2);
+ virBufferAsprintf(buf,
+ "<size unit='KiB'>%llu</size>\n",
+ def->disk_cache.cache_size);
+ virBufferAdjustIndent(buf, -2);
+ virBufferAddLit(buf, "</cache>\n");
+ }
+ if (def->disk_cache.clean_interval > 0) {
+ virBufferAsprintf(buf,
+ "<clean interval='%u'/>\n",
+ def->disk_cache.clean_interval);
+ }
+ virBufferAdjustIndent(buf, -2);
+ virBufferAddLit(buf, "</diskCache>\n");
+ }
+}
static void
virDomainSourceDefFormatSeclabel(virBufferPtr buf,
@@ -23869,6 +23929,7 @@ virDomainDiskDefFormat(virBufferPtr buf,
virDomainDiskGeometryDefFormat(buf, def);
virDomainDiskBlockIoDefFormat(buf, def);
+ virDomainDiskCacheDefFormat(buf, def);
if (virDomainDiskDefFormatMirror(buf, def, flags, xmlopt) < 0)
return -1;
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 71437dc..7f87a1a 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -647,6 +647,11 @@ struct _virDomainDiskDef {
unsigned int physical_block_size;
} blockio;
+ struct {
+ unsigned int cache_level;
+ unsigned long long cache_size;
+ unsigned int clean_interval;
+ } disk_cache;
virDomainBlockIoTuneInfo blkdeviotune;
char *driverName;
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 4fc3176..54fc642 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -1637,6 +1637,12 @@ qemuBuildDriveStr(virDomainDiskDefPtr disk,
if (qemuBuildDriveSourceStr(disk, qemuCaps, &opt) < 0)
goto error;
+ if (disk->disk_cache.cache_level == 2 && disk->disk_cache.cache_size > 0)
+ virBufferAsprintf(&opt, "l2-cache-size=%llu,",
+ disk->disk_cache.cache_size);
+ if (disk->disk_cache.clean_interval > 0)
+ virBufferAsprintf(&opt, "cache-clean-interval=%u,",
+ disk->disk_cache.clean_interval);
if (qemuDiskBusNeedsDeviceArg(disk->bus)) {
char *drivealias = qemuAliasDiskDriveFromDisk(disk);
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index fee4481..cca78fc 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -8627,6 +8627,12 @@ qemuDomainDiskChangeSupported(virDomainDiskDefPtr disk,
CHECK_EQ(ioeventfd, "ioeventfd", true);
CHECK_EQ(event_idx, "event_idx", true);
CHECK_EQ(copy_on_read, "copy_on_read", true);
+ CHECK_EQ(disk_cache.cache_level,
+ "diskCache cache_level", true);
+ CHECK_EQ(disk_cache.cache_size,
+ "diskCache cache_size", true);
+ CHECK_EQ(disk_cache.clean_interval,
+ "diskCache clean_interval", true);
/* "snapshot" is a libvirt internal field and thus can be changed */
/* startupPolicy is allowed to be updated. Therefore not checked here. */
CHECK_EQ(transient, "transient", true);
diff --git a/tests/qemuxml2argvdata/disk-cache.args b/tests/qemuxml2argvdata/disk-cache.args
new file mode 100644
index 0000000..bbc61e4
--- /dev/null
+++ b/tests/qemuxml2argvdata/disk-cache.args
@@ -0,0 +1,30 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu-system-i686 \
+-name QEMUGuest1 \
+-S \
+-machine pc,accel=tcg,usb=off,dump-guest-core=off \
+-m 214 \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\
+server,nowait \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/tmp/data.img,format=raw,l2-cache-size=10240,cache-clean-interval=900,if=none,id=drive-virtio-disk0 \
+-device virtio-blk-pci,bus=pci.0,addr=0x3,drive=drive-virtio-disk0,\
+id=virtio-disk0 \
+-drive file=/tmp/logs.img,format=raw,if=none,id=drive-virtio-disk1 \
+-device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk1,\
+id=virtio-disk1
diff --git a/tests/qemuxml2argvdata/disk-cache.xml b/tests/qemuxml2argvdata/disk-cache.xml
new file mode 100644
index 0000000..54cfa6c
--- /dev/null
+++ b/tests/qemuxml2argvdata/disk-cache.xml
@@ -0,0 +1,40 @@
+<domain type='qemu'>
+ <name>QEMUGuest1</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+ <memory unit='KiB'>219136</memory>
+ <currentMemory unit='KiB'>219136</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='i686' machine='pc'>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-i686</emulator>
+ <disk type='file' device='disk'>
+ <driver name='qemu' type='raw'/>
+ <source file='/tmp/data.img'/>
+ <diskCache>
+ <cache level='2'>
+ <size unit='KiB'>10240</size>
+ </cache>
+ <clean interval='900'/>
+ </diskCache>
+ <target dev='vda' bus='virtio'/>
+ </disk>
+ <disk type='file' device='disk'>
+ <driver name='qemu' type='raw'/>
+ <source file='/tmp/logs.img'/>
+ <target dev='vdb' bus='virtio'/>
+ </disk>
+ <controller type='usb' index='0'/>
+ <controller type='ide' index='0'/>
+ <controller type='pci' index='0' model='pci-root'/>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+ <memballoon model='none'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index c279ac4..994afc4 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1008,6 +1008,7 @@ mymain(void)
QEMU_CAPS_VIRTIO_S390);
DO_TEST("disk-many", NONE);
DO_TEST("disk-virtio", QEMU_CAPS_DRIVE_BOOT);
+ DO_TEST("disk-cache", NONE);
DO_TEST("disk-virtio-ccw",
QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390);
DO_TEST("disk-virtio-ccw-many",
diff --git a/tests/qemuxml2xmloutdata/disk-cache.xml b/tests/qemuxml2xmloutdata/disk-cache.xml
new file mode 100644
index 0000000..015ca3e
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/disk-cache.xml
@@ -0,0 +1,46 @@
+<domain type='qemu'>
+ <name>QEMUGuest1</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+ <memory unit='KiB'>219136</memory>
+ <currentMemory unit='KiB'>219136</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='i686' machine='pc'>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-i686</emulator>
+ <disk type='file' device='disk'>
+ <driver name='qemu' type='raw'/>
+ <source file='/tmp/data.img'/>
+ <diskCache>
+ <cache level='2'>
+ <size unit='KiB'>10240</size>
+ </cache>
+ <clean interval='900'/>
+ </diskCache>
+ <target dev='vda' bus='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+ </disk>
+ <disk type='file' device='disk'>
+ <driver name='qemu' type='raw'/>
+ <source file='/tmp/logs.img'/>
+ <target dev='vdb' bus='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+ </disk>
+ <controller type='usb' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
+ </controller>
+ <controller type='ide' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'/>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+ <memballoon model='none'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index eac6d5b..7f6340d 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -404,6 +404,7 @@ mymain(void)
QEMU_CAPS_SCSI_DISK_WWN);
DO_TEST("disk-mirror-old", NONE);
DO_TEST("disk-mirror", NONE);
+ DO_TEST("disk-cache", NONE);
DO_TEST_FULL("disk-active-commit", WHEN_ACTIVE, GIC_NONE, NONE);
DO_TEST("graphics-listen-network", NONE);
DO_TEST("graphics-vnc", NONE);
--
1.8.3.1
6 years, 4 months
[libvirt] [PATCH 0/2] esx: Couple of fixes
by Michal Privoznik
*** BLURB HERE ***
Michal Privoznik (2):
esx: Report error in esxVI_LookupVirtualMachineByName
esx: De-duplicate @virtualMachine check in esxDomainLookupByName
src/esx/esx_driver.c | 7 +------
src/esx/esx_vi.c | 5 ++++-
2 files changed, 5 insertions(+), 7 deletions(-)
--
2.16.4
6 years, 4 months
[libvirt] [PATCH v2] qemu: move qemuDomainCCWAddrSetCreateFromDomain
by Anya Harter
from src/qemu/qemu_domain_address.c to src/conf/domain_addr.c
and rename to virDomainCCWAddressSetCreateFromDomain
(rename to have Address in full instead of Addr to follow
the naming convention of other virDomainCCWAddress functions)
Signed-off-by: Anya Harter <aharter(a)redhat.com>
---
renamed function in v2 patch (reason supplied in commit message)
original patch email: https://www.redhat.com/archives/libvir-list/2018-June/msg01823.html
src/conf/domain_addr.c | 24 ++++++++++++++++++++++++
src/conf/domain_addr.h | 4 ++++
src/libvirt_private.syms | 1 +
src/qemu/qemu_domain_address.c | 26 ++------------------------
src/qemu/qemu_domain_address.h | 4 ----
src/qemu/qemu_hotplug.c | 4 ++--
6 files changed, 33 insertions(+), 30 deletions(-)
diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c
index fd66a74e9d..eb0784cd2c 100644
--- a/src/conf/domain_addr.c
+++ b/src/conf/domain_addr.c
@@ -1185,6 +1185,30 @@ virDomainCCWAddressSetCreate(void)
}
+virDomainCCWAddressSetPtr
+virDomainCCWAddressSetCreateFromDomain(virDomainDefPtr def)
+{
+ virDomainCCWAddressSetPtr addrs = NULL;
+
+ if (!(addrs = virDomainCCWAddressSetCreate()))
+ goto error;
+
+ if (virDomainDeviceInfoIterate(def, virDomainCCWAddressValidate,
+ addrs) < 0)
+ goto error;
+
+ if (virDomainDeviceInfoIterate(def, virDomainCCWAddressAllocate,
+ addrs) < 0)
+ goto error;
+
+ return addrs;
+
+ error:
+ virDomainCCWAddressSetFree(addrs);
+ return NULL;
+}
+
+
#define VIR_DOMAIN_DEFAULT_VIRTIO_SERIAL_PORTS 31
diff --git a/src/conf/domain_addr.h b/src/conf/domain_addr.h
index 2764070cd2..776399eb63 100644
--- a/src/conf/domain_addr.h
+++ b/src/conf/domain_addr.h
@@ -202,6 +202,10 @@ int virDomainCCWAddressValidate(virDomainDefPtr def,
virDomainCCWAddressSetPtr virDomainCCWAddressSetCreate(void);
+virDomainCCWAddressSetPtr
+virDomainCCWAddressSetCreateFromDomain(virDomainDefPtr def)
+ ATTRIBUTE_NONNULL(1);
+
struct _virDomainVirtioSerialController {
unsigned int idx;
virBitmapPtr ports;
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index ffe5dfd19b..7000620b41 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -107,6 +107,7 @@ virPCIDeviceAddressParseXML;
virDomainCCWAddressAllocate;
virDomainCCWAddressAssign;
virDomainCCWAddressSetCreate;
+virDomainCCWAddressSetCreateFromDomain;
virDomainCCWAddressSetFree;
virDomainCCWAddressValidate;
virDomainPCIAddressAsString;
diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c
index e9f460d77a..eb11a660d7 100644
--- a/src/qemu/qemu_domain_address.c
+++ b/src/qemu/qemu_domain_address.c
@@ -376,28 +376,6 @@ qemuDomainPrimeVirtioDeviceAddresses(virDomainDefPtr def,
}
}
-virDomainCCWAddressSetPtr
-qemuDomainCCWAddrSetCreateFromDomain(virDomainDefPtr def)
-{
- virDomainCCWAddressSetPtr addrs = NULL;
-
- if (!(addrs = virDomainCCWAddressSetCreate()))
- goto error;
-
- if (virDomainDeviceInfoIterate(def, virDomainCCWAddressValidate,
- addrs) < 0)
- goto error;
-
- if (virDomainDeviceInfoIterate(def, virDomainCCWAddressAllocate,
- addrs) < 0)
- goto error;
-
- return addrs;
-
- error:
- virDomainCCWAddressSetFree(addrs);
- return NULL;
-}
/*
* Three steps populating CCW devnos
@@ -420,7 +398,7 @@ qemuDomainAssignS390Addresses(virDomainDefPtr def,
qemuDomainPrimeVirtioDeviceAddresses(
def, VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW);
- if (!(addrs = qemuDomainCCWAddrSetCreateFromDomain(def)))
+ if (!(addrs = virDomainCCWAddressSetCreateFromDomain(def)))
goto cleanup;
} else if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_S390)) {
@@ -3027,7 +3005,7 @@ qemuDomainEnsureVirtioAddress(bool *releaseAddr,
}
if (info->type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW) {
- if (!(ccwaddrs = qemuDomainCCWAddrSetCreateFromDomain(vm->def)))
+ if (!(ccwaddrs = virDomainCCWAddressSetCreateFromDomain(vm->def)))
goto cleanup;
if (virDomainCCWAddressAssign(info, ccwaddrs,
!info->addr.ccw.assigned) < 0)
diff --git a/src/qemu/qemu_domain_address.h b/src/qemu/qemu_domain_address.h
index 83f8e81cad..89d7a5ac3e 100644
--- a/src/qemu/qemu_domain_address.h
+++ b/src/qemu/qemu_domain_address.h
@@ -59,10 +59,6 @@ void qemuDomainReleaseDeviceAddress(virDomainObjPtr vm,
virDomainDeviceInfoPtr info,
const char *devstr);
-virDomainCCWAddressSetPtr
-qemuDomainCCWAddrSetCreateFromDomain(virDomainDefPtr def)
- ATTRIBUTE_NONNULL(1);
-
int qemuDomainAssignMemoryDeviceSlot(virDomainDefPtr def,
virDomainMemoryDefPtr mem);
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index fcd8eb0ffa..f028175fb4 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -964,7 +964,7 @@ qemuDomainAttachNetDevice(virQEMUDriverPtr driver,
if (qemuDomainIsS390CCW(vm->def) &&
virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_CCW)) {
net->info.type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW;
- if (!(ccwaddrs = qemuDomainCCWAddrSetCreateFromDomain(vm->def)))
+ if (!(ccwaddrs = virDomainCCWAddressSetCreateFromDomain(vm->def)))
goto cleanup;
if (virDomainCCWAddressAssign(&net->info, ccwaddrs,
!net->info.addr.ccw.assigned) < 0)
@@ -2375,7 +2375,7 @@ qemuDomainAttachSCSIVHostDevice(virQEMUDriverPtr driver,
if (qemuDomainEnsurePCIAddress(vm, &dev, driver) < 0)
goto cleanup;
} else if (hostdev->info->type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW) {
- if (!(ccwaddrs = qemuDomainCCWAddrSetCreateFromDomain(vm->def)))
+ if (!(ccwaddrs = virDomainCCWAddressSetCreateFromDomain(vm->def)))
goto cleanup;
if (virDomainCCWAddressAssign(hostdev->info, ccwaddrs,
!hostdev->info->addr.ccw.assigned) < 0)
--
2.17.1
6 years, 4 months
[libvirt] [PATCH] rpm: add new nwfilter RNGs to mingw-libvirt spec file
by Daniel P. Berrangé
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
Pushed as a build fix
mingw-libvirt.spec.in | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/mingw-libvirt.spec.in b/mingw-libvirt.spec.in
index 917d2143d8..cc1e619927 100644
--- a/mingw-libvirt.spec.in
+++ b/mingw-libvirt.spec.in
@@ -248,6 +248,8 @@ rm -rf $RPM_BUILD_ROOT%{mingw64_libexecdir}/libvirt-guests.sh
%{mingw32_datadir}/libvirt/schemas/networkcommon.rng
%{mingw32_datadir}/libvirt/schemas/nodedev.rng
%{mingw32_datadir}/libvirt/schemas/nwfilter.rng
+%{mingw32_datadir}/libvirt/schemas/nwfilter_params.rng
+%{mingw32_datadir}/libvirt/schemas/nwfilterbinding.rng
%{mingw32_datadir}/libvirt/schemas/secret.rng
%{mingw32_datadir}/libvirt/schemas/storagecommon.rng
%{mingw32_datadir}/libvirt/schemas/storagepool.rng
@@ -333,6 +335,8 @@ rm -rf $RPM_BUILD_ROOT%{mingw64_libexecdir}/libvirt-guests.sh
%{mingw64_datadir}/libvirt/schemas/networkcommon.rng
%{mingw64_datadir}/libvirt/schemas/nodedev.rng
%{mingw64_datadir}/libvirt/schemas/nwfilter.rng
+%{mingw64_datadir}/libvirt/schemas/nwfilter_params.rng
+%{mingw64_datadir}/libvirt/schemas/nwfilterbinding.rng
%{mingw64_datadir}/libvirt/schemas/secret.rng
%{mingw64_datadir}/libvirt/schemas/storagecommon.rng
%{mingw64_datadir}/libvirt/schemas/storagepool.rng
--
2.17.1
6 years, 4 months
[libvirt] [PATCH 0/2] domain_addr: move qemu function and rename
by Anya Harter
qemuDomainCCWAddrSetCreateFromDomain moved from qemu_domain_addr to
domain_addr and rename to virDomainCCWAddrSetCreateFromDomain because
it is not a qemu-specific function
Anya Harter (2):
qemu: move qemuDomainCCWAddrSetCreateFromDomain
domain_addr: refactor qemuDomainCCWAddrSetCreateFromDomain
src/conf/domain_addr.c | 24 ++++++++++++++++++++++++
src/conf/domain_addr.h | 4 ++++
src/qemu/qemu_domain_address.c | 26 ++------------------------
src/qemu/qemu_domain_address.h | 4 ----
src/qemu/qemu_hotplug.c | 4 ++--
5 files changed, 32 insertions(+), 30 deletions(-)
--
2.17.1
6 years, 4 months