Re: [PATCH] os: deprecate the -enable-fips option and QEMU's FIPS enforcement

2020-10-20 Thread Thomas Huth
On 20/10/2020 18.22, Daniel P. Berrangé wrote: > The -enable-fips option was added a long time ago to prevent the use of > single DES when VNC when FIPS mode is enabled. It should never have been > added, because apps are supposed to unconditionally honour FIPS mode > based on the

[PATCH] util: fix very old bug/typo in virNetDevParseVfInfo()

2020-10-20 Thread Laine Stump
When this function was recently changed to add in parsing of IFLA_VF_STATS, I noticed that the checks for existence of IFLA_VF_MAC and IFLA_VF_VLAN were looking in the *wrong array*. The array that contains the results of parsing each IFLA_VFINFO in tb[IFLA_VFINFO_LIST] is tb_vf, but we were

[PATCH 6/9] util: use more g_autofree in virpci.c

2020-10-20 Thread Laine Stump
Signed-off-by: Laine Stump --- src/util/virpci.c | 27 +-- 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/src/util/virpci.c b/src/util/virpci.c index 3ca513702e..c7ee259e29 100644 --- a/src/util/virpci.c +++ b/src/util/virpci.c @@ -1245,7 +1245,7 @@ static

[PATCH 5/9] util: avoid manual VIR_FREE of a g_autofree pointer in virPCIGetName()

2020-10-20 Thread Laine Stump
thisPhysPortID is only used inside a conditional, so reduce its scope to just the body of that conditional, which will eliminate the need for the undesirable manual VIR_FREE(). Signed-off-by: Laine Stump --- src/util/virpci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 4/9] util: simplify virPCIProbeStubDriver()

