Re: [PATCH v2 1/2] util: Rework virFileFlock() to be unambiguous

2020-07-10 Thread Martin Kletzander
On Fri, Jul 10, 2020 at 09:45:25PM +0200, Martin Kletzander wrote: The boolean parameters for lock/unlock and read/write (shared/exclusive) caused a lot of confusion when reading the callers. The new approach is explicit and unambiguous. Signed-off-by: Martin Kletzander Reviewed-by: Andrea

[PATCH v2 2/2] resctrl: Use exclusive lock for /sys/fs/resctrl

2020-07-10 Thread Martin Kletzander
That's the way it should've been all the time. It was originally the case, but then the rework to virFileFlock() made the function ambiguous when it was created in commit 5a0a5f7fb5f5, and due to that it was misused in commit 657ddeff2313 and since then the lock being taken was shared rather than

[PATCH v2 1/2] util: Rework virFileFlock() to be unambiguous

2020-07-10 Thread Martin Kletzander
The boolean parameters for lock/unlock and read/write (shared/exclusive) caused a lot of confusion when reading the callers. The new approach is explicit and unambiguous. Signed-off-by: Martin Kletzander Reviewed-by: Andrea Bolognani --- src/util/virfile.c| 27 ++-

[PATCH v2 0/2] Fix resctrl locking

2020-07-10 Thread Martin Kletzander
Le Blurb: Re-sending even when reviewed because I don't feel that confident, even after reading the commit messages after myself. Let's be honest, I'm resending it only because of the commit messages. Martin Kletzander (2): util: Rework virFileFlock() to be unambiguous resctrl: Use

Re: [PATCH] util: Rework virFileFlock() to be unambiguous

2020-07-10 Thread Martin Kletzander
On Fri, Jul 10, 2020 at 03:50:07PM +0200, Andrea Bolognani wrote: On Fri, 2020-07-10 at 15:20 +0200, Martin Kletzander wrote: The boolean parameters for lock/unlock and read/write (shared/exclusive) caused a lot of confusion when reading the callers. The new approach is explicit and

Re: [PATCH] resctrl: Do not open directory for writing

2020-07-10 Thread Martin Kletzander
On Fri, Jul 10, 2020 at 04:00:13PM +0200, Michal Privoznik wrote: On 7/10/20 3:39 PM, Andrea Bolognani wrote: On Fri, 2020-07-10 at 15:13 +0200, Martin Kletzander wrote: On Fri, Jul 10, 2020 at 10:47:22AM +0200, Michal Privoznik wrote: On 7/9/20 6:30 PM, Andrea Bolognani wrote: This is all

Re: [PATCH] storage: fix vstorage backend build

2020-07-10 Thread Andrea Bolognani
On Fri, 2020-07-10 at 18:26 +0100, Daniel P. Berrangé wrote: > On Fri, Jul 10, 2020 at 06:40:07PM +0200, Andrea Bolognani wrote: > > That failed with > > > > Error: Package: vstorage-libs-shared-7.10.1.5-1.vz7.x86_64 (vz) > > Requires: libjson-c.so.2(libjson-c.so.2)(64bit) > > > >

Re: [PATCH] storage: fix vstorage backend build

2020-07-10 Thread Daniel P . Berrangé
On Fri, Jul 10, 2020 at 06:40:07PM +0200, Andrea Bolognani wrote: > On Fri, 2020-07-10 at 10:10 +0300, Nikolay Shirokovskiy wrote: > > On 09.07.2020 19:06, Andrea Bolognani wrote: > > > One thing at a time, though. First, how do we get the vstorage > > > commands included in the CentOS 7

Re: [libvirt PATCH 9/9] rpc: use new virt-nc binary for remote tunnelling

2020-07-10 Thread Andrea Bolognani
On Thu, 2020-07-09 at 19:36 +0100, Daniel P. Berrangé wrote: > This wires up support for using the new virt-nc binary with the ssh, > libssh and libssh2 protocols. > > The new binary will be used preferentially if it is available in $PATH, > otherwise we fall back to traditional netcat. > > The

Re: libvirt-6.5.0 breaks host passthrough migration

2020-07-10 Thread Jiri Denemark
On Fri, Jul 10, 2020 at 07:48:26 -0400, Mark Mielke wrote: > On Fri, Jul 10, 2020 at 7:14 AM Jiri Denemark wrote: > > > On Sun, Jul 05, 2020 at 12:45:55 -0400, Mark Mielke wrote: > > > With 6.4.0, live migration was working fine with Qemu 5.0. After trying > > out > > > 6.5.0, migration broke

Re: [PATCH 2/2] x86/cpu: Handle GUEST_MAXPHYADDR < HOST_MAXPHYADDR for hosts that don't support it

