[libvirt PATCH] ci: Reduce number of stages
by Andrea Bolognani
Right now we're dividing the jobs into three stages: prebuild, which
includes DCO checking as well as building artifacts such as the
website, and native_build/cross_build, which do exactly what you'd
expect based on their names.
This organization is nice from the logical point of view, but results
in poor utilization of the available CI resources: in particular, the
fact that cross_build jobs can only start after all native_build jobs
have finished means that if even a single one of the latter takes a
bit longer the pipeline will stall, and with native builds taking
anywhere from less than 10 minutes to more than 20, this happens all
the time.
Building artifacts in a separate pipeline stage also doesn't have any
advantages, and only delays further stages by a couple of minutes.
The only job that really makes sense in its own stage is the DCO
check, because it's extremely fast (less than 1 minute) and, if that
fails, we can avoid kicking off all other jobs.
Reducing the number of stages results in significant speedups:
specifically, going from three stages to two stages reduces the
overall completion time for a full CI pipeline from ~45 minutes[1]
to ~30 minutes[2].
[1] https://gitlab.com/abologna/libvirt/-/pipelines/154751893
[2] https://gitlab.com/abologna/libvirt/-/pipelines/154771173
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
.gitlab-ci.yml | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7a8142b506..8d9313e415 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,9 +2,8 @@ variables:
GIT_DEPTH: 100
stages:
- - prebuild
- - native_build
- - cross_build
+ - sanity_checks
+ - builds
.script_variables: &script_variables |
export MAKEFLAGS="-j$(getconf _NPROCESSORS_ONLN)"
@@ -17,7 +16,7 @@ stages:
# Default native build jobs that are always run
.native_build_default_job_template: &native_build_default_job_definition
- stage: native_build
+ stage: builds
cache:
paths:
- ccache/
@@ -42,7 +41,7 @@ stages:
# system other than Linux. These jobs will only run if the required
# setup has been performed on the GitLab account (see ci/README.rst).
.cirrus_build_default_job_template: &cirrus_build_default_job_definition
- stage: native_build
+ stage: builds
image: registry.gitlab.com/libvirt/libvirt-ci/cirrus-run:master
script:
- cirrus-run ci/cirrus/$NAME.yml.j2
@@ -64,7 +63,7 @@ stages:
# Default cross build jobs that are always run
.cross_build_default_job_template: &cross_build_default_job_definition
- stage: cross_build
+ stage: builds
cache:
paths:
- ccache/
@@ -194,7 +193,7 @@ mingw64-fedora-rawhide:
# be deployed to the web root:
# https://gitlab.com/libvirt/libvirt/-/jobs/artifacts/master/download?job=w...
website:
- stage: prebuild
+ stage: builds
before_script:
- *script_variables
script:
@@ -216,7 +215,7 @@ website:
codestyle:
- stage: prebuild
+ stage: builds
before_script:
- *script_variables
script:
@@ -231,7 +230,7 @@ codestyle:
# for translation usage:
# https://gitlab.com/libvirt/libvirt/-/jobs/artifacts/master/download?job=p...
potfile:
- stage: prebuild
+ stage: builds
only:
- master
before_script:
@@ -259,7 +258,7 @@ potfile:
# this test on developer's personal forks from which
# merge requests are submitted
check-dco:
- stage: prebuild
+ stage: sanity_checks
image: registry.gitlab.com/libvirt/libvirt-ci/check-dco:master
script:
- /check-dco
--
2.25.4
4 years, 5 months
[libvirt PATCH] docs: Document CIRRUS_GITHUB_REPO variable
by Andrea Bolognani
This needs to be set for every repository for Cirrus CI integration
to work.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
docs/newreposetup.rst | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/docs/newreposetup.rst b/docs/newreposetup.rst
index f81e26747b..dd86535c9a 100644
--- a/docs/newreposetup.rst
+++ b/docs/newreposetup.rst
@@ -83,6 +83,17 @@ required under the **Settings** page:
* *Shared runners*: Enable shared runners
+ * **Variables**
+
+ * *Key*: ``CIRRUS_GITHUB_REPO``
+
+ * *Value*: ``libvirt/$repo``
+
+ * *Protect variable*: enabled
+
+ * *Mask variable*: disabled
+
+
GitHub configuration
====================
--
2.25.4
4 years, 5 months
Multiple video elements lead to erratic mouse behavior through spice
by Christian Ehrhardt
Hi,
with a guest set up as in the following example mouse behavior breaks:
<graphics type='spice' port='5901' autoport='no' listen='0.0.0.0'>
<listen type='address' address='0.0.0.0'/>
<gl enable='no'/>
</graphics>
<video>
<model type='qxl' ram='65536' vram='16384' vgamem='16384' heads='1'
primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01'
function='0x0'/>
</video>
<video>
<model type='qxl' ram='65536' vram='16384' vgamem='16384' heads='1'/>
<address type='pci' domain='0x0000' bus='0x08' slot='0x01'
function='0x0'/>
</video>
Please note that this is for illustration purposes as this everyone can
easily retry.
I originally had QXL + GPU as mediated device, where the behavior is the
same.
If I know connect to that via spice, spice is smart and opens both displays:
$ virt-viewer --connect qemu+ssh://ubuntu@10.246.115.255/system guestname
But while with one display mouse integration (to move in/out smoothly) and
positioning of the mouse pointer is fine.
It is broken with this double display setup.
What I see is:
- no mouse integration anymore (falls back to capture the mouse)
- often the mouse can not move upwards anymore
- sometimes "left" also doesn't work
Let me know if someone wants a video in case the description is still too
odd.
I have tried spice-client-gtk and virt-viewer, but both behave the same way.
If I take away one of the displays it works well again.
So I'm wondering how virtual-multi-monitor is supposed to work, are there
known bugs or tweaks that would apply here?
In my original case I wanted to take away the QXL device, to jst keep the
Mdev as one screen (and the one I really want).
But due to [1] the video section is re-added automatically.
Maybe this comes down to not re-adding that default video entry if a
hostdev has display=on set?
I'd appreciate any pointers if this rings a bell or a discussion on
not-auto-adding-video if display=on is present.
Kind Regards,
Christian
P.S. I tried VNC but that just has "other" issues. It only shows 1 of 2
displays and on the one I see over amplifies the mouse movement by the
amount the other display adds to ther overall desktop size.
P.P.S. Sorry for cross posting, at least I avoided cross posting even
further (spice-devel / qemu-devel) hoping that libvirt & virt-tools would
be involved enough that if someone recognizes this he can point me to the
right place.
[1]: https://bugzilla.redhat.com/show_bug.cgi?id=707439
4 years, 5 months
[libvirt PATCH v2 0/2] ci: Enable Cirrus CI integration
by Andrea Bolognani
Changes from [v1]:
* skip Cirrus CI jobs if the necessary variables are not set.
[v1] https://www.redhat.com/archives/libvir-list/2020-June/msg00249.html
Andrea Bolognani (2):
ci: Enable Cirrus CI integration
ci: Remove Travis CI
.gitlab-ci.yml | 38 +++++++++++++++++++
.travis.yml | 58 -----------------------------
ci/README.rst | 59 ++++++++++++++++++++++++++++++
ci/cirrus/freebsd-11.yml.j2 | 73 +++++++++++++++++++++++++++++++++++++
ci/cirrus/freebsd-12.yml.j2 | 73 +++++++++++++++++++++++++++++++++++++
ci/cirrus/macos-1015.yml.j2 | 38 +++++++++++++++++++
6 files changed, 281 insertions(+), 58 deletions(-)
delete mode 100644 .travis.yml
create mode 100644 ci/README.rst
create mode 100644 ci/cirrus/freebsd-11.yml.j2
create mode 100644 ci/cirrus/freebsd-12.yml.j2
create mode 100644 ci/cirrus/macos-1015.yml.j2
--
2.25.4
4 years, 5 months
[libvirt PATCH v2 0/4] ci: Use GitLab container registry
by Andrea Bolognani
Changes from [v1]:
* only build containers necessary for extra jobs when said jobs
are actually going to run;
* rename container build jobs to '$arch-$os-container';
* rename 'other' stage to 'preliminary_checks' and move it before
native builds;
* simplify build system integration.
[v1] https://www.redhat.com/archives/libvir-list/2020-May/msg01183.html
Andrea Bolognani (4):
ci: Use variables to build image names
ci: Add 'preliminary_checks' stage
ci: Use GitLab container registry
ci: Update build system integration
.gitlab-ci.yml | 325 ++++++++++++++++--
ci/Makefile | 6 +-
ci/containers/README.rst | 14 +
ci/containers/ci-centos-7.Dockerfile | 137 ++++++++
ci/containers/ci-centos-8.Dockerfile | 108 ++++++
.../ci-debian-10-cross-aarch64.Dockerfile | 122 +++++++
.../ci-debian-10-cross-armv6l.Dockerfile | 120 +++++++
.../ci-debian-10-cross-armv7l.Dockerfile | 121 +++++++
.../ci-debian-10-cross-i686.Dockerfile | 121 +++++++
.../ci-debian-10-cross-mips.Dockerfile | 121 +++++++
.../ci-debian-10-cross-mips64el.Dockerfile | 121 +++++++
.../ci-debian-10-cross-mipsel.Dockerfile | 121 +++++++
.../ci-debian-10-cross-ppc64le.Dockerfile | 121 +++++++
.../ci-debian-10-cross-s390x.Dockerfile | 121 +++++++
ci/containers/ci-debian-10.Dockerfile | 112 ++++++
.../ci-debian-9-cross-aarch64.Dockerfile | 126 +++++++
.../ci-debian-9-cross-armv6l.Dockerfile | 124 +++++++
.../ci-debian-9-cross-armv7l.Dockerfile | 125 +++++++
.../ci-debian-9-cross-mips.Dockerfile | 125 +++++++
.../ci-debian-9-cross-mips64el.Dockerfile | 125 +++++++
.../ci-debian-9-cross-mipsel.Dockerfile | 125 +++++++
.../ci-debian-9-cross-ppc64le.Dockerfile | 125 +++++++
.../ci-debian-9-cross-s390x.Dockerfile | 125 +++++++
ci/containers/ci-debian-9.Dockerfile | 116 +++++++
.../ci-debian-sid-cross-aarch64.Dockerfile | 122 +++++++
.../ci-debian-sid-cross-armv6l.Dockerfile | 120 +++++++
.../ci-debian-sid-cross-armv7l.Dockerfile | 121 +++++++
.../ci-debian-sid-cross-i686.Dockerfile | 121 +++++++
.../ci-debian-sid-cross-mips.Dockerfile | 121 +++++++
.../ci-debian-sid-cross-mips64el.Dockerfile | 121 +++++++
.../ci-debian-sid-cross-mipsel.Dockerfile | 120 +++++++
.../ci-debian-sid-cross-ppc64le.Dockerfile | 121 +++++++
.../ci-debian-sid-cross-s390x.Dockerfile | 121 +++++++
ci/containers/ci-debian-sid.Dockerfile | 112 ++++++
ci/containers/ci-fedora-31.Dockerfile | 109 ++++++
ci/containers/ci-fedora-32.Dockerfile | 109 ++++++
...ci-fedora-rawhide-cross-mingw32.Dockerfile | 129 +++++++
...ci-fedora-rawhide-cross-mingw64.Dockerfile | 129 +++++++
ci/containers/ci-fedora-rawhide.Dockerfile | 110 ++++++
ci/containers/ci-opensuse-151.Dockerfile | 109 ++++++
ci/containers/ci-ubuntu-1804.Dockerfile | 117 +++++++
ci/containers/ci-ubuntu-2004.Dockerfile | 113 ++++++
ci/containers/refresh | 43 +++
ci/list-images.sh | 24 +-
44 files changed, 5051 insertions(+), 48 deletions(-)
create mode 100644 ci/containers/README.rst
create mode 100644 ci/containers/ci-centos-7.Dockerfile
create mode 100644 ci/containers/ci-centos-8.Dockerfile
create mode 100644 ci/containers/ci-debian-10-cross-aarch64.Dockerfile
create mode 100644 ci/containers/ci-debian-10-cross-armv6l.Dockerfile
create mode 100644 ci/containers/ci-debian-10-cross-armv7l.Dockerfile
create mode 100644 ci/containers/ci-debian-10-cross-i686.Dockerfile
create mode 100644 ci/containers/ci-debian-10-cross-mips.Dockerfile
create mode 100644 ci/containers/ci-debian-10-cross-mips64el.Dockerfile
create mode 100644 ci/containers/ci-debian-10-cross-mipsel.Dockerfile
create mode 100644 ci/containers/ci-debian-10-cross-ppc64le.Dockerfile
create mode 100644 ci/containers/ci-debian-10-cross-s390x.Dockerfile
create mode 100644 ci/containers/ci-debian-10.Dockerfile
create mode 100644 ci/containers/ci-debian-9-cross-aarch64.Dockerfile
create mode 100644 ci/containers/ci-debian-9-cross-armv6l.Dockerfile
create mode 100644 ci/containers/ci-debian-9-cross-armv7l.Dockerfile
create mode 100644 ci/containers/ci-debian-9-cross-mips.Dockerfile
create mode 100644 ci/containers/ci-debian-9-cross-mips64el.Dockerfile
create mode 100644 ci/containers/ci-debian-9-cross-mipsel.Dockerfile
create mode 100644 ci/containers/ci-debian-9-cross-ppc64le.Dockerfile
create mode 100644 ci/containers/ci-debian-9-cross-s390x.Dockerfile
create mode 100644 ci/containers/ci-debian-9.Dockerfile
create mode 100644 ci/containers/ci-debian-sid-cross-aarch64.Dockerfile
create mode 100644 ci/containers/ci-debian-sid-cross-armv6l.Dockerfile
create mode 100644 ci/containers/ci-debian-sid-cross-armv7l.Dockerfile
create mode 100644 ci/containers/ci-debian-sid-cross-i686.Dockerfile
create mode 100644 ci/containers/ci-debian-sid-cross-mips.Dockerfile
create mode 100644 ci/containers/ci-debian-sid-cross-mips64el.Dockerfile
create mode 100644 ci/containers/ci-debian-sid-cross-mipsel.Dockerfile
create mode 100644 ci/containers/ci-debian-sid-cross-ppc64le.Dockerfile
create mode 100644 ci/containers/ci-debian-sid-cross-s390x.Dockerfile
create mode 100644 ci/containers/ci-debian-sid.Dockerfile
create mode 100644 ci/containers/ci-fedora-31.Dockerfile
create mode 100644 ci/containers/ci-fedora-32.Dockerfile
create mode 100644 ci/containers/ci-fedora-rawhide-cross-mingw32.Dockerfile
create mode 100644 ci/containers/ci-fedora-rawhide-cross-mingw64.Dockerfile
create mode 100644 ci/containers/ci-fedora-rawhide.Dockerfile
create mode 100644 ci/containers/ci-opensuse-151.Dockerfile
create mode 100644 ci/containers/ci-ubuntu-1804.Dockerfile
create mode 100644 ci/containers/ci-ubuntu-2004.Dockerfile
create mode 100755 ci/containers/refresh
--
2.25.4
4 years, 5 months
[PATCH v2 0/7] virsysinfo: Parse OEM strings
by Michal Privoznik
v2 of:
https://www.redhat.com/archives/libvir-list/2020-June/msg00038.html
diff to v1:
- cleaned up sysinfotest so that it can use virCommandSetDryRun()
- Handle multiline strings (per Dan's suggestion in review of v1)
Michal Prívozník (7):
virSysinfoReadDMI: Use more g_auto*()
virSysinfoReadDMI: Drop needless virFindFileInPath()
testSysinfo: Use more g_auto*()
sysinfotest: Dissolve sysinfotest_run() in testSysinfo()
sysinfotest: Move from custom dmidecode scripts to
virCommandSetDryRun()
virsysinfo: Drop global @sysinfoDmidecode
virsysinfo: Parse OEM strings
src/util/virsysinfo.c | 151 +++++++++++++-----
src/util/virsysinfopriv.h | 3 +-
.../sysinfodata/aarch64-gigabytedmidecode.sh | 3 -
tests/sysinfodata/x86dmidecode.sh | 3 -
tests/sysinfodata/x86sysinfo.data | 6 +
tests/sysinfodata/x86sysinfo.expect | 8 +
tests/sysinfotest.c | 144 +++++++++--------
7 files changed, 203 insertions(+), 115 deletions(-)
delete mode 100755 tests/sysinfodata/aarch64-gigabytedmidecode.sh
delete mode 100755 tests/sysinfodata/x86dmidecode.sh
--
2.26.2
4 years, 5 months
[PATCH v3 0/6] Expose QEMU's -fw_cfg
by Michal Privoznik
v3 of:
https://www.redhat.com/archives/libvir-list/2020-June/msg00167.html
diff to v2:
- pushed first two patches from v2 because they are independent.
- rebased onto latest mater (there were new capabilities introduced
meanwhile)
- changed accepted XML per Dan's suggestion
- dropped check for filename length, which turned out to be invalid
anyways (the limit applies to @name and not @file)
- Changed news from news.xml to NEWS.rst
Michal Prívozník (6):
conf: Add firmware blob configuration
qemu: Validate firmware blob configuration
qemu: Introduce fw_cfg capability
secdrivers: Relabel firmware config files
qemu: Generate command line for -fw_cfg
news: Document -fw_cfg
NEWS.rst | 8 +
docs/formatdomain.html.in | 32 +++
docs/schemas/domaincommon.rng | 145 +++++++------
src/conf/domain_conf.c | 193 ++++++++++++++----
src/conf/domain_conf.h | 4 +-
src/qemu/qemu_capabilities.c | 2 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 54 ++++-
src/qemu/qemu_validate.c | 32 +++
src/security/security_dac.c | 50 +++++
src/security/security_selinux.c | 50 +++++
src/security/virt-aa-helper.c | 12 ++
src/util/virsysinfo.c | 52 ++++-
src/util/virsysinfo.h | 16 +-
.../caps_2.10.0.aarch64.xml | 1 +
.../caps_2.10.0.ppc64.xml | 1 +
.../caps_2.10.0.s390x.xml | 1 +
.../caps_2.10.0.x86_64.xml | 1 +
.../caps_2.11.0.s390x.xml | 1 +
.../caps_2.11.0.x86_64.xml | 1 +
.../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 +
.../caps_2.4.0.x86_64.xml | 1 +
.../caps_2.5.0.x86_64.xml | 1 +
.../caps_2.6.0.aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_2.6.0.ppc64.xml | 1 +
.../caps_2.6.0.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_2.7.0.s390x.xml | 1 +
.../caps_2.7.0.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_2.8.0.s390x.xml | 1 +
.../caps_2.8.0.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_2.9.0.ppc64.xml | 1 +
.../qemucapabilitiesdata/caps_2.9.0.s390x.xml | 1 +
.../caps_2.9.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 +
.../caps_5.0.0.aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 +
.../caps_5.0.0.riscv64.xml | 1 +
.../caps_5.0.0.x86_64.xml | 1 +
.../caps_5.1.0.x86_64.xml | 1 +
tests/qemuxml2argvdata/smbios-type-fwcfg.args | 38 ++++
tests/qemuxml2argvdata/smbios-type-fwcfg.xml | 63 ++++++
tests/qemuxml2argvtest.c | 1 +
.../qemuxml2xmloutdata/smbios-type-fwcfg.xml | 1 +
tests/qemuxml2xmltest.c | 1 +
64 files changed, 686 insertions(+), 114 deletions(-)
create mode 100644 tests/qemuxml2argvdata/smbios-type-fwcfg.args
create mode 100644 tests/qemuxml2argvdata/smbios-type-fwcfg.xml
create mode 120000 tests/qemuxml2xmloutdata/smbios-type-fwcfg.xml
--
2.26.2
4 years, 5 months
[PATCH v5] numa: forbid '-numa node, mem' for 5.1 and newer machine types
by Igor Mammedov
Deprecation period is run out and it's a time to flip the switch
introduced by cd5ff8333a. Disable legacy option for new machine
types (since 5.1) and amend documentation.
'-numa node,memdev' shall be used instead of disabled option
with new machine types.
Signed-off-by: Igor Mammedov <imammedo(a)redhat.com>
Reviewed-by: Michal Privoznik <mprivozn(a)redhat.com>
Reviewed-by: Michael S. Tsirkin <mst(a)redhat.com>
Reviewed-by: Greg Kurz <groug(a)kaod.org>
---
v1:
- rebased on top of current master
- move compat mode from 4.2 to 5.0
v2:
- move deprecation text to recently removed section
v3:
- increase title line length for (deprecated.rst)
'``-numa node,mem=``\ *size* (removed in 5.1)'
v4:
- use error_append_hint() for suggesting valid CLI
v5:
- add "\n" at the end of error_append_hint()
- fix gramar/spelling in moved deprecation text
CC: peter.maydell(a)linaro.org
CC: ehabkost(a)redhat.com
CC: marcel.apfelbaum(a)gmail.com
CC: mst(a)redhat.com
CC: pbonzini(a)redhat.com
CC: rth(a)twiddle.net
CC: david(a)gibson.dropbear.id.au
CC: libvir-list(a)redhat.com
CC: qemu-arm(a)nongnu.org
CC: qemu-ppc(a)nongnu.org
CC: eblake(a)redhat.com
CC: groug(a)kaod.org
---
docs/system/deprecated.rst | 37 ++++++++++++++++++++-----------------
hw/arm/virt.c | 2 +-
hw/core/numa.c | 7 +++++++
hw/i386/pc.c | 1 -
hw/i386/pc_piix.c | 1 +
hw/i386/pc_q35.c | 1 +
hw/ppc/spapr.c | 2 +-
qemu-options.hx | 9 +++++----
8 files changed, 36 insertions(+), 24 deletions(-)
diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst
index 544ece0a45..72666ac764 100644
--- a/docs/system/deprecated.rst
+++ b/docs/system/deprecated.rst
@@ -101,23 +101,6 @@ error in the future.
The ``-realtime mlock=on|off`` argument has been replaced by the
``-overcommit mem-lock=on|off`` argument.
-``-numa node,mem=``\ *size* (since 4.1)
-'''''''''''''''''''''''''''''''''''''''
-
-The parameter ``mem`` of ``-numa node`` is used to assign a part of
-guest RAM to a NUMA node. But when using it, it's impossible to manage specified
-RAM chunk on the host side (like bind it to a host node, setting bind policy, ...),
-so guest end-ups with the fake NUMA configuration with suboptiomal performance.
-However since 2014 there is an alternative way to assign RAM to a NUMA node
-using parameter ``memdev``, which does the same as ``mem`` and adds
-means to actualy manage node RAM on the host side. Use parameter ``memdev``
-with *memory-backend-ram* backend as an replacement for parameter ``mem``
-to achieve the same fake NUMA effect or a properly configured
-*memory-backend-file* backend to actually benefit from NUMA configuration.
-In future new machine versions will not accept the option but it will still
-work with old machine types. User can check QAPI schema to see if the legacy
-option is supported by looking at MachineInfo::numa-mem-supported property.
-
``-numa`` node (without memory specified) (since 4.1)
'''''''''''''''''''''''''''''''''''''''''''''''''''''
@@ -516,3 +499,23 @@ long starting at 1MiB, the old command::
can be rewritten as::
qemu-nbd -t --image-opts driver=raw,offset=1M,size=100M,file.driver=qcow2,file.file.driver=file,file.file.filename=file.qcow2
+
+Command line options
+--------------------
+
+``-numa node,mem=``\ *size* (removed in 5.1)
+''''''''''''''''''''''''''''''''''''''''''''
+
+The parameter ``mem`` of ``-numa node`` was used to assign a part of
+guest RAM to a NUMA node. But when using it, it's impossible to manage a specified
+RAM chunk on the host side (like bind it to a host node, setting bind policy, ...),
+so the guest ends up with the fake NUMA configuration with suboptiomal performance.
+However since 2014 there is an alternative way to assign RAM to a NUMA node
+using parameter ``memdev``, which does the same as ``mem`` and adds
+means to actually manage node RAM on the host side. Use parameter ``memdev``
+with *memory-backend-ram* backend as replacement for parameter ``mem``
+to achieve the same fake NUMA effect or a properly configured
+*memory-backend-file* backend to actually benefit from NUMA configuration.
+New machine versions (since 5.1) will not accept the option but it will still
+work with old machine types. User can check the QAPI schema to see if the legacy
+option is supported by looking at MachineInfo::numa-mem-supported property.
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 37462a6f78..063d4703f7 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -2262,7 +2262,6 @@ static void virt_machine_class_init(ObjectClass *oc, void *data)
hc->pre_plug = virt_machine_device_pre_plug_cb;
hc->plug = virt_machine_device_plug_cb;
hc->unplug_request = virt_machine_device_unplug_request_cb;
- mc->numa_mem_supported = true;
mc->nvdimm_supported = true;
mc->auto_enable_numa_with_memhp = true;
mc->default_ram_id = "mach-virt.ram";
@@ -2375,6 +2374,7 @@ DEFINE_VIRT_MACHINE_AS_LATEST(5, 1)
static void virt_machine_5_0_options(MachineClass *mc)
{
virt_machine_5_1_options(mc);
+ mc->numa_mem_supported = true;
}
DEFINE_VIRT_MACHINE(5, 0)
diff --git a/hw/core/numa.c b/hw/core/numa.c
index 316bc50d75..a935640962 100644
--- a/hw/core/numa.c
+++ b/hw/core/numa.c
@@ -117,6 +117,13 @@ static void parse_numa_node(MachineState *ms, NumaNodeOptions *node,
}
if (node->has_mem) {
+ if (!mc->numa_mem_supported) {
+ error_setg(errp, "Parameter -numa node,mem is not supported by this"
+ " machine type");
+ error_append_hint(errp, "Use -numa node,memdev instead\n");
+ return;
+ }
+
numa_info[nodenr].node_mem = node->mem;
if (!qtest_enabled()) {
warn_report("Parameter -numa node,mem is deprecated,"
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 2128f3d6fe..a86136069c 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1960,7 +1960,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data)
hc->unplug = pc_machine_device_unplug_cb;
mc->default_cpu_type = TARGET_DEFAULT_CPU_TYPE;
mc->nvdimm_supported = true;
- mc->numa_mem_supported = true;
mc->default_ram_id = "pc.ram";
object_class_property_add(oc, PC_MACHINE_DEVMEM_REGION_SIZE, "int",
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index f66e1d73ce..8955436efa 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -438,6 +438,7 @@ static void pc_i440fx_5_0_machine_options(MachineClass *m)
pc_i440fx_5_1_machine_options(m);
m->alias = NULL;
m->is_default = false;
+ m->numa_mem_supported = true;
compat_props_add(m->compat_props, hw_compat_5_0, hw_compat_5_0_len);
compat_props_add(m->compat_props, pc_compat_5_0, pc_compat_5_0_len);
}
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index 4ba8ac8774..af6b32adb7 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -366,6 +366,7 @@ static void pc_q35_5_0_machine_options(MachineClass *m)
{
pc_q35_5_1_machine_options(m);
m->alias = NULL;
+ m->numa_mem_supported = true;
compat_props_add(m->compat_props, hw_compat_5_0, hw_compat_5_0_len);
compat_props_add(m->compat_props, pc_compat_5_0, pc_compat_5_0_len);
}
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 3b1a5ed865..210d61d1b3 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -4511,7 +4511,6 @@ static void spapr_machine_class_init(ObjectClass *oc, void *data)
* in which LMBs are represented and hot-added
*/
mc->numa_mem_align_shift = 28;
- mc->numa_mem_supported = true;
mc->auto_enable_numa = true;
smc->default_caps.caps[SPAPR_CAP_HTM] = SPAPR_CAP_OFF;
@@ -4599,6 +4598,7 @@ static void spapr_machine_5_0_class_options(MachineClass *mc)
{
spapr_machine_5_1_class_options(mc);
compat_props_add(mc->compat_props, hw_compat_5_0, hw_compat_5_0_len);
+ mc->numa_mem_supported = true;
}
DEFINE_SPAPR_MACHINE(5_0, "5.0", false);
diff --git a/qemu-options.hx b/qemu-options.hx
index 93bde2bbc8..196f468786 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -239,10 +239,11 @@ SRST
-numa node,nodeid=0 -numa node,nodeid=1 \
-numa cpu,node-id=0,socket-id=0 -numa cpu,node-id=1,socket-id=1
- '\ ``mem``\ ' assigns a given RAM amount to a node. '\ ``memdev``\ '
- assigns RAM from a given memory backend device to a node. If
- '\ ``mem``\ ' and '\ ``memdev``\ ' are omitted in all nodes, RAM is
- split equally between them.
+ Legacy '\ ``mem``\ ' assigns a given RAM amount to a node (not supported
+ for 5.1 and newer machine types). '\ ``memdev``\ ' assigns RAM from
+ a given memory backend device to a node. If '\ ``mem``\ ' and
+ '\ ``memdev``\ ' are omitted in all nodes, RAM is split equally between them.
+
'\ ``mem``\ ' and '\ ``memdev``\ ' are mutually exclusive.
Furthermore, if one node uses '\ ``memdev``\ ', all of them have to
--
2.26.2
4 years, 5 months
[libvirt PATCH 0/3] network: support NAT with IPv6
by Daniel P. Berrangé
The virtual network has never supported NAT with IPv6 since this feature
didn't exist at the time. NAT has been available since RHEL-7 vintage
though, and it is desirable to be able to use it.
This series enables it with
<forward mode=3D"nat">
<nat ipv6=3D"yes"/>
</forward>
Note that I do NOT actually change the default.xml to enable use of IPv6
because that will cause failure if the user has force disabled IPv6 on
their host kernel.
Of course our current default.xml is already broken if someone has done
the reverse and force disabled IPv4.
We've also long had a problem with guests bringing up the default
network with the same subnet as the host. We'll have this same issue
with IPv6 too.
On my prompting Laine proposed a way to deal with the clash by tearing
down a network, if we see a real host NIC get assigned the same subnet.
Meanwhile we also have complaints about the fact that libvirt does
anything todo with networking in the %post of the RPM.
I'm thinking that we can do something entirely different by introducing
a concept of "automatic subnet selection" into the virtual network.
Consider if we made default.xml be able to contain only:
<network>
<name>default</name>
<forward/>
<ip family=3D"ipv4" autoaddr=3D"yes">
<dhcp/>
</ip>
<ip family=3D"ipv6" autoaddr=3D"yes"/>
</network>
Conceptually this means
- Try to gimme a subnet with IPv4 and DHCP
- Try to gimme a subnet with IPv6 and RAs
Now when we start the virtual network
- If IPv4 is not enabled on host, don't assign addr
- Else
- Iterate N=3D1..254 to find a free range for IPv4
- Use 192.168.N.0/24 for subnet
- Use 192.168.N.1 for host IP
- Use 192.168.N.2 -> 192.168.N.254 for guest DHCP
- If IPv6 is not enabled on host, don't assign addr
- Else
- Generate NNNN:NNNN as 4 random bytes
- Use fd00:add:f00d:NNNN:NNNN::0/64 for IPv6 subnet
- Use fd00:add:f00d:NNNN:NNNN::1 for host IP
- Use route advertizement for IPv6 zero-conf
With NNNN:NNNN, even with 1000 guests running, we have just a 0.02%
chance of clashing with a guest for IPv6.
The "live" XML would always reflect the currently assigned addresses
Proactively monitor the address allocations of the host. If we see
a conflicting address appear, take down the dnsmasq intance, generate
a new subnet, bring dnsmasq back online.
Ideally we would have to bring the guest network links offline and
then online again to force DHCP re-assignment immediately.
Daniel P. Berrang=C3=A9 (3):
util: add support for IPv6 masquerade rules
conf: add an attribute to turn on NAT for IPv6 virtual networks
network: wire up support for IPv6 NAT rules
docs/formatnetwork.html.in | 14 ++
docs/schemas/network.rng | 8 +
src/conf/network_conf.c | 26 +-
src/conf/network_conf.h | 2 +
src/network/bridge_driver_linux.c | 23 +-
src/util/viriptables.c | 33 +--
.../nat-ipv6-masquerade-linux.args | 228 ++++++++++++++++++
.../nat-ipv6-masquerade.xml | 17 ++
tests/networkxml2firewalltest.c | 1 +
.../nat-network-forward-nat-ipv6.xml | 10 +
.../nat-network-forward-nat-ipv6.xml | 11 +
tests/networkxml2xmltest.c | 1 +
12 files changed, 343 insertions(+), 31 deletions(-)
create mode 100644 tests/networkxml2firewalldata/nat-ipv6-masquerade-linux.a=
rgs
create mode 100644 tests/networkxml2firewalldata/nat-ipv6-masquerade.xml
create mode 100644 tests/networkxml2xmlin/nat-network-forward-nat-ipv6.xml
create mode 100644 tests/networkxml2xmlout/nat-network-forward-nat-ipv6.xml
--=20
2.26.2
4 years, 5 months
[libvirt PATCH 0/9] qemu: Add support for -cpu host, migratable=on|off
by Jiri Denemark
Jiri Denemark (9):
conf: Use g_auto* in virCPUDefParseXML
qemu: Probe for .migratable property of a CPU
qemu: Probe for migrtability support in CPU expansion
qemu: Avoid probing unsupported migratable CPU expansion
conf: Introduce migratable attribute for the <cpu> element
conf: Advertise migratable attribute for CPU in domcaps
qemu: Advertise migratable attribute for CPU in domcaps
qemu: Fill default value in //cpu/@migratable attribute
qemu: Pass migratable=on|off property for -cpu host
docs/formatdomain.html.in | 14 +-
docs/formatdomaincaps.html.in | 13 +-
docs/schemas/domaincaps.rng | 3 +
docs/schemas/domaincommon.rng | 5 +
src/conf/cpu_conf.c | 157 +++++++++---------
src/conf/cpu_conf.h | 1 +
src/conf/domain_capabilities.c | 13 +-
src/conf/domain_capabilities.h | 1 +
src/qemu/qemu_capabilities.c | 28 +++-
src/qemu/qemu_capabilities.h | 4 +
src/qemu/qemu_command.c | 15 ++
src/qemu/qemu_domain.c | 14 +-
.../domaincapsdata/qemu_1.5.3-q35.x86_64.xml | 6 +-
tests/domaincapsdata/qemu_1.5.3.x86_64.xml | 6 +-
.../domaincapsdata/qemu_1.6.0-q35.x86_64.xml | 6 +-
tests/domaincapsdata/qemu_1.6.0.x86_64.xml | 6 +-
.../domaincapsdata/qemu_1.7.0-q35.x86_64.xml | 6 +-
tests/domaincapsdata/qemu_1.7.0.x86_64.xml | 6 +-
.../domaincapsdata/qemu_2.1.1-q35.x86_64.xml | 6 +-
tests/domaincapsdata/qemu_2.1.1.x86_64.xml | 6 +-
.../domaincapsdata/qemu_2.10.0-q35.x86_64.xml | 6 +-
.../qemu_2.10.0-virt.aarch64.xml | 6 +-
tests/domaincapsdata/qemu_2.10.0.aarch64.xml | 6 +-
tests/domaincapsdata/qemu_2.10.0.ppc64.xml | 6 +-
tests/domaincapsdata/qemu_2.10.0.s390x.xml | 6 +-
tests/domaincapsdata/qemu_2.10.0.x86_64.xml | 6 +-
.../domaincapsdata/qemu_2.11.0-q35.x86_64.xml | 6 +-
tests/domaincapsdata/qemu_2.11.0.s390x.xml | 6 +-
tests/domaincapsdata/qemu_2.11.0.x86_64.xml | 6 +-
.../domaincapsdata/qemu_2.12.0-q35.x86_64.xml | 7 +-
.../qemu_2.12.0-virt.aarch64.xml | 6 +-
tests/domaincapsdata/qemu_2.12.0.aarch64.xml | 6 +-
tests/domaincapsdata/qemu_2.12.0.ppc64.xml | 6 +-
tests/domaincapsdata/qemu_2.12.0.s390x.xml | 6 +-
tests/domaincapsdata/qemu_2.12.0.x86_64.xml | 7 +-
.../domaincapsdata/qemu_2.4.0-q35.x86_64.xml | 6 +-
tests/domaincapsdata/qemu_2.4.0.x86_64.xml | 6 +-
.../domaincapsdata/qemu_2.5.0-q35.x86_64.xml | 6 +-
tests/domaincapsdata/qemu_2.5.0.x86_64.xml | 6 +-
.../domaincapsdata/qemu_2.6.0-q35.x86_64.xml | 6 +-
.../qemu_2.6.0-virt.aarch64.xml | 6 +-
tests/domaincapsdata/qemu_2.6.0.aarch64.xml | 6 +-
tests/domaincapsdata/qemu_2.6.0.ppc64.xml | 6 +-
tests/domaincapsdata/qemu_2.6.0.x86_64.xml | 6 +-
.../domaincapsdata/qemu_2.7.0-q35.x86_64.xml | 6 +-
tests/domaincapsdata/qemu_2.7.0.s390x.xml | 6 +-
tests/domaincapsdata/qemu_2.7.0.x86_64.xml | 6 +-
.../domaincapsdata/qemu_2.8.0-q35.x86_64.xml | 6 +-
tests/domaincapsdata/qemu_2.8.0.s390x.xml | 6 +-
tests/domaincapsdata/qemu_2.8.0.x86_64.xml | 6 +-
.../domaincapsdata/qemu_2.9.0-q35.x86_64.xml | 6 +-
tests/domaincapsdata/qemu_2.9.0.ppc64.xml | 6 +-
tests/domaincapsdata/qemu_2.9.0.s390x.xml | 6 +-
tests/domaincapsdata/qemu_2.9.0.x86_64.xml | 6 +-
.../domaincapsdata/qemu_3.0.0-q35.x86_64.xml | 7 +-
tests/domaincapsdata/qemu_3.0.0.ppc64.xml | 6 +-
tests/domaincapsdata/qemu_3.0.0.s390x.xml | 6 +-
tests/domaincapsdata/qemu_3.0.0.x86_64.xml | 7 +-
.../domaincapsdata/qemu_3.1.0-q35.x86_64.xml | 7 +-
tests/domaincapsdata/qemu_3.1.0.ppc64.xml | 6 +-
tests/domaincapsdata/qemu_3.1.0.x86_64.xml | 7 +-
.../domaincapsdata/qemu_4.0.0-q35.x86_64.xml | 7 +-
.../qemu_4.0.0-virt.aarch64.xml | 6 +-
tests/domaincapsdata/qemu_4.0.0.aarch64.xml | 6 +-
tests/domaincapsdata/qemu_4.0.0.ppc64.xml | 6 +-
tests/domaincapsdata/qemu_4.0.0.s390x.xml | 6 +-
tests/domaincapsdata/qemu_4.0.0.x86_64.xml | 7 +-
.../domaincapsdata/qemu_4.1.0-q35.x86_64.xml | 7 +-
tests/domaincapsdata/qemu_4.1.0.x86_64.xml | 7 +-
.../domaincapsdata/qemu_4.2.0-q35.x86_64.xml | 7 +-
.../qemu_4.2.0-virt.aarch64.xml | 6 +-
tests/domaincapsdata/qemu_4.2.0.aarch64.xml | 6 +-
tests/domaincapsdata/qemu_4.2.0.ppc64.xml | 6 +-
tests/domaincapsdata/qemu_4.2.0.s390x.xml | 6 +-
tests/domaincapsdata/qemu_4.2.0.x86_64.xml | 7 +-
.../domaincapsdata/qemu_5.0.0-q35.x86_64.xml | 7 +-
.../qemu_5.0.0-virt.aarch64.xml | 6 +-
tests/domaincapsdata/qemu_5.0.0.aarch64.xml | 6 +-
tests/domaincapsdata/qemu_5.0.0.ppc64.xml | 6 +-
tests/domaincapsdata/qemu_5.0.0.x86_64.xml | 7 +-
.../domaincapsdata/qemu_5.1.0-q35.x86_64.xml | 7 +-
tests/domaincapsdata/qemu_5.1.0.x86_64.xml | 7 +-
.../caps_2.10.0.s390x.replies | 22 ---
.../caps_2.10.0.x86_64.xml | 1 +
.../caps_2.11.0.s390x.replies | 22 ---
.../caps_2.11.0.x86_64.xml | 1 +
.../caps_2.12.0.s390x.replies | 22 ---
.../caps_2.12.0.x86_64.xml | 2 +
.../caps_2.8.0.s390x.replies | 22 ---
.../caps_2.9.0.s390x.replies | 22 ---
.../caps_2.9.0.x86_64.xml | 1 +
.../caps_3.0.0.s390x.replies | 22 ---
.../caps_3.0.0.x86_64.xml | 2 +
.../caps_3.1.0.x86_64.xml | 2 +
.../caps_4.0.0.s390x.replies | 48 +-----
.../caps_4.0.0.x86_64.xml | 2 +
.../caps_4.1.0.x86_64.xml | 2 +
.../caps_4.2.0.aarch64.replies | 48 +-----
.../caps_4.2.0.s390x.replies | 48 +-----
.../caps_4.2.0.x86_64.xml | 2 +
.../caps_5.0.0.aarch64.replies | 48 +-----
.../caps_5.0.0.x86_64.xml | 2 +
.../caps_5.1.0.x86_64.xml | 2 +
.../migration-in-params-in.xml | 2 +-
.../migration-out-params-in.xml | 2 +-
.../cpu-check-default-none.xml | 2 +-
.../qemuxml2xmloutdata/cpu-host-kvmclock.xml | 2 +-
.../cpu-host-passthrough-features.xml | 2 +-
tests/qemuxml2xmloutdata/kvm-features.xml | 2 +-
109 files changed, 578 insertions(+), 481 deletions(-)
--
2.27.0
4 years, 5 months