Re: [PATCH 1/1] qemu_tpm: Get swtpm pid without binary validation

2022-01-11 Thread Vasily Ulyanov
Hi Michal, On 11/01/2022 11:00, Michal Prívozník wrote: > > Firstly, this fixes the problem only for swtpm case, but there is one > other place where the same problem can happen (qemuVhostUserGPUGetPid()). > Sure, I can also try to fix the vhost gpu case. Was mostly focused on tpm hence did

[libvirt PATCH v4 6/7] ch_process: Setup emulator and iothread settings

2022-01-11 Thread Praveen K Paladugu
using virCHProcessSetupPid Signed-off-by: Praveen K Paladugu --- src/ch/ch_monitor.c | 60 +++ src/ch/ch_monitor.h | 2 ++ src/ch/ch_process.c | 77 - 3 files changed, 138 insertions(+), 1 deletion(-) diff --git

[libvirt PATCH v4 4/7] ch_driver: enable typed param string for numatune

2022-01-11 Thread Praveen K Paladugu
From: Vineeth Pillai Enable support of VIR_DRV_FEATURE_TYPED_PARAM_STRING to enable numatune Signed-off-by: Vineeth Pillai Signed-off-by: Praveen K Paladugu --- src/ch/ch_driver.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/src/ch/ch_driver.c

[libvirt PATCH v4 1/7] qemu, hypervisor: refactor some cgroup mgmt methods

2022-01-11 Thread Praveen K Paladugu
Refactor some cgroup management methods from qemu into hypervisor. These methods will be shared with ch driver for cgroup management. Signed-off-by: Praveen K Paladugu --- src/hypervisor/domain_cgroup.c | 457 - src/hypervisor/domain_cgroup.h | 72 ++

[libvirt PATCH v4 5/7] ch_driver: add numatune callbacks for CH driver

2022-01-11 Thread Praveen K Paladugu
From: Vineeth Pillai Signed-off-by: Vineeth Pillai Signed-off-by: Praveen K Paladugu --- src/ch/ch_driver.c | 260 + 1 file changed, 260 insertions(+) diff --git a/src/ch/ch_driver.c b/src/ch/ch_driver.c index 408aae2cd6..e3c0ae2952 100644 ---

[libvirt PATCH v4 7/7] ch_driver: emulator threadinfo & pinning callbacks

2022-01-11 Thread Praveen K Paladugu
Signed-off-by: Praveen K Paladugu --- src/ch/ch_driver.c | 154 + 1 file changed, 154 insertions(+) diff --git a/src/ch/ch_driver.c b/src/ch/ch_driver.c index e3c0ae2952..bf5bb3696c 100644 --- a/src/ch/ch_driver.c +++ b/src/ch/ch_driver.c @@ -1303,6

[libvirt PATCH v4 3/7] ch_driver, ch_domain: vcpupin callback in ch driver

2022-01-11 Thread Praveen K Paladugu
From: Vineeth Pillai Signed-off-by: Vineeth Pillai Signed-off-by: Praveen K Paladugu --- src/ch/ch_domain.c | 30 + src/ch/ch_domain.h | 7 ++- src/ch/ch_driver.c | 145 src/ch/ch_monitor.c | 2 +- 4 files changed, 181

[libvirt PATCH v4 2/7] ch: methods for cgroup mgmt in ch driver

2022-01-11 Thread Praveen K Paladugu
From: Vineeth Pillai Signed-off-by: Vineeth Pillai Signed-off-by: Praveen K Paladugu --- src/ch/ch_conf.c| 2 + src/ch/ch_conf.h| 4 +- src/ch/ch_domain.c | 34 + src/ch/ch_domain.h | 11 +- src/ch/ch_monitor.c | 96 ++ src/ch/ch_monitor.h | 54 +++-

[libvirt PATCH v4 0/7] cgroup and thread management in ch driver.

