[libvirt] [PATCH] gnulib: switch to use https:// instead of git:// protocol
by Daniel P. Berrangé
Some contributors are behind obnoxious firewalls that block everything
except http(s) traffic, preventing checkout of modules using the git://
protocol. Since git.savannah.gnu.org is using the modern, fast HTTP
transport, there's no real downside to using that by default.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
AFAICT, this change has no effect for anyone with an existing checkout
of gnulib. They'll continue using the git protocol, just new checkouts
will start using http. This is fine so no effort is made to "fix"
existing checkouts.
.gitmodules | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.gitmodules b/.gitmodules
index cfee24d7b8..0fda887528 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,6 +1,6 @@
[submodule "gnulib"]
path = .gnulib
- url = git://git.sv.gnu.org/gnulib.git
+ url = https://git.savannah.gnu.org/git/gnulib.git/
[submodule "keycodemapdb"]
path = src/keycodemapdb
url = https://gitlab.com/keycodemap/keycodemapdb.git
--
2.14.3
7 years, 1 month
[libvirt] [GSoC] Pointers for project idea
by Sukrit Bhatnagar
Hi,
Can anyone provide me with some pointers for the project "Conversion to and
from OCI formatted containers"?
I have referred to the relevant source files listed on the ideas page and
would like to read more about it.
Thanks,
Sukrit
7 years, 1 month
[libvirt] [PATCH rebase v4 0/5] qemu: use arp table of host to get the
by Chen Hanxiao
introduce VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP to get ip address
of VM from the output of /proc/net/arp
Chen Hanxiao (5):
util: introduce virNetlinkGetNeighbor to get neighbor table entry
util: introduce helper to parse message from RTM_GETNEIGH query
qemu: introduce qemuARPGetInterfaces to get IP from host's arp table
virsh: add --source arp to domifaddr
news: qemu: use arp table of host to get the IP address of guests
docs/news.xml | 9 ++
include/libvirt/libvirt-domain.h | 1 +
po/POTFILES.in | 1 +
src/Makefile.am | 1 +
src/libvirt-domain.c | 7 ++
src/libvirt_private.syms | 6 ++
src/qemu/qemu_driver.c | 72 ++++++++++++++++
src/util/Makefile.inc.am | 2 +
src/util/virarptable.c | 181 +++++++++++++++++++++++++++++++++++++++
src/util/virarptable.h | 48 +++++++++++
src/util/virnetlink.c | 82 ++++++++++++++++++
src/util/virnetlink.h | 2 +
tools/virsh-domain-monitor.c | 2 +
tools/virsh.pod | 7 +-
14 files changed, 418 insertions(+), 3 deletions(-)
create mode 100644 src/util/virarptable.c
create mode 100644 src/util/virarptable.h
--
2.14.3
7 years, 1 month
[libvirt] [PATCH 0/2] virarptable: fix some leaks and format
by Chen Hanxiao
Address John's comment on v4
Chen Hanxiao (2):
virarptable: fix some leaks and format issue
qemu: fix some leaks
src/qemu/qemu_driver.c | 3 +++
src/util/virarptable.c | 13 +++++++++++--
2 files changed, 14 insertions(+), 2 deletions(-)
--
2.14.3
7 years, 1 month
[libvirt] [PATCH V2] libxl: MigratePrepare: use standard begin and end API pattern
by Jim Fehlig
libxlDomainMigrationPrepare adds the incoming domain def to the list
of domains via virDomainObjListAdd, but never adds its own ref to the
returned virDomainObj as other callers of virDomainObjListAdd do.
libxlDomainMigrationPrepareTunnel3 suffers the same discrepancy.
Change both to add a ref to the virDomainObj after a successful
virDomainObjListAdd, similar to other callers. This ensures a consistent
pattern throughout the drivers and allows using the virDomainObjEndAPI
function for cleanup.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
V2 of
https://www.redhat.com/archives/libvir-list/2018-March/msg00674.html
Changes in V2:
Add ref after call to virDomainObjListAdd so that EndAPI can be used
in the usual pattern.
src/libxl/libxl_migration.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/src/libxl/libxl_migration.c b/src/libxl/libxl_migration.c
index 42a84bd35..7dc39ae02 100644
--- a/src/libxl/libxl_migration.c
+++ b/src/libxl/libxl_migration.c
@@ -583,6 +583,7 @@ libxlDomainMigrationPrepareTunnel3(virConnectPtr dconn,
NULL)))
goto error;
+ virObjectRef(vm);
*def = NULL;
priv = vm->privateData;
@@ -635,13 +636,11 @@ libxlDomainMigrationPrepareTunnel3(virConnectPtr dconn,
/* Remove virDomainObj from domain list */
if (vm) {
virDomainObjListRemove(driver->domains, vm);
- vm = NULL;
+ virObjectLock(vm);
}
done:
- if (vm)
- virObjectUnlock(vm);
-
+ virDomainObjEndAPI(&vm);
return ret;
}
@@ -683,6 +682,7 @@ libxlDomainMigrationPrepare(virConnectPtr dconn,
NULL)))
goto error;
+ virObjectRef(vm);
*def = NULL;
priv = vm->privateData;
@@ -810,7 +810,7 @@ libxlDomainMigrationPrepare(virConnectPtr dconn,
/* Remove virDomainObj from domain list */
if (vm) {
virDomainObjListRemove(driver->domains, vm);
- vm = NULL;
+ virObjectLock(vm);
}
done:
@@ -820,8 +820,7 @@ libxlDomainMigrationPrepare(virConnectPtr dconn,
VIR_FREE(hostname);
else
virURIFree(uri);
- if (vm)
- virObjectUnlock(vm);
+ virDomainObjEndAPI(&vm);
virObjectUnref(cfg);
return ret;
}
--
2.16.2
7 years, 1 month
[libvirt] [PATCH v1 0/7] Add support for video and input devices on S390
by Farhan Ali
Hi,
This patch series adds Libvirt support for video and input devices
for QEMU guests on S390. QEMU v2.11.0 added support for the
virtio-gpu-ccw device [1] and virtio-{keyboard, mouse, tablet}-ccw devices [2],
which can be used as video and input devices respectively.
Thanks
Farhan
[1] https://git.qemu.org/?p=qemu.git;a=commit;h=1f8ad88935f5cb5a2968909e392db...
[2] https://git.qemu.org/?p=qemu.git;a=commit;h=3382cf1fabbf722dce931846853da...
Farhan Ali (7):
qemu: Fix comment for 'qemuValidateDevicePCISlotsChipsets'
qemu: Add support for virtio-gpu-ccw device
tests: Add test case for virtio-gpu-ccw
qemu: Use correct bus type for input devices
qemu: Add support for virtio input ccw devices
tests: Add test case for virtio input ccw devices
news: Update for virtio-gpu-ccw and virtio input ccw devices
docs/formatdomain.html.in | 5 ++
docs/news.xml | 10 +++
src/qemu/qemu_capabilities.c | 13 ++++
src/qemu/qemu_capabilities.h | 6 ++
src/qemu/qemu_command.c | 32 +++++++--
src/qemu/qemu_domain.c | 2 +-
src/qemu/qemu_domain_address.c | 12 +++-
src/qemu/qemu_process.c | 5 +-
.../qemucapabilitiesdata/caps_2.11.0.s390x.replies | 83 +++++++++++++++++++---
tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 6 +-
tests/qemuxml2argvdata/input-virtio-ccw.args | 26 +++++++
tests/qemuxml2argvdata/input-virtio-ccw.xml | 29 ++++++++
.../qemuxml2argvdata/video-virtio-gpu-ccw-auto.xml | 18 +++++
tests/qemuxml2argvdata/video-virtio-gpu-ccw.args | 25 +++++++
tests/qemuxml2argvdata/video-virtio-gpu-ccw.xml | 35 +++++++++
tests/qemuxml2argvtest.c | 15 ++++
tests/qemuxml2xmloutdata/input-virtio-ccw.xml | 36 ++++++++++
.../video-virtio-gpu-ccw-auto.xml | 34 +++++++++
tests/qemuxml2xmloutdata/video-virtio-gpu-ccw.xml | 38 ++++++++++
tests/qemuxml2xmltest.c | 23 ++++++
20 files changed, 434 insertions(+), 19 deletions(-)
create mode 100644 tests/qemuxml2argvdata/input-virtio-ccw.args
create mode 100644 tests/qemuxml2argvdata/input-virtio-ccw.xml
create mode 100644 tests/qemuxml2argvdata/video-virtio-gpu-ccw-auto.xml
create mode 100644 tests/qemuxml2argvdata/video-virtio-gpu-ccw.args
create mode 100644 tests/qemuxml2argvdata/video-virtio-gpu-ccw.xml
create mode 100644 tests/qemuxml2xmloutdata/input-virtio-ccw.xml
create mode 100644 tests/qemuxml2xmloutdata/video-virtio-gpu-ccw-auto.xml
create mode 100644 tests/qemuxml2xmloutdata/video-virtio-gpu-ccw.xml
--
2.7.4
7 years, 1 month
[libvirt] [PATCH 0/2] apibuild: fix with python3
by Cole Robinson
These patches fix apibuild.py to work with python3 and generate
identical output to python2, at least in my testing. Someone
else should confirm though
Thanks,
Cole
Cole Robinson (2):
apibuild: Fix errors on python3
apibuild: Fix -refs.xml building
docs/apibuild.py | 34 +++++++++++++++-------------------
1 file changed, 15 insertions(+), 19 deletions(-)
--
2.14.3
7 years, 1 month
[libvirt] [PATCH 0/4] libxl: fix virDomainObj locking and ref counting in migration APIs
by Jim Fehlig
While reviewing a patch [0] from John's series to rework
virDomainObjListFindBy{UUID|ID}Ref, I noticed several problems with locking
and ref counting in the libxl migration APIs. This series changes the Begin,
Prepare, Perform, and Confirm APIs to use the standard pattern of get a
locked and ref counted virDomainObj, perform API, virDomainObjEndAPI.
[0] https://www.redhat.com/archives/libvir-list/2018-March/msg00516.html
Jim Fehlig (4):
libxl: MigrateBegin: Dont call EndAPI in helper function
libxl: MigrateConfirm: Dont unlock virDomainObj in helper function
libxl: MigratePrepare: properly cleanup after virDomainObjListAdd
libxl: MigratePerform: properly cleanup after libxlDomObjFromDomain
src/libxl/libxl_driver.c | 40 ++++++++++++++++++++++------------------
src/libxl/libxl_migration.c | 10 ++--------
2 files changed, 24 insertions(+), 26 deletions(-)
--
2.16.2
7 years, 1 month
[libvirt] [PATCH] docs: mention viewing security notices on front page
by Daniel P. Berrangé
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
Pushed as a trivial docs change after suggestion by Roman in other review
docs/index.html.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/index.html.in b/docs/index.html.in
index c0c55cb148..1b3a7a3db6 100644
--- a/docs/index.html.in
+++ b/docs/index.html.in
@@ -52,7 +52,7 @@
<dd>Get involved in the libvirt community & student outreach programs</dd>
<dt><a href="securityprocess.html">Security vulnerabilities</a></dt>
- <dd>Report vulnerabilities to the libvirt security response team</dd>
+ <dd>View security notices and report vulnerabilities to the libvirt security response team</dd>
<dt><a href="bugs.html">Bug reporting</a></dt>
<dd>View and report bugs in libvirt packages</dd>
--
2.14.3
7 years, 1 month
[libvirt] [PATCH] qemu: Build usb controller command line more wisely
by Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1552127
When building command line for USB controllers we have to do more
than just put controller's alias onto the command line. QEMU has
concept of these joined USB controllers. For instance ehci and
uhci controllers need to create the same USB bus. To achieve that
the slave controller needs to refer the master controller. This
worked until we've introduced user aliases because both master
and slave had the same alias. With user aliases slave can have
different alias than master. Therefore, when generating command
line for slave we need to look up the master's alias.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_command.c | 44 ++++++++++++++--
tests/qemuxml2argvdata/user-aliases-usb.args | 38 ++++++++++++++
tests/qemuxml2argvdata/user-aliases-usb.xml | 78 ++++++++++++++++++++++++++++
tests/qemuxml2argvtest.c | 3 ++
4 files changed, 158 insertions(+), 5 deletions(-)
create mode 100644 tests/qemuxml2argvdata/user-aliases-usb.args
create mode 100644 tests/qemuxml2argvdata/user-aliases-usb.xml
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index fa0aa5d5c3..a8afbd14fa 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -2545,8 +2545,34 @@ qemuControllerModelUSBToCaps(int model)
}
+static const char *
+qemuBuildUSBControllerFindMasterAlias(const virDomainDef *domainDef,
+ const virDomainControllerDef *def)
+{
+ size_t i;
+
+ for (i = 0; i < domainDef->ncontrollers; i++) {
+ const virDomainControllerDef *tmp = domainDef->controllers[i];
+
+ if (tmp->type != VIR_DOMAIN_CONTROLLER_TYPE_USB)
+ continue;
+
+ if (tmp->idx != def->idx)
+ continue;
+
+ if (tmp->info.mastertype == VIR_DOMAIN_CONTROLLER_MASTER_USB)
+ continue;
+
+ return tmp->info.alias;
+ }
+
+ return NULL;
+}
+
+
static int
-qemuBuildUSBControllerDevStr(virDomainControllerDefPtr def,
+qemuBuildUSBControllerDevStr(const virDomainDef *domainDef,
+ virDomainControllerDefPtr def,
virQEMUCapsPtr qemuCaps,
virBuffer *buf)
{
@@ -2586,11 +2612,19 @@ qemuBuildUSBControllerDevStr(virDomainControllerDefPtr def,
def->opts.usbopts.ports, def->opts.usbopts.ports);
}
- if (def->info.mastertype == VIR_DOMAIN_CONTROLLER_MASTER_USB)
+ if (def->info.mastertype == VIR_DOMAIN_CONTROLLER_MASTER_USB) {
+ const char *masterbus;
+
+ if (!(masterbus = qemuBuildUSBControllerFindMasterAlias(domainDef, def))) {
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("masterbus not found"));
+ return -1;
+ }
virBufferAsprintf(buf, ",masterbus=%s.0,firstport=%d",
- def->info.alias, def->info.master.usb.startport);
- else
+ masterbus, def->info.master.usb.startport);
+ } else {
virBufferAsprintf(buf, ",id=%s", def->info.alias);
+ }
return 0;
}
@@ -2722,7 +2756,7 @@ qemuBuildControllerDevStr(const virDomainDef *domainDef,
break;
case VIR_DOMAIN_CONTROLLER_TYPE_USB:
- if (qemuBuildUSBControllerDevStr(def, qemuCaps, &buf) == -1)
+ if (qemuBuildUSBControllerDevStr(domainDef, def, qemuCaps, &buf) == -1)
goto error;
if (nusbcontroller)
diff --git a/tests/qemuxml2argvdata/user-aliases-usb.args b/tests/qemuxml2argvdata/user-aliases-usb.args
new file mode 100644
index 0000000000..3dfaadc33b
--- /dev/null
+++ b/tests/qemuxml2argvdata/user-aliases-usb.args
@@ -0,0 +1,38 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu-system-x86_64 \
+-name gentoo \
+-S \
+-M pc-i440fx-1.4 \
+-m 4096 \
+-smp 4,sockets=4,cores=1,threads=1 \
+-uuid a75aca4b-a02f-2bcb-4a91-c93cd848c34b \
+-nographic \
+-nodefaults \
+-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-gentoo/monitor.sock,\
+server,nowait \
+-mon chardev=charmonitor,id=monitor,mode=readline \
+-global PIIX4_PM.disable_s3=0 \
+-global PIIX4_PM.disable_s4=0 \
+-boot cd \
+-device ich9-usb-ehci1,id=ua-myUSB1,bus=pci.0,addr=0x4.0x7 \
+-device ich9-usb-uhci1,masterbus=ua-myUSB1.0,firstport=0,bus=pci.0,\
+multifunction=on,addr=0x4 \
+-device ich9-usb-uhci2,masterbus=ua-myUSB1.0,firstport=2,bus=pci.0,\
+addr=0x4.0x1 \
+-device ich9-usb-uhci3,masterbus=ua-myUSB1.0,firstport=4,bus=pci.0,\
+addr=0x4.0x2 \
+-device ich9-usb-ehci1,id=ua-myUSB5,bus=pci.0,addr=0x5.0x7 \
+-device ich9-usb-uhci1,masterbus=ua-myUSB5.0,firstport=0,bus=pci.0,\
+multifunction=on,addr=0x5 \
+-device ich9-usb-uhci2,masterbus=ua-myUSB5.0,firstport=2,bus=pci.0,\
+addr=0x5.0x1 \
+-device ich9-usb-uhci3,masterbus=ua-myUSB5.0,firstport=4,bus=pci.0,\
+addr=0x5.0x2 \
+-device usb-host,hostbus=14,hostaddr=6,id=hostdev0,bus=ua-myUSB1.0,port=3 \
+-device usb-host,hostbus=15,hostaddr=6,id=hostdev1,bus=ua-myUSB5.0,port=3 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
diff --git a/tests/qemuxml2argvdata/user-aliases-usb.xml b/tests/qemuxml2argvdata/user-aliases-usb.xml
new file mode 100644
index 0000000000..668a9c384b
--- /dev/null
+++ b/tests/qemuxml2argvdata/user-aliases-usb.xml
@@ -0,0 +1,78 @@
+<domain type='kvm'>
+ <name>gentoo</name>
+ <uuid>a75aca4b-a02f-2bcb-4a91-c93cd848c34b</uuid>
+ <memory unit='KiB'>4194304</memory>
+ <currentMemory unit='KiB'>4194304</currentMemory>
+ <vcpu placement='static'>4</vcpu>
+ <os>
+ <type arch='x86_64' machine='pc-i440fx-1.4'>hvm</type>
+ <boot dev='hd'/>
+ <boot dev='cdrom'/>
+ </os>
+ <features>
+ <acpi/>
+ <apic/>
+ <pae/>
+ </features>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>restart</on_crash>
+ <pm>
+ <suspend-to-mem enabled='yes'/>
+ <suspend-to-disk enabled='yes'/>
+ </pm>
+ <devices>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
+ <controller type='usb' index='0' model='ich9-ehci1'>
+ <alias name='ua-myUSB1'/>
+ <address type='pci' domain='0' bus='0' slot='4' function='7'/>
+ </controller>
+ <controller type='usb' index='0' model='ich9-uhci1'>
+ <alias name='ua-myUSB2'/>
+ <master startport='0'/>
+ <address type='pci' domain='0' bus='0' slot='4' function='0' multifunction='on'/>
+ </controller>
+ <controller type='usb' index='0' model='ich9-uhci2'>
+ <alias name='ua-myUSB3'/>
+ <master startport='2'/>
+ <address type='pci' domain='0' bus='0' slot='4' function='1'/>
+ </controller>
+ <controller type='usb' index='0' model='ich9-uhci3'>
+ <alias name='ua-myUSB4'/>
+ <master startport='4'/>
+ <address type='pci' domain='0' bus='0' slot='4' function='2'/>
+ </controller>
+ <controller type='usb' index='1' model='ich9-ehci1'>
+ <alias name='ua-myUSB5'/>
+ <address type='pci' domain='0' bus='0' slot='5' function='7'/>
+ </controller>
+ <controller type='usb' index='1' model='ich9-uhci1'>
+ <alias name='ua-myUSB6'/>
+ <master startport='0'/>
+ <address type='pci' domain='0' bus='0' slot='5' function='0' multifunction='on'/>
+ </controller>
+ <controller type='usb' index='1' model='ich9-uhci2'>
+ <alias name='ua-myUSB7'/>
+ <master startport='2'/>
+ <address type='pci' domain='0' bus='0' slot='5' function='1'/>
+ </controller>
+ <controller type='usb' index='1' model='ich9-uhci3'>
+ <alias name='ua-myUSB8'/>
+ <master startport='4'/>
+ <address type='pci' domain='0' bus='0' slot='5' function='2'/>
+ </controller>
+ <hostdev mode='subsystem' type='usb' managed='yes'>
+ <source>
+ <address bus='14' device='6'/>
+ </source>
+ <address type='usb' bus='0' port='3'/>
+ </hostdev>
+ <hostdev mode='subsystem' type='usb' managed='yes'>
+ <source>
+ <address bus='15' device='6'/>
+ </source>
+ <address type='usb' bus='1' port='3'/>
+ </hostdev>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 731db9ed52..f6a90c2814 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -2997,6 +2997,9 @@ mymain(void)
QEMU_CAPS_DEVICE_ISA_SERIAL,
QEMU_CAPS_HDA_DUPLEX);
DO_TEST("user-aliases2", QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI);
+ DO_TEST("user-aliases-usb", QEMU_CAPS_KVM,
+ QEMU_CAPS_PIIX_DISABLE_S3, QEMU_CAPS_PIIX_DISABLE_S4,
+ QEMU_CAPS_ICH9_USB_EHCI1, QEMU_CAPS_PCI_MULTIFUNCTION);
/* Test disks with format probing enabled for legacy reasons.
* New tests should not go in this section. */
--
2.16.1
7 years, 1 month