2020-07-10 Thread Paolo Bonzini
On 10/07/20 18:02, Eduardo Habkost wrote: > On Fri, Jul 10, 2020 at 09:22:42AM +0200, Paolo Bonzini wrote: >> On 09/07/20 21:13, Eduardo Habkost wrote: Doesn't this require intercepting MOV-to-CR3 when the guest is in PAE mode, so that the hypervisor can validate the high bits in the

Re: [PATCH] storage: fix vstorage backend build

2020-07-10 Thread Andrea Bolognani
On Fri, 2020-07-10 at 10:10 +0300, Nikolay Shirokovskiy wrote: > On 09.07.2020 19:06, Andrea Bolognani wrote: > > One thing at a time, though. First, how do we get the vstorage > > commands included in the CentOS 7 container? What packages need to > > be installed, and from what repository? > >

Re: [PATCH 2/2] x86/cpu: Handle GUEST_MAXPHYADDR < HOST_MAXPHYADDR for hosts that don't support it

2020-07-10 Thread Eduardo Habkost
On Fri, Jul 10, 2020 at 09:22:42AM +0200, Paolo Bonzini wrote: > On 09/07/20 21:13, Eduardo Habkost wrote: > >> Doesn't this require intercepting MOV-to-CR3 when the guest is in PAE > >> mode, so that the hypervisor can validate the high bits in the PDPTEs? > > If the fix has additional overhead,

Re: [libvirt PATCH v2 4/5] m4: virt-xdr: rewrite XDR check

2020-07-10 Thread Andrea Bolognani
On Fri, 2020-07-10 at 14:12 +0200, Pavel Hrdina wrote: > On Fri, Jul 10, 2020 at 01:13:00PM +0200, Andrea Bolognani wrote: > > On Fri, 2020-07-10 at 12:25 +0200, Pavel Hrdina wrote: > > > +%if 0%{?fedora} || 0%{?rhel} > > > BuildRequires: libtirpc-devel > > > %endif > > > > We only support

[libvirt PATCH] docs: rename fig to svg in Makefile.am

2020-07-10 Thread Pavel Hrdina
Commit <9ad637c9651ff29955dd6aa8fe31f639b42b7315> converted all fig files into svg files but did not change the Makefile.am. Signed-off-by: Pavel Hrdina --- Pushed under build-breaker rule. docs/Makefile.am | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff

Re: [PATCH 17/18] qemu: caps: Enable QEMU_CAPS_BLOCKDEV_HOSTDEV_SCSI

2020-07-10 Thread Peter Krempa
On Fri, Jul 10, 2020 at 16:33:38 +0200, Peter Krempa wrote: > Enable it when regular QEMU_CAPS_BLOCKDEV is present. > > Signed-off-by: Peter Krempa > --- > src/qemu/qemu_capabilities.c | 3 ++ > .../caps_4.2.0.aarch64.xml| 1 + >

Re: [PATCH 2/4] qemu_domainjob: job funcitons moved out of `qemu_domain`

2020-07-10 Thread Michal Privoznik
On 7/10/20 9:11 AM, Prathamesh Chavan wrote: We move functions `qemuDomainObjPrivateXMLParseJob` and `qemuDomainObjPrivateXMLFormatJob` to `qemu_domainjob`. To make this happen, corresponding changes in their parameters were made, as well as they were exposed to be used in `qemu_domain` file.

Re: [GSoC][PATCH v3 3/4] qemu_domainjob: introduce `privateData` for `qemuDomainJob`

2020-07-10 Thread Michal Privoznik
On 7/10/20 9:11 AM, Prathamesh Chavan wrote: To remove dependecy of `qemuDomainJob` on job specific paramters, a `privateData` pointer is introduced. To handle it, structure of callback functions is also introduced. Signed-off-by: Prathamesh Chavan --- src/qemu/qemu_domain.c | 4

Re: [GSoC][PATCH v3 1/4] qemu_domain: moved qemuDomainNamespace to `qemu_domain`

2020-07-10 Thread Michal Privoznik
On 7/10/20 9:11 AM, Prathamesh Chavan wrote: While moving the code, qemuDomainNamespace also was moved to `qemu_domainjob`. Hence it is moved back to `qemu_domain` where it will be more appropriate. Signed-off-by: Prathamesh Chavan --- src/qemu/qemu_domain.c| 5 +

[PATCH 16/18] qemuDomainRemoveHostDevice: Use new infrastructure for (i)SCSI

2020-07-10 Thread Peter Krempa
Similarly to previous commits, modify the hostdev detach code to use blockdev infrastructure to detach (i)SCSI hostdevs. Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 20 +++- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/src/qemu/qemu_hotplug.c

[PATCH 08/18] qemu: domain: Regenerate hostdev source private data

