[PATCH 0/2] Fix wrong parameter "scsi" for vhost-user-blk-pci device

2022-01-21 Thread yshxxsjt715
From: shenjiatong Co-authored-by: Peter Krempa Peter Krempa (1): qemuxml2argvtest: disk-vhostuser: Add invocation for qemu-4.2 shenjiatong (1): Remove scsi parameter for vhost-user-blk for qemu 4.2 src/qemu/qemu_command.c | 6 ++- .../disk-vhostuser-numa.x86_64-4.2.

[PATCH 1/2] qemuxml2argvtest: disk-vhostuser: Add invocation for qemu-4.2

2022-01-21 Thread yshxxsjt715
From: Peter Krempa With qemu versions prior to qemu-5.0 we'll format 'scsi=off' for virtio-blk disks, but also for vhost-user-blk. This is a bug as it's not supported. Add a test case to show that wrong configuration is generated by adding running 'disk-vhostuser' test case on capabilities from

[PATCH 2/2] Remove scsi parameter for vhost-user-blk for qemu 4.2

2022-01-21 Thread yshxxsjt715
From: shenjiatong When trying to attach vhost-user-blk device to virtual machine using libvirt 7.8 and qemu 4.2. Libvirt mistakenly add a scsi=off parameter which is not supported by Qemu Signed-off-by: shenjiatong --- src/qemu/qemu_command.c | 6 +- ...

[libvirt PATCH] bhyve: handle all enum values in switches

2022-01-21 Thread Ján Tomko
Recent commits switched some variables to enums but did not fix the warnings in the bhyve driver. Fixes: 0eb42087c7907f43c114cb57b5ff2cf2a52dfea4 Fixes: a1ce98061c9a3f9ced367b2b9a3fe4071930a128 Signed-off-by: Ján Tomko --- Pushed as a build fix. src/bhyve/bhyve_command.c | 4 1 file change

[libvirt PATCH v7 17/18] docs: Add support page for libvirt on macOS

2022-01-21 Thread Andrea Bolognani
From: Roman Bolshakov Signed-off-by: Roman Bolshakov Signed-off-by: Andrea Bolognani Tested-by: Brad Laue Tested-by: Christophe Fergeau Reviewed-by: Daniel P. Berrangé --- docs/docs.html.in | 3 +++ docs/index.html.in | 3 ++- docs/macos.rst | 44 +

[libvirt PATCH v7 14/18] tests: Add HVF test cases

2022-01-21 Thread Andrea Bolognani
We need to use a hardcoded list of capabilities because we don't yet have proper replies files obtained from QEMU running on actual macOS machines. Signed-off-by: Andrea Bolognani Tested-by: Brad Laue Tested-by: Christophe Fergeau Reviewed-by: Daniel P. Berrangé --- .../hvf-aarch64-virt-headl

[libvirt PATCH v7 11/18] tests: Introduce testQemuHostOS

2022-01-21 Thread Andrea Bolognani
This new enumeration provides a way to specify the host OS that a specific test case expects. The default is Linux, which has been the implicit host OS until now; when Linux is selected as the host OS, KVM support is advertised in capabilies data exposed to test cases. This commit doesn't result i

[libvirt PATCH v7 10/18] qemu: Correct CPU capabilities probing for hvf

2022-01-21 Thread Andrea Bolognani
From: Roman Bolshakov With this change virsh domcapabilites shows: https://gitlab.com/libvirt/libvirt/-/issues/147 Signed-off-by: Roman Bolshakov Signed-off-by: Andrea Bolognani Tested-by: Brad Laue Tested-by: Christophe Fergeau Reviewed-by: Daniel P. Berrangé --- src/qemu/qemu_capabi

[libvirt PATCH v7 09/18] qemu: Introduce virQEMUCapsHaveAccel

2022-01-21 Thread Andrea Bolognani
From: Roman Bolshakov The function should be used to check if qemu capabilities include a hardware acceleration, i.e. accel is not TCG. Signed-off-by: Roman Bolshakov Signed-off-by: Andrea Bolognani Tested-by: Brad Laue Tested-by: Christophe Fergeau Reviewed-by: Daniel P. Berrangé --- src/

[libvirt PATCH v7 06/18] qemu: Expose hvf domain type if hvf is supported

2022-01-21 Thread Andrea Bolognani
From: Roman Bolshakov Signed-off-by: Roman Bolshakov Signed-off-by: Andrea Bolognani Tested-by: Brad Laue Tested-by: Christophe Fergeau Reviewed-by: Daniel P. Berrangé --- src/qemu/qemu_capabilities.c | 4 1 file changed, 4 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src

[libvirt PATCH v7 04/18] qemu: Define hvf capability

2022-01-21 Thread Andrea Bolognani
From: Roman Bolshakov Signed-off-by: Roman Bolshakov Signed-off-by: Andrea Bolognani Tested-by: Brad Laue Tested-by: Christophe Fergeau Reviewed-by: Daniel P. Berrangé --- src/qemu/qemu_capabilities.c | 1 + src/qemu/qemu_capabilities.h | 1 + 2 files changed, 2 insertions(+) diff --git a/

[libvirt PATCH v7 05/18] qemu: Query hvf capability on macOS

2022-01-21 Thread Andrea Bolognani
From: Roman Bolshakov There's no QMP command for querying if hvf is supported, therefore we use sysctl interface that tells if Hypervisor.framework works/available on the host. Signed-off-by: Roman Bolshakov Signed-off-by: Andrea Bolognani Tested-by: Brad Laue Tested-by: Christophe Fergeau R

[libvirt PATCH v7 02/18] qemu: Add KVM CPUs into cache only if KVM is present

2022-01-21 Thread Andrea Bolognani
From: Roman Bolshakov virQEMUCapsFormatCache/virQEMUCapsLoadCache adds/reads KVM CPUs to/from capabilities cache regardless of QEMU_CAPS_KVM. That can cause undesired side-effects when KVM CPUs are present in the cache on a platform that doesn't support it, e.g. macOS or Linux without KVM support

