[libvirt] [PATCH] virsh migrate: Require --tls for --tls-destination
by Jiri Denemark
--tls-destination would be just ignored unless --tls is not specified,
which is correct, but let's provide a bit of a guidance is a user
forgets to add --tls.
https://bugzilla.redhat.com/show_bug.cgi?id=1784345
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
tools/virsh-domain.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 56137bdd74..e7e92ee60d 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -10966,6 +10966,7 @@ cmdMigrate(vshControl *ctl, const vshCmd *cmd)
VSH_REQUIRE_OPTION("postcopy-after-precopy", "postcopy");
VSH_REQUIRE_OPTION("timeout-postcopy", "postcopy");
VSH_REQUIRE_OPTION("persistent-xml", "persistent");
+ VSH_REQUIRE_OPTION("tls-destination", "tls");
if (!(dom = virshCommandOptDomain(ctl, cmd, NULL)))
return false;
--
2.24.1
4 years, 11 months
[libvirt] [glib PATCH 0/2] po: change over to use Weblate instead of Zanata
by Daniel P. Berrangé
Zanata is dead upstream, and Fedora is replacing it with Weblate
https://fedoraproject.org/wiki/L10N_Move_to_Weblate
Libvirt has outsourced its translations to the Fedora translation
team, so we must follow this move.
Daniel P. Berrangé (2):
po: delete empty translation files
po: change update rules to use weblate instead of zanata
po/Makefile.am | 32 +++++++++++++++++++-------------
po/af.mini.po | 20 --------------------
po/am.mini.po | 20 --------------------
po/anp.mini.po | 19 -------------------
po/ar.mini.po | 21 ---------------------
po/as.mini.po | 20 --------------------
po/ast.mini.po | 20 --------------------
po/bal.mini.po | 20 --------------------
po/be.mini.po | 21 ---------------------
po/bg.mini.po | 20 --------------------
po/bn.mini.po | 20 --------------------
po/bn_IN.mini.po | 20 --------------------
po/bo.mini.po | 20 --------------------
po/br.mini.po | 20 --------------------
po/brx.mini.po | 20 --------------------
po/bs.mini.po | 21 ---------------------
po/cy.mini.po | 21 ---------------------
po/da.mini.po | 20 --------------------
po/de.mini.po | 20 --------------------
po/de_CH.mini.po | 20 --------------------
po/el.mini.po | 20 --------------------
po/eo.mini.po | 20 --------------------
po/et.mini.po | 20 --------------------
po/eu.mini.po | 20 --------------------
po/fa.mini.po | 20 --------------------
po/gl.mini.po | 20 --------------------
po/gu.mini.po | 20 --------------------
po/he.mini.po | 20 --------------------
po/hr.mini.po | 21 ---------------------
po/hu.mini.po | 20 --------------------
po/ia.mini.po | 20 --------------------
po/id.mini.po | 20 --------------------
po/ilo.mini.po | 20 --------------------
po/is.mini.po | 20 --------------------
po/it.mini.po | 20 --------------------
po/ka.mini.po | 20 --------------------
po/kk.mini.po | 20 --------------------
po/km.mini.po | 20 --------------------
po/kn.mini.po | 20 --------------------
po/ko.mini.po | 20 --------------------
po/kw.mini.po | 20 --------------------
po/kw(a)kkcor.mini.po | 20 --------------------
po/kw(a)uccor.mini.po | 20 --------------------
po/kw_GB.mini.po | 20 --------------------
po/ky.mini.po | 20 --------------------
po/lt.mini.po | 21 ---------------------
po/lv.mini.po | 21 ---------------------
po/mai.mini.po | 20 --------------------
po/mk.mini.po | 20 --------------------
po/ml.mini.po | 20 --------------------
po/mn.mini.po | 20 --------------------
po/mr.mini.po | 20 --------------------
po/ms.mini.po | 20 --------------------
po/nb.mini.po | 20 --------------------
po/nds.mini.po | 20 --------------------
po/ne.mini.po | 20 --------------------
po/nl.mini.po | 20 --------------------
po/nn.mini.po | 20 --------------------
po/nso.mini.po | 20 --------------------
po/or.mini.po | 20 --------------------
po/pa.mini.po | 20 --------------------
po/pt.mini.po | 20 --------------------
po/ro.mini.po | 21 ---------------------
po/si.mini.po | 20 --------------------
po/sk.mini.po | 20 --------------------
po/sl.mini.po | 21 ---------------------
po/sq.mini.po | 20 --------------------
po/sr.mini.po | 21 ---------------------
po/sr(a)latin.mini.po | 21 ---------------------
po/sv.mini.po | 20 --------------------
po/ta.mini.po | 20 --------------------
po/te.mini.po | 20 --------------------
po/tg.mini.po | 20 --------------------
po/th.mini.po | 20 --------------------
po/tr.mini.po | 20 --------------------
po/tw.mini.po | 19 -------------------
po/ur.mini.po | 20 --------------------
po/vi.mini.po | 20 --------------------
po/wba.mini.po | 19 -------------------
po/yo.mini.po | 19 -------------------
po/zanata.xml | 7 -------
po/zh_CN.mini.po | 20 --------------------
po/zh_HK.mini.po | 20 --------------------
po/zh_TW.mini.po | 20 --------------------
po/zu.mini.po | 20 --------------------
85 files changed, 19 insertions(+), 1687 deletions(-)
delete mode 100644 po/af.mini.po
delete mode 100644 po/am.mini.po
delete mode 100644 po/anp.mini.po
delete mode 100644 po/ar.mini.po
delete mode 100644 po/as.mini.po
delete mode 100644 po/ast.mini.po
delete mode 100644 po/bal.mini.po
delete mode 100644 po/be.mini.po
delete mode 100644 po/bg.mini.po
delete mode 100644 po/bn.mini.po
delete mode 100644 po/bn_IN.mini.po
delete mode 100644 po/bo.mini.po
delete mode 100644 po/br.mini.po
delete mode 100644 po/brx.mini.po
delete mode 100644 po/bs.mini.po
delete mode 100644 po/cy.mini.po
delete mode 100644 po/da.mini.po
delete mode 100644 po/de.mini.po
delete mode 100644 po/de_CH.mini.po
delete mode 100644 po/el.mini.po
delete mode 100644 po/eo.mini.po
delete mode 100644 po/et.mini.po
delete mode 100644 po/eu.mini.po
delete mode 100644 po/fa.mini.po
delete mode 100644 po/gl.mini.po
delete mode 100644 po/gu.mini.po
delete mode 100644 po/he.mini.po
delete mode 100644 po/hr.mini.po
delete mode 100644 po/hu.mini.po
delete mode 100644 po/ia.mini.po
delete mode 100644 po/id.mini.po
delete mode 100644 po/ilo.mini.po
delete mode 100644 po/is.mini.po
delete mode 100644 po/it.mini.po
delete mode 100644 po/ka.mini.po
delete mode 100644 po/kk.mini.po
delete mode 100644 po/km.mini.po
delete mode 100644 po/kn.mini.po
delete mode 100644 po/ko.mini.po
delete mode 100644 po/kw.mini.po
delete mode 100644 po/kw(a)kkcor.mini.po
delete mode 100644 po/kw(a)uccor.mini.po
delete mode 100644 po/kw_GB.mini.po
delete mode 100644 po/ky.mini.po
delete mode 100644 po/lt.mini.po
delete mode 100644 po/lv.mini.po
delete mode 100644 po/mai.mini.po
delete mode 100644 po/mk.mini.po
delete mode 100644 po/ml.mini.po
delete mode 100644 po/mn.mini.po
delete mode 100644 po/mr.mini.po
delete mode 100644 po/ms.mini.po
delete mode 100644 po/nb.mini.po
delete mode 100644 po/nds.mini.po
delete mode 100644 po/ne.mini.po
delete mode 100644 po/nl.mini.po
delete mode 100644 po/nn.mini.po
delete mode 100644 po/nso.mini.po
delete mode 100644 po/or.mini.po
delete mode 100644 po/pa.mini.po
delete mode 100644 po/pt.mini.po
delete mode 100644 po/ro.mini.po
delete mode 100644 po/si.mini.po
delete mode 100644 po/sk.mini.po
delete mode 100644 po/sl.mini.po
delete mode 100644 po/sq.mini.po
delete mode 100644 po/sr.mini.po
delete mode 100644 po/sr(a)latin.mini.po
delete mode 100644 po/sv.mini.po
delete mode 100644 po/ta.mini.po
delete mode 100644 po/te.mini.po
delete mode 100644 po/tg.mini.po
delete mode 100644 po/th.mini.po
delete mode 100644 po/tr.mini.po
delete mode 100644 po/tw.mini.po
delete mode 100644 po/ur.mini.po
delete mode 100644 po/vi.mini.po
delete mode 100644 po/wba.mini.po
delete mode 100644 po/yo.mini.po
delete mode 100644 po/zanata.xml
delete mode 100644 po/zh_CN.mini.po
delete mode 100644 po/zh_HK.mini.po
delete mode 100644 po/zh_TW.mini.po
delete mode 100644 po/zu.mini.po
--
2.23.0
4 years, 11 months
[libvirt] [PATCH v3 00/30] Introduce NVMe support
by Michal Privoznik
v3 of:
https://www.redhat.com/archives/libvir-list/2019-September/msg01209.html
Builds just fine ;-)
https://travis-ci.org/zippy2/libvirt/builds/619622349
diff to v2:
- Fixed bug reported by Cole - unability to plug regular <hostdev/>-s
caused by v2.
Michal Prívozník (30):
qemu: Explicitly add/remove /dev/vfio/vfio to/from NS/CGroups
qemuDomainGetHostdevPath: Use more g_autoptr()/g_autofree
qemuDomainGetHostdevPath: Don't include /dev/vfio/vfio in returned
paths
qemu: Drop some 'cleanup' labels
virpci: Introduce and use virPCIDeviceAddressGetIOMMUGroupDev
virHostdevPreparePCIDevices: Separate out function body
virHostdevReAttachPCIDevices: Separate out function body
virpci: Introduce virPCIDeviceAddressCopy
qemuMigrationSrcIsSafe: Rework slightly
schemas: Introduce disk type NVMe
conf: Format and parse NVMe type disk
virstoragefile: Introduce virStorageSourceChainHasNVMe
domain_conf: Introduce virDomainDefHasNVMeDisk
util: Introduce virNVMeDevice module
virhostdev: Include virNVMeDevice module
virpcimock: Introduce NVMe driver and devices
virhostdevtest: Test virNVMeDevice assignment
qemu: prepare NVMe devices too
qemu: Take NVMe disks into account when calculating memlock limit
qemu: Create NVMe disk in domain namespace
qemu: Mark NVMe disks as 'need VFIO'
qemu: Allow NVMe disk in CGroups
virSecuritySELinuxRestoreImageLabelInt: Don't skip non-local storage
qemu_capabilities: Introduce QEMU_CAPS_DRIVE_NVME
qemu: Generate command line of NVMe disks
qemu_monitor_text: Catch IOMMU/VFIO related errors in
qemuMonitorTextAddDrive
qemu: Don't leak storage perms on failure in
qemuDomainAttachDiskGeneric
qemu: Allow forcing VFIO when computing memlock limit
qemu_hotplug: Prepare NVMe disks on hotplug
virsh: Introduce nvme disk to domblklist
docs/formatdomain.html.in | 57 ++-
docs/schemas/domaincommon.rng | 32 ++
po/POTFILES.in | 1 +
src/conf/domain_conf.c | 109 +++++
src/conf/domain_conf.h | 3 +
src/libvirt_private.syms | 28 ++
src/libxl/xen_xl.c | 1 +
src/qemu/qemu_block.c | 25 +
src/qemu/qemu_capabilities.c | 2 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_cgroup.c | 203 +++++---
src/qemu/qemu_command.c | 6 +-
src/qemu/qemu_domain.c | 375 +++++++++------
src/qemu/qemu_domain.h | 15 +-
src/qemu/qemu_driver.c | 4 +
src/qemu/qemu_hostdev.c | 71 ++-
src/qemu/qemu_hostdev.h | 16 +
src/qemu/qemu_hotplug.c | 31 +-
src/qemu/qemu_migration.c | 30 +-
src/qemu/qemu_monitor_text.c | 7 +
src/qemu/qemu_process.c | 7 +
src/security/security_apparmor.c | 25 +-
src/security/security_dac.c | 30 ++
src/security/security_selinux.c | 51 +-
src/util/Makefile.inc.am | 2 +
src/util/virhostdev.c | 431 +++++++++++++++--
src/util/virhostdev.h | 37 ++
src/util/virnvme.c | 447 ++++++++++++++++++
src/util/virnvme.h | 97 ++++
src/util/virpci.c | 29 ++
src/util/virpci.h | 5 +
src/util/virstoragefile.c | 71 +++
src/util/virstoragefile.h | 19 +
.../caps_2.12.0.aarch64.xml | 1 +
.../caps_2.12.0.ppc64.xml | 1 +
.../caps_2.12.0.s390x.xml | 1 +
.../caps_2.12.0.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 1 +
.../caps_3.0.0.riscv32.xml | 1 +
.../caps_3.0.0.riscv64.xml | 1 +
.../qemucapabilitiesdata/caps_3.0.0.s390x.xml | 1 +
.../caps_3.0.0.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_3.1.0.ppc64.xml | 1 +
.../caps_3.1.0.x86_64.xml | 1 +
.../caps_4.0.0.aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_4.0.0.ppc64.xml | 1 +
.../caps_4.0.0.riscv32.xml | 1 +
.../caps_4.0.0.riscv64.xml | 1 +
.../qemucapabilitiesdata/caps_4.0.0.s390x.xml | 1 +
.../caps_4.0.0.x86_64.xml | 1 +
.../caps_4.1.0.x86_64.xml | 1 +
.../caps_4.2.0.aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 1 +
.../qemucapabilitiesdata/caps_4.2.0.s390x.xml | 1 +
.../caps_4.2.0.x86_64.xml | 1 +
tests/qemumemlocktest.c | 2 +-
.../disk-nvme.x86_64-latest.args | 63 +++
tests/qemuxml2argvdata/disk-nvme.xml | 63 +++
tests/qemuxml2argvtest.c | 1 +
tests/qemuxml2xmloutdata/disk-nvme.xml | 1 +
tests/qemuxml2xmltest.c | 1 +
tests/virhostdevtest.c | 97 ++++
tests/virpcimock.c | 3 +
tests/virpcitestdata/0000-01-00.0.config | Bin 0 -> 4096 bytes
tests/virpcitestdata/0000-02-00.0.config | Bin 0 -> 4096 bytes
tools/virsh-domain-monitor.c | 31 +-
66 files changed, 2240 insertions(+), 312 deletions(-)
create mode 100644 src/util/virnvme.c
create mode 100644 src/util/virnvme.h
create mode 100644 tests/qemuxml2argvdata/disk-nvme.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/disk-nvme.xml
create mode 120000 tests/qemuxml2xmloutdata/disk-nvme.xml
create mode 100644 tests/virpcitestdata/0000-01-00.0.config
create mode 100644 tests/virpcitestdata/0000-02-00.0.config
--
2.23.0
4 years, 11 months
[libvirt] [PATCH 0/2] build: -Wframe-larger-than shenanigans
by Ján Tomko
The recent cputest addition broke the build with clang for me,
since clang calculates the stack size differently than gcc.
Put the strict limit into all warning by default
(this starts enforcing it for examples, for example)
and raise the limit by a few orders, which might appear
Sisyphean but I believe it's needed for putting two
conflicting limits on the compiler command line.
Ján Tomko (2):
build: warn on a large frame by default
build: relax the relaxed stack frame limit further
m4/virt-compile-warnings.m4 | 4 ++--
src/Makefile.am | 2 --
tools/Makefile.am | 2 --
3 files changed, 2 insertions(+), 6 deletions(-)
--
2.19.2
4 years, 11 months
[libvirt] [PATCH] virtio-blk: deprecate SCSI passthrough
by Stefan Hajnoczi
The Linux virtio_blk.ko guest driver is removing legacy SCSI passthrough
support. Deprecate this feature in QEMU too.
Signed-off-by: Stefan Hajnoczi <stefanha(a)redhat.com>
---
qemu-deprecated.texi | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi
index 4b4b7425ac..ef94d497da 100644
--- a/qemu-deprecated.texi
+++ b/qemu-deprecated.texi
@@ -285,6 +285,17 @@ spec you can use the ``-cpu rv64gcsu,priv_spec=v1.9.1`` command line argument.
@section Device options
+@subsection Emulated device options
+
+@subsubsection -device virtio-blk,scsi=on|off (since 5.0.0)
+
+The virtio-blk SCSI passthrough feature is a legacy VIRTIO feature. VIRTIO 1.0
+and later do not support it because the virtio-scsi device was introduced for
+full SCSI support. Use virtio-scsi instead when SCSI passthrough is required.
+
+Note this also applies to ``-device virtio-blk-pci,scsi=on|off'', which is an
+alias.
+
@subsection Block device options
@subsubsection "backing": "" (since 2.12.0)
--
2.23.0
4 years, 11 months
[libvirt] [PATCH 0/5] Introduce the support of Intel RDT-MBM
by Wang Huaqiang
RDT is the short for Intel Resource Director Technology, consists
of four sub-technologies until now:
-. CAT for cache allocation
-. CMT for cache usage monitoring
-. MBA for memory bandwidth allocation
-. MBM for memory bandwidth usage monitoring
The Linux kernel interface is 'resctrl' file system, and we have
already implemented the support of CAT, CMT and MBA, to accomplish
the tasks such as allocating a part of shared CPU last level cache
to particular domain vcpu or a list of vcpus and monitoring the
usage of cache, or the task of allocating a mount of memory
bandwidth to specify domain vcpu(s).
This series is to introduce the support of MBM.
Basically the interfaces are:
** Identify host capability **
Similar to identify the host capability of CMT, it could be gotten
through the result of 'virsh capabilities', if following elements
are found, then MBM is supported:
<memory_bandwidth>
<monitor maxMonitors='176'>
<feature name='mbm_total_bytes'/>
<feature name='mbm_local_bytes'/>
</monitor>
</memory_bandwidth>
'mbm_total_bytes' means supporting to report the memory bandwidth
used by the vcpu(s) of specific monitor on all CPU sockets.
'mbm_local_bytes' means supporting to report the memory bandwidth
used by vcpu(s) that is passing through local CPU socket.
** Create monitor group**
The monitor group for specific domain vcpus, for example vcpu 0-4,
is defined in domain configuration file, in such kind of way:
<cputune>
<memorytune vcpus='0-4'>
<monitor vcpus='0-4'/>
</memorytune>
</cputune>
** Report memory usage **
Introduced an option '--memory' against 'virsh domstats' command
to show the memory bandwidth usage in such way:
(also very similar to the format of CMT result.)
# virsh domstats --memory
Domain: 'libvirt-vm'
memory.bandwidth.monitor.count=4
memory.bandwidth.monitor.0.name=vcpus_0-4
memory.bandwidth.monitor.0.vcpus=0-4
memory.bandwidth.monitor.0.node.count=2
memory.bandwidth.monitor.0.node.0.id=0
memory.bandwidth.monitor.0.node.0.bytes.total=14201651200
memory.bandwidth.monitor.0.node.0.bytes.local=7369809920
memory.bandwidth.monitor.0.node.1.id=1
memory.bandwidth.monitor.0.node.1.bytes.total=188897640448
memory.bandwidth.monitor.0.node.1.bytes.local=170044047360
Huaqiang (5):
util, resctrl: using 64bit interface instead of 32bit for counters
conf: showing cache/memoryBW monitor features in capabilities
cachetune schema: a looser check for the order of <cache> and
<monitor> element
conf: Parse dommon configure file for memorytune monitors
virsh: show memoryBW info in 'virsh domstats' command
docs/schemas/domaincommon.rng | 91 +++++++++---------
include/libvirt/libvirt-domain.h | 1 +
src/conf/capabilities.c | 4 +-
src/conf/domain_conf.c | 44 +++++++--
src/libvirt-domain.c | 21 +++++
src/qemu/qemu_driver.c | 103 ++++++++++++++++++++-
src/util/virfile.c | 40 ++++++++
src/util/virfile.h | 2 +
src/util/virresctrl.c | 6 +-
src/util/virresctrl.h | 2 +-
tests/genericxml2xmlindata/cachetune.xml | 1 +
tests/genericxml2xmlindata/memorytune.xml | 5 +
tests/genericxml2xmloutdata/cachetune.xml | 34 +++++++
tests/genericxml2xmloutdata/memorytune.xml | 42 +++++++++
tests/genericxml2xmltest.c | 4 +-
tools/virsh-domain-monitor.c | 7 ++
tools/virsh.pod | 23 ++++-
17 files changed, 367 insertions(+), 63 deletions(-)
create mode 100644 tests/genericxml2xmloutdata/cachetune.xml
create mode 100644 tests/genericxml2xmloutdata/memorytune.xml
--
2.23.0
4 years, 11 months
[libvirt] [PATCH v1 00/26] move qemucaps validations from qemu_command to qemu_domain
by Daniel Henrique Barboza
(series based on master commit 97cafa610ecf5)
This work was proposed by Cole in [1]. This is Cole's reasoning for
it, copy/pasted from [1]:
-------
The benefits of moving to validate time is that XML is rejected by
'virsh define' rather than at 'virsh start' time. It also makes it easier
to follow the cli building code, and makes it easier to verify qemu_command.c
test suite code coverage for the important stuff like covering every CLI
option. It's also a good intermediate step for sharing validation with
domain capabilities building, like is done presently for rng models.
-------
Cole also mentioned that the machine features validation was a good
place to start. I took it a step further and did it across the
board on all qemu_command.c.
This series didn't create any new validation, just moved them
to domain define time. Any other outcome is unintended.
Not all cases where covered in this work. For a first version
I decided to do only the most trivial cases. These are the
other cases I left out for another day:
- all verifications contained in functions that are also called
by qemu_hotplug.c. This means that the hotplug process will also
use the validation code, and we can't just move it to qemu_domain.c.
Besides, not all validation done in domain define time applies
to hotplug, so it's not simply a matter of calling the same function
from qemu_domain in qemu_hotplug. I have patches that moved the
verification of all virtio options to qemu_domain.c, while also
considering qemu_hotplug validation. In the end I decided to leave
it away from this work for now because (1) it took 8 patches just
for virtio case alone and (2) there are a lot of these cases in
qemu_command.c and it would be too much to do it all at in this
same series.
- moving CPU Model validation is trickier than the rest because
there are code in DefPostParse() that makes CPU Model changes that
are then validated in qemu_command.c. Moving the validation to define
time doesn't cut in this case - the validation is considering
PostParse changes in the CPU Model and some of the will fail if
done by qemuDomainDefValidate time. I didn't think too much about
how to handle this case, but given that the approach would be
different from the other cases handled here, I left it out too.
- SHMem: part of SHMem validation is being used by hotplug code.
I could've moved the non-hotplug validation to define time,
instead I decided it's better to to leave it to do it all at
once in the future.
- DBus-VMState: validation of this fella must be done by first
querying if the hash vm->priv->dbusVMState has elements.
qemuDomainDefValidate does not have 'vm->priv' in it's API,
meaning that I would need to either change the API to include
it (which means changing domainValidateCallback), or do the
validation by another branch where I can get access to vm->priv.
- vmcoreinfo: there are no challenges in moving vmcoreinfo
validation to qemuDomainDefValidate. The problem were the
unit tests. Moving this validation to domain define time
breaks 925 tests on qemuxml2xmltest.c, including tests labelled
as 'minimal' which should pass under any circurstances, as
far as I understand. It is possible to just shoehorn
QEMU_CAPS_DEVICE_VMCOREINFO in the qemuCaps of all tests, but
this would tamper the idea of having to deal with NONE or
LATEST or a specific set of capabilities for certain tests.
Another case I would rather discuss separately.
[1] https://www.redhat.com/archives/libvir-list/2019-October/msg00568.html
Daniel Henrique Barboza (26):
qemu_command.c: move PSeries features validation to qemu_domain.c
qemu_command.c: move mem.nosharepages validation to qemu_domain.c
qemu_command.c: move validation of vmport to qemu_domain.c
qemu_command.c: move nvdimm validation to qemu_domain.c
qemu_command.c: move I/O APIC validation to qemu_domain.c
numa_conf: add virDomainNumaNodesDistancesAreBeingSet() helper
qemu_command.c move NUMA validation to qemu_domain.c
qemu_command.c: move NVRAM validation to qemu_domain.c
qemu_command: move qemuBuildSoundDevStr caps validation to qemu_domain
qemu_command.c: move sound codec validation to qemu_domain.c
qemu_command: move qemuBuildHubDevStr caps validation to qemu_domain
qemu_command: move qemuBuildChrChardevStr caps validation to
qemu_domain
qemu: move qemuBuildHostdevCommandLine caps validation to qemu_domain
qemu_command.c: move vmGenID validation to qemu_domain.c
qemu: move qemuBuildSgaCommandLine validation to qemu_domain.c
qemu: move virDomainClockDef validation to qemu_domain.c
qemu: move qemuBuildPMCommandLine validation to qemu_domain.c
qemu: move qemuBuildBootCommandLine validation to qemu_domain.c
qemu_command.c: move pcihole64 validation to qemu_domain.c
qemu: move qemuBuildGraphicsSDLCommandLine validation to qemu_domain.c
qemu: move qemuBuildGraphicsVNCCommandLine validation to qemu_domain.c
qemu: move qemuBuildGraphicsSPICECommandLine validation to
qemu_domain.c
qemu: move qemuBuildGraphicsEGLHeadlessCommandLine validation to
qemu_domain.c
qemu: move qemuBuildSmartcardCommandLine validation to qemu_domain.c
qemu: move qemuBuildConsoleCommandLine validation to qemu_domain.c
qemu: move qemuBuildTPMDevStr TPM validation to qemu_domain.c
src/conf/numa_conf.c | 19 +
src/conf/numa_conf.h | 2 +
src/libvirt_private.syms | 1 +
src/qemu/qemu_command.c | 575 +---------
src/qemu/qemu_command.h | 1 +
src/qemu/qemu_domain.c | 983 ++++++++++++++++--
tests/qemuhotplugtest.c | 10 +
tests/qemumemlocktest.c | 16 +-
.../default-video-type-aarch64.xml | 2 +-
.../default-video-type-ppc64.xml | 2 +-
.../default-video-type-s390x.xml | 2 +-
.../graphics-egl-headless.args | 2 +-
.../graphics-spice-egl-headless.args | 2 +-
.../graphics-vnc-egl-headless.args | 2 +-
tests/qemuxml2argvtest.c | 80 +-
...ault-video-type-aarch64.aarch64-latest.xml | 4 +-
.../default-video-type-ppc64.ppc64-latest.xml | 4 +-
.../default-video-type-s390x.s390x-latest.xml | 4 +-
tests/qemuxml2xmltest.c | 244 +++--
19 files changed, 1246 insertions(+), 709 deletions(-)
--
2.23.0
4 years, 11 months
[libvirt] [PATCH v6 0/4] scripts: convert most perl scripts to python
by Daniel P. Berrangé
This series is an effort to reduce the number of different
languages we use by eliminating most use of perl in favour
of python.
This aligns with fact that the likely future build system
we'll use (meson) is written in python, and that python
is much more commonly used/understood by developers these
days than perl.
With this applied we use perl in a handful of places only:
- src/rpc/gendispatch.pl - this is a horrendously large
script and very hard to understand/follow. A straight
syntax conversion to Python would still leave a hgue
and hard to understand/follow script. It really needs
a clean room rewrite from scratch, with better structure.
- src/rpc/genprotocol.pl - fairly easy to convert, but
might be obsolete depending on approach for rewriting
gendispatch.pl, so ignored for now
- tests/oomtrace.pl - will be purge by the patches that
drop OOM handling anyway
- tools/wireshark/util/genxdrstub.pl - a very large
script, which I haven't got the courage to tackle
yet.
- cfg.mk/maint.mk - many syntax rules involve regexes
which are fed to perl. Decision on what to do
with syntax-check rules punted to another time.
- build-aux/gitlog-to-changelog
- build-aux/useless-if-before-free - Both pulled in
from gnulib. Could be rewritten quite easily if
desired, but given that we aren't maintainers of
them right now, they're ignored as they don't
really impact our developers.
Note that the check-spacing.py script is significantly
slower in Python than in Perl. After researching this
it appears there is nothing that can be done. The Perl
regex engine is simply much better optimized than the
Python one. As previously discussed we need to loook
at uncrustify or clang-format or some other tool to
validate whitespace formatting. This is ongoing. We
can either accept the slow down in the short term or
keep the Perl version in the short term.
In v6:
- Fix various bugs in check-file-access.py so it
now reports same output as original perl script.
- Merged the already-ACKd scripts
In v5:
- Rebased to cope with changes to require VPATH build
- Merged the already-ACKd scripts
In v4:
- Moved all scripts into the scripts/ directory instead
of having them scattered around source tree
- Use re.search instead of re.match
- Don't bother re-compiling regexes
In v3:
- All scripts comply with all flake8 style rules with
exception of
E129 visually indented line with same indent as next logical line
In v2:
- Pulled in patch to hacking file
- Converted many more scripts
- Forced UTF-8 character set to avoid ascii codec
on py3 < 3.7
Daniel P. Berrangé (4):
tests: rewrite qemu capability grouper in Python
tests: rewrite file access checker in Python
docs: rewrite hvsupport.html page generator in python
docs: rewrite polkit docs generator in Python
Makefile.am | 4 +
build-aux/syntax-check.mk | 3 +-
docs/Makefile.am | 12 +-
docs/genaclperms.pl | 125 --------
docs/hvsupport.pl | 459 -----------------------------
scripts/check-file-access.py | 125 ++++++++
scripts/genaclperms.py | 121 ++++++++
scripts/group-qemu-caps.py | 121 ++++++++
scripts/hvsupport.py | 502 ++++++++++++++++++++++++++++++++
tests/Makefile.am | 3 +-
tests/check-file-access.pl | 130 ---------
tests/file_access_whitelist.txt | 2 +-
tests/group-qemu-caps.pl | 124 --------
13 files changed, 882 insertions(+), 849 deletions(-)
delete mode 100755 docs/genaclperms.pl
delete mode 100755 docs/hvsupport.pl
create mode 100755 scripts/check-file-access.py
create mode 100755 scripts/genaclperms.py
create mode 100755 scripts/group-qemu-caps.py
create mode 100755 scripts/hvsupport.py
delete mode 100755 tests/check-file-access.pl
delete mode 100755 tests/group-qemu-caps.pl
--
2.21.0
4 years, 11 months
[libvirt] [tck PATCH] Update x86_64 image & virt-builder image to F31
by Daniel P. Berrangé
i386 was dropped even as a secondary arch in F31 so must remain
on F30
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
conf/default.cfg | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/conf/default.cfg b/conf/default.cfg
index 39d9b04..3493ad7 100644
--- a/conf/default.cfg
+++ b/conf/default.cfg
@@ -49,7 +49,7 @@ images = (
hvm
xen
)
- osname = fedora-30
+ osname = fedora-31
}
)
@@ -76,6 +76,7 @@ images = (
#
kernels = (
# Fedora 30 i686 PAE has pv_ops, so one kernel can do both Xen and KVM guests here
+ # No i386 releases since F30
{
arch = i686
ostype = (
@@ -85,15 +86,15 @@ kernels = (
kernel = http://dl.fedoraproject.org/pub/fedora-secondary/releases/30/Everything/i...
initrd = http://dl.fedoraproject.org/pub/fedora-secondary/releases/30/Everything/i...
}
- # Fedora 30 x86_64 has pv_ops, so one kernel can do both Xen and KVM guests here
+ # Fedora 31 x86_64 has pv_ops, so one kernel can do both Xen and KVM guests here
{
arch = x86_64
ostype = (
hvm
xen
)
- kernel = http://dl.fedoraproject.org/pub/fedora/linux/releases/30/Everything/x86_6...
- initrd = http://dl.fedoraproject.org/pub/fedora/linux/releases/30/Everything/x86_6...
+ kernel = http://dl.fedoraproject.org/pub/fedora/linux/releases/31/Everything/x86_6...
+ initrd = http://dl.fedoraproject.org/pub/fedora/linux/releases/31/Everything/x86_6...
}
# LXC containers need a virtual container filesystem somewhere
# {
--
2.23.0
4 years, 11 months
[libvirt] ongoing code transitions section on the wiki
by Cole Robinson
Hi all, I added a 'Ongoing code transitions' section to the
BiteSizedTasks page on the wiki:
https://wiki.libvirt.org/page/BiteSizedTasks#Ongoing_code_transitions
BiteSizedTasks might not be the best location for it, but I wanted to
start a list and that page already exists.
I added 3 sections:
* g_autofree/g_autoptr, with some example conversion commits
* GLib in general, listing APIs that can replace custom libvirt code.
Currently the list is only g_key_file for virkeyfile, g_user_*_dir for
virGetUser*Dir, some virFile APIs for g_path_* APIs.
* gnulib removal. I filled in a few examples of possible gnulib module
replacements, and listed all the others as 'Unsorted/replacments unclear'.
If you know any GLib replacements for existing code or gnulib modules,
please fill them in there. Or any other incomplete code conversions
internally
Thanks,
Cole
4 years, 11 months