[PATCH] qemu: Add audit entries for suspend and resume

2024-12-16 Thread Jim Fehlig via Devel
We recently received a request from certification auditors to provide audit entries for suspend and resume. This small patch uses the existing virtDomainAudit{Start,Stop} functions with new reasons "suspended" and "resumed". Signed-off-by: Jim Fehlig --- For suspend, I initially wrote the follow

[PATCH v3 7/7] conf: add deprecated_features attribute

2024-12-16 Thread Collin Walling
Add a new a attribute, deprecated_features='on|off' to the element. This is used to toggle features flagged as deprecated on the CPU model on or off. When this attribute is paired with 'on', deprecated features will not be filtered. When paired with 'off', any CPU features that are flagged as d

[PATCH v3 6/7] virsh: add --disable-deprecated-features flag to domcapabilities

2024-12-16 Thread Collin Walling
Add a new flag, --disable-deprecated-features, to the domcapabilities command. This will modify the output to show the 'host-model' CPU with features flagged as deprecated paired with the 'disable' policy. virsh domcapabilities --disable-deprecated-features Signed-off-by: Collin Walling --- do

[PATCH v3 4/7] libvirt-domain: introduce VIR_CONNECT_GET_DOMAIN_CAPABILITIES_DISABLE_DEPRECATED_FEATURES

2024-12-16 Thread Collin Walling
Introduce domain flag used to filter deprecated features from the domain's CPU model. Signed-off-by: Collin Walling --- include/libvirt/libvirt-domain.h | 12 src/libvirt-domain.c | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/include/libvirt/lib

[PATCH v3 5/7] qemu_capabilities: filter deprecated features if requested

2024-12-16 Thread Collin Walling
If flag VIR_CONNECT_GET_DOMAIN_CAPABILITIES_DISABLE_DEPRECATED_FEATURES is passed to qemuConnectGetDomainCapabilities, then the domain's CPU model features will be updated to set any deprecated features to the 'disabled' policy. Signed-off-by: Collin Walling --- src/qemu/qemu_capabilities.c | 20

[PATCH v3 2/7] qemu: parse deprecated-props from query-cpu-model-expansion response

2024-12-16 Thread Collin Walling
query-cpu-model-expansion may report an array of deprecated properties. This array is optional, and may not be supported for a particular architecture or reported for a particular CPU model. If the output is present, then capture it and store in a qemuMonitorCPUModelInfo struct for later use. The

[PATCH v3 3/7] qemu_capabilities: query deprecated features for host-model

2024-12-16 Thread Collin Walling
Add QEMU_CAPS_QUERY_CPU_MODEL_EXPANSION_DEPRECATED_PROPS for detecting if query-cpu-model-expansion can report deprecated CPU model properties. QEMU introduced this capability in 9.1 release. Add flag and deprecated features to the capabilities test data for QEMU 9.1 and 9.2 replies/XML since it c

[PATCH v3 1/7] qemuMonitorJSONGetCPUModelExpansion: refactor parsing functions

2024-12-16 Thread Collin Walling
Refactor the CPU Model parsing functions within qemuMonitorJSONGetCPUModelExpansion. The new functions, qemuMonitorJSONParseCPUModelExpansionData and qemuMonitorJSONParseCPUModelExpansion invoke the functions they replace and leave room for a subsequent patch to handle parsing the (optional) depre

[PATCH v3 0/7] Allow Guest CPU Model with Deprecated Features Disabled

2024-12-16 Thread Collin Walling
# Changelog v3 - added reviewed-by's on appropriate patches - split patch #4 into three: - domain API (libvirt-domain: introduce VIR_CONNECT_GET_DOMAIN_CAPABILITIES_DISABLE_DEPRECATED_FEATURES) - qemu (qemu_capabilities: filter deprecated features if requested) -

[PATCH] docs: Clarify what source and name attributes of TPM profile describe

2024-12-16 Thread Stefan Berger
Clarify what source and name attributes of TPM profile describe and update the version placeholder to the libvirt version when profiles were first supported, v10.10. Also mention that profiles with prefix 'custom:' in their name can be modified. Signed-off-by: Stefan Berger --- docs/formatdomain

Re: [PATCH v2 0/4] fix AppArmor policy restore for runtime rules