2022-01-11 Thread Praveen K Paladugu
This patchset adds support for cgroup management of ch threads. This version correctly manages cgroups for vcpu and emulator threads created by ch. cgroup management for iothreads is not yet supported. Along with cgroup management, this patchset also enables support for pinning vcpu and emulator

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

2022-01-11 Thread Ani Sinha
I just realized after sending this patch that I made the change in the Linux version of the function. It may not be applicable for FreeBSD . In any case I simply don’t understand if errors on the logs is a problem. If it is maybe we need a FreeBSD version of this function as well not just a larger

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

2022-01-11 Thread Ani Sinha
On Tue, 11 Jan 2022, Michal Prívozník wrote: > On 1/11/22 11:20, Ani Sinha wrote: > > Currently virProcessGetStatInfo() always returns success and only logs error > > when it is unable to parse the data. Make this function actually report the > > error and return a negative value in this error

[PATCH v4] report error when virProcessGetStatInfo() is unable to parse data

2022-01-11 Thread Ani Sinha
Currently virProcessGetStatInfo() always returns success and only logs error when it is unable to parse the data. Make this function actually report the error and return a negative value in this error scenario. Fix the callers so that they do not override the error generated. Also fix non-linux

[libvirt PATCH 2/3] docs: use virYesNo definition in more schemas

2022-01-11 Thread Daniel P . Berrangé
A few places are still using an expend yes/no choice instead of the common virYesNo definition. Signed-off-by: Daniel P. Berrangé --- docs/schemas/capability.rng | 5 + docs/schemas/domainbackup.rng | 5 + docs/schemas/domaincaps.rng | 5 + docs/schemas/domaincommon.rng | 17

[libvirt PATCH 1/3] docs: split example for schema

2022-01-11 Thread Daniel P . Berrangé
The docs illustration for the schema contains a mixture of incompatible configuration options. This is rather confusing and misleading to users. Splitting the illustration into four separate examples clarifies the situation. Signed-off-by: Daniel P. Berrangé --- docs/formatdomain.rst | 32

[libvirt PATCH 0/3] Misc fixes / improvements

2022-01-11 Thread Daniel P . Berrangé
Just a few things I dealt with as side effect of other work I'm doing wrt AMD SEV. Daniel P. Berrangé (3): docs: split example for schema docs: use virYesNo definition in more schemas qemu: split handling of distinct firmware enum conversions docs/formatdomain.rst | 32

[libvirt PATCH 3/3] qemu: split handling of distinct firmware enum conversions

2022-01-11 Thread Daniel P . Berrangé
The qemuFirmwareOSInterfaceTypeFromOsDefFirmware method was added to convert from virDomainOsDefFirmware to the qemuFirmwareOSInterface enum. It was later also used to convert from virDomainLoader to qemuFirmwareOSInterface in: commit 8e1804f9f66f13ca1412d22bf1a957b6d55a2365 Author: Michal

Re: [PATCH V2 0/2] docs: Add man page for libvirt-guests

2022-01-11 Thread Andrea Bolognani
On Mon, Jan 10, 2022 at 02:23:59PM -0700, Jim Fehlig wrote: > V2 of > https://listman.redhat.com/archives/libvir-list/2022-January/msg00336.html > > Changes since V1: > - New patch to only install libvirt-guests when building libvirtd > - Only install libvirt-guests man page when building

Re: [PATCH 2/3] virdnsmasq: Lookup DNSMASQ in PATH

2022-01-11 Thread Andrea Bolognani
On Tue, Jan 11, 2022 at 10:24:00AM +, Daniel P. Berrangé wrote: > On Tue, Jan 11, 2022 at 10:18:23AM +, Andrea Bolognani wrote: > > On Tue, Jan 11, 2022 at 09:59:06AM +, Daniel P. Berrangé wrote: > > > Why do we need a fallback ? If someone has put 'dnsmasq' in $PATH > > > without the

Re: [PATCH v6 3/4] remove sysconfig files