2020-07-10 Thread Peter Krempa
When upgrading from a libvirt which didn't format private data of a virStorageSource representing an iSCSI hostdev source, we might need to generate some internal data so that the code still works as if it was present in the status XML. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c

[PATCH 13/18] qemu: command: Create qemuBlockStorageSourceAttachData for (i)SCSI hostdevs

2020-07-10 Thread Peter Krempa
Add convertor for creating qemuBlockStorageSourceAttachData which will allow reusing the infrastructure which we have for attaching disks also for hostdevs. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 83 + src/qemu/qemu_command.h | 8

[PATCH 15/18] qemuDomainAttachHostSCSIDevice: Use new infrastructure

2020-07-10 Thread Peter Krempa
Similarly to command line creation, use the blockdev helpers when hotplugging an (i)SCSI hostdev. Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 45 +++-- 1 file changed, 7 insertions(+), 38 deletions(-) diff --git a/src/qemu/qemu_hotplug.c

[PATCH 07/18] qemuDomainSecretHostdevDestroy: Don't clear secinfo alias

2020-07-10 Thread Peter Krempa
We need the alias to deal with hot-unplug of the hostdev. Use qemuDomainSecretInfoDestroy which clears only the secrets and not the alias. The same function is used also for handling disk secrets. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 4 ++-- 1 file changed, 2 insertions(+),

[PATCH 01/18] qemuBlockStorageSourceGetBackendProps: Convert boolean arguments to flags

2020-07-10 Thread Peter Krempa
Upcoming commit will need to add another flag for the function so convert it to a bitwise-or'd array of flags to prevent having 4 booleans. Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c | 32 +--- src/qemu/qemu_block.h | 10 +++---

[PATCH 11/18] qemuBuildSCSIHostdevDevStr: Pass in backend alias

2020-07-10 Thread Peter Krempa
Don't (re)generate the backend alias (alias of the -drive backend for now) internally but rather pass it in. Later on it will be replaced by the nodename when blockdev is used depending on the capabilities. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 14 --

[PATCH 04/18] virDomainHostdevDefFormatSubsys: Format private data for a virStorageSource

2020-07-10 Thread Peter Krempa
iSCSI subsystem hostdevs store the data as a virStorageSource. Format the private data part of the virStorageSource in the appropriate place. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 32 1 file changed, 20 insertions(+), 12 deletions(-) diff

[PATCH 17/18] qemu: caps: Enable QEMU_CAPS_BLOCKDEV_HOSTDEV_SCSI

2020-07-10 Thread Peter Krempa
Enable it when regular QEMU_CAPS_BLOCKDEV is present. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 3 ++ .../caps_4.2.0.aarch64.xml| 1 + .../qemucapabilitiesdata/caps_4.2.0.s390x.xml | 1 + .../caps_4.2.0.x86_64.xml

[PATCH 06/18] qemustatusxml2xmltest: Add tests for iSCSI hostdev private data handling

2020-07-10 Thread Peter Krempa
Signed-off-by: Peter Krempa --- tests/qemustatusxml2xmldata/modern-in.xml | 18 ++ 1 file changed, 18 insertions(+) diff --git a/tests/qemustatusxml2xmldata/modern-in.xml b/tests/qemustatusxml2xmldata/modern-in.xml index 63ef9caed3..0a3990bd3e 100644 ---

[PATCH 14/18] qemuBuildHostdevSCSICommandLine: Use new infrastructure

2020-07-10 Thread Peter Krempa
In preparation for instantiating (i)SCSI hostdevs via -blockdev, refactor qemuBuildHostdevSCSICommandLine to use the new infrastructure which will do it automatically. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 44 - 1 file changed, 4

[PATCH 12/18] qemu: capabilities: Add QEMU_CAPS_BLOCKDEV_HOSTDEV_SCSI

2020-07-10 Thread Peter Krempa
We want to instantiate hostdevs via -blockdev too. Add a separate capability for them for a clean transition. The new capability will be enabled when QEMU_CAPS_BLOCKDEV is present once all code is prepared. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 1 +

[PATCH 18/18] qemuBuildSCSIHostdevDrvStr: unexport

2020-07-10 Thread Peter Krempa
The function is no longer called from other modules. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 2 +- src/qemu/qemu_command.h | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 7f624a031e..839c93bfb4

[PATCH 05/18] virDomainHostdevSubsysSCSIiSCSIDefParseXML: Parse private data of virStorageSource

2020-07-10 Thread Peter Krempa
We store the config of an iSCSI hostdev in a virStorageSource structure. Parse the private data portion. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 39 +-- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/src/conf/domain_conf.c

[PATCH 02/18] qemuBlockStorageSourceGetBackendProps: Allow skipping "discard":"unmap"