[libvirt PATCH v7 18/18] news: Mention hvf domain type

2022-01-21 Thread Andrea Bolognani
From: Roman Bolshakov Signed-off-by: Roman Bolshakov Signed-off-by: Andrea Bolognani Tested-by: Brad Laue Tested-by: Christophe Fergeau Reviewed-by: Daniel P. Berrangé --- NEWS.rst | 5 + 1 file changed, 5 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index cbfc9b4a15..666a593b58 1006

[libvirt PATCH v7 15/18] docs: Add hvf on QEMU driver page

2022-01-21 Thread Andrea Bolognani
From: Roman Bolshakov It's worth to make the domain type a little bit more visible than a row in news. An example of hvf domain is available on QEMU driver page. While at it, mention Hypervisor.framework on index page. Signed-off-by: Roman Bolshakov Signed-off-by: Andrea Bolognani Tested-by:

[libvirt PATCH v7 13/18] tests: Add macOS support to qemuxml2*test

2022-01-21 Thread Andrea Bolognani
The new DO_TEST_MACOS() macro makes it possible to create test cases that verify the behavior of libvirt on a macOS machine with HVF support available. Signed-off-by: Andrea Bolognani Tested-by: Brad Laue Tested-by: Christophe Fergeau Reviewed-by: Daniel P. Berrangé --- tests/qemuxml2argvtest

[libvirt PATCH v7 16/18] docs: Note hvf support for domain elements

2022-01-21 Thread Andrea Bolognani
From: Roman Bolshakov Many domain elements have "QEMU and KVM only" or "QEMU/KVM since x.y.z" remarks. Most of the elements work for HVF domain, so it makes sense to add respective notices for HVF domain. All the elements have been manually tested. Signed-off-by: Roman Bolshakov Signed-off-by:

[libvirt PATCH v7 12/18] tests: Add macOS support to testutilsqemu

2022-01-21 Thread Andrea Bolognani
This exposes a couple of macOS-specific variants of existing APIs, which can be used when implementing test programs and result in HVF support being advertised. Signed-off-by: Andrea Bolognani Tested-by: Brad Laue Tested-by: Christophe Fergeau Reviewed-by: Daniel P. Berrangé --- tests/testuti

[libvirt PATCH v7 03/18] conf: Add hvf domain type

2022-01-21 Thread Andrea Bolognani
From: Roman Bolshakov QEMU supports Hypervisor.framework since 2.12 as hvf accel. Hypervisor.framework provides a lightweight interface to run a virtual cpu on macOS without the need to install third-party kernel extensions (KEXTs). It's supported since macOS 10.10 on machines with Intel VT-x fe

[libvirt PATCH v7 08/18] qemu: Introduce virQEMUCapsTypeIsAccelerated

2022-01-21 Thread Andrea Bolognani
From: Roman Bolshakov It replaces hardcoded checks for KVM. It'll be cleaner to use the function once multiple accelerators are supported in the QEMU driver. Explicit KVM domain checks should be done only when a feature is available only for KVM. Signed-off-by: Roman Bolshakov Signed-off-by: A

[libvirt PATCH v7 07/18] qemu: Introduce virQEMUCapsAccelStr

2022-01-21 Thread Andrea Bolognani
From: Roman Bolshakov This makes possible to add more accelerators by touching less code and reduces code duplication. Signed-off-by: Roman Bolshakov Signed-off-by: Andrea Bolognani Tested-by: Brad Laue Tested-by: Christophe Fergeau --- src/qemu/qemu_capabilities.c | 14 -- 1 fi

[libvirt PATCH v7 00/18] qemu: Introduce hvf domain type for Hypervisor.framework

