[libvirt] [PATCH] config-post.h:fix a typo
by Nitesh Konkar
Signed-off-by: Nitesh Konkar <nitkon12(a)linux.vnet.ibm.com>
---
config-post.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config-post.h b/config-post.h
index dd69197..6eb63db 100644
--- a/config-post.h
+++ b/config-post.h
@@ -20,7 +20,7 @@
* Since virt-login-shell will be setuid, we must do everything
* we can to avoid linking to other libraries. Many of them do
* unsafe things in functions marked __atttribute__((constructor)).
- * The only way avoid to avoid such deps is to re-compile the
+ * The only way to avoid such deps is to re-compile the
* functions with the code in question disabled, and for that we
* must override the main config.h rules. Hence this file :-(
*/
--
2.1.0
8 years, 3 months
[libvirt] [PATCH 0/5] enforce and simplify qga interactions
by Nikolay Shirokovskiy
First 2 patches fix bugs of libvirt - qga communication.
They deal with the channel pecularities described in
http://wiki.qemu.org/Features/QAPI/GuestAgent. First
patch address https://bugzilla.redhat.com/show_bug.cgi?id=1090551
bug.
Next 3 patches hide details of channel pecularities from client,
so there is no more need to reissue commands for the reasons other
then simple timeout.
Nikolay Shirokovskiy (5):
qemu: agent: ignore delayed reply when unsynced
qemu: agent: ignore garbage while waiting for sync reply
qemu: agent: skip outdated sync replies
qemu: agent: reissue sync on garbage sync reply
qemu: agent: give better error messages whe agent monitor is down
src/qemu/qemu_agent.c | 91 ++++++++++++++++++++++++++++++---------------------
1 file changed, 54 insertions(+), 37 deletions(-)
--
1.8.3.1
8 years, 3 months
[libvirt] [PATCH v1 0/4] libxl: channels support
by Joao Martins
Hey,
Channels have been on xen toolstack since Xen 4.5 and this small series
adds support for it, including xenconfig conversion and appropriate tests.
After this series it's possible to do this:
(assuming correct configuration of qemu agent in the guest)
$ cat domain.xml | grep -a1 channel | head -n 5 | tail -n 4
<channel type='unix'>
<source mode='bind' path='/tmp/channel'/>
<target type='xen' name='org.qemu.guest_agent.0'/>
</channel>
$ virsh create domain.xml
$ echo '{"execute":"guest-network-get-interfaces"}' | socat
stdio,ignoreeof unix-connect:/tmp/channel
{"execute":"guest-network-get-interfaces"}
{"return": [{"name": "lo", "ip-addresses": [{"ip-address-type": "ipv4",
"ip-address": "127.0.0.1", "prefix": 8}, {"ip-address-type": "ipv6",
"ip-address": "::1", "prefix": 128}], "hardware-address":
"00:00:00:00:00:00"}, {"name": "eth0", "ip-addresses":
[{"ip-address-type": "ipv4", "ip-address": "10.100.0.6", "prefix": 24},
{"ip-address-type": "ipv6", "ip-address": "fe80::216:3eff:fe40:88eb",
"prefix": 64}], "hardware-address": "00:16:3e:40:88:eb"}, {"name":
"sit0"}]}
There is just one thing unclear: is source "path" meant to be auto-generated
if it's not specified in the channel config? Additionally what does "state"
signify for virtio case: is it that the guest agent is connected, or that the
virtio serial is connected? Looking at the qemu driver on
processSerialChangedEvent it sounds to me like it's about the serial state.
I also have one other series that lets us share the qemu agent across both qemu
and libxl drivers, with qemu-agent-command implemented. But it's still in an
early stage.
Any comments or feedback is appreciated :)
Thanks,
Joao
Joao Martins (4):
conf: add xen type for channels
libxl: channels support
xenconfig: channels conversion support
xlconfigtest: add test for channel conversion
docs/schemas/domaincommon.rng | 11 ++
src/conf/domain_conf.c | 18 +++-
src/conf/domain_conf.h | 1 +
src/libxl/libxl_conf.c | 81 ++++++++++++++
src/libxl/libxl_domain.c | 38 +++++++
src/qemu/qemu_command.c | 1 +
src/xenconfig/xen_xl.c | 176 +++++++++++++++++++++++++++++++
tests/xlconfigdata/test-channel-pty.cfg | 13 +++
tests/xlconfigdata/test-channel-pty.xml | 33 ++++++
tests/xlconfigdata/test-channel-unix.cfg | 13 +++
tests/xlconfigdata/test-channel-unix.xml | 34 ++++++
tests/xlconfigtest.c | 4 +
12 files changed, 419 insertions(+), 4 deletions(-)
create mode 100644 tests/xlconfigdata/test-channel-pty.cfg
create mode 100644 tests/xlconfigdata/test-channel-pty.xml
create mode 100644 tests/xlconfigdata/test-channel-unix.cfg
create mode 100644 tests/xlconfigdata/test-channel-unix.xml
--
2.1.4
8 years, 3 months
[libvirt] [PATCH v3 0/5] Add runnability info to query-cpu-definitions
by Eduardo Habkost
This series extends query-cpu-definitions to include an extra
field: "unavailable-features". The new field can be used to find
out reasons that prevent the CPU model from running in the
current host.
This will return information based on the current machine and
accelerator only. In the future we may extend these mechanisms to
allow querying other machines and other accelerators without
restarting QEMU, but it will require some reorganization of
QEMU's main code.
Changes v2 -> v3:
* Small documentation reword
* Suggested-by: Markus Armbruster <armbru(a)redhat.com>
* Create a x86_cpu_feature_name() function, to
isolate the code that returns the property name
Changes v1 -> v2:
* Fixed documentation to say "(since 2.7)"
* Removed @runnable field, improved documentation
Example command output:
{ "return": [
{
"unavailable-features": [],
"static": false,
"name": "host"
},
{
"unavailable-features": [],
"static": false,
"name": "qemu64"
},
{
"unavailable-features": [],
"static": false,
"name": "qemu32"
},
{
"unavailable-features": ["npt", "sse4a", "3dnow", "3dnowext", "fxsr-opt", "mmxext"],
"static": false,
"name": "phenom"
},
{
"unavailable-features": [],
"static": false,
"name": "pentium3"
},
{
"unavailable-features": [],
"static": false,
"name": "pentium2"
},
{
"unavailable-features": [],
"static": false,
"name": "pentium"
},
{
"unavailable-features": [],
"static": false,
"name": "n270"
},
{
"unavailable-features": [],
"static": false,
"name": "kvm64"
},
{
"unavailable-features": [],
"static": false,
"name": "kvm32"
},
{
"unavailable-features": [],
"static": false,
"name": "coreduo"
},
{
"unavailable-features": [],
"static": false,
"name": "core2duo"
},
{
"unavailable-features": ["3dnow", "3dnowext", "mmxext"],
"static": false,
"name": "athlon"
},
{
"unavailable-features": [],
"static": false,
"name": "Westmere"
},
{
"unavailable-features": ["xgetbv1", "xsavec", "3dnowprefetch", "smap", "adx", "rdseed", "mpx", "rtm", "hle"],
"static": false,
"name": "Skylake-Client"
},
{
"unavailable-features": [],
"static": false,
"name": "SandyBridge"
},
{
"unavailable-features": [],
"static": false,
"name": "Penryn"
},
{
"unavailable-features": ["tbm", "fma4", "xop", "3dnowprefetch", "misalignsse", "sse4a"],
"static": false,
"name": "Opteron_G5"
},
{
"unavailable-features": ["fma4", "xop", "3dnowprefetch", "misalignsse", "sse4a"],
"static": false,
"name": "Opteron_G4"
},
{
"unavailable-features": ["misalignsse", "sse4a"],
"static": false,
"name": "Opteron_G3"
},
{
"unavailable-features": [],
"static": false,
"name": "Opteron_G2"
},
{
"unavailable-features": [],
"static": false,
"name": "Opteron_G1"
},
{
"unavailable-features": [],
"static": false,
"name": "Nehalem"
},
{
"unavailable-features": [],
"static": false,
"name": "IvyBridge"
},
{
"unavailable-features": ["rtm", "hle"],
"static": false,
"name": "Haswell"
},
{
"unavailable-features": [],
"static": false,
"name": "Haswell-noTSX"
},
{
"unavailable-features": [],
"static": false,
"name": "Conroe"
},
{
"unavailable-features": ["3dnowprefetch", "smap", "adx", "rdseed", "rtm", "hle"],
"static": false,
"name": "Broadwell"
},
{
"unavailable-features": ["3dnowprefetch", "smap", "adx", "rdseed"],
"static": false,
"name": "Broadwell-noTSX"
},
{
"unavailable-features": [],
"static": false,
"name": "486"
}
]}
Cc: David Hildenbrand <dahi(a)linux.vnet.ibm.com>
Cc: Michael Mueller <mimu(a)linux.vnet.ibm.com>
Cc: Christian Borntraeger <borntraeger(a)de.ibm.com>
Cc: Cornelia Huck <cornelia.huck(a)de.ibm.com>
Cc: Jiri Denemark <jdenemar(a)redhat.com>
Cc: libvir-list(a)redhat.com
Eduardo Habkost (5):
target-i386: List CPU models using subclass list
target-i386: Move warning code outside x86_cpu_filter_features()
target-i386: Define CPUID filtering functions before x86_cpu_list()
qmp: Add runnability information to query-cpu-definitions
target-i386: Return runnability information on query-cpu-definitions
qapi-schema.json | 23 ++++-
target-i386/cpu-qom.h | 4 +
target-i386/cpu.c | 236 ++++++++++++++++++++++++++++++++++++--------------
3 files changed, 199 insertions(+), 64 deletions(-)
--
2.7.4
8 years, 3 months
[libvirt] [PATCH v2] qemu-migration: Disallow migration of read only disk
by Corey S. McQuay
Currently Libvirt allows attempts to migrate read only disks. Qemu cannot handle this as read only
disks cannot be written to on the destination system. The end result is a cryptic error message
and a failed migration.
This patch causes migration to fail earlier and provides a meaningful error message stating that
migrating read only disks is not supported.
Signed-off-by: Corey S. McQuay <csmcquay(a)linux.vnet.ibm.com>
Reviewed-by: Jason J. Herne <jjherne(a)linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy(a)linux.vnet.ibm.com>
---
src/qemu/qemu_migration.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index e451ef6..011f349 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -2157,6 +2157,13 @@ qemuMigrationDriveMirror(virQEMUDriverPtr driver,
if (!qemuMigrateDisk(disk, nmigrate_disks, migrate_disks))
continue;
+ if (disk->src->readonly) {
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
+ _("Cannot migrate read-only disk %s"),
+ disk->dst);
+ goto cleanup;
+ }
+
if (!(diskAlias = qemuAliasFromDisk(disk)) ||
(virAsprintf(&nbd_dest, "nbd:%s:%d:exportname=%s",
hoststr, port, diskAlias) < 0))
--
2.7.4
8 years, 3 months
[libvirt] [RFC PATCH] Use disable-modern=on for disk device='lun'
by Ján Tomko
https://bugzilla.redhat.com/show_bug.cgi?id=1365823
For virtio-blk, scsi=on has been deprecated in virtio-1,
so <disk type='block' device='lun'> no longer works with
with a virtio-blk-pci device with machine types newer than 2.7:
https://bugzilla.redhat.com/show_bug.cgi?id=1245453
http://git.qemu.org/?p=qemu.git;a=commitdiff;h=9a4c0e22
Add disable-modern=on on the QEMU command line to prolong
the suffering for a while longer.
---
The alternative would be using the QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY
capability to report an error, instead of waiting until QEMU fails with
an error, since it's the first commit when the following error should
be reachable via libvirt-generated command line:
http://git.qemu.org/?p=qemu.git;a=commitdiff;h=efb8206c
src/qemu/qemu_command.c | 12 +++++
.../qemuxml2argv-virtio-lun-legacy.args | 30 +++++++++++++
.../qemuxml2argv-virtio-lun-legacy.xml | 52 ++++++++++++++++++++++
tests/qemuxml2argvtest.c | 3 ++
4 files changed, 97 insertions(+)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-virtio-lun-legacy.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-virtio-lun-legacy.xml
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 051a0bc..03dc20e 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -2075,6 +2075,18 @@ qemuBuildDriveDevStr(const virDomainDef *def,
virBufferAddLit(&opt, "virtio-blk-pci");
if (disk->iothread)
virBufferAsprintf(&opt, ",iothread=iothread%u", disk->iothread);
+
+ /*
+ * SCSI command passthrough was deprecated in virtio 1.0,
+ * see https://bugzilla.redhat.com/show_bug.cgi?id=1365823
+ */
+ if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_BLK_SCSI) &&
+ disk->device == VIR_DOMAIN_DISK_DEVICE_LUN &&
+ virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY)) {
+ VIR_WARN("lun type devices are deprecated for virtio-blk-pci devices, "
+ "consider using disks on a virtio-scsi controller");
+ virBufferAddLit(&opt, ",disable-modern=on");
+ }
}
qemuBuildIoEventFdStr(&opt, disk->ioeventfd, qemuCaps);
if (disk->event_idx &&
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-virtio-lun-legacy.args b/tests/qemuxml2argvdata/qemuxml2argv-virtio-lun-legacy.args
new file mode 100644
index 0000000..d1ff31c
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-virtio-lun-legacy.args
@@ -0,0 +1,30 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name test \
+-S \
+-M pc-0.13 \
+-m 1024 \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid bba65c0e-c049-934f-b6aa-4e2c0582acdf \
+-nographic \
+-nodefaults \
+-monitor unix:/tmp/lib/domain--1-test/monitor.sock,server,nowait \
+-no-acpi \
+-boot dc \
+-device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 \
+-usb \
+-drive file=/dev/sdfake,format=qcow2,if=none,id=drive-virtio-disk0 \
+-device virtio-blk-pci,disable-modern=on,scsi=on,bus=pci.0,addr=0x4,\
+drive=drive-virtio-disk0,id=virtio-disk0 \
+-drive file=/dev/sdfake2,format=qcow2,if=none,id=drive-virtio-disk1 \
+-device virtio-blk-pci,disable-modern=on,scsi=on,bus=pci.0,addr=0x5,\
+drive=drive-virtio-disk1,id=virtio-disk1 \
+-device virtio-net-pci,vlan=0,id=net0,mac=52:54:00:e5:48:58,bus=pci.0,addr=0x3 \
+-net user,vlan=0,name=hostnet0 \
+-serial pty \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-virtio-lun-legacy.xml b/tests/qemuxml2argvdata/qemuxml2argv-virtio-lun-legacy.xml
new file mode 100644
index 0000000..63dbfda
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-virtio-lun-legacy.xml
@@ -0,0 +1,52 @@
+<domain type='qemu'>
+ <name>test</name>
+ <uuid>bba65c0e-c049-934f-b6aa-4e2c0582acdf</uuid>
+ <memory unit='KiB'>1048576</memory>
+ <currentMemory unit='KiB'>1048576</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='x86_64' machine='pc-0.13'>hvm</type>
+ <boot dev='cdrom'/>
+ <boot dev='hd'/>
+ <bootmenu enable='yes'/>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>restart</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu</emulator>
+ <disk type='block' device='lun' rawio='yes'>
+ <driver name='qemu' type='qcow2'/>
+ <source dev='/dev/sdfake'/>
+ <target dev='vda' bus='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+ </disk>
+ <disk type='block' device='lun'>
+ <driver name='qemu' type='qcow2'/>
+ <source dev='/dev/sdfake2'/>
+ <target dev='vdb' bus='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
+ </disk>
+ <controller type='usb' index='0'/>
+ <controller type='virtio-serial' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
+ </controller>
+ <controller type='ide' index='0'/>
+ <controller type='pci' index='0' model='pci-root'/>
+ <interface type='user'>
+ <mac address='52:54:00:e5:48:58'/>
+ <model type='virtio'/>
+ <driver name='vhost' event_idx='off'/>
+ </interface>
+ <serial type='pty'>
+ <target port='0'/>
+ </serial>
+ <console type='pty'>
+ <target type='serial' port='0'/>
+ </console>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+ <memballoon model='virtio'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index e854077..afe3073 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -931,6 +931,9 @@ mymain(void)
QEMU_CAPS_VIRTIO_BLK_SCSI);
DO_TEST("virtio-lun",
QEMU_CAPS_VIRTIO_BLK_SCSI);
+ DO_TEST("virtio-lun-legacy",
+ QEMU_CAPS_VIRTIO_BLK_SCSI,
+ QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY);
DO_TEST("disk-scsi-lun-passthrough",
QEMU_CAPS_SCSI_BLOCK,
QEMU_CAPS_SCSI_LSI, QEMU_CAPS_VIRTIO_SCSI);
--
2.7.3
8 years, 3 months
[libvirt] [PATCH] virtlogd: Don't stop or restart along with libvirtd
by Andrea Bolognani
Commit 839a060 tied the lifecycle of virtlogd more
closely to that of libvirtd. Unfortunately, while starting
virtlogd when libvirtd is started is definitely a good idea,
restarting virtlogd or shutting it down at any time outside
of system poweroff is not.
Revert part of that commit by removing the PartOf= lines,
meaning that only startup requests will be propagated from
libvirtd to virtlogd.
Resolves: https://bugzilla.redhat.com/1372576
---
src/logging/virtlogd.service.in | 1 -
src/logging/virtlogd.socket.in | 1 -
2 files changed, 2 deletions(-)
diff --git a/src/logging/virtlogd.service.in b/src/logging/virtlogd.service.in
index 8287994..09e0740 100644
--- a/src/logging/virtlogd.service.in
+++ b/src/logging/virtlogd.service.in
@@ -2,7 +2,6 @@
Description=Virtual machine log manager
Requires=virtlogd.socket
Before=libvirtd.service
-PartOf=libvirtd.service
Documentation=man:virtlogd(8)
Documentation=http://libvirt.org
diff --git a/src/logging/virtlogd.socket.in b/src/logging/virtlogd.socket.in
index efb6504..22b9360 100644
--- a/src/logging/virtlogd.socket.in
+++ b/src/logging/virtlogd.socket.in
@@ -1,7 +1,6 @@
[Unit]
Description=Virtual machine log manager socket
Before=libvirtd.service
-PartOf=libvirtd.service
[Socket]
ListenStream=@localstatedir@/run/libvirt/virtlogd-sock
--
2.7.4
8 years, 3 months
[libvirt] [PATCH v3 0/8] Introduce aliases for virt-admin's srv-* commands
by Erik Skultety
the original version:
https://www.redhat.com/archives/libvir-list/2016-September/msg00312.html
v2: https://www.redhat.com/archives/libvir-list/2016-September/msg00380.html
Since this series (compared to v2) does a tiny bit of refactor (tweaking might
be a better word in this case) as well, I was also looking into refactoring the
parser in vsh.c....again...And again I gave up on doing that (this time a lot
faster though) because that would mean to rewrite a lot of code mainly to enable
usage of our virString* methods. I also found an ANSI C GNU-styled command line
parser library [1] which might even cope with our command and option aliases
(I didn't look into that much though, so take it with a grain of salt).
However, though looking good, it would most likely hit the wall once it
encountered our "multi-command" feature in the interactive shell mode :(
[1] http://argtable.sourceforge.net/
since v1:
- tweaked the virsh-self-test so that it also checks the aliased commands
instead of skipping them (since there was a good reason for that before
the changes this series introduces)
- patches (now) 7-8 remained untouched
since v2:
- Michal was indeed right about having a proper check for missing aliases
which would eventually result in a reasonable internal error
- so the check was put into vshCmddefCheckInternals, but that function
should not be called from within vshCmddefOptParse because it's not just
about checking the .opts but the overall command structure and at the time
of parsing the arguments we should already know whether the command
structure is valid or not
- since vshCmddefOptParse has been split once again, merge it with
vshCmddefOptFill and drop the latter
Erik Skultety (8):
vsh: Fix NULL dereference leading to SIGSEGV if a command is missing
'.info'
vsh: vshCmddefHelp: Drop the unnecessary 'else' branch
vsh: vshCmddefHelp: Retrieve command info after we know the command is
non-NULL
vsh: Extract vshCmddefCheckInternals from vshCmddefOptParse
vsh: discard vshCmddefOptFill and move its body to vshCmddefOptParse
virt-admin: Tweak command parsing logic so that aliases point to new
commands
virt-admin: Add some command aliases to provide syntax sugar over ugly
commands
virt-admin: Replace the (now) aliases with new command names in the
man page
tools/virsh-nodedev.c | 6 +-
tools/virsh.pod | 2 -
tools/virt-admin.c | 24 +++++
tools/virt-admin.pod | 30 +++---
tools/vsh.c | 280 ++++++++++++++++++++++++++------------------------
tools/vsh.h | 4 +-
6 files changed, 191 insertions(+), 155 deletions(-)
--
2.5.5
8 years, 3 months
[libvirt] [PATCH v3 0/2] qemu/gluster: add option for tuning debug logging level
by Prasanna Kumar Kalever
v3:
Add patch 2/2 which address capability checks
Changed 'glusterfs_debug_level' to 'gluster_debug_level' agreeing to Peter
Made changes in libvirtd_qemu.aug
Thanks to Peter & Daniel
v2:
Modify test cases and syntax check changes as suggested by Peter in v1.
Rename qemu_gfapi_debuglevel to glusterfs_debug_level as per Daniel comments.
Fix to make debug_level changes effects on URI along with JSON.
TODO:
* changes in libvirtd_qemu.aug
Which I don't understand for now
* comment on debug_level variable in storage source
Not sure what is the right place
* Capablities check
v1:
Initial post
Prasanna Kumar Kalever (2):
qemu/gluster: add option for tuning debug logging level
qemu_capabilities: Introduce gluster specific debug capability
src/qemu/libvirtd_qemu.aug | 3 +++
src/qemu/qemu.conf | 20 ++++++++++++++++++++
src/qemu/qemu_capabilities.c | 6 ++++++
src/qemu/qemu_capabilities.h | 3 +++
src/qemu/qemu_command.c | 21 ++++++++++++++++++---
src/qemu/qemu_conf.c | 3 +++
src/qemu/qemu_conf.h | 1 +
src/util/virstoragefile.h | 2 ++
.../qemuargv2xml-disk-drive-network-gluster.args | 7 ++++---
.../qemuxml2argv-disk-drive-network-gluster.args | 12 ++++++------
tests/qemuxml2argvtest.c | 3 ++-
11 files changed, 68 insertions(+), 13 deletions(-)
--
2.7.4
8 years, 3 months
[libvirt] [PATCH] Add missing 'extern' for VIR_EXPORT_VAR macro
by Daniel P. Berrange
The recent update to gnulib
commit 9d7a37ecb2ab516c19164a57b8aeb32016a99d2c
Author: Eric Blake <eblake(a)redhat.com>
Date: Thu Sep 15 15:12:52 2016 -0500
build: update to latest gnulib
Pulled in a change that adds -fno-common to the default compiler
flags
commit bf8e658ffadb95d444f56d222d04c9af955af765
Author: Jim Meyering <meyering(a)fb.com>
Date: Fri Sep 2 09:16:16 2016 -0700
manywarnings: add -fno-common
This caused libvirt Mingw build to break with the compiler
reporting 100's of definitions of virConnectAuthPtrDefault
./.libs/libvirt_util.a(libvirt_util_la-virarch.o):virarch.c:(.bss+0x0): multiple definition of `virConnectAuthPtrDefault'
./.libs/libvirt_util.a(libvirt_util_la-viralloc.o):viralloc.c:(.bss+0x0): first defined here
./.libs/libvirt_util.a(libvirt_util_la-viratomic.o):viratomic.c:(.bss+0x0): multiple definition of `virConnectAuthPtrDefault'
./.libs/libvirt_util.a(libvirt_util_la-viralloc.o):/home/berrange/src/virt/libvirt/src/util/viralloc.c:87: first defined here
./.libs/libvirt_util.a(libvirt_util_la-viraudit.o):viraudit.c:(.bss+0x0): multiple definition of `virConnectAuthPtrDefault'
./.libs/libvirt_util.a(libvirt_util_la-viralloc.o):/home/berrange/src/virt/libvirt/src/util/viralloc.c:87: first defined here
./.libs/libvirt_util.a(libvirt_util_la-virauth.o):virauth.c:(.bss+0x0): multiple definition of `virConnectAuthPtrDefault'
./.libs/libvirt_util.a(libvirt_util_la-viralloc.o):/home/berrange/src/virt/libvirt/src/util/viralloc.c:87: first defined here
./.libs/libvirt_util.a(libvirt_util_la-virauthconfig.o):virauthconfig.c:(.bss+0x0): multiple definition of `virConnectAuthPtrDefault'
...snip...
The cause is our VIR_EXPORT_VAR macro which has some
magic on win to add dllexport/dllimport to the variable
declaration. Unfortunately the dllexport branch missed
off the 'extern' keyword, so the header file was in
fact declaring an instance of the variable in every
source file.
Previously the linker would merge all these definitions
into one, but that no longer happens due to -fno-common
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
Pushing as a CI build fix
include/libvirt/libvirt-common.h.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/libvirt/libvirt-common.h.in b/include/libvirt/libvirt-common.h.in
index 79bfe90..0e8ada4 100644
--- a/include/libvirt/libvirt-common.h.in
+++ b/include/libvirt/libvirt-common.h.in
@@ -49,7 +49,7 @@ extern "C" {
# define VIR_EXPORT_VAR extern
# else
# ifdef IN_LIBVIRT
-# define VIR_EXPORT_VAR __declspec(dllexport)
+# define VIR_EXPORT_VAR __declspec(dllexport) extern
# else
# define VIR_EXPORT_VAR __declspec(dllimport) extern
# endif
--
2.7.4
8 years, 3 months