2020-07-10 Thread Peter Krempa
It doesn't make sense to format "discard" when doing a -blockdev backend of scsi-generic used with SCSI hostdevs. Add a way to skip it. Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c | 8 src/qemu/qemu_block.h | 1 + 2 files changed, 9 insertions(+) diff --git

[PATCH 09/18] qemu: hotplug: Don't regenerate iSCSI secret alias

2020-07-10 Thread Peter Krempa
We now store the alias of the secrets in the status XML so there's no need to generate it again. Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c

[PATCH 03/18] qemuBlockStorageSourceAttachData: Add field for ad-hoc storage node name

2020-07-10 Thread Peter Krempa
SCSI hostdevs don't have a virStorageSource associated with the backend in certain cases. Adding a separate field to hold memory for a copy of the nodename of the storage backend will allow reusing the blockdev machinery also for SCSI hostdevs. Signed-off-by: Peter Krempa ---

[PATCH 10/18] qemuBuildHostdevCommandLine: Extract (i)SCSI code

2020-07-10 Thread Peter Krempa
Move all (i)SCSI related code into a new function named 'qemuBuildHostdevSCSICommandLine'. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 61 + 1 file changed, 38 insertions(+), 23 deletions(-) diff --git a/src/qemu/qemu_command.c

[PATCH 00/18] qemu: Switch (i)SCSI host devices to -blockdev

2020-07-10 Thread Peter Krempa
Peter Krempa (18): qemuBlockStorageSourceGetBackendProps: Convert boolean arguments to flags qemuBlockStorageSourceGetBackendProps: Allow skipping "discard":"unmap" qemuBlockStorageSourceAttachData: Add field for ad-hoc storage node name virDomainHostdevDefFormatSubsys: Format

Re: [PATCH] resctrl: Do not open directory for writing

2020-07-10 Thread Michal Privoznik
On 7/10/20 3:39 PM, Andrea Bolognani wrote: On Fri, 2020-07-10 at 15:13 +0200, Martin Kletzander wrote: On Fri, Jul 10, 2020 at 10:47:22AM +0200, Michal Privoznik wrote: On 7/9/20 6:30 PM, Andrea Bolognani wrote: This is all bikeshedding, of course: what actually matters is making that lock

Re: [PATCH] util: Rework virFileFlock() to be unambiguous

2020-07-10 Thread Andrea Bolognani
On Fri, 2020-07-10 at 15:20 +0200, Martin Kletzander wrote: > The boolean parameters for lock/unlock and read/write (shared/exclusive) > caused > a lot of confusion when reading the callers. The new approach is explicit and > unambiguous. > > While at it, also change the only caller so that it

Re: [libvirt PATCH v2 3/5] m4: virt-secdriver-selinux: drop obsolete function checks

2020-07-10 Thread Daniel P . Berrangé
On Fri, Jul 10, 2020 at 12:25:04PM +0200, Pavel Hrdina wrote: > All of the listed functions are available in libselinux version 2.2. > Our supported OSes start with version 2.5 so there is no need to check > it. > > Signed-off-by: Pavel Hrdina > --- > m4/virt-secdriver-selinux.m4| 24

Re: [libvirt PATCH v2 2/5] docs: convert FIG files into SVG format

2020-07-10 Thread Daniel P . Berrangé
On Fri, Jul 10, 2020 at 12:25:03PM +0200, Pavel Hrdina wrote: > Converted by using: > > fig2dev -L svg > > Signed-off-by: Pavel Hrdina > --- > docs/architecture.fig | 87 -- > docs/architecture.svg | 239 >

Re: [PATCH] resctrl: Do not open directory for writing

2020-07-10 Thread Andrea Bolognani
On Fri, 2020-07-10 at 15:13 +0200, Martin Kletzander wrote: > On Fri, Jul 10, 2020 at 10:47:22AM +0200, Michal Privoznik wrote: > > On 7/9/20 6:30 PM, Andrea Bolognani wrote: > > > This is all bikeshedding, of course: what actually matters is making > > > that lock exclusive once again :) > > > >

Re: [RFC v2 1/1] memory: Delete assertion in memory_region_unregister_iommu_notifier

2020-07-10 Thread Peter Xu
On Fri, Jul 10, 2020 at 02:34:11PM +0800, Jason Wang wrote: > > On 2020/7/9 下午10:10, Peter Xu wrote: > > On Thu, Jul 09, 2020 at 01:58:33PM +0800, Jason Wang wrote: > > > > > - If we care the performance, it's better to implement the MAP event > > > > > for > > > > > vhost, otherwise it could be

[PATCH] util: Rework virFileFlock() to be unambiguous

2020-07-10 Thread Martin Kletzander
The boolean parameters for lock/unlock and read/write (shared/exclusive) caused a lot of confusion when reading the callers. The new approach is explicit and unambiguous. While at it, also change the only caller so that it acquires an exclusive lock as it should've been all the time. This was

