]> git.ipfire.org Git - thirdparty/libvirt.git/log
thirdparty/libvirt.git
2 weeks agotests: qemuxmlconftest: Add case for hyperv domains
Praveen K Paladugu [Fri, 7 Nov 2025 20:14:00 +0000 (14:14 -0600)] 
tests: qemuxmlconftest: Add case for hyperv domains

Add qemuxmlconftest test for hyperv domains.

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2 weeks agotests: qemucapabilities: Introduce MSHV capability
Praveen K Paladugu [Fri, 7 Nov 2025 20:13:59 +0000 (14:13 -0600)] 
tests: qemucapabilities: Introduce MSHV capability

Add case to test libvirt's parsing of MSHV capability.

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2 weeks agotests: Add domaincaps case for mshv
Praveen K Paladugu [Fri, 7 Nov 2025 20:13:58 +0000 (14:13 -0600)] 
tests: Add domaincaps case for mshv

Add domaincaps tests data for mshv capability

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2 weeks agoconf: Fix virttype handling in schemas
Praveen K Paladugu [Fri, 7 Nov 2025 20:13:57 +0000 (14:13 -0600)] 
conf: Fix virttype handling in schemas

Create a common `virttype` definition in basictypes.rng and reuse it
to enumerate all virt types. This change eliminates the need to duplicate
virttypes in multiple locations.

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2 weeks agoqemu: conditionally add /dev/mshv to acl
Praveen K Paladugu [Fri, 7 Nov 2025 20:13:56 +0000 (14:13 -0600)] 
qemu: conditionally add /dev/mshv to acl

Conditionally add /dev/mshv device to acl while launching
hyperv domains.

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2 weeks agoqemu: use mshv accel for hyperv domains
Praveen K Paladugu [Fri, 7 Nov 2025 20:13:55 +0000 (14:13 -0600)] 
qemu: use mshv accel for hyperv domains

Add mshv acceleration (-accel mshv) flag while launching hyperv domains.

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2 weeks agoqemu: Append mshv to hwaccel list.
Eugene Fedorenko [Fri, 7 Nov 2025 20:13:54 +0000 (14:13 -0600)] 
qemu: Append mshv to hwaccel list.

Append mshv to the default list of hwaccel to use be used by qemu.

Signed-off-by: Eugene Fedorenko <eugene.fedor@gmail.com>
Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2 weeks agoqemu: Query and use mshv capabilities
Praveen K Paladugu [Fri, 7 Nov 2025 20:13:53 +0000 (14:13 -0600)] 
qemu: Query and use mshv capabilities

Qemu with mshv capabilities can launch VIR_DOMAIN_VIRT_HYPERV domains.

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2 weeks agoqemu: Introduce mshv capabilities
Praveen K Paladugu [Fri, 7 Nov 2025 20:13:52 +0000 (14:13 -0600)] 
qemu: Introduce mshv capabilities

This capability indicates if qemu supports mshv as an accelerator. Qemu
with mshv capabilities can launch domains of type VIR_DOMAIN_VIRT_HYPERV.

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2 weeks agoqemu: only allow enabling deprecated features that are supported
Collin Walling [Thu, 20 Nov 2025 22:34:43 +0000 (17:34 -0500)] 
qemu: only allow enabling deprecated features that are supported

When updating the guest CPU model and the deprecated_features attribute
is set to on, only enable the features the model can actually enable.

While host-model would normally just enable these features without
intervention (and without the presence of the deprecated_features
attribute), custom models would see no changes to their feature set
without these changes.

This is useful for e.g. testing CPU models.

Fixes: f279ea36 (qemu: process: refactor deprecated features code)
Signed-off-by: Collin Walling <walling@linux.ibm.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2 weeks agoqemu: query and cache static/host deprecated features
Collin Walling [Thu, 20 Nov 2025 22:34:42 +0000 (17:34 -0500)] 
qemu: query and cache static/host deprecated features

When performing a static CPU model expansion, the reported list of
deprecated features will reflect the features which are currently
enabled on the CPU model.

Retrieve this subset and store them as static deprecated properties for
the model info, and as host deprecated features in the cache.

Note that this list may exclude items that are shown in the
<deprecatedFeatures> list, as some feature support has been dropped by
hardware (e.g. csske).

Signed-off-by: Collin Walling <walling@linux.ibm.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2 weeks agoqemu: refactor load/format of deprecated features
Collin Walling [Thu, 20 Nov 2025 22:34:41 +0000 (17:34 -0500)] 
qemu: refactor load/format of deprecated features

Signed-off-by: Collin Walling <walling@linux.ibm.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2 weeks agoqemu: rename modelinfo's deprecated_props to full_dep_props
Collin Walling [Thu, 20 Nov 2025 22:34:40 +0000 (17:34 -0500)] 
qemu: rename modelinfo's deprecated_props to full_dep_props

The current query of deprecated properties is the result of a full model
expansion.  Rename the field to reflect this.

Signed-off-by: Collin Walling <walling@linux.ibm.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2 weeks agotests: Don't link vmx2xmltest with esx_lib
Michal Privoznik [Fri, 21 Nov 2025 13:54:27 +0000 (14:54 +0100)] 
tests: Don't link vmx2xmltest with esx_lib

When reworking the vmx2xmltest to call esxParseVMXFileName() from
the ESX driver I also made the test link with the driver
statically. But the function then calls some other functions
which are mocked in vmx2xmlmock. Now, on many systems this works
just fine as the dynamic linker finds the mocked functions first.
But on Fedora 41 and Fedora 42 the dynamic linker resolves the
symbols to those from statically linked library rendering our
mock ineffective.