2022-01-11 Thread Andrea Bolognani
On Tue, Jan 11, 2022 at 10:10:30AM +, Daniel P. Berrangé wrote: > On Tue, Jan 11, 2022 at 10:05:41AM +, Andrea Bolognani wrote: > > But, what you're saying is that there are still valid use cases > > for setting those in the service file, and we can't quite get rid of > > them yet - or

Re: [PATCH for 8.0 0/3] Fix creation of snapshots without libvirt metadata

2022-01-11 Thread Michal Prívozník
On 1/11/22 10:53, Peter Krempa wrote: > After a recent unreleased refactor we don't remove the temporary > snapshot object from the list when finishing a snapshot without metadata > thus we should fix it before releasing a buggy release. > > This patchset fixes it by not adding it into the list

Re: [PATCH 3/3] qemuSnapshotCreate: Don't insert snapshot into list with VIR_DOMAIN_SNAPSHOT_CREATE_NO_METADATA

2022-01-11 Thread Michal Prívozník
On 1/11/22 10:53, Peter Krempa wrote: > Our approach to snapshots without metadata was to insert them to the > snapshot list and then later remove them from the list when the flag is > present. > > This quirky logic was broken in a recent refactor of the snapshot code > causing that the snapshot

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

2022-01-11 Thread Michal Prívozník
On 1/11/22 11:20, Ani Sinha wrote: > Currently virProcessGetStatInfo() always returns success and only logs error > when it is unable to parse the data. Make this function actually report the > error and return a negative value in this error scenario. > > Fix the callers so that they do not

Re: [RFC v3 1/2] Add the port allocation logic for isa-serial devices.

2022-01-11 Thread Ani Sinha
On Tue, 11 Jan 2022, Divya Garg wrote: > > On 11/01/22 4:09 pm, Ani Sinha wrote: > > Please add SOB. > Yes Thankyou so much. Should I have a new version for it or on the same thread > send > the updated patches ? I am fine with your bugfix patch patch 2. DanPB and others, could you guys

Re: [RFC v3 1/2] Add the port allocation logic for isa-serial devices.

2022-01-11 Thread Divya Garg
On 11/01/22 4:09 pm, Ani Sinha wrote: Please add SOB. Yes Thankyou so much. Should I have a new version for it or on the same thread send the updated patches ? On Mon, 10 Jan 2022, Divya Garg wrote: This commit takes care of following cases: -> Check availability of requested ports.

Re: [RFC v3 2/2] qemu: add index for isa-serial device using target.port

2022-01-11 Thread Divya Garg
On 11/01/22 4:08 pm, Ani Sinha wrote: SOB line is missing. Patches are not accepted without SOB. I am extremely sorry I forgot to add it. Thankyou so much. On Mon, 10 Jan 2022, Divya Garg wrote: VM XML accepts target.port but this does not get passed while building the qemu command line

Re: [PATCH] docs: minor fix in launchSecurity

2022-01-11 Thread Pavel Hrdina
On Tue, Jan 11, 2022 at 10:03:32AM +0100, Boris Fiuczynski wrote: > Correcting XML element. > > Signed-off-by: Boris Fiuczynski > --- > docs/formatdomain.rst | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Pavel Hrdina signature.asc Description: PGP signature

Re: [RFC v3 1/2] Add the port allocation logic for isa-serial devices.

2022-01-11 Thread Ani Sinha
Please add SOB. On Mon, 10 Jan 2022, Divya Garg wrote: > This commit takes care of following cases: > -> Check availability of requested ports. > ->The total number of requested ports should not be more than > VIR_MAX_ISA_SERIAL_PORTS. > ->The ports requested should be less than

Re: [RFC v3 2/2] qemu: add index for isa-serial device using target.port

2022-01-11 Thread Ani Sinha
SOB line is missing. Patches are not accepted without SOB. On Mon, 10 Jan 2022, Divya Garg wrote: > VM XML accepts target.port but this does not get passed while building the > qemu > command line for this VM. > --- > src/qemu/qemu_command.c | 22 ++- >

Re: [PATCH 2/3] virdnsmasq: Lookup DNSMASQ in PATH