Re: [PATCH] resctrl: Do not open directory for writing

2020-07-10 Thread Martin Kletzander
On Fri, Jul 10, 2020 at 10:47:22AM +0200, Michal Privoznik wrote: On 7/9/20 6:30 PM, Andrea Bolognani wrote: On Thu, 2020-07-09 at 13:44 +0200, Martin Kletzander wrote: On Thu, Jul 09, 2020 at 12:50:38PM +0200, Andrea Bolognani wrote: it seems to me that this change entirely flipped the

Re: Setting 'nodatacow' on VM image when on Btrfs

2020-07-10 Thread Daniel P . Berrangé
On Thu, Jul 09, 2020 at 02:15:50PM -0600, Chris Murphy wrote: > On Thu, Jul 9, 2020 at 12:27 PM Daniel P. Berrangé > wrote: > > > > On Thu, Jul 09, 2020 at 08:30:14AM -0600, Chris Murphy wrote: > > > It's generally recommended by upstream Btrfs development to set > > > 'nodatacow' using 'chattr

Re: [libvirt PATCH v2 4/5] m4: virt-xdr: rewrite XDR check

2020-07-10 Thread Pavel Hrdina
On Fri, Jul 10, 2020 at 01:13:00PM +0200, Andrea Bolognani wrote: > On Fri, 2020-07-10 at 12:25 +0200, Pavel Hrdina wrote: > > +%if 0%{?fedora} || 0%{?rhel} > > BuildRequires: libtirpc-devel > > %endif > > We only support building RPMs on Fedora and RHEL, so this check is > effectively a no-op.

Re: [libvirt PATCH 9/9] rpc: use new virt-nc binary for remote tunnelling

2020-07-10 Thread Michal Privoznik
On 7/9/20 8:36 PM, Daniel P. Berrangé wrote: This wires up support for using the new virt-nc binary with the ssh, libssh and libssh2 protocols. The new binary will be used preferentially if it is available in $PATH, otherwise we fall back to traditional netcat. The "proxy" URI parameter can be

Re: [libvirt PATCH 7/9] remote: introduce virtd-nc helper binary

2020-07-10 Thread Michal Privoznik
On 7/9/20 8:36 PM, Daniel P. Berrangé wrote: When accessing libvirtd over a SSH tunnel, the remote driver must spawn the remote 'nc' process, pointing it to the libvirtd socket path. This is problematic for a number of reasons: - The socket path varies according to the --prefix chosen at

Re: [libvirt PATCH 0/9] remote: introduce a custom netcat impl for ssh tunnelling

2020-07-10 Thread Michal Privoznik
On 7/9/20 8:36 PM, Daniel P. Berrangé wrote: We have long had a problem with use of netcat for ssh tunnelling because there's no guarantee the UNIX socket path the client builds will match the UNIX socket path the remote host uses. We don't even allow session mode SSH tunnelling for this reason.

Re: [libvirt PATCH v2 5/5] wireshark: fix compilation errors

2020-07-10 Thread Ján Tomko
On a Friday in 2020, Pavel Hrdina wrote: With meson introduction which is using the same CFLAGS for the whole project some compilation errors were discovered. The wireshark plugin library is the only one in tools directory that is not using AM_CFLAGS. With the AM_CFLAGS we get these errors:

Re: libvirt-6.5.0 breaks host passthrough migration

2020-07-10 Thread Mark Mielke
On Fri, Jul 10, 2020 at 7:14 AM Jiri Denemark wrote: > On Sun, Jul 05, 2020 at 12:45:55 -0400, Mark Mielke wrote: > > With 6.4.0, live migration was working fine with Qemu 5.0. After trying > out > > 6.5.0, migration broke with the following error: > > > > libvirt.libvirtError: internal error:

Re: [libvirt PATCH v2 3/5] m4: virt-secdriver-selinux: drop obsolete function checks

2020-07-10 Thread Ján Tomko
On a Friday in 2020, Pavel Hrdina wrote: All of the listed functions are available in libselinux version 2.2. Our supported OSes start with version 2.5 so there is no need to check it. Signed-off-by: Pavel Hrdina --- m4/virt-secdriver-selinux.m4| 24 ++--

Re: libvirt-6.5.0 breaks host passthrough migration

2020-07-10 Thread Jiri Denemark
On Fri, Jul 10, 2020 at 05:53:47 -0400, Mark Mielke wrote: > Hi all: > > Any thoughts on this, or not time enough to look? > > I'm trying to decide what the right solution is on my end to deal with this > breaking change, before more widely deploying it. If I know what the fix > will be, I would

Re: libvirt-6.5.0 breaks host passthrough migration