Just don't link in the esx_lib.

Fixes: f82d30307da8bea396a32dcab2ba9be5c3236b7c
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 weeks agoEdit apps.rst to add Apache CloudStack in the IaaS section.
Nux [Fri, 14 Nov 2025 16:16:02 +0000 (16:16 +0000)] 
Edit apps.rst to add Apache CloudStack in the IaaS section.

Add Apache CloudStack to the docs/apps.rst file, IaaS section.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Nux <nux@li.nux.ro>
2 weeks agoqemu: Remove redundant kvm group config in sysusers.d
Achill Gilgenast via Devel [Sat, 15 Nov 2025 11:19:11 +0000 (12:19 +0100)] 
qemu: Remove redundant kvm group config in sysusers.d

It's already defined by default in systemd:
https://github.com/systemd/systemd/blob/v257.6/sysusers.d/basic.conf.in#L32

Adding it again here in libvirt-qemu.sysusers.conf causes the following
warning by validating it with sd-sysuers:

/usr/lib/sysusers.d/libvirt-qemu.conf:1: Conflict with earlier configuration for group 'kvm' in /usr/lib/sysusers.d/basic.conf:32, ignoring line.

On Fedora/RHEL systemd is built with -Dkvm-gid=36 so there is no change
in the allocated GID on these platforms. Other platforms have the same
facility available to them if they wish to retain a fixed GID.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Achill Gilgenast <achill@achill.org>
2 weeks agocputest: Skip test for Intel(R) Xeon(R) 6788P CPU when QEMU driver is disabled
Jaroslav Suchanek [Fri, 21 Nov 2025 12:24:47 +0000 (13:24 +0100)] 
cputest: Skip test for Intel(R) Xeon(R) 6788P CPU when QEMU driver is disabled

Commit 034f02d25cd8de8c7875d7b12e762df4809a8418 added new test for the
Intel(R) Xeon(R) 6788P cpu model. The test depends on QEMU driver. If
the driver is not available, then skip it. Similarly as in commit
c22b73411732b9a135923c19b7784c7c48729042.

Signed-off-by: Jaroslav Suchanek <jsuchane@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2 weeks agotests: skip vmx tests when ESX is disabled
Daniel P. Berrangé [Fri, 21 Nov 2025 11:38:07 +0000 (11:38 +0000)] 
tests: skip vmx tests when ESX is disabled

Since the recent change:

  commit f82d30307da8bea396a32dcab2ba9be5c3236b7c
  Author: Michal Prívozník <mprivozn@redhat.com>
  Date:   Fri Nov 14 10:35:14 2025 +0100

    vmx2xmltest: Drop custom file name parse function

The VMX parsing uses the esxParseVMXFileName() function in
the ESX library. This is unavailable when the ESX driver is
disabled, so the tests must be skipped too.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2 weeks agobuild: drop userfaultfd_sysctl option
Ján Tomko [Wed, 19 Nov 2025 11:00:12 +0000 (12:00 +0100)] 
build: drop userfaultfd_sysctl option

Since e2bc742fcc64da4c8370a71b65fd8c01ff3f9d41 we do not
install it on RHEL nor Fedora.

OpenSUSE is also new enough that it disables the installation.
On Debian, sysctl files are only installed as an example.

Remove the option and delete the file.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2 weeks agotests: qemuxmlconfdata: provide device-pluggable smmuv3 sample XML and CLI args
Nathan Chen [Thu, 20 Nov 2025 01:42:43 +0000 (17:42 -0800)] 
tests: qemuxmlconfdata: provide device-pluggable smmuv3 sample XML and CLI args

Provide sample XML and CLI args for the device-pluggable smmuv3
XML schema for virt machine type.

Signed-off-by: Nathan Chen <nathanc@nvidia.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 weeks agoqemu: Implement pluggable-device smmuv3
Nathan Chen [Thu, 20 Nov 2025 01:42:41 +0000 (17:42 -0800)] 
qemu: Implement pluggable-device smmuv3

Introduce support for "pciBus" driver attribute for
"smmuv3" IOMMU model. The "pciBus" attribute indicates
the index of the controller that a smmuv3 IOMMU device
is attached to, and differentiates the device-pluggable
arm-smmuv3 model from the virt-machine-associated smmuv3
model.

Signed-off-by: Nathan Chen <nathanc@nvidia.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 weeks agoconf: Support multiple device-pluggable smmuv3 IOMMUs
Nathan Chen [Thu, 20 Nov 2025 01:42:40 +0000 (17:42 -0800)] 
conf: Support multiple device-pluggable smmuv3 IOMMUs

Add support for parsing multiple IOMMU devices from
the VM definition when "smmuv3" is the IOMMU model.

Signed-off-by: Nathan Chen <nathanc@nvidia.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 weeks agoqemu: Format IOMMU devices after controllers
Nathan Chen [Thu, 20 Nov 2025 01:42:42 +0000 (17:42 -0800)] 
qemu: Format IOMMU devices after controllers

Format qemu arguments for IOMMU devices after
controllers as the multi-SMMUv3 model associates
SMMUv3 devices with hostdevs by plugging them
into the same controller upstream.

Signed-off-by: Nathan Chen <nathanc@nvidia.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 weeks agoqemu: make qemuBuildDeviceAddressPCIGetBus more generic
Ján Tomko [Thu, 20 Nov 2025 14:15:38 +0000 (15:15 +0100)] 
qemu: make qemuBuildDeviceAddressPCIGetBus more generic