2022-01-11 Thread Daniel P . Berrangé
On Tue, Jan 11, 2022 at 10:18:23AM +, Andrea Bolognani wrote: > On Tue, Jan 11, 2022 at 09:59:06AM +, Daniel P. Berrangé wrote: > > On Tue, Jan 11, 2022 at 09:28:45AM +0100, Michal Prívozník wrote: > > > Thanks, but as I was looking through virFindFileInPath() I've noticed > > > that if

[PATCH v3] report error when virProcessGetStatInfo() is unable to parse data

2022-01-11 Thread Ani Sinha
Currently virProcessGetStatInfo() always returns success and only logs error when it is unable to parse the data. Make this function actually report the error and return a negative value in this error scenario. Fix the callers so that they do not override the error generated. Also fix non-linux

Re: [PATCH 2/3] virdnsmasq: Lookup DNSMASQ in PATH

2022-01-11 Thread Andrea Bolognani
On Tue, Jan 11, 2022 at 09:59:06AM +, Daniel P. Berrangé wrote: > On Tue, Jan 11, 2022 at 09:28:45AM +0100, Michal Prívozník wrote: > > Thanks, but as I was looking through virFindFileInPath() I've noticed > > that if the file exists but is not executable then NULL is returned, so > > we will

Re: [PATCH v6 3/4] remove sysconfig files

2022-01-11 Thread Daniel P . Berrangé
On Tue, Jan 11, 2022 at 10:05:41AM +, Andrea Bolognani wrote: > On Tue, Jan 11, 2022 at 09:56:30AM +, Daniel P. Berrangé wrote: > > On Tue, Jan 11, 2022 at 09:51:05AM +, Andrea Bolognani wrote: > > > On Tue, Jan 11, 2022 at 10:21:32AM +0100, Olaf Hering wrote: > > > > Mon, 3 Jan 2022

Re: [PATCH v6 3/4] remove sysconfig files

2022-01-11 Thread Andrea Bolognani
On Tue, Jan 11, 2022 at 09:56:30AM +, Daniel P. Berrangé wrote: > On Tue, Jan 11, 2022 at 09:51:05AM +, Andrea Bolognani wrote: > > On Tue, Jan 11, 2022 at 10:21:32AM +0100, Olaf Hering wrote: > > > Mon, 3 Jan 2022 03:18:11 -0800 Andrea Bolognani : > > > > The fact that we still

Re: [PATCH 1/1] qemu_tpm: Get swtpm pid without binary validation

2022-01-11 Thread Michal Prívozník
On 1/3/22 08:56, Vasiliy Ulyanov wrote: > Access to /proc/[pid]/exe may be restricted in certain environments (e.g. > in containers) and any attempt to stat(2) or readlink(2) the file will > result in 'permission denied' error if the calling process does not have > CAP_SYS_PTRACE capability.

Re: [PATCH 2/3] virdnsmasq: Lookup DNSMASQ in PATH

2022-01-11 Thread Daniel P . Berrangé
On Tue, Jan 11, 2022 at 09:28:45AM +0100, Michal Prívozník wrote: > On 1/10/22 18:41, Andrea Bolognani wrote: > > On Mon, Jan 10, 2022 at 04:44:55PM +0100, Michal Privoznik wrote: > >> While it's true that our virCommand subsystem is happy with > >> non-absolute paths, the dnsmasq capability code

Re: [libvirt PATCH v2 1/3] scripts: Check spelling

2022-01-11 Thread Andrea Bolognani
On Mon, Jan 10, 2022 at 03:58:55PM -0700, Jim Fehlig wrote: > On 1/10/22 11:21, Andrea Bolognani wrote: > > On Mon, Jan 10, 2022 at 04:41:25PM +0100, Tim Wiederhake wrote: > > > +("/src/security/apparmor/libvirt-lxc", "devic"), > > > > Looking at the context where this appears: > > > >deny

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