2020-07-10 Thread Jiri Denemark
On Sun, Jul 05, 2020 at 12:45:55 -0400, Mark Mielke wrote: > Hi all: > > With 6.4.0, live migration was working fine with Qemu 5.0. After trying out > 6.5.0, migration broke with the following error: > > libvirt.libvirtError: internal error: unable to execute QEMU command > 'migrate': State

Re: [libvirt PATCH v2 4/5] m4: virt-xdr: rewrite XDR check

2020-07-10 Thread Andrea Bolognani
On Fri, 2020-07-10 at 12:25 +0200, Pavel Hrdina wrote: > +%if 0%{?fedora} || 0%{?rhel} > BuildRequires: libtirpc-devel > %endif We only support building RPMs on Fedora and RHEL, so this check is effectively a no-op. -- Andrea Bolognani / Red Hat / Virtualization

Re: [PATCH 0/2] virSecurityManagerMetadataLock: Ignore RO filesystem

2020-07-10 Thread Ján Tomko
On a Friday in 2020, Michal Privoznik wrote: See 2/2 for explanation. Michal Prívozník (2): virSecurityManagerMetadataLock: Clarify directory locking comment virSecurityManagerMetadataLock: Ignore RO filesystem src/security/security_manager.c | 8 +++- 1 file changed, 7 insertions(+), 1

Re: [PATCH 0/7] qemu: Stop chowning domain restore file

2020-07-10 Thread Erik Skultety
On Wed, Jul 01, 2020 at 06:15:00PM +0200, Michal Privoznik wrote: > See 4/7 for detailed explanation. > > Michal Prívozník (7): > security: Reintroduce virSecurityManager{Set,Restore}SavedStateLabel > qemu_security: Implement > virSecurityManager{Set,Restore}SavedStateLabel >

Re: [PATCH 7/7] qemu_security: Complete renaming of virSecurityManagerSetAllLabel() argument

2020-07-10 Thread Erik Skultety
On Wed, Jul 01, 2020 at 06:15:07PM +0200, Michal Privoznik wrote: > Just like in the previous commit, the stdin_path argument of > virSecurityManagerSetAllLabel() is renamed to incomingPath. > > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_security.c | 4 ++-- > 1 file changed, 2

Re: [RFC PATCH 0/2] hw/sd: Deprecate the SPI mode and the SPI to SD adapter

2020-07-10 Thread Bin Meng
Hi Philippe, On Mon, Jul 6, 2020 at 6:07 AM Philippe Mathieu-Daudé wrote: > > I tried to maintain the SPI mode because it is useful in > tiny embedded devices, and thought it would be helpful for > the AVR MCUs. > As AVR was blocked, I thought it was wise to deprecate the > SPI mode as users are

Re: [PATCH] docs: point out that locals should be defined at the top of a block of code

2020-07-10 Thread Pavel Hrdina
On Thu, Jul 09, 2020 at 06:41:21PM -0400, Laine Stump wrote: > Although we have nothing in make syntax-check to enforce this, and > apparently there are places where it isn't the case (according to > Dan), we should discourage the practice of defining new variables in > the middle of a block of

[libvirt PATCH v2 4/5] m4: virt-xdr: rewrite XDR check

2020-07-10 Thread Pavel Hrdina
The current code to check XDR support was obsolete and way to complicated. On linux we can use pkg-config to check for libtirpc and have the CFLAGS and LIBS configured by it as well. On MinGW there is portablexdr library which installs header files directly into system include directory. On

Re: libvirt opens kernel+initrd in read-write mode

2020-07-10 Thread Michal Privoznik
On 7/9/20 8:27 PM, Olaf Hering wrote: Am Thu, 9 Jul 2020 19:00:18 +0200 schrieb Michal Privoznik : do you see an actual libvirt error? I think this may come from secdrivers trying to remember the original owner of kernel/initrd files. Jul 09 16:10:42 libvirtd[5741]: internal error: child

[libvirt PATCH v2 1/5] docs: drop %.png: %.fig rule

2020-07-10 Thread Pavel Hrdina
convert bin is part of ImageMagick package and uses uniconvertor to create png file from fig files. Unfortunately uniconvertor is python2 only and not available in most recent distributions which makes the convert command fail with: sh: uniconvertor: command not found /usr/bin/mv: cannot stat

Re: [PATCH] docs: point out that locals should be defined at the top of a block of code

2020-07-10 Thread Daniel P . Berrangé
On Thu, Jul 09, 2020 at 06:41:21PM -0400, Laine Stump wrote: > Although we have nothing in make syntax-check to enforce this, and > apparently there are places where it isn't the case (according to > Dan), we should discourage the practice of defining new variables in > the middle of a block of