2020-10-20 Thread Laine Stump
This function had a loop that was only executed twice; it was artificially constructed with a label, a goto, and a boolean to tell that it had already been executed once. Aside from that, the body of the loop contained only two lines that needed to be repeated (the second time through, everything

[PATCH 3/9] util: simplify virPCIDriverDir() and its callers

2020-10-20 Thread Laine Stump
There is no need for a temporary variable in this function, and since it can't return NULL, no need for callers to check for it. Signed-off-by: Laine Stump --- src/util/virpci.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/util/virpci.c

[PATCH 0/9] several small cleanups in virpci.c et. al.

2020-10-20 Thread Laine Stump
These started with a couple small cleanups to functions I was going to change the API for, but then I decided not to change the API, and just didn't want to waste the effort spent cleaning them up. Laine Stump (9): util: simplify virHostdevPCISysfsPath() util: simplify virPCIFile() and its

[PATCH 1/9] util: simplify virHostdevPCISysfsPath()

2020-10-20 Thread Laine Stump
Apparently at some point in the past, when there were multiple types to represent PCI addresses, the function virPCIDeviceAddressGetSysfsFile() used one of those types, while virDomainHostDevDef used another. It's been quite awhile since we reduced the number of different representations of PCI

[PATCH 2/9] util: simplify virPCIFile() and its callers

2020-10-20 Thread Laine Stump
There is no need for a temporary variable in this function, and ever since we switched to glib for memory allocation, there is no possibility it can return NULL, so callers don't need to check for it. Signed-off-by: Laine Stump --- src/util/virpci.c | 34 ++ 1

[PATCH 7/9] util: remove unneeded cleanup:/ret in virpci.c

2020-10-20 Thread Laine Stump
These were nops once enough cleanup was g_auto'd. Signed-off-by: Laine Stump --- src/util/virpci.c | 35 +-- 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/src/util/virpci.c b/src/util/virpci.c index c7ee259e29..855872031e 100644 ---

[PATCH 8/9] util: don't use virPCIGetSysfsFile()

2020-10-20 Thread Laine Stump
virPCIDeviceAddressGetSysfsFile() is simpler to call. Signed-off-by: Laine Stump --- src/util/virnetdev.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c index 088f35621d..e284d62233 100644 --- a/src/util/virnetdev.c +++

[PATCH 9/9] util: remove unused function virPCIGetSysfsFile()

2020-10-20 Thread Laine Stump
Signed-off-by: Laine Stump --- src/libvirt_private.syms | 1 - src/util/virpci.c| 15 --- src/util/virpci.h| 4 3 files changed, 20 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index ae543589f1..b2d786409b 100644 ---

Re: [PATCH v11 13/13] block: apply COR-filter to block-stream jobs

2020-10-20 Thread Andrey Shinkevich
On 16.10.2020 18:45, Vladimir Sementsov-Ogievskiy wrote: 15.10.2020 20:16, Andrey Shinkevich wrote: On 14.10.2020 19:24, Max Reitz wrote: On 12.10.20 19:43, Andrey Shinkevich wrote: [...] ---   block/stream.c | 93 +-  

Re: [PATCH v5 2/2] util: rename virNetDevParseVfConfig to virNetDevParseVfInfo

2020-10-20 Thread Laine Stump
On 10/15/20 7:21 AM, zhenwei pi wrote: Suggested by Laine: virNetDevParseVfConfig has became a multifunctional helper function, rename it to virNetDevParseVfInfo. Signed-off-by: zhenwei pi Reviewed-by: Laine Stump and pushed. Now I need to figure out what the prize is for answering the

Re: [PATCH v5 1/2] util: support PCI passthrough net device stats collection

2020-10-20 Thread Laine Stump
On 10/15/20 7:21 AM, zhenwei pi wrote: Collect PCI passthrough net device stats from kernel by netlink API. Currently, libvirt can not get PCI passthrough net device stats, run command: #virsh domifstat instance --interface=52:54:00:2d:b2:35 error: Failed to get interface stats instance

Re: [libvirt PATCH v5 0/6] Add support for vDPA network devices

2020-10-20 Thread Jonathon Jongsma
On Tue, 20 Oct 2020 15:16:48 -0400 Laine Stump wrote: > On 10/14/20 1:08 PM, Jonathon Jongsma wrote: > > vDPA network devices allow high-performance networking in a virtual > > machine by providing a wire-speed data path. These devices require > > a vendor-specific host driver but the data path

Re: [libvirt PATCH v5 0/6] Add support for vDPA network devices

2020-10-20 Thread Laine Stump
On 10/14/20 1:08 PM, Jonathon Jongsma wrote: vDPA network devices allow high-performance networking in a virtual machine by providing a wire-speed data path. These devices require a vendor-specific host driver but the data path follows the virtio specification. The support for vDPA devices was

[PATCH] qemu: virtiofs: Add pool element to limit thread pool

2020-10-20 Thread Masayoshi Mizuma
From: Masayoshi Mizuma virtiofsd has --thread-pool-size=NUM option to limit the thread pool size. It will be useful to tune the performance. Add pool element to use the option like as: Signed-off-by: Masayoshi Mizuma --- docs/formatdomain.rst

[PATCH 3/3] qemu: sync backing chain update in virDomainGetBlockJobInfo

2020-10-20 Thread Nikolay Shirokovskiy
Some mgmt still use polling for block job completion. After job completion the job failure/success is infered by inspecting domain xml. With legacy block job processing this does not always work. The issue deals with how libvirt processes events. If no other thread is waiting for blockjob event

[PATCH 2/3] qemu: update legacy block job sync after offloading changes

2020-10-20 Thread Nikolay Shirokovskiy
Now block job can be created by qemuProcessHandleBlockJob during reconnect before we start to synchronize block jobs. Also pending event can hold state change we see during sync and in this case we don't need to process the pending event. Signed-off-by: Nikolay Shirokovskiy ---

[PATCH 1/3] qemu: add option to process offloaded legacy blockjob event ealier

2020-10-20 Thread Nikolay Shirokovskiy
Currently in qemuProcessHandleBlockJob we either offload blockjob event processing to the worker thread or notify another thread that waits for blockjob event and that thread processes the event. But sometimes after event is offloaded to the worker thread we need to process the event in a

[PATCH 0/3] qemu: sync backing chain update in virDomainGetBlockJobInfo

2020-10-20 Thread Nikolay Shirokovskiy
The issue is desciribed in detail in last patch. I've already tried to address it in [1]. It was not good at all. Actually it was waiting for event processing in worker thread but that processing blocked by qemuDomainGetBlockJobInfo itself holding the job. Now with help of the 1st patch the

Re: [PATCH] os: deprecate the -enable-fips option and QEMU's FIPS enforcement

2020-10-20 Thread Paolo Bonzini
On 20/10/20 18:22, Daniel P. Berrangé wrote: > @@ -153,6 +153,9 @@ int os_parse_cmd_args(int index, const char *optarg) > break; > #if defined(CONFIG_LINUX) > case QEMU_OPTION_enablefips: > +warn_report("-enable-fips is deprecated, please build QEMU with " > +

[libvirt PATCH] qemu: stop passing -enable-fips to QEMU >= 5.2.0

2020-10-20 Thread Daniel P . Berrangé
Use of the -enable-fips option is being deprecated in QEMU >= 5.2.0. If FIPS compliance is required, QEMU must be built with libcrypt which will unconditionally enforce it. Thus there is no need for libvirt to pass -enable-fips to modern QEMU. Unfortunately there was never any way to probe for

Re: [PATCH v2] Remove deprecated -no-kvm option

2020-10-20 Thread Paolo Bonzini
On 20/10/20 18:05, Thomas Huth wrote: > The option has never been mentioned in our documentation, it's been > deprecated since years, it's marked with QEMU_ARCH_I386 (which does > not make sense anymore since KVM is available on other architectures, > too), it does not do anything by default in

[PATCH] os: deprecate the -enable-fips option and QEMU's FIPS enforcement

2020-10-20 Thread Daniel P . Berrangé
The -enable-fips option was added a long time ago to prevent the use of single DES when VNC when FIPS mode is enabled. It should never have been added, because apps are supposed to unconditionally honour FIPS mode based on the '/proc/sys/crypto/fips_enabled' file contents. In addition there is

Re: where can i find the sourcecode from virDomainDestroy ?

2020-10-20 Thread Jim Fehlig
On 10/16/20 9:37 AM, Lentes, Bernd wrote: Hi, i have some questions concerning the destroying of domains, and i hope i'm right here. If not sorry for the disturbance. Laine already answered your questions about code navigation. I'll provide a few random comments. I'm running a two node

Re: [PATCH v2] Remove deprecated -no-kvm option

2020-10-20 Thread John Snow
On 10/20/20 12:05 PM, Thomas Huth wrote: The option has never been mentioned in our documentation, it's been deprecated since years, it's marked with QEMU_ARCH_I386 (which does not make sense anymore since KVM is available on other architectures, too), it does not do anything by default in

[PATCH v2] Remove deprecated -no-kvm option

2020-10-20 Thread Thomas Huth
The option has never been mentioned in our documentation, it's been deprecated since years, it's marked with QEMU_ARCH_I386 (which does not make sense anymore since KVM is available on other architectures, too), it does not do anything by default in upstream QEMU (since TCG is the default here

Re: [PATCH] Remove deprecated -no-kvm option

2020-10-20 Thread Paolo Bonzini
On 20/10/20 17:52, Thomas Huth wrote: > The option has never been mentioned in our documentation, it's been > deprecated since years, it's marked with QEMU_ARCH_I386 (which does > not make sense anymore since KVM is available on other architectures, > too), it does not do anything by default in

[PATCH] Remove deprecated -no-kvm option

2020-10-20 Thread Thomas Huth
The option has never been mentioned in our documentation, it's been deprecated since years, it's marked with QEMU_ARCH_I386 (which does not make sense anymore since KVM is available on other architectures, too), it does not do anything by default in upstream QEMU (since TCG is the default here

[libvirt PATCH] qemu: honour fatal errors dealing with qemu slirp helper

2020-10-20 Thread Daniel P . Berrangé
Currently all errors from qemuInterfacePrepareSlirp() are completely ignored by the callers. The intention is that missing qemu-slirp binary should cause the caller to fallback to the built-in slirp impl. Many of the possible errors though should indeed be considered fatal. Signed-off-by: Daniel

Re: [PATCH] virsh: Allow listing just domain IDs

2020-10-20 Thread Michal Prívozník
On 10/20/20 3:14 PM, Peter Krempa wrote: On Tue, Oct 20, 2020 at 15:02:07 +0200, Michal Privoznik wrote: On 10/20/20 2:46 PM, Peter Krempa wrote: On Tue, Oct 20, 2020 at 12:27:27 +0200, Michal Privoznik wrote: Some completers for libvirt related tools might want to list domain IDs only. Just

Re: [PATCH] virsh: Allow listing just domain IDs

2020-10-20 Thread Peter Krempa
On Tue, Oct 20, 2020 at 15:02:07 +0200, Michal Privoznik wrote: > On 10/20/20 2:46 PM, Peter Krempa wrote: > > On Tue, Oct 20, 2020 at 12:27:27 +0200, Michal Privoznik wrote: > > > Some completers for libvirt related tools might want to list > > > domain IDs only. Just like the one I've

Re: [PATCH] virsh: Allow listing just domain IDs

2020-10-20 Thread Michal Prívozník
On 10/20/20 2:46 PM, Peter Krempa wrote: On Tue, Oct 20, 2020 at 12:27:27 +0200, Michal Privoznik wrote: Some completers for libvirt related tools might want to list domain IDs only. Just like the one I've implemented for virt-viewer [1]. I've worked around it using some awk magic, but if it

Re: [PATCH] virsh: Allow listing just domain IDs

2020-10-20 Thread Peter Krempa
On Tue, Oct 20, 2020 at 12:27:27 +0200, Michal Privoznik wrote: > Some completers for libvirt related tools might want to list > domain IDs only. Just like the one I've implemented for > virt-viewer [1]. I've worked around it using some awk magic, > but if it was possible to just 'virsh list --id'

Re: [PATCH 0/6] qemu: Fix cdrom as SCSI hostdev via -blockdev

2020-10-20 Thread daggs
Greetings Peter, > Sent: Tuesday, October 20, 2020 at 3:39 PM > From: "daggs" > To: "Peter Krempa" > Cc: libvir-list@redhat.com > Subject: Re: [PATCH 0/6] qemu: Fix cdrom as SCSI hostdev via -blockdev > > Greetings Peter, > > > that might consistent with the fact that I had to use e1000e for

Re: [PATCH] virsh: Allow listing just domain IDs

2020-10-20 Thread Peter Krempa
On Tue, Oct 20, 2020 at 12:27:27 +0200, Michal Privoznik wrote: > Some completers for libvirt related tools might want to list > domain IDs only. Just like the one I've implemented for > virt-viewer [1]. I've worked around it using some awk magic, > but if it was possible to just 'virsh list --id'

Re: [PATCH 0/6] qemu: Fix cdrom as SCSI hostdev via -blockdev

2020-10-20 Thread daggs
Greetings Peter, > Sent: Tuesday, October 20, 2020 at 3:22 PM > From: "Peter Krempa" > To: "daggs" > Cc: libvir-list@redhat.com > Subject: Re: [PATCH 0/6] qemu: Fix cdrom as SCSI hostdev via -blockdev > > Oh, so your guest OS doesn't seem to recognize virtio-scsi apparently! > > On my test VM

Re: [PATCH 0/6] qemu: Fix cdrom as SCSI hostdev via -blockdev

2020-10-20 Thread Peter Krempa
On Tue, Oct 20, 2020 at 14:10:12 +0200, daggs wrote: > Greetings Peter, > > > Sent: Tuesday, October 20, 2020 at 3:00 PM > > From: "Peter Krempa" > > To: "daggs" > > Cc: libvir-list@redhat.com > > Subject: Re: [PATCH 0/6] qemu: Fix cdrom as SCSI hostdev via -blockdev > > > > [...] > > > > try

Re: [PATCH 0/6] qemu: Fix cdrom as SCSI hostdev via -blockdev

2020-10-20 Thread daggs
Greetings Peter, > Sent: Tuesday, October 20, 2020 at 3:00 PM > From: "Peter Krempa" > To: "daggs" > Cc: libvir-list@redhat.com > Subject: Re: [PATCH 0/6] qemu: Fix cdrom as SCSI hostdev via -blockdev > > [...] > > try 'ls -lia /sys/bus/scsi/devices' that has all the data > > $ ls -lia

Re: [PATCH 0/6] qemu: Fix cdrom as SCSI hostdev via -blockdev

2020-10-20 Thread Peter Krempa
On Mon, Oct 19, 2020 at 20:37:53 +0200, daggs wrote: > Greetings Peter, > > > Sent: Monday, October 19, 2020 at 7:35 PM > > From: "Peter Krempa" > > To: libvir-list@redhat.com > > Cc: "daggs" > > Subject: Re: [PATCH 0/6] qemu: Fix cdrom as SCSI hostdev via -blockdev [...] > > > > > lsscsi >

Re: [libvirt PATCH] meson: remove non-pkg-config fallback for devmapper

2020-10-20 Thread Michal Prívozník
On 10/20/20 12:22 PM, Daniel P. Berrangé wrote: The fallback for distros which lack pkg-config support for devmapper references an undefined variable "tmp". It appears non of our supported build platforms are triggering this bug and so the fallback code can be removed entirely rather than fixed.

Re: [PATCH 0/6] qemu: Fix cdrom as SCSI hostdev via -blockdev

2020-10-20 Thread Michal Prívozník
On 10/15/20 5:25 PM, Peter Krempa wrote: -drive detects whether a device is a cdrom automatically but we need to use 'host_cdrom' when using blockdev explicitly. Fix the hostdev code which was recently converted to -blockdev. Warning: I _don't_ have a box with a CDROM handy so this code is not

[PATCH] virsh: Allow listing just domain IDs

2020-10-20 Thread Michal Privoznik
Some completers for libvirt related tools might want to list domain IDs only. Just like the one I've implemented for virt-viewer [1]. I've worked around it using some awk magic, but if it was possible to just 'virsh list --id' then I could drop awk. 1:

[libvirt PATCH] meson: remove non-pkg-config fallback for devmapper

2020-10-20 Thread Daniel P . Berrangé
The fallback for distros which lack pkg-config support for devmapper references an undefined variable "tmp". It appears non of our supported build platforms are triggering this bug and so the fallback code can be removed entirely rather than fixed. Signed-off-by: Daniel P. Berrangé ---

Re: [PATCH 0/6] qemu: Fix cdrom as SCSI hostdev via -blockdev

2020-10-20 Thread daggs
Greetings Han,   > Sent: Tuesday, October 20, 2020 at 12:33 PM > From: "Han Han" > To: "Peter Krempa" > Cc: "daggs" , libvir-list@redhat.com > Subject: Re: [PATCH 0/6] qemu: Fix cdrom as SCSI hostdev via -blockdev > You can emulate it by scsi_debug: > ➜  ~ modprobe scsi_debug ptype=5 > ➜  ~

Re: [PATCH 0/6] qemu: Fix cdrom as SCSI hostdev via -blockdev

2020-10-20 Thread Han Han
On Mon, Oct 19, 2020 at 4:07 PM Peter Krempa wrote: > On Mon, Oct 19, 2020 at 09:45:31 +0200, daggs wrote: > > Greetings Peter, > > > > > Sent: Monday, October 19, 2020 at 10:17 AM > > > From: "Peter Krempa" > > > To: "daggs" > > > Cc: libvir-list@redhat.com > > > Subject: Re: [PATCH 0/6]