Re: [libvirt PATCH v2 11/15] conf: replace virHostdevIsVFIODevice with virHostdevIsPCIDevice

2023-11-27 Thread Peter Krempa
On Mon, Nov 06, 2023 at 02:38:56 -0500, Laine Stump wrote: > virHostdevIsVFIODevice() and virDomainDefHasVFIOHostdev() are only ever > called from the QEMU driver, and in the case of the QEMU driver, any > PCI hostdev by definition uses VFIO, so really all these callers only > need to know if the d

Re: [libvirt PATCH v2 10/15] xen: explicitly set hostdev driver.type at runtime, not in postparse

2023-11-27 Thread Peter Krempa
On Mon, Nov 06, 2023 at 02:38:55 -0500, Laine Stump wrote: > Xen only supports a single type of PCI hostdev assignment, so it is > superfluous to have peppered throughout the > config. It *is* necessary to have the driver type explicitly set in > the hosdev object before calling into the hyperviso

Re: [libvirt PATCH v2 09/15] tests: remove explicit from hostdev test cases

2023-11-27 Thread Peter Krempa
On Mon, Nov 06, 2023 at 02:38:54 -0500, Laine Stump wrote: > The long-deprecated use of in domain xml > for devices was only ever necessary during the period when > libvirt (and the Linux kernel) supported both VFIO and "legacy KVM" > styles of hostdev device assignment for QEMU. This became poin

Re: [libvirt PATCH v2 08/15] conf: use new common parser/formatter for hostdev driver in network XML

2023-11-27 Thread Peter Krempa
On Mon, Nov 06, 2023 at 02:38:53 -0500, Laine Stump wrote: > Now if a new attribute is added to , we only need to update > the formatting/parsing in one place. > > Signed-off-by: Laine Stump > --- > src/conf/network_conf.c | 24 > src/conf/virnetworkportdef.c | 21 +

Re: [libvirt PATCH v2 07/15] conf: split out hostdev parse/format to their own functions

2023-11-27 Thread Peter Krempa
On Mon, Nov 06, 2023 at 02:38:52 -0500, Laine Stump wrote: > This is done so that we can re-use the same parser/formatter for > and > > Signed-off-by: Laine Stump > --- > src/conf/device_conf.c | 41 + > src/conf/device_conf.h | 7 +++ > src/conf/do

Re: [libvirt PATCH v2 06/15] conf: use virDeviceHostdevPCIDriverInfo in network and networkport objects

2023-11-27 Thread Peter Krempa
On Mon, Nov 06, 2023 at 02:38:51 -0500, Laine Stump wrote: > The next step in consolidating parsing/formatting of the > element of these objects using a common struct and common code. This > eliminates the virNetworkForwardDriverNameType enum which is nearly > identical to virDeviceHostdevPCIDrive

Re: [libvirt PATCH v2 05/15] conf: put hostdev PCI backend into a struct

2023-11-27 Thread Peter Krempa
On Mon, Nov 06, 2023 at 02:38:50 -0500, Laine Stump wrote: > The new struct is virDeviceHostdevPCIDriverInfo, and the "backend" > enum in the hostdevDef will be replaced with a > virDeviceHostdevPCIDriverInfo named "driver'. Since the enum value in > this new struct is called "type", it means that

Re: [libvirt PATCH v2 04/15] conf: normalize hostdev parsing to simplify adding new attr