2022-01-11 Thread Peter Krempa
On Tue, Jan 11, 2022 at 15:16:36 +0530, Ani Sinha wrote: > > > On Tue, 11 Jan 2022, Michal Prívozník wrote: > > > On 1/11/22 04:42, Ani Sinha wrote: > > > Currently virProcessGetStatInfo() always returns success and only logs > > > error > > > when it is unable to parse the data. Make this

Re: [PATCH v6 3/4] remove sysconfig files

2022-01-11 Thread Daniel P . Berrangé
On Tue, Jan 11, 2022 at 09:51:05AM +, Andrea Bolognani wrote: > On Tue, Jan 11, 2022 at 10:21:32AM +0100, Olaf Hering wrote: > > Mon, 3 Jan 2022 03:18:11 -0800 Andrea Bolognani : > > > > > The fact that we still QEMU_AUDIO_DRV and SDL_AUDIODRIVER in the > > > service file even after your

[PATCH 3/3] qemuSnapshotCreate: Don't insert snapshot into list with VIR_DOMAIN_SNAPSHOT_CREATE_NO_METADATA

2022-01-11 Thread Peter Krempa
Our approach to snapshots without metadata was to insert them to the snapshot list and then later remove them from the list when the flag is present. This quirky logic was broken in a recent refactor of the snapshot code causing that the snapshot stayed inserted in the snapshot list. Recent

[PATCH 2/3] conf: moment: Export helpers to create the virDomainMoment wrapper

2022-01-11 Thread Peter Krempa
Export 'virDomainMomentObjNew' and 'virDomainMomentObjFree' and define the latter as autoptr cleanup function for 'virDomainMomentObj'. Signed-off-by: Peter Krempa --- src/conf/virdomainmomentobjlist.c | 4 ++-- src/conf/virdomainmomentobjlist.h | 8 src/libvirt_private.syms |

[PATCH for 8.0 0/3] Fix creation of snapshots without libvirt metadata

2022-01-11 Thread Peter Krempa
After a recent unreleased refactor we don't remove the temporary snapshot object from the list when finishing a snapshot without metadata thus we should fix it before releasing a buggy release. This patchset fixes it by not adding it into the list in the first place. Peter Krempa (3):

[PATCH 1/3] virdomainmomentobjlist.h: Convert to modern header style

2022-01-11 Thread Peter Krempa
Format the function prototypes the same way as in the .c file. Signed-off-by: Peter Krempa --- src/conf/virdomainmomentobjlist.h | 113 ++ 1 file changed, 70 insertions(+), 43 deletions(-) diff --git a/src/conf/virdomainmomentobjlist.h

Re: [PATCH v6 3/4] remove sysconfig files

2022-01-11 Thread Andrea Bolognani
On Tue, Jan 11, 2022 at 10:21:32AM +0100, Olaf Hering wrote: > Mon, 3 Jan 2022 03:18:11 -0800 Andrea Bolognani : > > > The fact that we still QEMU_AUDIO_DRV and SDL_AUDIODRIVER in the > > service file even after your changes goes against this principle. > > So what should be done about these? > >

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

2022-01-11 Thread Ani Sinha
On Tue, 11 Jan 2022, Michal Prívozník wrote: > On 1/11/22 04:42, Ani Sinha wrote: > > Currently virProcessGetStatInfo() always returns success and only logs error > > when it is unable to parse the data. Make this function actually report the > > error and return a negative value in this error

Re: [PATCH 2/3] virdnsmasq: Lookup DNSMASQ in PATH

2022-01-11 Thread Andrea Bolognani
On Tue, Jan 11, 2022 at 09:28:45AM +0100, Michal Prívozník wrote: > Thanks, but as I was looking through virFindFileInPath() I've noticed > that if the file exists but is not executable then NULL is returned, so > we will need a fallback case. Right. But considering that

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

2022-01-11 Thread Michal Prívozník
On 1/11/22 04:42, Ani Sinha wrote: > Currently virProcessGetStatInfo() always returns success and only logs error > when it is unable to parse the data. Make this function actually report the > error and return a negative value in this error scenario. > > Fix the callers so that they do not