[libvirt PATCH v2 0/5] fixes and cleanups for current build system

2020-07-10 Thread Pavel Hrdina
While working on rewrite to Meson I discovered some parts of our current build system that could be improved to help with the transition to Meson. It will make the review of the Meson patches a bit easier. Changes in v2: - dropped patches: src: unify virFileActivateDirOverride()

[PATCH 1/2] virSecurityManagerMetadataLock: Clarify directory locking comment

2020-07-10 Thread Michal Privoznik
In the light of recent commit of 9d83281382 fix the comment that says directories can't be locked. Well, in general they can, but not in our case. Signed-off-by: Michal Privoznik --- src/security/security_manager.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH 2/2] virSecurityManagerMetadataLock: Ignore RO filesystem

2020-07-10 Thread Michal Privoznik
When locking files for metadata change, we open() them for R/W access. The write access is needed because we want to acquire exclusive (write) lock (to mutually exclude with other daemons trying to modify XATTRs on the same file). Anyway, the open() might fail if the file lives on a RO filesystem.

Re: [PATCH] docs: point out that locals should be defined at the top of a block of code

2020-07-10 Thread Andrea Bolognani
On Thu, 2020-07-09 at 18:41 -0400, Laine Stump wrote: > +Defining Local Variables > + > + > +Always define local variables at the top of the block in which they > +are used (before any pure code). Although modern C compilers allow > +defining a local variable in the middle

[libvirt PATCH v2 5/5] wireshark: fix compilation errors

2020-07-10 Thread Pavel Hrdina
With meson introduction which is using the same CFLAGS for the whole project some compilation errors were discovered. The wireshark plugin library is the only one in tools directory that is not using AM_CFLAGS. With the AM_CFLAGS we get these errors: ../../tools/wireshark/src/packet-libvirt.c:

Re: [libvirt PATCH 27/31] src: unify virFileActivateDirOverride()

2020-07-10 Thread Pavel Hrdina
On Thu, Jul 09, 2020 at 04:21:32PM +0100, Daniel P. Berrangé wrote: > On Thu, Jul 02, 2020 at 02:25:25PM +0200, Pavel Hrdina wrote: > > We have two functions to set that we want to override directory where to > > look for libvirt files, one checks the binary name and the other one > > checks env

Re: [PATCH] resctrl: Do not open directory for writing

2020-07-10 Thread Michal Privoznik
On 7/9/20 6:30 PM, Andrea Bolognani wrote: On Thu, 2020-07-09 at 13:44 +0200, Martin Kletzander wrote: On Thu, Jul 09, 2020 at 12:50:38PM +0200, Andrea Bolognani wrote: it seems to me that this change entirely flipped the semantics of the lock. Yep, you're right. When you have a lock that

Re: libvirt-6.5.0 breaks host passthrough migration

2020-07-10 Thread Mark Mielke
Hi all: Any thoughts on this, or not time enough to look? I'm trying to decide what the right solution is on my end to deal with this breaking change, before more widely deploying it. If I know what the fix will be, I would like to align my strategy against it. Or, if we discuss and the libvirt

[PATCH 0/2] virSecurityManagerMetadataLock: Ignore RO filesystem

2020-07-10 Thread Michal Privoznik
See 2/2 for explanation. Michal Prívozník (2): virSecurityManagerMetadataLock: Clarify directory locking comment virSecurityManagerMetadataLock: Ignore RO filesystem src/security/security_manager.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) -- 2.26.2

[libvirt PATCH v2 2/5] docs: convert FIG files into SVG format

2020-07-10 Thread Pavel Hrdina
Converted by using: fig2dev -L svg Signed-off-by: Pavel Hrdina --- docs/architecture.fig | 87 -- docs/architecture.svg | 239 docs/libvirt-daemon-arch.fig| 114 - docs/libvirt-daemon-arch.svg|

[libvirt PATCH v2 3/5] m4: virt-secdriver-selinux: drop obsolete function checks

2020-07-10 Thread Pavel Hrdina
All of the listed functions are available in libselinux version 2.2. Our supported OSes start with version 2.5 so there is no need to check it. Signed-off-by: Pavel Hrdina --- m4/virt-secdriver-selinux.m4| 24 ++-- src/security/security_selinux.c | 18 +++---

Re: [RFC PATCH 0/2] hw/sd: Deprecate the SPI mode and the SPI to SD adapter

2020-07-10 Thread Philippe Mathieu-Daudé
On 7/10/20 11:27 AM, Bin Meng wrote: > Hi Philippe, > > On Mon, Jul 6, 2020 at 6:07 AM Philippe Mathieu-Daudé wrote: >> >> I tried to maintain the SPI mode because it is useful in >> tiny embedded devices, and thought it would be helpful for >> the AVR MCUs. >> As AVR was blocked, I thought it

