[PATCH 0/4] Support new qemu aio interface io_uring
by Han Han
The io_uring mode requires QEMU 5.0.0 and Linux 5.1 above.
Han Han (4):
qemu_capabilities: Introduce QEMU_CAPS_AIO_IO_URING
qemu: Implement the aio mode io_uring
tests: Tests for io mode io_uring
docs: Docs and news for io mode io_uring
docs/formatdomain.html.in | 3 +-
docs/news.xml | 9 +++
docs/schemas/domaincommon.rng | 1 +
src/conf/domain_conf.c | 1 +
src/conf/domain_conf.h | 1 +
src/qemu/qemu_capabilities.c | 2 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 8 +++
tests/qemublocktest.c | 1 +
...le-backing_basic-aio_io_uring-srconly.json | 44 +++++++++++++
.../file-backing_basic-aio_io_uring.json | 66 +++++++++++++++++++
.../file-backing_basic-aio_io_uring.xml | 47 +++++++++++++
.../caps_5.0.0.aarch64.replies | 3 +-
.../caps_5.0.0.aarch64.xml | 1 +
.../caps_5.0.0.ppc64.replies | 3 +-
.../qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 +
.../caps_5.0.0.x86_64.replies | 3 +-
.../caps_5.0.0.x86_64.xml | 1 +
.../disk-aio-io_uring.x86_64-latest.args | 40 +++++++++++
tests/qemuxml2argvdata/disk-aio-io_uring.xml | 30 +++++++++
tests/qemuxml2argvtest.c | 1 +
.../disk-aio-io_uring.x86_64-latest.xml | 39 +++++++++++
tests/qemuxml2xmltest.c | 1 +
23 files changed, 303 insertions(+), 4 deletions(-)
create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-aio_io_uring-srconly.json
create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-aio_io_uring.json
create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-aio_io_uring.xml
create mode 100644 tests/qemuxml2argvdata/disk-aio-io_uring.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/disk-aio-io_uring.xml
create mode 100644 tests/qemuxml2xmloutdata/disk-aio-io_uring.x86_64-latest.xml
--
2.25.0
4 years, 7 months
[PATCH libvirt-python] examples: Fix connection error handling
by Philipp Hahn
libvirt.open*() does not return None but raises an exception
Signed-off-by: Philipp Hahn <hahn(a)univention.de>
---
examples/dominfo.py | 5 +++--
examples/domrestore.py | 5 +++--
examples/domsave.py | 5 +++--
examples/domstart.py | 5 +++--
examples/esxlist.py | 6 +++---
5 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/examples/dominfo.py b/examples/dominfo.py
index 0a39f4c..fcfb8ed 100755
--- a/examples/dominfo.py
+++ b/examples/dominfo.py
@@ -34,8 +34,9 @@ if len(sys.argv) != 2:
name = sys.argv[1]
# Connect to libvirt
-conn = libvirt.openReadOnly(None)
-if conn is None:
+try:
+ conn = libvirt.openReadOnly(None)
+except libvirt.libvirtError:
print('Failed to open connection to the hypervisor')
sys.exit(1)
diff --git a/examples/domrestore.py b/examples/domrestore.py
index 96f4955..7fd5c8e 100755
--- a/examples/domrestore.py
+++ b/examples/domrestore.py
@@ -20,8 +20,9 @@ if len(sys.argv) != 2:
dir = sys.argv[1]
imgs = os.listdir(dir)
-conn = libvirt.open(None)
-if conn is None:
+try:
+ conn = libvirt.open(None)
+except libvirt.libvirtError:
print('Failed to open connection to the hypervisor')
sys.exit(1)
diff --git a/examples/domsave.py b/examples/domsave.py
index 4940cce..f8922d6 100755
--- a/examples/domsave.py
+++ b/examples/domsave.py
@@ -18,8 +18,9 @@ if len(sys.argv) != 2:
dir = sys.argv[1]
-conn = libvirt.open(None)
-if conn is None:
+try:
+ conn = libvirt.open(None)
+except libvirt.libvirtError:
print('Failed to open connection to the hypervisor')
sys.exit(1)
diff --git a/examples/domstart.py b/examples/domstart.py
index 7ff6cb9..f342e95 100755
--- a/examples/domstart.py
+++ b/examples/domstart.py
@@ -32,8 +32,9 @@ if len(sys.argv) != 2:
(name, xmldesc) = read_domain(sys.argv[1])
-conn = libvirt.open(None)
-if conn is None:
+try:
+ conn = libvirt.open(None)
+except libvirt.libvirtError:
print('Failed to open connection to the hypervisor')
sys.exit(1)
diff --git a/examples/esxlist.py b/examples/esxlist.py
index d86e064..caeced1 100755
--- a/examples/esxlist.py
+++ b/examples/esxlist.py
@@ -97,9 +97,9 @@ uri = "esx://%s/?no_verify=1" % hostname
# in order to log into the vCenter
auth = [[libvirt.VIR_CRED_AUTHNAME, libvirt.VIR_CRED_NOECHOPROMPT],
request_credentials, None]
-conn = libvirt.openAuth(uri, auth, 0)
-
-if conn is None:
+try:
+ conn = libvirt.openAuth(uri, auth, 0)
+except libvirt.libvirtError:
print("Failed to open connection to %s" % hostname)
sys.exit(1)
--
2.20.1
4 years, 7 months
[libvirt-ci PATCH] lcitool: Don't set root shell
by Andrea Bolognani
Being able to log in as root is critical to recover from failures,
so using bash might not always be the best idea: this is especially
true for FreeBSD, where bash is installed via ports and might break
on update from time to time, rendering the system inaccessible
without jumping through additional hoops.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
guests/playbooks/update/tasks/users.yml | 1 -
1 file changed, 1 deletion(-)
diff --git a/guests/playbooks/update/tasks/users.yml b/guests/playbooks/update/tasks/users.yml
index a07349f..28ee96a 100644
--- a/guests/playbooks/update/tasks/users.yml
+++ b/guests/playbooks/update/tasks/users.yml
@@ -3,7 +3,6 @@
user:
name: root
password: '{{ lookup("file", root_password_file)|password_hash("sha512") }}'
- shell: '{{ bash }}'
- name: 'root: Configure ssh access'
authorized_key:
--
2.25.3
4 years, 7 months
[libvirt PATCH 00/10] vbox: update to support newer versions and drop eol versions
by Daniel P. Berrangé
This is the bare minimum patches required to let libvirt compile with
the latest virtualbox SDK for 6.0 and 6.1. Since I do not use
virtualbox this is compile tested only. This will at least give users
something to try and provide feedback on. In addition currently EOL
versions of virtualbox are dropped.
Daniel P. Berrangé (10):
vbox: remove support for version 5.0 API
vbox: remove version 5.0 CAPI header
vbox: remove support for version 5.1 API
vbox: remove version 5.1 CAPI header
vbox: remove unused support for Windows MSCOM
vbox: add version 6.0 CAPI header
vbox: add support for version 6.0 SDK
vbox: add version 6.1 CAPI header
vbox: add support for version 6.1 SDK
docs: add news about virtualbox version support changes
docs/news.xml | 22 +
po/POTFILES.in | 1 -
src/vbox/Makefile.inc.am | 16 +-
.../{vbox_CAPI_v5_1.h => vbox_CAPI_v6_0.h} | 14959 +++---
.../{vbox_CAPI_v5_0.h => vbox_CAPI_v6_1.h} | 37642 +++++++++-------
src/vbox/vbox_MSCOMGlue.c | 779 -
src/vbox/vbox_MSCOMGlue.h | 45 -
src/vbox/{vbox_V5_0.c => vbox_V6_0.c} | 6 +-
src/vbox/{vbox_V5_1.c => vbox_V6_1.c} | 6 +-
src/vbox/vbox_XPCOMCGlue.h | 2 +-
src/vbox/vbox_common.h | 10 +-
src/vbox/vbox_driver.c | 2 +-
src/vbox/vbox_glue.c | 28 -
src/vbox/vbox_glue.h | 28 -
src/vbox/vbox_storage.c | 10 +-
src/vbox/vbox_tmpl.c | 104 +-
src/vbox/vbox_uniformed_api.h | 6 +-
17 files changed, 31851 insertions(+), 21815 deletions(-)
rename src/vbox/{vbox_CAPI_v5_1.h => vbox_CAPI_v6_0.h} (85%)
rename src/vbox/{vbox_CAPI_v5_0.h => vbox_CAPI_v6_1.h} (73%)
delete mode 100644 src/vbox/vbox_MSCOMGlue.c
delete mode 100644 src/vbox/vbox_MSCOMGlue.h
rename src/vbox/{vbox_V5_0.c => vbox_V6_0.c} (68%)
rename src/vbox/{vbox_V5_1.c => vbox_V6_1.c} (68%)
delete mode 100644 src/vbox/vbox_glue.c
delete mode 100644 src/vbox/vbox_glue.h
--
2.25.2
4 years, 7 months
[PATCH 0/3] Enable net devices in node-dev driver again
by Michal Privoznik
If the kernel doesn't have CONFIG_NET_DEVLINK then net devices are not
listed in nodedev-list. See 2/3 for more info.
Michal Prívozník (3):
virNetDevGetFamilyId: Change signature
virNetDevSwitchdevFeature: Make failure to get 'family_id' non-fatal
virnetdev.c: Use g_auto*()
src/util/virnetdev.c | 412 +++++++++++++++++--------------------------
1 file changed, 157 insertions(+), 255 deletions(-)
--
2.25.3
4 years, 7 months
[PATCH 0/2] Include lease time option into DHCP settings
by Julio Faracco
This series is based on latest series from Alberto. It includes a new
entry called <leasetime/> under <dhcp/> scope to add a default lease
time for range and host options for dnsmasq. There is no point to
configure both separately. If they are defined (range and/or host), they
should have the same lease time value.
This series includes some test cases to cover lease time XML syntax
also.
Julio Faracco (2):
conf: Add <leasetime/> option for <dhcp/> settings
tests: Add tests for <leasetime/> to cover dnsmasq settings
docs/schemas/basictypes.rng | 9 +++
docs/schemas/network.rng | 11 ++++
src/conf/network_conf.c | 62 ++++++++++++++++++-
src/conf/network_conf.h | 14 +++++
src/libvirt_private.syms | 2 +
src/network/bridge_driver.c | 37 ++++++++++-
src/util/virdnsmasq.c | 40 ++++++------
src/util/virdnsmasq.h | 1 +
.../networkxml2confdata/leasetime-hours.conf | 16 +++++
tests/networkxml2confdata/leasetime-hours.xml | 12 ++++
.../leasetime-infinite.conf | 16 +++++
.../leasetime-infinite.xml | 12 ++++
.../leasetime-minutes.conf | 16 +++++
.../networkxml2confdata/leasetime-minutes.xml | 12 ++++
.../leasetime-seconds.conf | 16 +++++
.../networkxml2confdata/leasetime-seconds.xml | 12 ++++
tests/networkxml2conftest.c | 4 ++
tests/networkxml2xmlin/leasetime-hours.xml | 12 ++++
tests/networkxml2xmlin/leasetime-infinite.xml | 12 ++++
tests/networkxml2xmlin/leasetime-minutes.xml | 12 ++++
tests/networkxml2xmlin/leasetime-seconds.xml | 12 ++++
tests/networkxml2xmlout/leasetime-hours.xml | 14 +++++
.../networkxml2xmlout/leasetime-infinite.xml | 14 +++++
tests/networkxml2xmlout/leasetime-minutes.xml | 14 +++++
tests/networkxml2xmlout/leasetime-seconds.xml | 14 +++++
tests/networkxml2xmltest.c | 4 ++
26 files changed, 376 insertions(+), 24 deletions(-)
create mode 100644 tests/networkxml2confdata/leasetime-hours.conf
create mode 100644 tests/networkxml2confdata/leasetime-hours.xml
create mode 100644 tests/networkxml2confdata/leasetime-infinite.conf
create mode 100644 tests/networkxml2confdata/leasetime-infinite.xml
create mode 100644 tests/networkxml2confdata/leasetime-minutes.conf
create mode 100644 tests/networkxml2confdata/leasetime-minutes.xml
create mode 100644 tests/networkxml2confdata/leasetime-seconds.conf
create mode 100644 tests/networkxml2confdata/leasetime-seconds.xml
create mode 100644 tests/networkxml2xmlin/leasetime-hours.xml
create mode 100644 tests/networkxml2xmlin/leasetime-infinite.xml
create mode 100644 tests/networkxml2xmlin/leasetime-minutes.xml
create mode 100644 tests/networkxml2xmlin/leasetime-seconds.xml
create mode 100644 tests/networkxml2xmlout/leasetime-hours.xml
create mode 100644 tests/networkxml2xmlout/leasetime-infinite.xml
create mode 100644 tests/networkxml2xmlout/leasetime-minutes.xml
create mode 100644 tests/networkxml2xmlout/leasetime-seconds.xml
--
2.24.1
4 years, 7 months
[libvirt-ci PATCH] README: Fix "maintainance" typo
by Erik Skultety
Signed-off-by: Erik Skultety <eskultet(a)redhat.com>
---
Pushed as trivial.
guests/README.markdown | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/guests/README.markdown b/guests/README.markdown
index ed9be06..7dbefed 100644
--- a/guests/README.markdown
+++ b/guests/README.markdown
@@ -18,7 +18,7 @@ There are two steps to bringing up a guest:
post-installation configuration steps required to make the newly-created
guest usable and ready to be used for building `$project`;
-Once those steps have been performed, maintainance will involve running:
+Once those steps have been performed, maintenance will involve running:
lcitool update $guest $project
--
2.25.2
4 years, 7 months
[PATCH] Add 'permissive' option for PCI devices
by Marek Marczykowski-Górecki
From: Simon Gaiser <simon(a)invisiblethingslab.com>
By setting the permissive flag the guest access to the PCI config space
is not filtered. This might be a security risk, but it's required for
some devices and the IOMMU and interrupt remapping should (mostly?)
contain it.
Signed-off-by: Simon Gaiser <simon(a)invisiblethingslab.com>
Signed-off-by: Marek Marczykowski-Górecki <marmarek(a)invisiblethingslab.com>
---
docs/formatdomain.html.in | 3 +++
docs/schemas/domaincommon.rng | 5 +++++
src/conf/domain_conf.c | 12 ++++++++++++
src/conf/domain_conf.h | 1 +
src/libxl/libxl_conf.c | 1 +
5 files changed, 22 insertions(+)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 6f43976815..79a5176ccd 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -5051,6 +5051,9 @@
or hot-plugging the device and <code>virNodeDeviceReAttach</code>
(or <code>virsh nodedev-reattach</code>) after hot-unplug or
stopping the guest.
+ When <code>permissive</code> is "yes" the pci config space access
+ will not be filtered. This might be a security issue. The default
+ is "no".
</dd>
<dt><code>scsi</code></dt>
<dd>For SCSI devices, user is responsible to make sure the device
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 65d6580434..9389eec3d8 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -3064,6 +3064,11 @@
<ref name="virYesNo"/>
</attribute>
</optional>
+ <optional>
+ <attribute name="permissive">
+ <ref name="virYesNo"/>
+ </attribute>
+ </optional>
<interleave>
<element name="source">
<optional>
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 8e8146374c..607cae61d4 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -8419,6 +8419,7 @@ virDomainHostdevDefParseXMLSubsys(xmlNodePtr node,
virDomainHostdevSubsysSCSIVHostPtr scsihostsrc = &def->source.subsys.u.scsi_host;
virDomainHostdevSubsysMediatedDevPtr mdevsrc = &def->source.subsys.u.mdev;
g_autofree char *managed = NULL;
+ g_autofree char *permissive = NULL;
g_autofree char *sgio = NULL;
g_autofree char *rawio = NULL;
g_autofree char *backendStr = NULL;
@@ -8434,6 +8435,11 @@ virDomainHostdevDefParseXMLSubsys(xmlNodePtr node,
if ((managed = virXMLPropString(node, "managed")) != NULL)
ignore_value(virStringParseYesNo(managed, &def->managed));
+ if ((permissive = virXMLPropString(node, "permissive")) != NULL) {
+ if (STREQ(permissive, "yes"))
+ def->permissive = true;
+ }
+
sgio = virXMLPropString(node, "sgio");
rawio = virXMLPropString(node, "rawio");
model = virXMLPropString(node, "model");
@@ -25942,6 +25948,8 @@ virDomainActualNetDefFormat(virBufferPtr buf,
virDomainHostdevDefPtr hostdef = virDomainNetGetActualHostdev(def);
if (hostdef && hostdef->managed)
virBufferAddLit(buf, " managed='yes'");
+ if (hostdef && hostdef->permissive)
+ virBufferAddLit(buf, " permissive='yes'");
}
if (def->trustGuestRxFilters)
virBufferAsprintf(buf, " trustGuestRxFilters='%s'",
@@ -26130,6 +26138,8 @@ virDomainNetDefFormat(virBufferPtr buf,
virBufferAsprintf(buf, "<interface type='%s'", typeStr);
if (hostdef && hostdef->managed)
virBufferAddLit(buf, " managed='yes'");
+ if (hostdef && hostdef->permissive)
+ virBufferAddLit(buf, " permissive='yes'");
if (def->trustGuestRxFilters)
virBufferAsprintf(buf, " trustGuestRxFilters='%s'",
virTristateBoolTypeToString(def->trustGuestRxFilters));
@@ -27914,6 +27924,8 @@ virDomainHostdevDefFormat(virBufferPtr buf,
if (def->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS) {
virBufferAsprintf(buf, " managed='%s'",
def->managed ? "yes" : "no");
+ if (def->permissive)
+ virBufferAddLit(buf, " permissive='yes'");
if (def->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI &&
scsisrc->sgio)
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index aad3f82db7..b81a3ce901 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -345,6 +345,7 @@ struct _virDomainHostdevDef {
bool missing;
bool readonly;
bool shareable;
+ bool permissive;
union {
virDomainHostdevSubsys subsys;
virDomainHostdevCaps caps;
diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index b3f67f817a..55f2a09e3e 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -2249,6 +2249,7 @@ libxlMakePCI(virDomainHostdevDefPtr hostdev, libxl_device_pci *pcidev)
pcidev->bus = pcisrc->addr.bus;
pcidev->dev = pcisrc->addr.slot;
pcidev->func = pcisrc->addr.function;
+ pcidev->permissive = hostdev->permissive;
return 0;
}
--
2.21.1
4 years, 7 months
[libvirt PATCH] util: Do not include sys/wait.h on Win32
by Jiri Denemark
This fixes build on mingw broken by my previous commit 36e125296a.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
Pushed.
src/util/virdaemon.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/util/virdaemon.c b/src/util/virdaemon.c
index 6182ca3c21..31cc24e703 100644
--- a/src/util/virdaemon.c
+++ b/src/util/virdaemon.c
@@ -22,7 +22,9 @@
#include <sys/types.h>
#include <sys/stat.h>
-#include <sys/wait.h>
+#ifndef WIN32
+# include <sys/wait.h>
+#endif
#include <fcntl.h>
#include <unistd.h>
#include <stdbool.h>
--
2.26.1
4 years, 7 months
[PATCH v2 0/2] docs: Further adjustments to pci-addresses.rst
by Boris Fiuczynski
Andrea Bolognani (1):
docs: Update introduction in pci-addresses.rst
Boris Fiuczynski (1):
docs: Improve zPCI section in pci-addresses.rst
docs/pci-addresses.rst | 31 ++++++++++++++++++-------------
1 file changed, 18 insertions(+), 13 deletions(-)
--
2.25.1
4 years, 7 months