[PATCH] libxl: Normalize MAC address in device conf when hotplugging a netdev
by Jim Fehlig
Similar to commit 6c17606b7cc, normalize the MAC addresses in persistent
and live device config to avoid a different MAC address for the device
once the VM is rebooted and persistent config takes affect.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
src/libxl/libxl_driver.c | 56 +++++++++++++++++++++++++++++++++-------
1 file changed, 46 insertions(+), 10 deletions(-)
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 63ec0a2188..a80bc3fe3a 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -4096,6 +4096,31 @@ libxlDomainUpdateDeviceConfig(virDomainDefPtr vmdef, virDomainDeviceDefPtr dev)
}
+static void
+libxlDomainAttachDeviceNormalize(const virDomainDeviceDef *devConf,
+ virDomainDeviceDefPtr devLive)
+{
+ /*
+ * Fixup anything that needs to be identical in the live and
+ * config versions of DeviceDef, but might not be. Do this by
+ * changing the contents of devLive. This is done after all
+ * post-parse tweaks and validation, so be very careful about what
+ * changes are made.
+ */
+
+ /* MAC address should be identical in both DeviceDefs, but if it
+ * wasn't specified in the XML, and was instead autogenerated, it
+ * will be different for the two since they are each the result of
+ * a separate parser call. If it *was* specified, it will already
+ * be the same, so copying does no harm.
+ */
+
+ if (devConf->type == VIR_DOMAIN_DEVICE_NET)
+ virMacAddrSet(&devLive->data.net->mac, &devConf->data.net->mac);
+
+}
+
+
static int
libxlDomainAttachDeviceFlags(virDomainPtr dom, const char *xml,
unsigned int flags)
@@ -4104,7 +4129,9 @@ libxlDomainAttachDeviceFlags(virDomainPtr dom, const char *xml,
libxlDriverConfigPtr cfg = libxlDriverConfigGet(driver);
virDomainObjPtr vm = NULL;
virDomainDefPtr vmdef = NULL;
- virDomainDeviceDefPtr dev = NULL;
+ virDomainDeviceDefPtr devConf = NULL;
+ virDomainDeviceDef devConfSave = { 0 };
+ virDomainDeviceDefPtr devLive = NULL;
int ret = -1;
virCheckFlags(VIR_DOMAIN_DEVICE_MODIFY_LIVE |
@@ -4123,28 +4150,36 @@ libxlDomainAttachDeviceFlags(virDomainPtr dom, const char *xml,
goto endjob;
if (flags & VIR_DOMAIN_DEVICE_MODIFY_CONFIG) {
- if (!(dev = virDomainDeviceDefParse(xml, vm->def,
- driver->xmlopt, NULL,
- VIR_DOMAIN_DEF_PARSE_INACTIVE)))
+ if (!(devConf = virDomainDeviceDefParse(xml, vm->def,
+ driver->xmlopt, NULL,
+ VIR_DOMAIN_DEF_PARSE_INACTIVE)))
goto endjob;
/* Make a copy for updated domain. */
if (!(vmdef = virDomainObjCopyPersistentDef(vm, driver->xmlopt, NULL)))
goto endjob;
- if (libxlDomainAttachDeviceConfig(vmdef, dev) < 0)
+ /*
+ * devConf will be NULLed out by
+ * libxlDomainAttachDeviceConfig(), so save it for later use by
+ * libxlDomainAttachDeviceNormalize()
+ */
+ devConfSave = *devConf;
+
+ if (libxlDomainAttachDeviceConfig(vmdef, devConf) < 0)
goto endjob;
}
if (flags & VIR_DOMAIN_DEVICE_MODIFY_LIVE) {
- /* If dev exists it was created to modify the domain config. Free it. */
- virDomainDeviceDefFree(dev);
- if (!(dev = virDomainDeviceDefParse(xml, vm->def,
+ if (!(devLive = virDomainDeviceDefParse(xml, vm->def,
driver->xmlopt, NULL,
VIR_DOMAIN_DEF_PARSE_INACTIVE)))
goto endjob;
- if (libxlDomainAttachDeviceLive(driver, vm, dev) < 0)
+ if (flags & VIR_DOMAIN_AFFECT_CONFIG)
+ libxlDomainAttachDeviceNormalize(&devConfSave, devLive);
+
+ if (libxlDomainAttachDeviceLive(driver, vm, devLive) < 0)
goto endjob;
/*
@@ -4171,7 +4206,8 @@ libxlDomainAttachDeviceFlags(virDomainPtr dom, const char *xml,
cleanup:
virDomainDefFree(vmdef);
- virDomainDeviceDefFree(dev);
+ virDomainDeviceDefFree(devConf);
+ virDomainDeviceDefFree(devLive);
virDomainObjEndAPI(&vm);
virObjectUnref(cfg);
return ret;
--
2.26.0
4 years, 5 months
[libvirt PATCH 0/7] po: updates to switch over to use of Weblate
by Daniel P. Berrangé
The Fedora translation team has stopped using Zanata because the
software itself is dead upstream. In its place is the Weblate
platform. In theory we should have been able to work with Weblate in the
same way as we did for Zanata, pushing a pot file periodically, and
pulling .po files periodically. In practice this fails for libvirt.git
because Weblates RPC API doesn't scale sufficiently well. It will
frequently throw errors with the large libvirt.pot file and it gets
slower at an exponential rate as you add more languages.
Weblate has another mode of operating though which is way more common,
whereby it directly pulls a .pot from your git repo, and then directly
pushes .po files back, either using a trusted SSH key, or by opening a
merge request for GitLab/GitHub/etc. This is the mode we're going to
have to use in libvirt projects.
Compared to what we're currently doing with Zanata the downsides are:
- We have to store libvirt.pot in git and refresh it periodically
- The .po files are only partially minimized, as while they have
locations stripped, they still contain non-translated msgids
The plussides are
- We don't have to interact with Weblate at all, only the libvirt
git repo
- We'll be able to use the normal meson i18n integration, merely
by calling
i18n.gettext(meson.project_name(),
args: ['--sort-output'],
preset: 'glib')
I'm intending to open discussion with weblate maintainers to see if
either of those two downsides can be eliminated via feature enhancements
to Weblate. In the meanwhile we just have to accept them, as otherwise
we're not going to get any translations since Zanata is dead.
Daniel P. Berrangé (7):
po: switch to using LINGUAS file for list of languages
po: delete empty translations
po: refresh to drop unused translations
po: rename the .mini.po files to have just a .po suffix
po: generate .pot file with strings in alphabetical order
po: stop stripping non-translated strings from po files
po: go back to storing the .pot file in git
Makefile.am | 1 -
po/LINGUAS | 42 +
po/Makefile.am | 50 +-
po/af.mini.po | 19 -
po/am.mini.po | 19 -
po/anp.mini.po | 19 -
po/ar.mini.po | 23 -
po/{as.mini.po => as.po} | 402 +-
po/ast.mini.po | 19 -
po/bal.mini.po | 19 -
po/be.mini.po | 20 -
po/{bg.mini.po => bg.po} | 5 +-
po/bn.mini.po | 21 -
po/{bn_IN.mini.po => bn_IN.po} | 126 +-
po/bo.mini.po | 19 -
po/br.mini.po | 19 -
po/brx.mini.po | 19 -
po/{bs.mini.po => bs.po} | 5 +-
po/{ca.mini.po => ca.po} | 15 +-
po/{cs.mini.po => cs.po} | 523 +-
po/cy.mini.po | 23 -
po/{da.mini.po => da.po} | 5 +-
po/{de.mini.po => de.po} | 408 +-
po/de_CH.mini.po | 19 -
po/{el.mini.po => el.po} | 2 +-
po/{en_GB.mini.po => en_GB.po} | 402 +-
po/eo.mini.po | 19 -
po/{es.mini.po => es.po} | 409 +-
po/et.mini.po | 21 -
po/eu.mini.po | 21 -
po/fa.mini.po | 19 -
po/{fi.mini.po => fi.po} | 26 +-
po/fil.mini.po | 19 -
po/{fr.mini.po => fr.po} | 75 +-
po/fur.mini.po | 19 -
po/ga.mini.po | 20 -
po/gl.mini.po | 21 -
po/{gu.mini.po => gu.po} | 408 +-
po/he.mini.po | 21 -
po/{hi.mini.po => hi.po} | 300 +-
po/hr.mini.po | 20 -
po/{hu.mini.po => hu.po} | 5 +-
po/ia.mini.po | 19 -
po/{id.mini.po => id.po} | 2 +-
po/ilo.mini.po | 19 -
po/is.mini.po | 21 -
po/{it.mini.po => it.po} | 175 +-
po/{ja.mini.po => ja.po} | 407 +-
po/ka.mini.po | 21 -
po/kk.mini.po | 19 -
po/km.mini.po | 19 -
po/{kn.mini.po => kn.po} | 407 +-
po/{ko.mini.po => ko.po} | 240 +-
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 | 19 -
po/libvirt.pot | 48582 +++++++++++++++++++++++++
po/lt.mini.po | 22 -
po/lv.mini.po | 22 -
po/mai.mini.po | 19 -
po/{mk.mini.po => mk.po} | 5 +-
po/{ml.mini.po => ml.po} | 402 +-
po/mn.mini.po | 19 -
po/{mr.mini.po => mr.po} | 434 +-
po/{ms.mini.po => ms.po} | 2 +-
po/my.mini.po | 19 -
po/{nb.mini.po => nb.po} | 5 +-
po/nds.mini.po | 19 -
po/ne.mini.po | 19 -
po/{nl.mini.po => nl.po} | 215 +-
po/nn.mini.po | 21 -
po/nso.mini.po | 21 -
po/{or.mini.po => or.po} | 375 +-
po/{pa.mini.po => pa.po} | 402 +-
po/{pl.mini.po => pl.po} | 239 +-
po/{pt.mini.po => pt.po} | 5 +-
po/{pt_BR.mini.po => pt_BR.po} | 407 +-
po/ro.mini.po | 22 -
po/{ru.mini.po => ru.po} | 376 +-
po/si.mini.po | 21 -
po/sk.mini.po | 21 -
po/sl.mini.po | 22 -
po/sq.mini.po | 23 -
po/{sr.mini.po => sr.po} | 16 +-
po/{sr(a)latin.mini.po => sr(a)latin.po} | 16 +-
po/{sv.mini.po => sv.po} | 105 +-
po/{ta.mini.po => ta.po} | 407 +-
po/{te.mini.po => te.po} | 402 +-
po/tg.mini.po | 19 -
po/th.mini.po | 21 -
po/tr.mini.po | 21 -
po/tw.mini.po | 19 -
po/{uk.mini.po => uk.po} | 534 +-
po/ur.mini.po | 21 -
po/{vi.mini.po => vi.po} | 193 +-
po/wba.mini.po | 19 -
po/yo.mini.po | 19 -
po/{zh_CN.mini.po => zh_CN.po} | 421 +-
po/zh_HK.mini.po | 19 -
po/{zh_TW.mini.po => zh_TW.po} | 9 +-
po/zu.mini.po | 21 -
scripts/minimize-po.py | 54 -
104 files changed, 48678 insertions(+), 10512 deletions(-)
create mode 100644 po/LINGUAS
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
rename po/{as.mini.po => as.po} (98%)
delete mode 100644 po/ast.mini.po
delete mode 100644 po/bal.mini.po
delete mode 100644 po/be.mini.po
rename po/{bg.mini.po => bg.po} (99%)
delete mode 100644 po/bn.mini.po
rename po/{bn_IN.mini.po => bn_IN.po} (98%)
delete mode 100644 po/bo.mini.po
delete mode 100644 po/br.mini.po
delete mode 100644 po/brx.mini.po
rename po/{bs.mini.po => bs.po} (99%)
rename po/{ca.mini.po => ca.po} (99%)
rename po/{cs.mini.po => cs.po} (98%)
delete mode 100644 po/cy.mini.po
rename po/{da.mini.po => da.po} (99%)
rename po/{de.mini.po => de.po} (97%)
delete mode 100644 po/de_CH.mini.po
rename po/{el.mini.po => el.po} (99%)
rename po/{en_GB.mini.po => en_GB.po} (97%)
delete mode 100644 po/eo.mini.po
rename po/{es.mini.po => es.po} (97%)
delete mode 100644 po/et.mini.po
delete mode 100644 po/eu.mini.po
delete mode 100644 po/fa.mini.po
rename po/{fi.mini.po => fi.po} (98%)
delete mode 100644 po/fil.mini.po
rename po/{fr.mini.po => fr.po} (98%)
delete mode 100644 po/fur.mini.po
delete mode 100644 po/ga.mini.po
delete mode 100644 po/gl.mini.po
rename po/{gu.mini.po => gu.po} (97%)
delete mode 100644 po/he.mini.po
rename po/{hi.mini.po => hi.po} (97%)
delete mode 100644 po/hr.mini.po
rename po/{hu.mini.po => hu.po} (99%)
delete mode 100644 po/ia.mini.po
rename po/{id.mini.po => id.po} (99%)
delete mode 100644 po/ilo.mini.po
delete mode 100644 po/is.mini.po
rename po/{it.mini.po => it.po} (96%)
rename po/{ja.mini.po => ja.po} (97%)
delete mode 100644 po/ka.mini.po
delete mode 100644 po/kk.mini.po
delete mode 100644 po/km.mini.po
rename po/{kn.mini.po => kn.po} (97%)
rename po/{ko.mini.po => ko.po} (97%)
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
create mode 100644 po/libvirt.pot
delete mode 100644 po/lt.mini.po
delete mode 100644 po/lv.mini.po
delete mode 100644 po/mai.mini.po
rename po/{mk.mini.po => mk.po} (99%)
rename po/{ml.mini.po => ml.po} (97%)
delete mode 100644 po/mn.mini.po
rename po/{mr.mini.po => mr.po} (98%)
rename po/{ms.mini.po => ms.po} (98%)
delete mode 100644 po/my.mini.po
rename po/{nb.mini.po => nb.po} (98%)
delete mode 100644 po/nds.mini.po
delete mode 100644 po/ne.mini.po
rename po/{nl.mini.po => nl.po} (97%)
delete mode 100644 po/nn.mini.po
delete mode 100644 po/nso.mini.po
rename po/{or.mini.po => or.po} (97%)
rename po/{pa.mini.po => pa.po} (97%)
rename po/{pl.mini.po => pl.po} (97%)
rename po/{pt.mini.po => pt.po} (99%)
rename po/{pt_BR.mini.po => pt_BR.po} (97%)
delete mode 100644 po/ro.mini.po
rename po/{ru.mini.po => ru.po} (98%)
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
rename po/{sr.mini.po => sr.po} (99%)
rename po/{sr(a)latin.mini.po => sr(a)latin.po} (99%)
rename po/{sv.mini.po => sv.po} (95%)
rename po/{ta.mini.po => ta.po} (98%)
rename po/{te.mini.po => te.po} (97%)
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
rename po/{uk.mini.po => uk.po} (98%)
delete mode 100644 po/ur.mini.po
rename po/{vi.mini.po => vi.po} (97%)
delete mode 100644 po/wba.mini.po
delete mode 100644 po/yo.mini.po
rename po/{zh_CN.mini.po => zh_CN.po} (98%)
delete mode 100644 po/zh_HK.mini.po
rename po/{zh_TW.mini.po => zh_TW.po} (99%)
delete mode 100644 po/zu.mini.po
delete mode 100755 scripts/minimize-po.py
--
2.26.2
4 years, 5 months
[libvirt PATCH 0/2] lxc: remove most use of libvirt allocation APIs
by Daniel P. Berrangé
This removes VIR_ALLOC / VIR_FREE and friends, but not
the VIR_*_ELEMENT API usage.
Daniel P. Berrangé (2):
lxc: replace VIR_FREE with g_autofree / g_free
lxc: replace VIR_ALLOC/REALLOC with g_new0/renew
src/lxc/lxc_cgroup.c | 15 +--
src/lxc/lxc_conf.c | 19 ++-
src/lxc/lxc_container.c | 262 ++++++++++++++-------------------------
src/lxc/lxc_controller.c | 148 ++++++++--------------
src/lxc/lxc_domain.c | 40 +++---
src/lxc/lxc_driver.c | 89 ++++++-------
src/lxc/lxc_fuse.c | 14 +--
src/lxc/lxc_fuse.h | 1 +
src/lxc/lxc_hostdev.c | 1 -
src/lxc/lxc_monitor.c | 9 +-
src/lxc/lxc_native.c | 81 ++++++------
src/lxc/lxc_process.c | 135 ++++++++------------
12 files changed, 306 insertions(+), 508 deletions(-)
--
2.24.1
4 years, 5 months
[libvirt PATCH 0/5] ci: Use GitLab container registry
by Andrea Bolognani
Branch: https://gitlab.com/abologna/libvirt/-/tree/ci-full-gitlab-registry
Pipeline: https://gitlab.com/abologna/libvirt/pipelines/150891361
This is what we're already doing with the subprojects we've migrated
to GitLab CI and, as of earlier today, all projects under the
libosinfo umbrella.
Once this is merged, we can stop publishing container images on Quay
and archive the libvirt-dockerfiles repository.
Patch 3/5 has been trimmed in order to comply with the size limits
of the mailing list. You can grab the unabridged version with
$ git fetch https://gitlab.com/abologna/libvirt ci-full-gitlab-registry
Andrea Bolognani (5):
ci: Use variables to build image names
ci: Add 'other' stage
ci: Use GitLab container registry
ci: Update build system integration
ci: Improve CI_IMAGE_TAG handling
.gitlab-ci.yml | 314 ++++++++++++++++--
ci/Makefile | 23 +-
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, 5054 insertions(+), 51 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 0/3] Rmove support of tftp storage protocol
by Han Han
Let's drop tftp support since it is ususabled before or after QEMU v2.8
[1].
[1]: https://bugzilla.redhat.com/show_bug.cgi?id=1372143
Han Han (3):
docs: Remove tftp protocol support from docs
src: Remove tftp network storage support
news: Remove support for tftp storage protocol
docs/formatdomain.html.in | 10 +---------
docs/news.xml | 11 +++++++++++
docs/schemas/domaincommon.rng | 1 -
src/libxl/libxl_conf.c | 1 -
src/libxl/xen_xl.c | 1 -
src/qemu/qemu_block.c | 3 ---
src/qemu/qemu_command.c | 1 -
src/qemu/qemu_domain.c | 11 -----------
src/qemu/qemu_driver.c | 3 ---
src/util/virstoragefile.c | 6 ------
src/util/virstoragefile.h | 1 -
11 files changed, 12 insertions(+), 37 deletions(-)
--
2.25.0
4 years, 5 months
[PATCH] qemu: hotplug: Fix the condition check for net->downscript
by Yi Wang
From: Liao Pingfang <liao.pingfang(a)zte.com.cn>
According to the context, here we are checking net->downscript's validity,
Signed-off-by: Liao Pingfang <liao.pingfang(a)zte.com.cn>
---
src/qemu/qemu_hotplug.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index d1a2be1..8c99dfc 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -4672,9 +4672,8 @@ qemuDomainRemoveNetDevice(virQEMUDriverPtr driver,
virDomainNetReleaseActualDevice(conn, vm->def, net);
else
VIR_WARN("Unable to release network device '%s'", NULLSTR(net->ifname));
- } else if (net->type == VIR_DOMAIN_NET_TYPE_ETHERNET) {
- if (net->script)
- virNetDevRunEthernetScript(net->ifname, net->downscript);
+ } else if (net->type == VIR_DOMAIN_NET_TYPE_ETHERNET && net->downscript) {
+ virNetDevRunEthernetScript(net->ifname, net->downscript);
}
virDomainNetDefFree(net);
return 0;
--
2.9.5
4 years, 5 months
[PATCH 0/6] Add Security Guest doc and check for capabilities cache validation
by Boris Fiuczynski
This series introduces the concept of a 'Secure Guest' feature
which covers on s390 IBM Secure Execution and on x86 AMD Secure
Encrypted Virtualization.
Besides adding documentation for IBM Secure Execution it also adds
checks during validation of the qemu capabilities cache.
These checks per architecture can be performed for IBM Secure
Execution on s390 and AMD Secure Encrypted Virtualization on AMD x86
CPUs (both checks implemented in this series).
For s390 the verification consists of:
- checking if /sys/firmware/uv is available: meaning the HW
facility is available and the host OS supports it;
- checking if the kernel cmdline contains 'prot_virt=1': meaning
the host OS wants to use the feature.
For AMD Secure Encrypted Virtualization the verification consists of:
- checking if /sys/module/kvm_amd/parameters/sev contains the
value '1': meaning SEV is enabled in the host kernel;
- checking if the kernel cmdline contains 'mem_encrypt=on': meaning
SME memory encryption feature on the host is enabled
Whenever the availability of the feature does not match the secure
guest flag in the cache then libvirt will re-build it in order to
pick up the new set of capabilities available.
Additionally, this series adds the same aforementioned checks to the
virt-host-validate tool to facilitate the manual verification
process for users.
Boris Fiuczynski (2):
tools: secure guest check on s390 in virt-host-validate
tools: secure guest check for AMD in virt-host-validate
Paulo de Rezende Pinatti (3):
util: introduce a parser for kernel cmdline arguments
qemu: check if s390 secure guest support is enabled
qemu: check if AMD secure guest support is enabled
Viktor Mihajlovski (1):
docs: Describe protected virtualization guest setup
docs/kbase.html.in | 3 +
docs/kbase/launch_security_sev.rst | 9 +-
docs/kbase/s390_protected_virt.rst | 189 +++++++++++++++++++++++++++++
src/libvirt_private.syms | 2 +
src/qemu/qemu_capabilities.c | 83 +++++++++++++
src/util/virutil.c | 173 ++++++++++++++++++++++++++
src/util/virutil.h | 18 +++
tests/utiltest.c | 130 ++++++++++++++++++++
tools/virt-host-validate-common.c | 90 +++++++++++++-
tools/virt-host-validate-common.h | 5 +
tools/virt-host-validate-qemu.c | 4 +
11 files changed, 701 insertions(+), 5 deletions(-)
create mode 100644 docs/kbase/s390_protected_virt.rst
--
2.25.1
4 years, 5 months
[PATCH v2] qemu: Skip pre-creation of NVMe disks
by Michal Privoznik
Upon migration with disks, libvirt determines if each disk exists
on the destination and tries to pre-create missing ones. Well,
NVMe disks can't be pre-created, but they can be checked for
presence.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1823639
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
Technically, this is a v2 of:
https://www.redhat.com/archives/libvir-list/2020-May/msg00253.html
but I've taken what I'm suggesting in a BZ comment and posting it as a
patch.
src/qemu/qemu_migration.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 02e8271e42..7ee5b5eda8 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -315,6 +315,7 @@ qemuMigrationDstPrecreateStorage(virDomainObjPtr vm,
for (i = 0; i < nbd->ndisks; i++) {
virDomainDiskDefPtr disk;
const char *diskSrcPath;
+ g_autofree char *nvmePath = NULL;
VIR_DEBUG("Looking up disk target '%s' (capacity=%llu)",
nbd->disks[i].target, nbd->disks[i].capacity);
@@ -326,7 +327,12 @@ qemuMigrationDstPrecreateStorage(virDomainObjPtr vm,
goto cleanup;
}
- diskSrcPath = virDomainDiskGetSource(disk);
+ if (disk->src->type == VIR_STORAGE_TYPE_NVME) {
+ virPCIDeviceAddressGetSysfsFile(&disk->src->nvme->pciAddr, &nvmePath);
+ diskSrcPath = nvmePath;
+ } else {
+ diskSrcPath = virDomainDiskGetSource(disk);
+ }
/* Skip disks we don't want to migrate and already existing disks. */
if (!qemuMigrationAnyCopyDisk(disk, nmigrate_disks, migrate_disks) ||
--
2.26.2
4 years, 5 months
[PATCH] news: Document 'netdev_add' regression and disk type='lun' changes
by Peter Krempa
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
docs/news.xml | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/docs/news.xml b/docs/news.xml
index 67fb85377d..104babbae7 100644
--- a/docs/news.xml
+++ b/docs/news.xml
@@ -46,8 +46,31 @@
<section title="New features">
</section>
<section title="Improvements">
+ <change>
+ <summary>
+ qemu: stricter validation for disk type='lun'
+ </summary>
+ <description>
+ The 'lun' type is meant for SCSI command passthrough, which can't be
+ achieved if qemu's block layer features are used. Disk type='lun' is now
+ allowed only when the format is 'raw' and no other block layer features
+ are requested.
+ </description>
+ </change>
</section>
<section title="Bug fixes">
+ <change>
+ <summary>
+ qemu: fixed regression in network device hotplug with new qemu versions
+ </summary>
+ <description>
+ Starting from QEMU-5.0 it's required to conform to strict schema when
+ hotplugging network devices. Libvirt didn't conform to the schema so
+ in versions prior to 6.4.0 network device hotplug fails in certain
+ cases. This version fixes it and adds stricter testing to prevent
+ further issues.
+ </description>
+ </change>
</section>
</release>
<release version="v6.3.0" date="2020-05-05">
--
2.26.2
4 years, 5 months
[GSoC'20]: Student Introduction
by PRAKHAR BANSAL
Hello Everyone,
I am Prakhar Bansal, Google Summer of Code Student from Iowa State
University, USA.
In the next few months, I will be working on the Project " Libvirt Support
For Jailhouse Hypervisor" under the guidance of my mentors Michal Privoznik
and Jan Kiszka.
This project aims to add support for Jailhouse( partitioning hypervisor
based on Linux) in the Libvirt API to make it easier to use this hypervisor
using the well known Libvirt API or through various applications using
Libvirt.
I am available on IRC with a nickname as prakhar.
Thanks,
Prakhar
4 years, 5 months