Re: [libvirt PATCH 30/31] tools: virsh-secret: fix compilation error

2020-07-10 Thread Pavel Hrdina
On Thu, Jul 09, 2020 at 05:25:03PM +0200, Ján Tomko wrote: > On a Thursday in 2020, Pavel Hrdina wrote: > > ../tools/virsh-secret.c: In function ‘cmdSecretSetValue’: > > ../tools/virsh-secret.c:262:15: error: pointer targets in assignment from > > ‘char *’ to ‘unsigned char *’ differ in

Re: [PATCH 2/2] x86/cpu: Handle GUEST_MAXPHYADDR < HOST_MAXPHYADDR for hosts that don't support it

2020-07-10 Thread Paolo Bonzini
On 09/07/20 21:13, Eduardo Habkost wrote: >> Doesn't this require intercepting MOV-to-CR3 when the guest is in PAE >> mode, so that the hypervisor can validate the high bits in the PDPTEs? > If the fix has additional overhead, is the additional overhead > bad enough to warrant making it optional?

Re: [PATCH 2/2] x86/cpu: Handle GUEST_MAXPHYADDR < HOST_MAXPHYADDR for hosts that don't support it

2020-07-10 Thread Paolo Bonzini
On 09/07/20 19:00, Jim Mattson wrote: >> >> Mostly fine. Some edge cases, like different page fault errors for >> addresses above GUEST_MAXPHYADDR and below HOST_MAXPHYADDR. Which I >> think Mohammed fixed in the kernel recently. > Doesn't this require intercepting MOV-to-CR3 when

[GSoC][PATCH v3 3/4] qemu_domainjob: introduce `privateData` for `qemuDomainJob`

2020-07-10 Thread Prathamesh Chavan
To remove dependecy of `qemuDomainJob` on job specific paramters, a `privateData` pointer is introduced. To handle it, structure of callback functions is also introduced. Signed-off-by: Prathamesh Chavan --- src/qemu/qemu_domain.c | 4 +- src/qemu/qemu_domain.h | 10 +

[PATCH 2/4] qemu_domainjob: job funcitons moved out of `qemu_domain`

2020-07-10 Thread Prathamesh Chavan
We move functions `qemuDomainObjPrivateXMLParseJob` and `qemuDomainObjPrivateXMLFormatJob` to `qemu_domainjob`. To make this happen, corresponding changes in their parameters were made, as well as they were exposed to be used in `qemu_domain` file. Signed-off-by: Prathamesh Chavan ---

[GSoC][PATCH v3 4/4] qemu_domainjob: introduce `privateData` for `qemuDomainJobInfo`

2020-07-10 Thread Prathamesh Chavan
To remove dependecy of `qemuDomainJobInfo` on job specific paramters, a `privateData` pointer is introduced. To handle it, structure of callback functions is also introduced. Signed-off-by: Prathamesh Chavan --- src/qemu/qemu_backup.c | 15 -- src/qemu/qemu_domain.h | 18

[GSoC][PATCH v3 1/4] qemu_domain: moved qemuDomainNamespace to `qemu_domain`

2020-07-10 Thread Prathamesh Chavan
While moving the code, qemuDomainNamespace also was moved to `qemu_domainjob`. Hence it is moved back to `qemu_domain` where it will be more appropriate. Signed-off-by: Prathamesh Chavan --- src/qemu/qemu_domain.c| 5 + src/qemu/qemu_domainjob.c | 6 -- 2 files changed, 5

[GSoC][PATCH v3 0/4] removal of qemu_domainjob dependencies

2020-07-10 Thread Prathamesh Chavan
The following series of patches work on isolating the qemu_domainjob from its dependency on other files such as `qemu_migration_params`, `qemu_monitor`, etc. This is done by the introduction of a `privateData` structure, which is further handled by a structure of callback functions. Previous

Re: [PATCH] storage: fix vstorage backend build

2020-07-10 Thread Nikolay Shirokovskiy
On 09.07.2020 19:06, Andrea Bolognani wrote: > On Tue, 2020-07-07 at 15:00 +0300, Nikolay Shirokovskiy wrote: >> Add headers with declarations of geteuid/getegid >> and virGetUserName/virGetGroupName. > > Can you share the exact error message you're hitting? Our CI seems to > be perfectly

Re: [RFC v2 1/1] memory: Delete assertion in memory_region_unregister_iommu_notifier

2020-07-10 Thread Jason Wang
On 2020/7/9 下午10:10, Peter Xu wrote: On Thu, Jul 09, 2020 at 01:58:33PM +0800, Jason Wang wrote: - If we care the performance, it's better to implement the MAP event for vhost, otherwise it could be a lot of IOTLB miss I feel like these are two things. So far what we are talking about is