2023-11-27 Thread Peter Krempa
On Mon, Nov 06, 2023 at 02:38:49 -0500, Laine Stump wrote: > The hostdev version of the subelement appears in four places: > > * The domain XML in the and >elements (that's 2) > > * The network XML inside when the network is a pool of >SRIOV VFs > > * the XML, which is used to co

Re: [libvirt PATCH v2 03/15] conf: move/rename hostdev PCI driver type enum to device_conf.h

2023-11-27 Thread Peter Krempa
On Mon, Nov 06, 2023 at 02:38:48 -0500, Laine Stump wrote: > Currently this enum is defined in domain_conf.h and named > virDomainHostdevSubsysPCIDriverType. I want to use it in parts of the > network and networkport config, so am moving its definition to > device_conf.h which is / can be included

Re: [libvirt PATCH v2 02/15] schema: consolidate RNG for all hostdev elements

2023-11-27 Thread Peter Krempa
On Mon, Nov 06, 2023 at 02:38:47 -0500, Laine Stump wrote: > The exact same element can appear in and type='hostdev'>, and nearly identical in and > (these latter two don't include "xen" as a possible driver, but that's > coincidental - there's no reason Xen couldn't also use the VF pools in >

Re: [libvirt RFCv11 00/33] multifd save restore prototype

2023-11-27 Thread Claudio Fontana
On 11/27/23 11:50, Daniel P. Berrangé wrote: > On Mon, Nov 27, 2023 at 11:40:29AM +0100, Claudio Fontana wrote: >> On 11/27/23 11:18, Daniel P. Berrangé wrote: >>> On Mon, Nov 27, 2023 at 10:43:58AM +0100, Claudio Fontana wrote: Hi all, I understand there has been some movement in th

Entering freeze for libvirt-9.10.0

2023-11-27 Thread Jiri Denemark
I have just tagged v9.10.0-rc1 in the repository and pushed signed tarballs and source RPMs to https://download.libvirt.org/ Please give the release candidate some testing and in case you find a serious issue which should have a fix in the upcoming release, feel free to reply to this thread to mak

Re: [libvirt RFCv11 00/33] multifd save restore prototype

2023-11-27 Thread Daniel P . Berrangé
On Mon, Nov 27, 2023 at 11:40:29AM +0100, Claudio Fontana wrote: > On 11/27/23 11:18, Daniel P. Berrangé wrote: > > On Mon, Nov 27, 2023 at 10:43:58AM +0100, Claudio Fontana wrote: > >> Hi all, > >> > >> I understand there has been some movement in this topic as the > >> fixed-offset ram and multi

Re: [libvirt RFCv11 00/33] multifd save restore prototype

2023-11-27 Thread Claudio Fontana
On 11/27/23 11:18, Daniel P. Berrangé wrote: > On Mon, Nov 27, 2023 at 10:43:58AM +0100, Claudio Fontana wrote: >> Hi all, >> >> I understand there has been some movement in this topic as the fixed-offset >> ram and multifd code evolves. >> >> I think I understood that now the idea is to pass from

Re: [kubevirt-dev] ANNOUNCE: Virtualization linting library

2023-11-27 Thread Michal Prívozník
[Following move of libvir-list to new location] On 11/15/23 09:26, Dan Kenigsberg wrote: > Thanks, Michal, for this overture. I think libvirt and its people have a > lot of knowledge about working-yet-not-recommended configurations that > can be beneficial to higher-level management systems such a

[PATCH rfcv3 10/11] virsh: add new option "timekeep" to keep virsh console alive

2023-11-27 Thread Zhenzhong Duan
From: Chenyi Qiang User can add a new option --timekeep to keep the virsh console alive for several seconds. Then it would try to reconnenct the same domain. This option is mainly aimed to support hard reboot in Libvirt, which would kill the QEMU process and create a new one. The console would b

[PATCH rfcv3 11/11] conf: Add support to keep same domid for hard reboot

2023-11-27 Thread Zhenzhong Duan
After hard reboot, domid is increased by 1 as a new domain. Hard reboot simulate TD-guest reboot by calling qemuProcessStop and qemuProcessStart which will release and recreate domain resource including domid. Define origin_id to save domid and restore it when recreate domain. For persistent domai

[PATCH rfcv3 09/11] qemu: Extend hard reboot in Qemu driver

2023-11-27 Thread Zhenzhong Duan
With hard reboot, we can reboot a TDX guest with 'virsh reboot' or 'virsh shutdown' if action for onPoweroff is 'restart'. But running reboot cmd in guest shell will always lead to shutdown. This behavior is not consistent with legacy guest, this patch extend hard reboot support and make TDX guest

[PATCH rfcv3 07/11] qemu: add hard reboot in QEMU driver

2023-11-27 Thread Zhenzhong Duan
From: Chenyi Qiang Add the new flag VIR_DOMAIN_REBOOT_HARD/VIR_DOMAIN_SHUTDOWN_HARD to carry out a hard reboot, which kills the QEMU process and creates a new one with the same definition. Hard reboot will be the highest priority to check. If succeed, other reboot policy (i.e. agent and acpi) wo

[PATCH rfcv3 08/11] qemu: make hard reboot as the TDX default reboot mode

2023-11-27 Thread Zhenzhong Duan
From: Chenyi Qiang Signed-off-by: Chenyi Qiang --- src/qemu/qemu_driver.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 86e8efbfcb..ba1bb4ecb1 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c

[PATCH rfcv3 06/11] qemu: force special parameters enabled for TDX guest

2023-11-27 Thread Zhenzhong Duan
TDX guest requires some special parameters to boot, They are: "-machine pc-q35-*" "kernel_irqchip=split" Signed-off-by: Zhenzhong Duan --- src/qemu/qemu_validate.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 5a9173e

[PATCH rfcv3 04/11] conf: add tdx as launch security type

2023-11-27 Thread Zhenzhong Duan
When 'tdx' is used, the VM will launched with Intel TDX feature enabled. TDX feature supports running encrypted VM (Trust Domain, TD) under the control of KVM. A TD runs in a CPU model which protects the confidentiality of its memory and its CPU state from other software There is a child element '

[PATCH rfcv3 05/11] qemu: Add command line and validation for TDX type

2023-11-27 Thread Zhenzhong Duan
QEMU will provides 'tdx-guest' object which is used to launch encrypted VMs on Intel platform using TDX feature. Command line looks like: $QEMU ... \ -object tdx-guest,id=lsec0,debug=on,sept-ve-disable=on,mrconfigid=xxx...xxx,mrowner=xxx...xxx,mrownerconfig=xxx...xxx,quote-generation-service=lo

[PATCH rfcv3 03/11] conf: expose TDX feature in domain capabilities

2023-11-27 Thread Zhenzhong Duan
Extend qemu TDX capability to domain capabilities. Signed-off-by: Chenyi Qiang Signed-off-by: Zhenzhong Duan --- docs/formatdomaincaps.rst | 1 + src/conf/domain_capabilities.c | 1 + src/conf/domain_capabilities.h | 1 + src/conf/schemas/domaincaps.rng | 9 + src/qemu/qemu_

[PATCH rfcv3 02/11] qemu: Add TDX capability

2023-11-27 Thread Zhenzhong Duan
QEMU_CAPS_TDX_GUEST set means TDX supported with this QEMU. Signed-off-by: Chenyi Qiang Signed-off-by: Zhenzhong Duan --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabili

[PATCH rfcv3 00/11] LIBVIRT: X86: TDX support

2023-11-27 Thread Zhenzhong Duan
Hi, This series brings libvirt the x86 TDX support. * What's TDX? TDX stands for Trust Domain Extensions which isolates VMs from the virtual-machine manager (VMM)/hypervisor and any other software on the platform. To support TDX, multiple software components, not only KVM but also QEMU, guest Li

[PATCH rfcv3 01/11] qemu: Check if INTEL Trust Domain Extention support is enabled

2023-11-27 Thread Zhenzhong Duan
Implement TDX check in order to generate domain feature capability correctly in case the availability of the feature changed. For INTEL TDX the verification is: - checking if "/sys/module/kvm_intel/parameters/tdx" contains the value 'Y': meaning TDX is enabled in the host kernel. Signed-off-b