[PATCH 0/5] qemu: Fixes to firmware selection
by Andrea Bolognani
See [1] for the discussion motivating these changes.
[1] https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/U3...
Andrea Bolognani (5):
tests: Tweak descriptor for combined firmware
tests: Add firmware-auto-efi-sev-snp
qemu: Fix matching for stateless/combined firmware
qemu: Fix matching for read/write firmware
news: Update for firmware selection fixes
NEWS.rst | 6 +++
src/qemu/qemu_firmware.c | 39 +++++++++++++------
.../usr/share/qemu/firmware/90-combined.json | 4 +-
tests/qemufirmwaretest.c | 2 +-
...ware-auto-efi-rw-pflash.x86_64-latest.args | 36 +++++++++++++++++
...mware-auto-efi-rw-pflash.x86_64-latest.err | 1 -
...mware-auto-efi-rw-pflash.x86_64-latest.xml | 6 ++-
.../firmware-auto-efi-rw.x86_64-latest.args | 36 +++++++++++++++++
.../firmware-auto-efi-rw.x86_64-latest.err | 1 -
.../firmware-auto-efi-rw.x86_64-latest.xml | 6 ++-
...auto-efi-sev-snp.x86_64-latest+amdsev.args | 37 ++++++++++++++++++
...auto-efi-sev-snp.x86_64-latest+amdsev.xml} | 9 ++++-
.../firmware-auto-efi-sev-snp.xml | 20 ++++++++++
tests/qemuxmlconftest.c | 8 +++-
14 files changed, 190 insertions(+), 21 deletions(-)
create mode 100644 tests/qemuxmlconfdata/firmware-auto-efi-rw-pflash.x86_64-latest.args
delete mode 100644 tests/qemuxmlconfdata/firmware-auto-efi-rw-pflash.x86_64-latest.err
create mode 100644 tests/qemuxmlconfdata/firmware-auto-efi-rw.x86_64-latest.args
delete mode 100644 tests/qemuxmlconfdata/firmware-auto-efi-rw.x86_64-latest.err
create mode 100644 tests/qemuxmlconfdata/firmware-auto-efi-sev-snp.x86_64-latest+amdsev.args
copy tests/qemuxmlconfdata/{firmware-auto-efi-rw-pflash.x86_64-latest.xml => firmware-auto-efi-sev-snp.x86_64-latest+amdsev.xml} (76%)
create mode 100644 tests/qemuxmlconfdata/firmware-auto-efi-sev-snp.xml
--
2.50.1
5 hours, 37 minutes
[PATCH v2 0/2] Introduce hardware UUID (hwuuid) element
by Mark Cave-Ayland
Following on from the discussions at [1] and more recently [2], this series
introduces a new hardware UUID (hwuuid) element that allows an external
UUID to be provided to the guest, as opposed to the libvirt domain UUID.
The use case for this feature is to allow a domain to cloned and then
restarted without changing its guest-visible UUID e.g. via dmidecode.
Patch 1 introduces the new hardware UUID (hwuuid) element along with an
implementation for the QEMU driver, whilst patch 2 adds additional tests
to ensure the hwuuid functionality is working as expected.
Note that from reading the source it doesn't appear as if all virtualisation
platforms will support this feature: I've included the relevant changes for
the QEMU driver since that is what we use here at Nutanix.
Signed-off-by: Mark Cave-Ayland <mark.caveayland(a)nutanix.com>
[1] https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/YX...
[2] https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/HG...
v2:
- Rebase onto master
- Rework if() logic in virSysinfoSystemParseXML() in patch 1 as suggested by Daniel
- Add R-B tag from Daniel to patch 2
Mark Cave-Ayland (2):
conf: introduce hardware UUID (hwuuid) element
qemuxmlconftest: add tests for new hardware UUID (hwuuid) element
docs/formatdomain.rst | 7 +++
src/conf/domain_conf.c | 43 ++++++++++++++++---
src/conf/domain_conf.h | 1 +
src/conf/schemas/domaincommon.rng | 5 +++
src/qemu/qemu_command.c | 6 ++-
...hwuuid-smbios-uuid-match.x86_64-latest.err | 1 +
.../hwuuid-smbios-uuid-match.xml | 36 ++++++++++++++++
.../qemuxmlconfdata/hwuuid.x86_64-latest.args | 35 +++++++++++++++
.../qemuxmlconfdata/hwuuid.x86_64-latest.xml | 41 ++++++++++++++++++
tests/qemuxmlconfdata/hwuuid.xml | 30 +++++++++++++
tests/qemuxmlconftest.c | 3 ++
11 files changed, 202 insertions(+), 6 deletions(-)
create mode 100644 tests/qemuxmlconfdata/hwuuid-smbios-uuid-match.x86_64-latest.err
create mode 100644 tests/qemuxmlconfdata/hwuuid-smbios-uuid-match.xml
create mode 100644 tests/qemuxmlconfdata/hwuuid.x86_64-latest.args
create mode 100644 tests/qemuxmlconfdata/hwuuid.x86_64-latest.xml
create mode 100644 tests/qemuxmlconfdata/hwuuid.xml
--
2.43.0
5 hours, 47 minutes
Release of libvirt-11.6.0
by Jiri Denemark
The 11.6.0 release of both libvirt and libvirt-python is tagged and
signed tarballs are available at
https://download.libvirt.org/
https://download.libvirt.org/python/
Thanks everybody who helped with this release by sending patches,
reviewing, testing, or providing feedback. Your work is greatly
appreciated.
* New features
* Introduce VIR_CONNECT_BASELINE_CPU_IGNORE_HOST flag
This new flag for virConnectBaselineHypervisorCPU can be used for computing
a baseline CPU on any host. Without the VIR_CONNECT_BASELINE_CPU_IGNORE_HOST
flag the baseline API would return reasonable output only when run on one of
the hosts that the input CPU definitions were collected from.
* Allow control over QEMU TLS priority strings
The qemu.conf file now has multiple settings allowing control over the
QEMU TLS priority strings, for the different subsystems in QEMU that
can support TLS. This can be used to workaround a current bug in GNUTLS
that is liable to cause crashes of the source QEMU when performing long
running live migration operations with TLS enabled.
* Add support for disabling deprecated CPU model features by default for s390 domains
Starting an s390 domain with host-model will now default to setting the
``deprecated_features`` attribute to ``off``, ensuring the domain starts
with a migration-compatible CPU model to newer systems. This behavior can
be modified by setting the ``default_cpu_deprecated_features`` option in
the qemu.conf file.
* bhyve: Add TCP console support
TCP serial devices can now be configured with ``<serial type='tcp'>``::
<serial type='tcp'>
<source mode='bind' host='127.0.0.1' service='12345'/>
<target type='serial' port='0'/>
</serial>
Additionally, number of supported consoles increased to 4.
* qemu: Add support for RBD namespaces
Allow specifying the 'namespace' within a RBD image pool.
* Improvements
* qemu: Change default SCSI controller model to ``virtio-scsi`` for ARM and RISC-V
The previous default of ``lsilogic`` is unsupported by modern operating
systems. ``virtio-scsi`` is a more suitable default for ARM and RISC-V
``virt`` machine types.
* Clarify documentation of virConnectBaselineHypervisorCPU
The documentation makes it clear virConnectBaselineHypervisorCPU is
supposed to be called on one of the hosts represented in the input CPU
definitions. Otherwise the API will give unexpected results.
* Allow specifying zero discard granularity for block devices
This can be used to tell some guest operating systems (notably Windows) to
not trim the disk.
* bhyve: Add timeout handling for bhyveload
It is now possible to run ``bhyveload`` with the ``timeout`` tool, which
can send ``SIGTERM`` and ``SIGKILL`` signals when timeout is reached.
Timeout values are set using the ``bhyveload_timeout`` and
``bhyveload_timeout_kill`` configuration options in ``bhyve.conf``.
* nss: Improve debugging
Debugging messages from NSS modules can be now enabled by setting the
``LIBVIRT_NSS_DEBUG`` environment variable. So far, there is no special
meaning to its value.
* rpc: Removed requirement for TLS certificates to support 'key encipherment'
With TLS 1.3, key encipherment is not required even for RSA keys. Other key
types didn't even support it so they were wrongly refused even in cases when
they would work with libvirt. The TLS certificate validation now no longer
requires 'key encipherment' to be enabled.
* Bug fixes
* bhyve: Fix resetting of the autostart flag of the domain on destroy.
* The nwfilter driver no longer recreates the base iptable/ip6tables chains
The nwfilter driver had a impl mistake causing it to recreate the
base chains for iptables/ip6tables every time a VM was started.
This allowed a small window where traffic might not be fully
filtered. It now handles iptables/ip6tables the same way as
ebtables, creating the base chains only if they did not already
exist.
* Fix systemd unit ordering for auto-shutdown of domains via the daemon
The ordering of systemd units created by libvirt for individual machines
needed to be adapted when the shutdown of VMs on host shutdown is done
via the virt daemon itself (rather than ``libvirt-guests.service``) to
ensure that the VMs are not terminated before the virt daemon can deal with
them.
Enjoy.
Jirka
14 hours, 7 minutes
[PATCH] conf: add support for 'edid' attribute to video model
by Mark Cave-Ayland
Add the ability to enable/disable exposing the EDID information to the guest.
This allows migration from legacy machine types that have EDID disabled to a
newer machine type without any change becoming visible to the guest.
The edid attribute can specified in the domain XML as below:
<video>
<model type='virtio' edid='off'/>
</video>
If the edid attribute is unspecified, it is not generated so that the
virtualisation platform will continue to use its default.
The edid attribute is only valid for the vga, boch and virtio display models
and is currently only implemented for the QEMU driver.
Signed-off-by: Mark Cave-Ayland <mark.caveayland(a)nutanix.com>
---
docs/formatdomain.rst | 8 ++++++++
src/conf/domain_conf.c | 5 +++++
src/conf/domain_conf.h | 1 +
src/conf/domain_validate.c | 11 +++++++++++
src/conf/schemas/domaincommon.rng | 5 +++++
src/qemu/qemu_command.c | 7 +++++++
6 files changed, 37 insertions(+)
diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
index 976746e292..7fe8b03a56 100644
--- a/docs/formatdomain.rst
+++ b/docs/formatdomain.rst
@@ -7103,6 +7103,14 @@ A video device.
sub-element is valid for model types "vga", "qxl", "bochs", "gop",
and "virtio".
+ :since:`Since 11.7.0` (QEMU driver only), the ``model`` element may have an
+ optional ``edid`` attribute that can be set to "on" or "off". If the ``edid``
+ attribute is not specified then the device will use its default value.
+ Otherwise setting ``edid`` to "on" will expose the device EDID blob to the
+ guest, whilst setting it to "off" will hide the device EDID blob from the
+ guest. The ``edid`` attribute is only valid for model types "vga", "bochs",
+ and "virtio".
+
``acceleration``
Configure if video acceleration should be enabled.
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 59958c2f08..10cc6d7432 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -13535,6 +13535,9 @@ virDomainVideoModelDefParseXML(virDomainVideoDef *def,
if (virXMLPropTristateSwitch(node, "blob", VIR_XML_PROP_NONE, &def->blob) < 0)
return -1;
+ if (virXMLPropTristateSwitch(node, "edid", VIR_XML_PROP_NONE, &def->edid) < 0)
+ return -1;
+
return 0;
}
@@ -26629,6 +26632,8 @@ virDomainVideoDefFormat(virBuffer *buf,
virBufferAddLit(buf, " primary='yes'");
if (def->blob != VIR_TRISTATE_SWITCH_ABSENT)
virBufferAsprintf(buf, " blob='%s'", virTristateSwitchTypeToString(def->blob));
+ if (def->edid != VIR_TRISTATE_SWITCH_ABSENT)
+ virBufferAsprintf(buf, " edid='%s'", virTristateSwitchTypeToString(def->edid));
if (def->accel || def->res) {
virBufferAddLit(buf, ">\n");
virBufferAdjustIndent(buf, 2);
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 596d138973..425ccfa97c 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -1895,6 +1895,7 @@ struct _virDomainVideoDef {
virDomainDeviceInfo info;
virDomainVirtioOptions *virtio;
virDomainVideoBackendType backend;
+ virTristateSwitch edid;
};
/* graphics console modes */
diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c
index 40edecef83..60a2e46b7e 100644
--- a/src/conf/domain_validate.c
+++ b/src/conf/domain_validate.c
@@ -231,6 +231,17 @@ virDomainVideoDefValidate(const virDomainVideoDef *video,
}
}
+ if ((video->type != VIR_DOMAIN_VIDEO_TYPE_BOCHS) &&
+ (video->type != VIR_DOMAIN_VIDEO_TYPE_VGA) &&
+ (video->type != VIR_DOMAIN_VIDEO_TYPE_VIRTIO)) {
+ if (video->edid != VIR_TRISTATE_SWITCH_ABSENT) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("video type '%1$s' does not support edid"),
+ virDomainVideoTypeToString(video->type));
+ return -1;
+ }
+ }
+
return 0;
}
diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincommon.rng
index a714c3fcc5..d84f20637c 100644
--- a/src/conf/schemas/domaincommon.rng
+++ b/src/conf/schemas/domaincommon.rng
@@ -4807,6 +4807,11 @@
<ref name="virOnOff"/>
</attribute>
</optional>
+ <optional>
+ <attribute name="edid">
+ <ref name="virOnOff"/>
+ </attribute>
+ </optional>
<optional>
<element name="acceleration">
<optional>
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 457dee7029..db00f9b173 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -4739,6 +4739,13 @@ qemuBuildDeviceVideoCmd(virCommand *cmd,
return -1;
}
+ if ((video->type == VIR_DOMAIN_VIDEO_TYPE_BOCHS) ||
+ (video->type == VIR_DOMAIN_VIDEO_TYPE_VGA) ||
+ (video->type == VIR_DOMAIN_VIDEO_TYPE_VIRTIO)) {
+ if (virJSONValueObjectAdd(&props, "T:edid", video->edid, NULL) < 0)
+ return -1;
+ }
+
if (video->res) {
if (virJSONValueObjectAdd(&props,
"p:xres", video->res->x,
--
2.43.0
14 hours, 56 minutes