Operate on a virPCIDeviceAddress, not virDomainDeviceInfo
so that this can be reused to look for buses that are not
stored in the device info.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2 weeks agobhyve: support VNC 'wait' attribute
Roman Bogorodskiy [Tue, 18 Nov 2025 18:01:52 +0000 (19:01 +0100)] 
bhyve: support VNC 'wait' attribute

Bhyve supports the 'wait' option for the VNC device configuration.
When enabled, VM boots only upon a VNC connection.

Sample device configuration looks like this:

 -s 29,fbuf,tcp=0.0.0.0:5900,w=800,h=600,wait

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2 weeks agoconf: introduce 'wait' attribute for VNC
Roman Bogorodskiy [Tue, 18 Nov 2025 17:58:17 +0000 (18:58 +0100)] 
conf: introduce 'wait' attribute for VNC

Introduce an optional 'wait' attribute for 'VNC'.
When set to 'yes', VM should only boot upon the initiation of a VNC
connection.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2 weeks agotools: inform user which hardware virt was found during validation
Daniel P. Berrangé [Thu, 20 Nov 2025 09:50:29 +0000 (04:50 -0500)] 
tools: inform user which hardware virt was found during validation

On x86 we can indicate VMX or SVM, while s390x would be SIE, and
PowerPC would be LCPR (Logical Partitioning Control Register).

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2 weeks agotools: be explicit about failure to find x86 secure virt
Daniel P. Berrangé [Thu, 20 Nov 2025 09:42:35 +0000 (04:42 -0500)] 
tools: be explicit about failure to find x86 secure virt

If we fail to find either SEV or TDX on x86, we can explicitly
say there is no secure guest support on the platform.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2 weeks agotools: inform user which CVM is found during validation
Daniel P. Berrangé [Thu, 20 Nov 2025 09:36:58 +0000 (04:36 -0500)] 
tools: inform user which CVM is found during validation

For AMD, the virt-host-validate 'secure guest' check reports
support for SEV, and there are then further check results
printed for SEV-ES/SEV-SNP which are overly verbose and the
long lines break output alignment.

This uses the new ability to report details with PASS results
to concisely tell the user which out of SEV/SEV-ES/SEV-SNP
are found. Only a single answer is neede, as SEV-SNP implies
SEV & SEV-ES, and SEV-ES implies SEV.

The TDX s390x PROT-VIRT checks also identify themselves.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2 weeks agotools: inform user which IOMMU was found during validation
Daniel P. Berrangé [Thu, 20 Nov 2025 09:32:38 +0000 (04:32 -0500)] 
tools: inform user which IOMMU was found during validation

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2 weeks agotools: allow passing details for passed validation tests
Daniel P. Berrangé [Thu, 20 Nov 2025 09:30:31 +0000 (04:30 -0500)] 
tools: allow passing details for passed validation tests

In a number of virt-host-validte tests we are testing for
at least one out of multiple acceptable features. For
example the 'secure guest' test can be satisfied by
s390x protvirt, or x86 TDX, SEV, SEV-ES, SEV-SNP.

It would be useful to inform the user which one we detected
when the test passes. This introduces virValidatePassDetails
to enable that.

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2 weeks agovmx2xmltest: Add a test case for disks in subfolder
Michal Privoznik [Wed, 12 Nov 2025 14:55:54 +0000 (15:55 +0100)] 
vmx2xmltest: Add a test case for disks in subfolder

This test case demonstrates correctness of the previous fix.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2 weeks agoesx: Allow disk images in subdirectories
Michal Privoznik [Wed, 19 Nov 2025 13:28:11 +0000 (14:28 +0100)] 
esx: Allow disk images in subdirectories

The esxParseVMXFileName() function parses path to a disk image
trying to replace some "known" patterns (e.g. datastore paths).
A simple filename is treated as a path relative to .vmx file. But
disk images (and thus filenames) can be in a subdirectory,
relative to the .vmx file. For instance:

  subfolder/disk.vmdk

Adapt our parser to this fact.

Resolves: https://issues.redhat.com/browse/RHEL-122751
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2 weeks agovmx2xmltest: Drop custom file name parse function
Michal Privoznik [Fri, 14 Nov 2025 09:35:14 +0000 (10:35 +0100)] 
vmx2xmltest: Drop custom file name parse function

Having a custom file name parsing function in vmx2xml that's
different to the one used in production (esxParseVMXFileName())
might have served us well, but it also defeats the point of
having a unit test. More specifically, if there's a bug in
esxParseVMXFileName() then our unit test would not catch it.

But now that we have vmx2xmlmock the custom parsing function can
be dropped and the test can use the real one.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2 weeks agotests: Introduce vmx2xmlmock
Michal Privoznik [Wed, 19 Nov 2025 11:50:49 +0000 (12:50 +0100)] 
tests: Introduce vmx2xmlmock

If we want vmx2xmltest to use actual file name parser that's used
in production (esxParseVMXFileName()) we need a mock to stop it
from doing any HTTP requests and also to return predictable data.

So far, the function can call three functions that do HTTP
requests: esxVI_LookupDatastoreList(),
esxVI_LookupDatastoreHostMount() and
esxVI_LookupDatastoreByName().

Mock all three of them. And since their implementation uses some
other symbols (like allocators or _AppendToList() helpers) we
need to expose these symbols too.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2 weeks agoesx: Make esxVI_LookupDatastoreByName() mockable
Michal Privoznik [Wed, 19 Nov 2025 11:57:46 +0000 (12:57 +0100)] 
esx: Make esxVI_LookupDatastoreByName() mockable

This function is going to be mocked soon. Annotate and export it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2 weeks agoesx: Make esxVI_LookupDatastoreHostMount() mockable
Michal Privoznik [Wed, 19 Nov 2025 11:50:34 +0000 (12:50 +0100)] 
esx: Make esxVI_LookupDatastoreHostMount() mockable