2024-12-16 Thread tiago . pasqualini
I backported this to Noble and Jammy libvirt ubuntu packages and confirm that this fixes the issue. Is there anything we can do to get this merged?

Re: [PATCH] qemu: Enable I/O APIC if needed

2024-12-16 Thread Ján Tomko
On a Thursday in 2024, Michal Prívozník wrote: On 12/12/24 12:37, Ján Tomko wrote: On a Thursday in 2024, Michal Privoznik wrote: This is a follow up of my previous commits. If the number of vCPUs exceeds some arbitrary value (255) then QEMU requires IOMMU with EIM and interemap enabled. But in

Re: [RFC PATCH 0/5] qemu: Route hostdevs to multiple nested SMMUs

2024-12-16 Thread Daniel P . Berrangé
On Sun, Dec 15, 2024 at 11:45:56AM -0800, Nathan Chen wrote: > Hi Daniel, > > >Top level libvirt device representation in XML is based on the device > >*class*, not the specific device impl. Adding a device > >type XML element in libvirt is totally inappropriate. Any configuration > >must be done

Re: [PATCH v3 0/4] util: Change return type of functions that never fail to void

2024-12-16 Thread Jiri Denemark
On Mon, Dec 16, 2024 at 12:41:04 +0300, Alexander Kuznetsov wrote: > These functions return value is invariant since 18f3771, so change > its type and remove all dependent checks. > > Best regards, > Alexander Kuznetsov > > --- > v3: > - Fix indentation errors. > - 2: add missing virSCSIDeviceSet

[PATCH v3 4/4] logging: Change return type of virLogDaemonConfigFilePat to void

2024-12-16 Thread Alexander Kuznetsov
This function return value is invariant since 18f3771, so change its type and remove all dependent checks. Found by Linux Verification Center (linuxtesting.org) with Svace. Reported-by: Pavel Nekrasov Signed-off-by: Alexander Kuznetsov Reviewed-by: Jiri Denemark --- src/logging/log_daemon.c

[PATCH v3 3/4] util: Change return type of virSCSIVHostDeviceSetUsedBy to void

2024-12-16 Thread Alexander Kuznetsov
This function return value is invariant since 18f3771, so change its type and remove all dependent checks. Found by Linux Verification Center (linuxtesting.org) with Svace. Reported-by: Pavel Nekrasov Signed-off-by: Alexander Kuznetsov --- src/hypervisor/virhostdev.c | 3 +-- src/util/virscsiv

[PATCH v3 2/4] util: Change return type of virSCSIDeviceSetUsedBy to void

2024-12-16 Thread Alexander Kuznetsov
This function return value is invariant since 18f3771, so change its type and remove all dependent checks. Found by Linux Verification Center (linuxtesting.org) with Svace. Reported-by: Pavel Nekrasov Signed-off-by: Alexander Kuznetsov --- src/hypervisor/virhostdev.c | 13 + src/ut

[PATCH v3 1/4] util: Change return type of virPCIDeviceSetUsedBy to void

2024-12-16 Thread Alexander Kuznetsov
This function return value is invariant since 18f3771, so change its type and remove all dependent checks. Found by Linux Verification Center (linuxtesting.org) with Svace. Reported-by: Pavel Nekrasov Signed-off-by: Alexander Kuznetsov Reviewed-by: Jiri Denemark --- src/hypervisor/virhostdev.

[PATCH v3 0/4] util: Change return type of functions that never fail to void

2024-12-16 Thread Alexander Kuznetsov
These functions return value is invariant since 18f3771, so change its type and remove all dependent checks. Best regards, Alexander Kuznetsov --- v3: - Fix indentation errors. - 2: add missing virSCSIDeviceSetUsedBy call - 3: remove non-relevant cosmetic fix v2: - One function per commit. Alex

Re: [PATCH v4 00/11] swtpm: Add support for profiles

2024-12-16 Thread Marc-André Lureau
Hi On Wed, Nov 13, 2024 at 9:40 PM Stefan Berger wrote: > > Upcoming libtpms v0.10 and swtpm v0.10 will have TPM profile support that > allows to restrict a TPM's provided set of crypto algorithms and commands > and through which backwards compatibility and migration from newer versions > of libt