Re: [PATCH v6 3/4] remove sysconfig files

2022-01-11 Thread Olaf Hering
Mon, 3 Jan 2022 03:18:11 -0800 Andrea Bolognani : > The fact that we still QEMU_AUDIO_DRV and SDL_AUDIODRIVER in the > service file even after your changes goes against this principle. So what should be done about these? I think whoever added support for these environment variables a couple of

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

2022-01-11 Thread Andrea Bolognani
From: Roman Bolshakov Signed-off-by: Roman Bolshakov Signed-off-by: Andrea Bolognani Tested-by: Brad Laue --- NEWS.rst | 9 + 1 file changed, 9 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index b5893627e3..116d7c1251 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -53,6 +53,15 @@ v8.0.0

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

2022-01-11 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

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

2022-01-11 Thread Andrea Bolognani
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 docs/meson.build | 1 + 4 files changed, 50

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

2022-01-11 Thread Andrea Bolognani
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-off-by: Andrea Bolognani Tested-by: Brad Laue ---

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

2022-01-11 Thread Andrea Bolognani
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: Andrea Bolognani Tested-by: Brad Laue --- NEWS.rst | 7 ++- 1 file

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

2022-01-11 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

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

2022-01-11 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 --- tests/testutilsqemu.c | 58 +++

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

2022-01-11 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 v5 14/20] tests: Add macOS support to qemuxml2*test

2022-01-11 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 --- tests/qemuxml2argvtest.c | 25 - tests/qemuxml2xmltest.c |

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

2022-01-11 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 --- .../hvf-aarch64-virt-headless.args| 48 +

[libvirt PATCH v5 10/20] qemu: Introduce virQEMUCapsHaveAccel

2022-01-11 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 Reviewed-by: Daniel P. Berrangé --- src/qemu/qemu_capabilities.c | 17

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

2022-01-11 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 --- src/qemu/qemu_capabilities.c | 35 ---

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

2022-01-11 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 --- src/qemu/qemu_capabilities.c | 14 -- 1 file changed, 12 insertions(+),

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

2022-01-11 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:

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

2022-01-11 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 --- src/qemu/qemu_process.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_process.c

[libvirt PATCH v5 05/20] qemu: Query hvf capability on macOS

2022-01-11 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 Reviewed-by: Daniel P. Berrangé

[libvirt PATCH v5 07/20] qemu: Expose hvf domain type if hvf is supported

2022-01-11 Thread Andrea Bolognani
From: Roman Bolshakov Signed-off-by: Roman Bolshakov Signed-off-by: Andrea Bolognani Tested-by: Brad Laue 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/qemu/qemu_capabilities.c

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

2022-01-11 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

[libvirt PATCH v5 04/20] qemu: Define hvf capability

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

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

2022-01-11 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

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

2022-01-11 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

[PATCH] docs: minor fix in launchSecurity

2022-01-11 Thread Boris Fiuczynski
Correcting XML element. Signed-off-by: Boris Fiuczynski --- docs/formatdomain.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index d4f30bb8af..69e02e0135 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@

[PATCH v2 2/3] virdnsmasq: Lookup DNSMASQ in PATH

2022-01-11 Thread Michal Privoznik
While it's true that our virCommand subsystem is happy with non-absolute paths, the dnsmasq capability code is not. For instance, it does call stat() over the binary to learn its mtime (and thus decide whether capabilities need to be fetched again or not). Therefore, when constructing the

Re: [PATCH 2/3] virdnsmasq: Lookup DNSMASQ in PATH

2022-01-11 Thread Michal Prívozník
On 1/10/22 18:41, Andrea Bolognani wrote: > On Mon, Jan 10, 2022 at 04:44:55PM +0100, Michal Privoznik wrote: >> While it's true that our virCommand subsystem is happy with >> non-absolute paths, the dnsmasq capability code is not. For >> instance, it does call stat() over the binary to learn its