This function is going to be mocked soon. Annotate and export it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2 weeks agoesx: Make esxVI_LookupDatastoreList() mockable
Michal Privoznik [Fri, 14 Nov 2025 09:34:59 +0000 (10:34 +0100)] 
esx: Make esxVI_LookupDatastoreList() mockable

This function is going to be mocked soon. Annotate and export it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2 weeks agoesx: Expose esxParseVMXFileName() for tests
Michal Privoznik [Thu, 13 Nov 2025 09:34:26 +0000 (10:34 +0100)] 
esx: Expose esxParseVMXFileName() for tests

So far, our vmx2xmltest uses a custom .parseFileName callback.
And it kind of makes sense because the one that's used in
production (esxParseVMXFileName()) does some HTTP requests which
we don't want to do in our test suite. But this creates other
sorts of problems and the idea is to have the test ditch custom
parse callback and stick with the production one. But for now,
just expose it. With it, the esxVMX_Data struct is exposed too as
it is passed into the function (via 'opaque' argument).

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2 weeks agolibvirt_esx.syms: Put proper header file name into comment
Michal Privoznik [Fri, 14 Nov 2025 13:07:56 +0000 (14:07 +0100)] 
libvirt_esx.syms: Put proper header file name into comment

The esxVI_DateTime_ConvertToCalendarTime() symbol is declared in
esx_vi_types.h header file. Reflect this in the corresponding
.syms file.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2 weeks agodocs: domain: add watchdog notification support
Massimiliano Minella [Fri, 3 Oct 2025 09:06:16 +0000 (11:06 +0200)] 
docs: domain: add watchdog notification support

Since v0.8.0 a watchdog notification is available under event ID
VIR_DOMAIN_EVENT_ID_WATCHDOG, update the documentation to remove the
previous limitation.

Signed-off-by: Massimiliano Minella <massimiliano.minella@se.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
2 weeks agoqemuDomainPrepareDiskSourceData: Setup 'detect_zeroes' for all layers
Peter Krempa [Fri, 14 Nov 2025 15:05:06 +0000 (16:05 +0100)] 
qemuDomainPrepareDiskSourceData: Setup 'detect_zeroes' for all layers

While it may seem that zero detection is pointless for backing chain
layers other than the top one, which is usually the only one gettin
written to,  with block operations such as active-layer commit the
non-top layer may become active, in which case the VM wouldn't be
configured in accordance to the XML any more.

Similarly with snapshots a new image is introduced which would not get
zero detection enabled, but next start of the VM would enable it.

Fix this by propagating the zero detection setting for all layers.

This problem partially addresses one of the issues reported in
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1120389

Fixes: 8a78f88a1a6 and a522c3044bd (effectively reverts them)
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2 weeks agoqemuxmlconftest: Improve coverage of 'disk-detect-zeroes' test case
Peter Krempa [Fri, 14 Nov 2025 15:13:55 +0000 (16:13 +0100)] 
qemuxmlconftest: Improve coverage of 'disk-detect-zeroes' test case

Add test cases for all three options 'off'/'on'/'unmap' as well as add
backing store for each image to show how the configuration behaves.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
3 weeks agoselinux: Mark anything using content_context as shared
Cole Robinson [Tue, 11 Nov 2025 16:52:00 +0000 (11:52 -0500)] 
selinux: Mark anything using content_context as shared