2022-01-21 Thread Andrea Bolognani
In order to hopefully address [libvirt#147] at long last, I've picked up Roman's patches from 2018 and attempted to forward-port them. More specifically, I've used the [roolebo/hvf-domain] branch as a starting point, since it seems to contain a few improvements over [v2] and was just easier to pic

[libvirt PATCH v7 01/18] qemu: Only probe KVM on Linux

2022-01-21 Thread Andrea Bolognani
We already know it's not going to be available on other platforms. Suggested-by: Daniel P. Berrangé Signed-off-by: Andrea Bolognani Tested-by: Brad Laue Tested-by: Christophe Fergeau Reviewed-by: Ani Sinha Reviewed-by: Daniel P. Berrangé --- src/qemu/qemu_process.c | 8 +++- 1 file chan

Re: [libvirt PATCH 08/20] qemu: Introduce virQEMUCapsAccelStr

2022-01-21 Thread Andrea Bolognani
On Fri, Jan 21, 2022 at 04:57:34PM +, Daniel P. Berrangé wrote: > On Mon, Jan 17, 2022 at 11:52:48AM +0100, Andrea Bolognani wrote: > > +static const char * > > +virQEMUCapsAccelStr(virDomainVirtType type) > > +{ > > +if (type == VIR_DOMAIN_VIRT_QEMU) > > +return "tcg"; > > + > > +

Re: [libvirt PATCH 08/20] qemu: Introduce virQEMUCapsAccelStr

2022-01-21 Thread Andrea Bolognani
On Fri, Jan 21, 2022 at 09:20:42AM -0800, Andrea Bolognani wrote: > On Fri, Jan 21, 2022 at 04:57:34PM +, Daniel P. Berrangé wrote: > > I'd say we should just directly return the virt types we actually > > expect to get - the invalid ones will have already been filtered > > out. ie > > > > vir

Re: [libvirt PATCH 08/20] qemu: Introduce virQEMUCapsAccelStr

2022-01-21 Thread Daniel P . Berrangé
On Fri, Jan 21, 2022 at 09:20:42AM -0800, Andrea Bolognani wrote: > On Fri, Jan 21, 2022 at 04:57:34PM +, Daniel P. Berrangé wrote: > > On Mon, Jan 17, 2022 at 11:52:48AM +0100, Andrea Bolognani wrote: > > > +static const char * > > > +virQEMUCapsAccelStr(virDomainVirtType type) > > > +{ > > >

Re: [libvirt PATCH 20/20] fixup! NEWS: Mention Apple Silicon support for HVF

2022-01-21 Thread Daniel P . Berrangé
On Mon, Jan 17, 2022 at 11:53:00AM +0100, Andrea Bolognani wrote: > And simplify the entry by removing mentions of QEMU 2.12 and > macOS 10.10, which are both ancient at this point, and of > specific hardware features that are going to be present in any > recent Apple machine. > > Signed-off-by: A

Re: [libvirt PATCH 19/20] news: Mention hvf domain type

2022-01-21 Thread Daniel P . Berrangé
On Mon, Jan 17, 2022 at 11:52:59AM +0100, Andrea Bolognani wrote: > From: Roman Bolshakov > > Signed-off-by: Roman Bolshakov > Signed-off-by: Andrea Bolognani > Tested-by: Brad Laue > --- > NEWS.rst | 8 > 1 file changed, 8 insertions(+) Reviewed-by: Daniel P. Berrangé Regards, D

Re: [libvirt PATCH 18/20] docs: Add support page for libvirt on macOS

2022-01-21 Thread Daniel P . Berrangé
On Mon, Jan 17, 2022 at 11:52:58AM +0100, Andrea Bolognani wrote: > From: Roman Bolshakov > > Signed-off-by: Roman Bolshakov > Signed-off-by: Andrea Bolognani > Tested-by: Brad Laue > --- > docs/docs.html.in | 3 +++ > docs/index.html.in | 3 ++- > docs/macos.rst | 44 +

Re: [libvirt PATCH 09/20] qemu: Introduce virQEMUCapsTypeIsAccelerated

2022-01-21 Thread Andrea Bolognani
On Fri, Jan 21, 2022 at 04:58:53PM +, Daniel P. Berrangé wrote: > On Mon, Jan 17, 2022 at 11:52:49AM +0100, Andrea Bolognani wrote: > > +static bool > > +virQEMUCapsTypeIsAccelerated(virDomainVirtType type) > > +{ > > +return type == VIR_DOMAIN_VIRT_KVM; > > +} > > type != VIR_DOMAIN_VIRT

Re: [libvirt PATCH 17/20] docs: Note hvf support for domain elements

2022-01-21 Thread Daniel P . Berrangé
On Mon, Jan 17, 2022 at 11:52:57AM +0100, Andrea Bolognani wrote: > From: Roman Bolshakov > > Many domain elements have "QEMU and KVM only" or "QEMU/KVM since x.y.z" > remarks. Most of the elements work for HVF domain, so it makes sense to > add respective notices for HVF domain. > > All the ele

Re: [libvirt PATCH 15/20] tests: Add HVF test cases

2022-01-21 Thread Daniel P . Berrangé
On Mon, Jan 17, 2022 at 11:52:55AM +0100, Andrea Bolognani wrote: > We need to use a hardcoded list of capabilities because we don't > yet have proper replies files obtained from QEMU running on actual > macOS machines. > > Signed-off-by: Andrea Bolognani > Tested-by: Brad Laue > --- > .../hvf-

Re: [libvirt PATCH 14/20] tests: Add macOS support to qemuxml2*test

2022-01-21 Thread Daniel P . Berrangé
On Mon, Jan 17, 2022 at 11:52:54AM +0100, Andrea Bolognani wrote: > The new DO_TEST_MACOS() macro makes it possible to create test > cases that verify the behavior of libvirt on a macOS machine > with HVF support available. > > Signed-off-by: Andrea Bolognani > Tested-by: Brad Laue > --- > test

Re: [libvirt PATCH 12/20] tests: Introduce testQemuHostOS

2022-01-21 Thread Daniel P . Berrangé
On Mon, Jan 17, 2022 at 11:52:52AM +0100, Andrea Bolognani wrote: > This new enumeration provides a way to specify the host OS > that a specific test case expects. The default is Linux, which > has been the implicit host OS until now; when Linux is selected > as the host OS, KVM support is advertis

Re: [libvirt PATCH 09/20] qemu: Introduce virQEMUCapsTypeIsAccelerated

2022-01-21 Thread Daniel P . Berrangé
On Mon, Jan 17, 2022 at 11:52:49AM +0100, Andrea Bolognani wrote: > From: Roman Bolshakov > > It replaces hardcoded checks for KVM. It'll be cleaner to use > the function once multiple accelerators are supported in the > QEMU driver. > > Explicit KVM domain checks should be done only when a feat

Re: [libvirt PATCH 16/20] docs: Add hvf on QEMU driver page

2022-01-21 Thread Daniel P . Berrangé
On Mon, Jan 17, 2022 at 11:52:56AM +0100, Andrea Bolognani wrote: > From: Roman Bolshakov > > It's worth to make the domain type a little bit more visible than a row > in news. An example of hvf domain is available on QEMU driver page. > > While at it, mention Hypervisor.framework on index page.

Re: [libvirt PATCH 13/20] tests: Add macOS support to testutilsqemu

2022-01-21 Thread Daniel P . Berrangé
On Mon, Jan 17, 2022 at 11:52:53AM +0100, Andrea Bolognani wrote: > This exposes a couple of macOS-specific variants of existing > APIs, which can be used when implementing test programs and > result in HVF support being advertised. > > Signed-off-by: Andrea Bolognani > Tested-by: Brad Laue > --

Re: [libvirt PATCH 11/20] qemu: Correct CPU capabilities probing for hvf

2022-01-21 Thread Daniel P . Berrangé
On Mon, Jan 17, 2022 at 11:52:51AM +0100, Andrea Bolognani wrote: > From: Roman Bolshakov > > With this change virsh domcapabilites shows: > > > > https://gitlab.com/libvirt/libvirt/-/issues/147 > > Signed-off-by: Roman Bolshakov > Signed-off-by: Andrea Bolognani > Tested-by: Brad Laue >

Re: [libvirt PATCH 08/20] qemu: Introduce virQEMUCapsAccelStr

2022-01-21 Thread Daniel P . Berrangé
On Mon, Jan 17, 2022 at 11:52:48AM +0100, Andrea Bolognani wrote: > From: Roman Bolshakov > > This makes possible to add more accelerators by touching less code and > reduces code duplication. > > Signed-off-by: Roman Bolshakov > Signed-off-by: Andrea Bolognani > Tested-by: Brad Laue > --- >

Re: [libvirt PATCH 06/20] fixup! qemu: Fix / improve virQEMUCapsProbeHVF()

2022-01-21 Thread Daniel P . Berrangé
On Mon, Jan 17, 2022 at 11:52:46AM +0100, Andrea Bolognani wrote: > Fix the architecture check so that hardware acceleration is only > ever advertised when the guest and host architecture match; exit > early if possible instead of calling sysctl every single time; > add some comments. > > Signed-o

Re: [libvirt PATCH 03/20] conf: Add hvf domain type

2022-01-21 Thread Daniel P . Berrangé
On Mon, Jan 17, 2022 at 11:52:43AM +0100, Andrea Bolognani wrote: > From: Roman Bolshakov > > QEMU supports Hypervisor.framework since 2.12 as hvf accel. > Hypervisor.framework provides a lightweight interface to run a virtual > cpu on macOS without the need to install third-party kernel > extens

Re: [PATCH] Revert "report error when virProcessGetStatInfo() is unable to parse data"

2022-01-21 Thread Michal Prívozník
On 1/21/22 16:26, Daniel P. Berrangé wrote: > > Urgh, sorry I missed that the BZ was private. Private BZs are not > supposed to be listed in commit messages for precisely the reason > that people can't see them. The commit message should have showed > the problem listed in the private BZ descript

Re: [PATCH] Revert "report error when virProcessGetStatInfo() is unable to parse data"

2022-01-21 Thread Ani Sinha
On Fri, Jan 21, 2022 at 8:56 PM Daniel P. Berrangé wrote: > On Fri, Jan 21, 2022 at 08:39:47PM +0530, Ani Sinha wrote: > > On Fri, Jan 21, 2022 at 20:33 Daniel P. Berrangé > > wrote: > > > > > On Fri, Jan 21, 2022 at 08:16:01PM +0530, Ani Sinha wrote: > > > > > > > > > > > > On Fri, 21 Jan 2022,

Re: [PATCH] Revert "report error when virProcessGetStatInfo() is unable to parse data"

2022-01-21 Thread Daniel P . Berrangé
On Fri, Jan 21, 2022 at 08:39:47PM +0530, Ani Sinha wrote: > On Fri, Jan 21, 2022 at 20:33 Daniel P. Berrangé > wrote: > > > On Fri, Jan 21, 2022 at 08:16:01PM +0530, Ani Sinha wrote: > > > > > > > > > On Fri, 21 Jan 2022, Daniel P. Berrangé wrote: > > > > > > > On Fri, Jan 21, 2022 at 07:38:35PM

Re: [PATCH] Revert "report error when virProcessGetStatInfo() is unable to parse data"

2022-01-21 Thread Ani Sinha
On Fri, Jan 21, 2022 at 20:33 Daniel P. Berrangé wrote: > On Fri, Jan 21, 2022 at 08:16:01PM +0530, Ani Sinha wrote: > > > > > > On Fri, 21 Jan 2022, Daniel P. Berrangé wrote: > > > > > On Fri, Jan 21, 2022 at 07:38:35PM +0530, Ani Sinha wrote: > > > > > > > > > > > > On Fri, 21 Jan 2022, Michal

Re: [libvirt PATCH 02/20] qemu: Add KVM CPUs into cache only if KVM is present

2022-01-21 Thread Daniel P . Berrangé
On Mon, Jan 17, 2022 at 11:52:42AM +0100, Andrea Bolognani wrote: > From: Roman Bolshakov > > virQEMUCapsFormatCache/virQEMUCapsLoadCache adds/reads KVM CPUs to/from > capabilities cache regardless of QEMU_CAPS_KVM. That can cause undesired > side-effects when KVM CPUs are present in the cache on

Re: [libvirt PATCH 01/20] qemu: Only probe KVM on Linux

2022-01-21 Thread Daniel P . Berrangé
On Mon, Jan 17, 2022 at 11:52:41AM +0100, Andrea Bolognani wrote: > We already know it's not going to be available on other > platforms. > > Suggested-by: Daniel P. Berrangé > Signed-off-by: Andrea Bolognani > Tested-by: Brad Laue > --- > src/qemu/qemu_process.c | 8 +++- > 1 file changed,

[PATCH v2] virProcessGetStatInfo: add a comment describing why we can not report error

2022-01-21 Thread Ani Sinha
virProcessGetStatInfo() currently is unable to report error conditions because that breaks libvirt's public best effort APIs. We add a comment in the function to indicate this. Adding comment here prevents others from going down the path of reporting error conditions in this functions in the future

Re: [libvirt PATCH 0/5] Support AMD SEV firmware with -bios instead of pflash

2022-01-21 Thread Daniel P . Berrangé
On Fri, Jan 21, 2022 at 03:51:51PM +0100, Erik Skultety wrote: > On Fri, Jan 21, 2022 at 02:44:02PM +, Daniel P. Berrangé wrote: > > On Fri, Jan 21, 2022 at 03:40:23PM +0100, Erik Skultety wrote: > > > On Fri, Jan 21, 2022 at 02:16:14PM +, Daniel P. Berrangé wrote: > > > > On Fri, Jan 14, 2

Re: [PATCH] Revert "report error when virProcessGetStatInfo() is unable to parse data"

2022-01-21 Thread Daniel P . Berrangé
On Fri, Jan 21, 2022 at 08:16:01PM +0530, Ani Sinha wrote: > > > On Fri, 21 Jan 2022, Daniel P. Berrangé wrote: > > > On Fri, Jan 21, 2022 at 07:38:35PM +0530, Ani Sinha wrote: > > > > > > > > > On Fri, 21 Jan 2022, Michal Prívozník wrote: > > > > > > > On 1/20/22 18:23, Ani Sinha wrote: > > > >

Re: [libvirt PATCH 0/5] Support AMD SEV firmware with -bios instead of pflash

2022-01-21 Thread Erik Skultety
On Fri, Jan 21, 2022 at 02:44:02PM +, Daniel P. Berrangé wrote: > On Fri, Jan 21, 2022 at 03:40:23PM +0100, Erik Skultety wrote: > > On Fri, Jan 21, 2022 at 02:16:14PM +, Daniel P. Berrangé wrote: > > > On Fri, Jan 14, 2022 at 07:07:10PM +, Daniel P. Berrangé wrote: > > > > The firmware

Re: [PATCH 00/12] lib: Use virXMLProp*() more

2022-01-21 Thread Ján Tomko
On a Friday in 2022, Michal Privoznik wrote: *** BLURB HERE *** Michal Prívozník (12): virxml: Extend virXMLPropU{Int,LongLong}() error message virNetworkPortDefParseXML: Fix a typo in an error message qemuValidateDomainDeviceDefFS: Use correct enum for fs->multidevs comparison qemu: Use

Re: [libvirt PATCH 00/20] qemu: Introduce hvf domain type for Hypervisor.framework

2022-01-21 Thread Christophe Fergeau
Hey, I tested this on an intel macbook, virsh capabilities shows 'hvf' for the x86_64 qemu binary, I started a f35 guest, -accel hvf is present on the command line, and the VM is a lot faster than without hvf. Feel free to add my Tested-by to the series: Tested-by: Christophe Fergeau Christophe

Re: [libvirt PATCH 0/5] Support AMD SEV firmware with -bios instead of pflash

2022-01-21 Thread Daniel P . Berrangé
On Fri, Jan 21, 2022 at 03:40:23PM +0100, Erik Skultety wrote: > On Fri, Jan 21, 2022 at 02:16:14PM +, Daniel P. Berrangé wrote: > > On Fri, Jan 14, 2022 at 07:07:10PM +, Daniel P. Berrangé wrote: > > > The firmware distros have given people for use with AMD SEV thus far has > > > just been

[PATCH] virProcessGetStatInfo: add a comment describing why we can not report error

2022-01-21 Thread Ani Sinha
virProcessGetStatInfo() currently is unable to report error conditions because that breaks libvirt's public best effort APIs. We add a comment in the function to indicate this. Adding comment here prevents others from going down the path of reporting error conditions in this functions in the future

Re: [PATCH 06/12] lib: Almost eliminate use of virTristateBoolTypeFromString()

2022-01-21 Thread Ján Tomko
On a Friday in 2022, Michal Privoznik wrote: There are couple of places where virTristateBoolTypeFromString() is called. Well, the same result can be achieved by virXMLPropTristateBool() and on fewer lines. Note there are couple of places left untouched because those don't care about error repor

Re: [PATCH] Revert "report error when virProcessGetStatInfo() is unable to parse data"

2022-01-21 Thread Ani Sinha
On Fri, 21 Jan 2022, Daniel P. Berrangé wrote: > On Fri, Jan 21, 2022 at 07:38:35PM +0530, Ani Sinha wrote: > > > > > > On Fri, 21 Jan 2022, Michal Prívozník wrote: > > > > > On 1/20/22 18:23, Ani Sinha wrote: > > > > > > > > > > > > On Thu, Jan 20, 2022 at 21:29 Michal Prívozník > > >

Re: [libvirt PATCH 0/5] Support AMD SEV firmware with -bios instead of pflash

2022-01-21 Thread Erik Skultety
On Fri, Jan 21, 2022 at 02:16:14PM +, Daniel P. Berrangé wrote: > On Fri, Jan 14, 2022 at 07:07:10PM +, Daniel P. Berrangé wrote: > > The firmware distros have given people for use with AMD SEV thus far has > > just been one of the regular OVMF builds. This is sufficient for booting > > a g

Re: [PATCH 05/33] qemu_domain.c: define ISA as default PowerNV serial

2022-01-21 Thread Peter Krempa
On Thu, Jan 20, 2022 at 10:52:08 -0300, Daniel Henrique Barboza wrote: > The PowerNV machines uses ISA as the default serial type. > > Signed-off-by: Daniel Henrique Barboza > --- > src/qemu/qemu_domain.c | 2 ++ > 1 file changed, 2 insertions(+) Reviewed-by: Peter Krempa

Re: [PATCH 05/33] qemu_domain.c: define ISA as default PowerNV serial

2022-01-21 Thread Peter Krempa
On Fri, Jan 21, 2022 at 14:29:05 +, Daniel P. Berrangé wrote: > On Fri, Jan 21, 2022 at 03:01:32PM +0100, Peter Krempa wrote: > > On Thu, Jan 20, 2022 at 11:22:15 -0300, Daniel Henrique Barboza wrote: > > > > > > > > > On 1/20/22 10:58, Peter Krempa wrote: > > > > On Thu, Jan 20, 2022 at 10:5

Re: [PATCH 17/33] conf: parse and format

2022-01-21 Thread Peter Krempa
On Thu, Jan 20, 2022 at 10:52:20 -0300, Daniel Henrique Barboza wrote: > The 'chip-id' attribute indicates which chip/socket that owns the > PowerNV pcie-root controller. > > Signed-off-by: Daniel Henrique Barboza > --- > docs/formatdomain.rst | 4 > docs/schemas/domaincommon.rng |

Re: [PATCH 09/33] qemu_migration.c: forbid powernv domains migration

2022-01-21 Thread Daniel P . Berrangé
On Thu, Jan 20, 2022 at 10:52:12AM -0300, Daniel Henrique Barboza wrote: > The PowerNV machine does not implement any form of migration. What do you mean by that ? Migration is a general feature in QEMU, not typically something that a machine types opts in/out of. It is possible for devices to

Re: [PATCH 05/33] qemu_domain.c: define ISA as default PowerNV serial

2022-01-21 Thread Daniel P . Berrangé
On Fri, Jan 21, 2022 at 03:01:32PM +0100, Peter Krempa wrote: > On Thu, Jan 20, 2022 at 11:22:15 -0300, Daniel Henrique Barboza wrote: > > > > > > On 1/20/22 10:58, Peter Krempa wrote: > > > On Thu, Jan 20, 2022 at 10:52:08 -0300, Daniel Henrique Barboza wrote: > > > > The PowerNV machines uses I

Re: [PATCH 16/33] domain_conf.c: fix identation in virDomainControllerDefParseXML()

2022-01-21 Thread Peter Krempa
On Thu, Jan 20, 2022 at 10:52:19 -0300, Daniel Henrique Barboza wrote: > The identation of VIR_DOMAIN_CONTROLLER_TYPE_PCI elements are in the > same level as the parent 'if (def->type == ...TYPE_PCI)' clause, > and the closing bracket of this 'if' looks like a misplaced bracket > of the 'targetInde

Re: [PATCH 15/33] qemu: add 'modelName' value for pnv-phb3 device

2022-01-21 Thread Peter Krempa
On Thu, Jan 20, 2022 at 10:52:18 -0300, Daniel Henrique Barboza wrote: > Use the 'modelName' attribute for the pnv-phb3 pcie-root device. > > Signed-off-by: Daniel Henrique Barboza > --- > src/qemu/qemu_domain_address.c | 3 +++ > src/qemu/qemu_validate.c| 6

Re: [PATCH 11/33] conf: add 'pnv-phb3-root-port' domain definition

2022-01-21 Thread Peter Krempa
On Thu, Jan 20, 2022 at 10:52:14 -0300, Daniel Henrique Barboza wrote: > Apart from being usable only with pnv-phb3 PCIE host bridges (to be > added soon), this device acts as a regular pcie-root-port but with a > specific model name. > > Signed-off-by: Daniel Henrique Barboza > --- > docs/schem

Re: [PATCH 12/33] qemu: add 'modelName' value for pnv-phb3-root-port device

2022-01-21 Thread Peter Krempa
On Thu, Jan 20, 2022 at 10:52:15 -0300, Daniel Henrique Barboza wrote: > Use the 'modelName' attribute for the pnv-phb3-root-port device. > > Signed-off-by: Daniel Henrique Barboza > --- > src/qemu/qemu_domain_address.c | 5 + > src/qemu/qemu_validate.c | 10 +- > 2 files chan

Re: [PATCH 10/33] qemu: introduce QEMU_CAPS_DEVICE_PNV_PHB3_ROOT_PORT

2022-01-21 Thread Peter Krempa
On Thu, Jan 20, 2022 at 10:52:13 -0300, Daniel Henrique Barboza wrote: > The pnv-phb3-root-port device is the pcie-root-port device for PowerNV8 > domains. > > Add its QEMU capability so Libvirt can recognize it. > > Signed-off-by: Daniel Henrique Barboza > --- > src/qemu/qemu_capabilities.c

Re: [libvirt PATCH 0/5] Support AMD SEV firmware with -bios instead of pflash

2022-01-21 Thread Daniel P . Berrangé
On Fri, Jan 14, 2022 at 07:07:10PM +, Daniel P. Berrangé wrote: > The firmware distros have given people for use with AMD SEV thus far has > just been one of the regular OVMF builds. This is sufficient for booting > a guest with SEV enabled, but is useless if you want to actually > validate the

[libvirt PATCH] qemu: command: Fix the qemuBuldDomainLoaderPflashCommandLine name typo

2022-01-21 Thread Erik Skultety
The function should be called qemuBuildDomainLoaderPflashCommandLine. Signed-off-by: Erik Skultety --- Pushed as trivial. src/qemu/qemu_command.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 60b4f96e06..733cd470

Re: [PATCH 14/33] conf: add 'pnv-phb3' controller model

2022-01-21 Thread Peter Krempa
On Thu, Jan 20, 2022 at 10:52:17 -0300, Daniel Henrique Barboza wrote: > Signed-off-by: Daniel Henrique Barboza > --- > docs/schemas/domaincommon.rng | 2 ++ > src/conf/domain_conf.c| 1 + > src/conf/domain_conf.h| 1 + > src/qemu/qemu_validate.c | 2 ++ > 4 files changed, 6

Re: [PATCH 13/33] qemu: introduce QEMU_CAPS_DEVICE_PNV_PHB3

2022-01-21 Thread Peter Krempa
On Thu, Jan 20, 2022 at 10:52:16 -0300, Daniel Henrique Barboza wrote: > The pnv-phb3 device is the pcie-root controller for PowerNV8 domains. > > Add its QEMU capability so Libvirt can recognize it. > > Signed-off-by: Daniel Henrique Barboza > --- > src/qemu/qemu_capabilities.c

Re: [PATCH] Revert "report error when virProcessGetStatInfo() is unable to parse data"

2022-01-21 Thread Daniel P . Berrangé
On Fri, Jan 21, 2022 at 07:38:35PM +0530, Ani Sinha wrote: > > > On Fri, 21 Jan 2022, Michal Prívozník wrote: > > > On 1/20/22 18:23, Ani Sinha wrote: > > > > > > > > > On Thu, Jan 20, 2022 at 21:29 Michal Prívozník > > > wrote: > > > > > > On 1/20/22 16:48, Ani

Re: [PATCH 07/33] qemu_domain.c: disable default devices for PowerNV machines

2022-01-21 Thread Peter Krempa
On Thu, Jan 20, 2022 at 10:52:10 -0300, Daniel Henrique Barboza wrote: > PowerNV domains will support pcie-root devices as PHBs, in a similar > fashion as pSeries domains supports the spapr-pci-host-bridge as a > pci-root model. > > Set 'addPCIRoot' to false since we'll not be using this buses in

Re: [PATCH 09/33] qemu_migration.c: forbid powernv domains migration

2022-01-21 Thread Peter Krempa
On Thu, Jan 20, 2022 at 10:52:12 -0300, Daniel Henrique Barboza wrote: > The PowerNV machine does not implement any form of migration. > > Signed-off-by: Daniel Henrique Barboza > --- > src/qemu/qemu_migration.c | 6 ++ > 1 file changed, 6 insertions(+) Reviewed-by: Peter Krempa

Re: [PATCH] Revert "report error when virProcessGetStatInfo() is unable to parse data"

2022-01-21 Thread Ani Sinha
On Fri, 21 Jan 2022, Michal Prívozník wrote: > On 1/20/22 18:23, Ani Sinha wrote: > > > > > > On Thu, Jan 20, 2022 at 21:29 Michal Prívozník > > wrote: > > > > On 1/20/22 16:48, Ani Sinha wrote: > > > > > > > > > > > > > > AKA kicking the can one

Re: [PATCH 08/33] tests: add basic PowerNV8 test

2022-01-21 Thread Peter Krempa
On Thu, Jan 20, 2022 at 10:52:11 -0300, Daniel Henrique Barboza wrote: > We're now able to boot a simple PowerNV8 domain in Libvirt. > > Signed-off-by: Daniel Henrique Barboza > --- > tests/qemuxml2argvdata/powernv8-basic.args | 31 + > tests/qemuxml2argvdata/powernv8-basic.

Re: [libvirt PATCH 1/5] docs: explain that some UEFI images can use 'rom' instead of 'pflash'

2022-01-21 Thread Erik Skultety
On Fri, Jan 14, 2022 at 07:07:11PM +, Daniel P. Berrangé wrote: > The normal requirements for UEFI firmware images are to support > persistence of variables, either in the main image, or more typically in > a separate NVRAM file. > > In a confidential computing environment, however, persistenc

Re: [PATCH 06/33] qemu_validate.c: enhance 'machine type not supported' message

2022-01-21 Thread Peter Krempa
On Thu, Jan 20, 2022 at 10:52:09 -0300, Daniel Henrique Barboza wrote: > Add 'virt type' to allow for an easier time debugging. > > Signed-off-by: Daniel Henrique Barboza > --- > src/qemu/qemu_validate.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/src/qemu/qem

Re: [PATCH 05/33] qemu_domain.c: define ISA as default PowerNV serial

2022-01-21 Thread Peter Krempa
On Thu, Jan 20, 2022 at 11:22:15 -0300, Daniel Henrique Barboza wrote: > > > On 1/20/22 10:58, Peter Krempa wrote: > > On Thu, Jan 20, 2022 at 10:52:08 -0300, Daniel Henrique Barboza wrote: > > > The PowerNV machines uses ISA as the default serial type. > > > > ISA? Are you sure? > > > > ISA is

Re: [PATCH 04/33] qemu_validate.c: use qemuDomainIsPowerPC() in qemuValidateDomainChrDef()

2022-01-21 Thread Peter Krempa
On Thu, Jan 20, 2022 at 10:52:07 -0300, Daniel Henrique Barboza wrote: > Both PowerNV and pSeries machines don't support parallel ports. > > Signed-off-by: Daniel Henrique Barboza > --- > src/qemu/qemu_validate.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Peter Krempa

Re: [PATCH 03/33] qemu_capabilities.c: use 'MachineIsPowerPC' in DeviceDiskCaps

2022-01-21 Thread Peter Krempa
On Thu, Jan 20, 2022 at 10:52:06 -0300, Daniel Henrique Barboza wrote: > Both pSeries and PowerNV machines don't have floppy device support. > > qemuDomainMachineIsPSeries() can be turned into static since it's > now unused outside of qemu_domain.c. Preferably don't bundle two not related changes

Re: [PATCH 02/33] qemu_domain.c: add PowerNV machine helpers

2022-01-21 Thread Peter Krempa
On Thu, Jan 20, 2022 at 10:52:05 -0300, Daniel Henrique Barboza wrote: > The PowerNV (Power Non-Virtualized) QEMU ppc64 machine is the emulation > of a bare-metal IBM Power host. It follows the OPAL (OpenPower > Abstration Layer) API/ABI, most specifically Skiboot [1]. For now, > Libvirt has suppo

[PATCH 11/12] conf: Convert virNetworkPortDefParseXML() to virXMLProp*()

2022-01-21 Thread Michal Privoznik
After previous cleanups, the virNetworkPortDefParseXML() function uses a mixture of virXMLProp*() and the old virXMLPropString() + virXXXTypeFromString() patterns. Rework it so that virXMLProp*() is used. Signed-off-by: Michal Privoznik --- src/conf/virnetworkportdef.c | 20 +---

[PATCH 07/12] conf: Convert virCPUDefParseXML() to virXMLProp*()

2022-01-21 Thread Michal Privoznik
After previous cleanups, the virCPUDefParseXML() function uses a mixture of virXMLProp*() and the old virXMLPropString() + virXXXTypeFromString() patterns. Rework it so that virXMLProp*() is used. Signed-off-by: Michal Privoznik --- src/conf/cpu_conf.c | 24 src/conf/cpu

[PATCH 05/12] lib: Eliminate use of virTristateSwitchTypeFromString()

2022-01-21 Thread Michal Privoznik
There are couple of places (all of them in XML parsing) where virTristateSwitchTypeFromString() is called. Well, the same result can be achieved by virXMLPropTristateSwitch() and on fewer lines. Signed-off-by: Michal Privoznik --- src/conf/cpu_conf.c| 32 +--- src/conf/domain_conf.c

[PATCH 03/12] qemuValidateDomainDeviceDefFS: Use correct enum for fs->multidevs comparison

2022-01-21 Thread Michal Privoznik
During validation of a virDomainFSDef QEMU capabilities are check for multidevs support if the FS definition has it enabled. However, the fs->multidevs is really type of virDomainFSMultidevs but is compared against virDomainFSModel enum. Fortunately, both values are the same so no user visible harm

[PATCH 00/12] lib: Use virXMLProp*() more

2022-01-21 Thread Michal Privoznik
*** BLURB HERE *** Michal Prívozník (12): virxml: Extend virXMLPropU{Int,LongLong}() error message virNetworkPortDefParseXML: Fix a typo in an error message qemuValidateDomainDeviceDefFS: Use correct enum for fs->multidevs comparison qemu: Use virTristateBool instead of virTristateSwit

[PATCH 10/12] conf: Convert virDomainNetDefParseXML() to virXMLProp*()

2022-01-21 Thread Michal Privoznik
After previous cleanups, the virDomainNetDefParseXML() function uses a mixture of virXMLProp*() and the old virXMLPropString() + virXXXTypeFromString() patterns. Rework it so that virXMLProp*() is used. Signed-off-by: Michal Privoznik --- src/conf/domain_conf.c| 112 +

[PATCH 09/12] conf: Convert virDomainFSDefParseXML() to virXMLProp*()

2022-01-21 Thread Michal Privoznik
After previous cleanups, the virDomainFSDefParseXML() function uses a mixture of virXMLProp*() and the old virXMLPropString() + virXXXTypeFromString() patterns. Rework it so that virXMLProp*() is used. Signed-off-by: Michal Privoznik --- src/bhyve/bhyve_command.c | 2 +- src/conf/domain_c

[PATCH 08/12] conf: Convert virDomainDefParseBootXML() to virXMLProp*()

2022-01-21 Thread Michal Privoznik
After previous cleanups, the virDomainDefParseBootXML() function uses a mixture of virXMLProp*() and the old virXMLPropString() + virXXXTypeFromString() patterns. Rework it so that virXMLProp*() is used. Signed-off-by: Michal Privoznik --- src/conf/domain_conf.c | 61 +--

[PATCH 01/12] virxml: Extend virXMLPropU{Int, LongLong}() error message

2022-01-21 Thread Michal Privoznik
In case virXMLPropUInt() or virXMLPropULongLong() meets an attribute with a negative integer the following error message is printed: Invalid value ...: Expected integer value This message is not as good as it could be. Let users know it's a non-negative integer we are expecting. Signed-off-by:

[PATCH 12/12] conf: Convert virDomainHostdevDefParseXMLSubsys() to virXMLProp*()

2022-01-21 Thread Michal Privoznik
After previous cleanups, the virDomainHostdevDefParseXMLSubsys() function uses a mixture of virXMLProp*() and the old virXMLPropString() + virXXXTypeFromString() patterns. Rework it so that virXMLProp*() is used. Signed-off-by: Michal Privoznik --- src/conf/domain_conf.c| 60

[PATCH 06/12] lib: Almost eliminate use of virTristateBoolTypeFromString()

2022-01-21 Thread Michal Privoznik
There are couple of places where virTristateBoolTypeFromString() is called. Well, the same result can be achieved by virXMLPropTristateBool() and on fewer lines. Note there are couple of places left untouched because those don't care about error reporting and thus are shorter they way they are now

[PATCH 04/12] qemu: Use virTristateBool instead of virTristateSwitch in a few places

2022-01-21 Thread Michal Privoznik
Both @accel2d and @accel3d are parsed as virTristateBool, but in a few places (qemuDeviceVideoGetModel() and qemuValidateDomainDeviceDefVideo()) they are compared to virTristateSwitch enum either directly or via a variable of that type. Clear this confusion by using the correct enum. Signed-off-by

[PATCH 02/12] virNetworkPortDefParseXML: Fix a typo in an error message

2022-01-21 Thread Michal Privoznik
There's a typo in error message that's printed when parsing of fails: "prt" is reported instead of "port". Signed-off-by: Michal Privoznik --- src/conf/virnetworkportdef.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/virnetworkportdef.c b/src/conf/virnetworkportd

Re: [PATCH v2 3/3] man: virt-admin: Mention monolithic daemon URIs

2022-01-21 Thread Erik Skultety
On Thu, Jan 20, 2022 at 06:16:43PM +0100, Peter Krempa wrote: > On Thu, Jan 20, 2022 at 18:14:08 +0100, Erik Skultety wrote: > > On Thu, Jan 20, 2022 at 04:34:03PM +0100, Peter Krempa wrote: > > > Hint users that they can use 'virt-admin' also for the new monolithic > > > daemons. > > > > > > Reso

[libvirt PATCH v3 3/3] ci: Add spell checking

2022-01-21 Thread Tim Wiederhake
Allow the spell checking job to fail to not have false-positives fail the entire build. Signed-off-by: Tim Wiederhake --- .gitlab-ci.yml | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6ba11a0431..8f43889067 100644 --- a/.gi

[libvirt PATCH v3 1/3] scripts: Check spelling

2022-01-21 Thread Tim Wiederhake
This is a wrapper for codespell [1], a spell checker for source code. Codespell does not compare words to a dictionary, but rather works by checking words against a list of common typos, making it produce fewer false positives than other solutions. The script in this patch works around the lack of

[libvirt PATCH v3 0/3] ci: Check spelling

2022-01-21 Thread Tim Wiederhake
This is a wrapper for codespell [1], a spell checker for source code. Codespell does not compare words to a dictionary, but rather works by checking words against a list of common typos, making it produce fewer false positives than other solutions. The script in this patch works around the lack of

  1   2   >