This marks kernel, initrd, dtb, and similar elements with is_shared,
meaning we skip label restore if xattr label remembering is not
enabled or supported (like on qemu:///session).

non-xattr based label restore is subject to race conditions if
multiple VMs are starting and stopping using shared media:
https://issues.redhat.com/browse/RHEL-126945

This converts every case that is using content_context (virt_content_t)
as SetFileLabel time, which is how we are marking content as
readonly. All the shareable cases (marked with file_context) are
already skipping remembering/label restore entirely.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
3 weeks agoselinux: Add is_shared plumbing to RestoreFileLabel
Cole Robinson [Tue, 11 Nov 2025 14:21:17 +0000 (09:21 -0500)] 
selinux: Add is_shared plumbing to RestoreFileLabel

If set, we will skip fallback label restore attempts, if label
remembering fails or isn't supported.

This is a no-op, as every caller passes in `false` which matches
existing behavior. Next patch will make use of it

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
3 weeks agoselinux: Don't remember labels for shareable SCSI devices
Cole Robinson [Tue, 11 Nov 2025 16:50:06 +0000 (11:50 -0500)] 
selinux: Don't remember labels for shareable SCSI devices

For shareable/readonly devices, label restore is skipped entirely in
virSecuritySELinuxRestoreSCSILabel. So requesting remember=true here
doesn't accomplish anything

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
3 weeks agoselinux: Match remember/recall arguments for SavedStateLabel
Cole Robinson [Tue, 11 Nov 2025 14:10:03 +0000 (09:10 -0500)] 
selinux: Match remember/recall arguments for SavedStateLabel

virSecuritySELinuxSetSavedStateLabel uses remember=false, but
virSecuritySELinuxRestoreSavedStateLabel uses recall=true.

This doesn't cause problems in practice, just some redundant xattr
calls. But Set and Restore calls should be matched here.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
3 weeks agobhyve: s/provconn/privcon/
Michal Privoznik [Thu, 13 Nov 2025 08:06:43 +0000 (09:06 +0100)] 
bhyve: s/provconn/privcon/

Due to a typo, the bhyve driver doesn't compile. Fix it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
3 weeks agoqemu: snapshot: Set umask for 'qemu-img' when creating external inactive snapshots CVE-2025-13193
Peter Krempa [Wed, 12 Nov 2025 16:52:05 +0000 (17:52 +0100)] 
qemu: snapshot: Set umask for 'qemu-img' when creating external inactive snapshots

External inactive snapshots are created by invoking 'qemu-img' which
creates the file. Currently qemu-img creates image with mode 644 based
on default umask as libvirt doesn't set any.

Having a world-readable image is obviously wrong so set the umask to
077 to have the file readable only by the owner.

Resolves: https://bugs.debian.org/1120119
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
3 weeks agoqemu: Check ACLs before parsing the whole domain XML CVE-2025-12748
Martin Kletzander [Thu, 6 Nov 2025 13:33:41 +0000 (14:33 +0100)] 
qemu: Check ACLs before parsing the whole domain XML

Utilise the new virDomainDefIDsParseString() for that.

This is one of the more complex ones since there is also a function that
reads relevant metadata from a save image XML.  In order _not_ to extract
the parsing out of the function (and make the function basically trivial
and all callers more complex) add a callback to the function which will
be used to check the ACLs.

Fixes: CVE-2025-12748
Reported-by: Святослав Терешин <s.tereshin@fobos-nt.ru>
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 weeks agoch: Check ACLs before parsing the whole domain XML
Martin Kletzander [Thu, 6 Nov 2025 15:23:30 +0000 (16:23 +0100)] 
ch: Check ACLs before parsing the whole domain XML

Utilise the new virDomainDefIDsParseString() for that.

This is one of the more complex ones since there is also a function that
reads relevant metadata from a save image XML.  In order not to extract
the parsing out of the function (and make the function basically trivial
and all callers more complex) add a callback to the function which will
be used to check the ACLs.  And since this function is called in APIs
that perform ACL checks both with and without flags, add two of them for
good measure.

Fixes: CVE-2025-12748
Reported-by: Святослав Терешин <s.tereshin@fobos-nt.ru>
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 weeks agovz: Check ACLs before parsing the whole domain XML
Martin Kletzander [Thu, 6 Nov 2025 15:03:26 +0000 (16:03 +0100)] 
vz: Check ACLs before parsing the whole domain XML

Utilise the new virDomainDefIDsParseString() for that.

Fixes: CVE-2025-12748
Reported-by: Святослав Терешин <s.tereshin@fobos-nt.ru>
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 weeks agolxc: Check ACLs before parsing the whole domain XML
Martin Kletzander [Thu, 6 Nov 2025 14:49:01 +0000 (15:49 +0100)] 
lxc: Check ACLs before parsing the whole domain XML

Utilise the new virDomainDefIDsParseString() for that.

Fixes: CVE-2025-12748
Reported-by: Святослав Терешин <s.tereshin@fobos-nt.ru>
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 weeks agolibxl: Check ACLs before parsing the whole domain XML
Martin Kletzander [Thu, 6 Nov 2025 14:43:57 +0000 (15:43 +0100)] 
libxl: Check ACLs before parsing the whole domain XML

Utilise the new virDomainDefIDsParseString() for that.

Fixes: CVE-2025-12748
Reported-by: Святослав Терешин <s.tereshin@fobos-nt.ru>
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 weeks agobhyve: Check ACLs before parsing the whole domain XML
Martin Kletzander [Thu, 6 Nov 2025 14:31:12 +0000 (15:31 +0100)] 
bhyve: Check ACLs before parsing the whole domain XML

Utilise the new virDomainDefIDsParseString() for that.

Fixes: CVE-2025-12748
Reported-by: Святослав Терешин <s.tereshin@fobos-nt.ru>
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 weeks agoconf: Add virDomainDefIDsParseString
Martin Kletzander [Thu, 6 Nov 2025 13:33:31 +0000 (14:33 +0100)] 
conf: Add virDomainDefIDsParseString

This function performs only parsing with the underlying
virDomainDefParseIDs() function to get needed metadata for any ACL
checks, but nothing else to avoid extraneous allocations and any
parser-induced DoS over ACL-forbidden connections.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 weeks agovirXMLFormatMetadata: Don't modify deprecated 'xmlIndentTreeOutput'
Peter Krempa [Mon, 10 Nov 2025 15:52:45 +0000 (16:52 +0100)] 
virXMLFormatMetadata: Don't modify deprecated 'xmlIndentTreeOutput'

'libxml2' deprecated the 'xmlIndentTreeOutput' thread-local variable as
well as the 'xmlThrDefIndentTreeOutput' function for setting the global
default, which we use in our code for formatting the metadata sub-XML.

'libxml2' also for now doesn't provide a way to set target indentation
level in 'xmlSaveCtxt' which would allow us to use the modern output
APIs, we can't replace our use of 'xmlDumpNode'. (See
https://gitlab.gnome.org/GNOME/libxml2/-/issues/989 )

Since the indentation is enabled by default in libxml2 and our most
commonly used code which calls xmlDumpNode lives in a standalone
process, where we don't override the setting, just removing the override
will result in identical behaviour.

For the use cases which do live in a process we don't fully control and
thus the default could have been overriden, the result would be that the
<metadata> element would be un-indented, but that is still valid XML.

Thus to fix the deprecated use just stop setting 'xmlIndentTreeOutput'.

Closes: https://gitlab.com/libvirt/libvirt/-/issues/816
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
3 weeks agovirVBoxSnapshotConfSaveVboxFile: Don't modify deprecated 'xmlIndentTreeOutput'
Peter Krempa [Mon, 10 Nov 2025 15:54:32 +0000 (16:54 +0100)] 
virVBoxSnapshotConfSaveVboxFile: Don't modify deprecated 'xmlIndentTreeOutput'

'xmlIndentTreeOutput' is now deprecated by libxml2.

The default value set by libxml2 is '1', and the vbox driver resides
only inside the standalone daemon where the value will not be changed by
us thus there's no observable change in behaviour.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
3 weeks agobhyve: domain: improve disks validation
Roman Bogorodskiy [Sun, 9 Nov 2025 10:10:54 +0000 (11:10 +0100)] 
bhyve: domain: improve disks validation

Do not allow to configure queues and queue size for non-NVMe disks.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 weeks agobhyve: domain: refactor bhyveDomainDeviceDefValidate()
Roman Bogorodskiy [Sun, 9 Nov 2025 09:47:51 +0000 (10:47 +0100)] 
bhyve: domain: refactor bhyveDomainDeviceDefValidate()

Refactor bhyveDomainDeviceDefValidate() to use switch/case instead of
series of ifs which makes it easier to follow.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 weeks agobhyve: support queue configuration for NVMe disks
Roman Bogorodskiy [Sat, 8 Nov 2025 08:12:50 +0000 (09:12 +0100)] 
bhyve: support queue configuration for NVMe disks

bhyve supports queue configuration for the NVMe disks:

  maxq        Max number of queues.
  qsz         Max elements in each queue.

Map that to the disk driver's "queues" and "queue_size" attributes
respectfully, so:

  <driver name='file' type='raw' queues='2' queue_size='256'/>

results in:

  -s N:0,nvme,/tmp/disk.img,maxq=2,qsz=256

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
3 weeks agoconf: domain_validate: make disk queue configuration driver specific
Roman Bogorodskiy [Sun, 9 Nov 2025 09:10:54 +0000 (10:10 +0100)] 
conf: domain_validate: make disk queue configuration driver specific

Currently, virDomainDiskDefValidate() allows to configure disks' number
of queues and queue size for virtio disks only. However, the bhyve
driver allows to configure these for the NVMe disks, so make this
check driver-specific.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agodocs: drvbhyve: add guest-specific nodes section
Roman Bogorodskiy [Sat, 8 Nov 2025 14:22:48 +0000 (15:22 +0100)] 
docs: drvbhyve: add guest-specific nodes section

Add a section with guest-specific notes. Start with LPC slot address
information for the Windows guests.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agodocs: drvbhyve: improve the manpage link
Roman Bogorodskiy [Sat, 8 Nov 2025 13:46:26 +0000 (14:46 +0100)] 
docs: drvbhyve: improve the manpage link

When linking to the bhyve(8) manual page, do not set manpath
to a specific FreeBSD version so the latest actual version
is displayed.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agodocs: drvbhyve: document device passthrough
Roman Bogorodskiy [Sat, 8 Nov 2025 13:25:00 +0000 (14:25 +0100)] 
docs: drvbhyve: document device passthrough

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agomeson: default to system crypto policies where available
Daniel P. Berrangé [Tue, 1 Jul 2025 16:45:26 +0000 (17:45 +0100)] 
meson: default to system crypto policies where available

In RHEL and Fedora, the built-in GNUTLS default priority is changed
from "NORMAL" to "@SYSTEM", but because libvirt sets an explicit
policy with gnutls we don't honour that. Instead we force "NORMAL"
unless the 'tls_priority' meson option is changed.

In RPM builds, meanwhile, we ask for "@LIBVIRT,SYSTEM" to make it
look for a libvirt specific profile first, falling back to "@SYSTEM"

This changes the meson option to default to "@LIBVIRT,SYSTEM" if the
crypto-policies config is present on the local machine and the meson
option -Dsystem=true is given.

This gives developers more appropriate default behaviour, matching
that seen in package builds.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
4 weeks agoch: Sort driver sources and drop header files
Michal Privoznik [Fri, 24 Oct 2025 08:11:04 +0000 (10:11 +0200)] 
ch: Sort driver sources and drop header files

Firstly, there's no need to list header files in
ch_driver_sources (we don't do that anywhere else, and meson is
smart enough to figure them out). And secondly, the list of
source file is not sorted which means new source files are added
in random order.

Thus, drop header files from the list and sort it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
4 weeks agoch: Assign device alias early
Michal Privoznik [Thu, 23 Oct 2025 13:53:20 +0000 (15:53 +0200)] 
ch: Assign device alias early

Assigning device should happen from ch_hotplug.c (just like it's
done for disks currently) not in ch_process.c. Move alias
assignment out of chProcessAddNetworkDevice(). And while at it,
mimic what's done with disks and have net hotplug handling done
from a function.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
4 weeks agoch: Set transient domain definition
Michal Privoznik [Fri, 24 Oct 2025 13:42:53 +0000 (15:42 +0200)] 
ch: Set transient domain definition

Libvirt's philosophy is that for a running domain there are two
(in general distinct) definitions: live definition (reflects the
running state) and inactive definition (used to seed the live
definition when domain is being created).  That's why we have
VIR_DOMAIN_AFFECT_LIVE and VIR_DOMAIN_AFFECT_CONFIG flags to APIs
that modify domain definitions.

Well, the CH driver doesn't do this distinction. Fix this by
making the domain definition transient when it's being created.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
4 weeks agoch: Use correct domain definition in chDomainGetXMLDesc()
Michal Privoznik [Thu, 6 Nov 2025 14:01:26 +0000 (15:01 +0100)] 
ch: Use correct domain definition in chDomainGetXMLDesc()

The chDomainGetXMLDesc() function claims to support
VIR_DOMAIN_XML_INACTIVE to obtain the persistent definition of a
running domain (in its call to virCheckFlags()) but in fact, it's
always passing vm->def to virDomainDefFormat().

So far, there's no harm done because CH driver never sets domain
def as transient. But that'll change.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
4 weeks agoch_process: Avoid memleak in chProcessAddNetworkDevice()
Michal Privoznik [Thu, 6 Nov 2025 14:03:42 +0000 (15:03 +0100)] 
ch_process: Avoid memleak in chProcessAddNetworkDevice()

The 'payload' variable inside of chProcessAddNetworkDevice() is
reused and thus the memory it points to just before its
repurpose is not freed. Avoid reusing g_autofree variables.

 128 bytes in 1 blocks are definitely lost in loss record 1,828 of 2,026
    at 0x491A120: realloc (vg_replace_malloc.c:1801)
    by 0x4FEC251: g_realloc (in /usr/lib64/libglib-2.0.so.0.8400.4)
    by 0x500BB7E: g_string_expand (in /usr/lib64/libglib-2.0.so.0.8400.4)
    by 0x500BBF0: g_string_sized_new (in /usr/lib64/libglib-2.0.so.0.8400.4)
    by 0x4A114C0: virBufferInitialize (virbuffer.c:121)
    by 0x4A11890: virBufferAdd (virbuffer.c:160)
    by 0x4A67344: virJSONValueToBuffer (virjson.c:1562)
    by 0x4A673DB: virJSONValueToString (virjson.c:1599)
    by 0xBC878AB: virCHMonitorBuildNetJson (ch_monitor.c:466)
    by 0xBC8D4A9: chProcessAddNetworkDevice (ch_process.c:688)
    by 0xBC8FCE2: chDomainAttachDeviceLive (ch_hotplug.c:78)
    by 0xBC900CA: chDomainAttachDeviceLiveAndUpdateConfig (ch_hotplug.c:174)

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
4 weeks agodomain_capabilities: Use virXMLFormatElement() in FORMAT_PROLOGUE and FORMAT_EPILOGUE...
Michal Privoznik [Tue, 4 Nov 2025 10:03:18 +0000 (11:03 +0100)] 
domain_capabilities: Use virXMLFormatElement() in FORMAT_PROLOGUE and FORMAT_EPILOGUE macros

Domain capabilities XML is formatted (mostly) using
FORMAT_PROLOGUE and FORMAT_EPILOGUE macros. These format opening
and closing stanzas for given element. The FORMAT_PROLOGUE macro
even tries to be clever and format element onto one line (if the
element isn't supported), but that's not enough. Fortunately, we
have virXMLFormatElement() which formats elements properly, so
let's switch macros into using that.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
4 weeks agodomain_capabilities: Check NULL in FORMAT_PROLOGUE
Michal Privoznik [Tue, 4 Nov 2025 12:35:30 +0000 (13:35 +0100)] 
domain_capabilities: Check NULL in FORMAT_PROLOGUE

In the virDomainCaps struct there are some pointers that might be
NULL (for instance 'sev', 'sgx', 'hyperv'). Teach FORMAT_PROLOGUE
macro to check for NULL argument so that format functions (like
virDomainCapsFeatureHypervFormat()) don't need to.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
4 weeks agodomain_capabilities: Rework virDomainCapsCPUFormat()
Michal Privoznik [Tue, 4 Nov 2025 11:23:58 +0000 (12:23 +0100)] 
domain_capabilities: Rework virDomainCapsCPUFormat()

Make the virDomainCapsCPUFormat() function use
virXMLFormatElement() family of functions.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
4 weeks agodomain_capabilities: Rework virDomainCapsCPUCustomFormat()
Michal Privoznik [Wed, 5 Nov 2025 09:43:09 +0000 (10:43 +0100)] 
domain_capabilities: Rework virDomainCapsCPUCustomFormat()

Make the virDomainCapsCPUCustomFormat() function use
virXMLFormatElement() family of functions.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
4 weeks agodomain_capabilities: Move indentation adjustment out of virDomainCapsCPUCustomFormat()
Michal Privoznik [Tue, 4 Nov 2025 11:25:20 +0000 (12:25 +0100)] 
domain_capabilities: Move indentation adjustment out of virDomainCapsCPUCustomFormat()

The aim of virDomainCapsCPUCustomFormat() is to format CPU models
into given buffer. But it starts by adjusting indentation. Move
this one level up into the caller so that another buffer can be
used. This also makes the pattern match in the caller
(virDomainCapsCPUFormat()) with the rest of CPU related domcaps
formatting.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
4 weeks agobhyve: auto-assign PCI addresses for hostdevs
Roman Bogorodskiy [Wed, 2 Apr 2025 11:20:11 +0000 (13:20 +0200)] 
bhyve: auto-assign PCI addresses for hostdevs

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agobhyve: Tie the 'passthru' option to the 'hostdev' XML config
Alexander Shursha [Mon, 10 Mar 2025 09:05:05 +0000 (12:05 +0300)] 
bhyve: Tie the 'passthru' option to the 'hostdev' XML config

Signed-off-by: Alexander Shursha <kekek2@ya.ru>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agobhyve: Advertise hostdev support
Alexander Shursha [Mon, 10 Mar 2025 09:05:03 +0000 (12:05 +0300)] 
bhyve: Advertise hostdev support

Signed-off-by: Alexander Shursha <kekek2@ya.ru>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agobhyve: Support passing the 'passthru' command line option
Alexander Shursha [Mon, 10 Mar 2025 09:05:04 +0000 (12:05 +0300)] 
bhyve: Support passing the 'passthru' command line option

Bhyve supports PCI device passthrough using the following syntax:

  bhyve ... -s 4:0,passthru,5/2/0 ...

Where 5/2/0 is PCI address of the device in the host, and "4:0" is the
address in the guest.

Currently, user is responsible for reserving the device for passthrough,
i.e. by configuring pptdevs in loader.conf(5), or using devctl(8) to
detach the device.

Co-authored-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Signed-off-by: Alexander Shursha <kekek2@ya.ru>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agobhyve: process: improve domain startup error handling
Roman Bogorodskiy [Tue, 28 Oct 2025 17:04:12 +0000 (18:04 +0100)] 
bhyve: process: improve domain startup error handling

After executing the bhyve binary, it might happen that it fails very
early due to configuration issues (missing/inaccessible files, incorrect
custom args), bugs, etc. In this case it'll look like the domain has
started normally, but quickly turned off.

Improve that by waiting for the domain's vmm entity to appear in
/dev/vmm.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocpu_map: Add YongFeng-v3 CPU model
Jiri Denemark [Thu, 6 Nov 2025 09:57:47 +0000 (10:57 +0100)] 
cpu_map: Add YongFeng-v3 CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocpu_map: Add YongFeng-v2 CPU model
Jiri Denemark [Thu, 6 Nov 2025 09:57:25 +0000 (10:57 +0100)] 
cpu_map: Add YongFeng-v2 CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocpu_map: Add YongFeng CPU model
Jiri Denemark [Thu, 6 Nov 2025 09:56:27 +0000 (10:56 +0100)] 
cpu_map: Add YongFeng CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocpu_map: Add features used by Zhaoxin YongFeng Processor
Jiri Denemark [Thu, 6 Nov 2025 09:06:53 +0000 (10:06 +0100)] 
cpu_map: Add features used by Zhaoxin YongFeng Processor

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocpu_map: Add Zhaoxin CentaurHauls CPU vendor
Jiri Denemark [Thu, 6 Nov 2025 09:49:19 +0000 (10:49 +0100)] 
cpu_map: Add Zhaoxin CentaurHauls CPU vendor

Zhaoxin uses two distinct vendor IDs. This patch is adding one of them
used by Zhaoxin YongFeng Processor.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocpu_map: Add EPYC-Turin CPU model
Jiri Denemark [Thu, 6 Nov 2025 08:33:16 +0000 (09:33 +0100)] 
cpu_map: Add EPYC-Turin CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocpu_map: Add EPYC-Milan-v3 CPU model
Jiri Denemark [Thu, 6 Nov 2025 08:32:40 +0000 (09:32 +0100)] 
cpu_map: Add EPYC-Milan-v3 CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocpu_map: Add EPYC-v5 CPU model
Jiri Denemark [Thu, 6 Nov 2025 08:30:18 +0000 (09:30 +0100)] 
cpu_map: Add EPYC-v5 CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocpu_map: Add EPYC-Rome-v5 CPU model
Jiri Denemark [Thu, 6 Nov 2025 08:31:30 +0000 (09:31 +0100)] 
cpu_map: Add EPYC-Rome-v5 CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocpu_map: Add EPYC-Genoa-v2 CPU model
Jiri Denemark [Thu, 6 Nov 2025 08:27:39 +0000 (09:27 +0100)] 
cpu_map: Add EPYC-Genoa-v2 CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocpu_map: Add ClearwaterForest CPU model
Jiri Denemark [Wed, 5 Nov 2025 15:45:43 +0000 (16:45 +0100)] 
cpu_map: Add ClearwaterForest CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocpu_map: Add GraniteRapids-v3 CPU model
Jiri Denemark [Thu, 6 Nov 2025 08:41:19 +0000 (09:41 +0100)] 
cpu_map: Add GraniteRapids-v3 CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocpu_map: Add SapphireRapids-v4 CPU model
Jiri Denemark [Thu, 6 Nov 2025 08:40:38 +0000 (09:40 +0100)] 
cpu_map: Add SapphireRapids-v4 CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocpu_map: Add SierraForest-v3 CPU model
Jiri Denemark [Wed, 5 Nov 2025 15:18:12 +0000 (16:18 +0100)] 
cpu_map: Add SierraForest-v3 CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocpu_map: Add SierraForest-v2 CPU model
Jiri Denemark [Wed, 5 Nov 2025 15:16:35 +0000 (16:16 +0100)] 
cpu_map: Add SierraForest-v2 CPU model

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocputest: Add data for AMD Ryzen 9 9950X 16-Core CPU
Jiri Denemark [Thu, 6 Nov 2025 13:13:34 +0000 (14:13 +0100)] 
cputest: Add data for AMD Ryzen 9 9950X 16-Core CPU

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocputest: Add data for Intel(R) Xeon(R) 6788P CPU
Jiri Denemark [Thu, 6 Nov 2025 11:20:01 +0000 (12:20 +0100)] 
cputest: Add data for Intel(R) Xeon(R) 6788P CPU

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocputest: Read more MSRs in cpu-data.py
Jiri Denemark [Thu, 6 Nov 2025 13:10:06 +0000 (14:10 +0100)] 
cputest: Read more MSRs in cpu-data.py

The features defined in our CPU map use quite a bit more than just the
two MSRs the script is currently trying to read. Let's read all of them
to get complete host CPU data.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
4 weeks agocputest: Ignore missing MSRs in cpu-data.py
Jiri Denemark [Thu, 6 Nov 2025 12:40:14 +0000 (13:40 +0100)] 
cputest: Ignore missing MSRs in cpu-data.py

The current code made sense when we were reading only one MSR, but since
we started reading more MSRs, the host CPU would have to support all of
them otherwise the function would just return an empty dict.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>