Re: remove the nvlink2 pci_vfio subdriver v2

2021-05-04 Thread Greg Kurz
On Tue, 4 May 2021 15:30:15 +0200 Greg Kroah-Hartman wrote: > On Tue, May 04, 2021 at 03:20:34PM +0200, Greg Kurz wrote: > > On Tue, 4 May 2021 14:59:07 +0200 > > Greg Kroah-Hartman wrote: > > > > > On Tue, May 04, 2021 at 02:22:36PM +0200, Greg Kurz wrote: > &

Re: remove the nvlink2 pci_vfio subdriver v2

2021-05-04 Thread Greg Kurz
On Tue, 4 May 2021 14:59:07 +0200 Greg Kroah-Hartman wrote: > On Tue, May 04, 2021 at 02:22:36PM +0200, Greg Kurz wrote: > > On Fri, 26 Mar 2021 07:13:09 +0100 > > Christoph Hellwig wrote: > > > > > Hi all, > > > > > > the nvlink2 vfio sub

Re: remove the nvlink2 pci_vfio subdriver v2

2021-05-04 Thread Greg Kurz
On Fri, 26 Mar 2021 07:13:09 +0100 Christoph Hellwig wrote: > Hi all, > > the nvlink2 vfio subdriver is a weird beast. It supports a hardware > feature without any open source component - what would normally be > the normal open source userspace that we require for kernel drivers, > although in

Re: [for-6.1 v2 0/2] virtiofsd: Add support for FUSE_SYNCFS request

2021-04-27 Thread Greg Kurz
On Tue, 27 Apr 2021 12:28:13 +0100 "Dr. David Alan Gilbert" wrote: > * Greg Kurz (gr...@kaod.org) wrote: > > FUSE_SYNCFS allows the client to flush the host page cache. > > This isn't available in upstream linux yet, but the following > > tree can be used to

Re: [PATCH 1/5] hw/ppc/spapr_iommu: Register machine reset handler

2021-04-27 Thread Greg Kurz
On Tue, 27 Apr 2021 11:20:07 +0200 Philippe Mathieu-Daudé wrote: > On 4/27/21 3:45 AM, David Gibson wrote: > > On Sat, Apr 24, 2021 at 06:22:25PM +0200, Philippe Mathieu-Daudé wrote: > >> The TYPE_SPAPR_TCE_TABLE device is bus-less, thus isn't reset > >> automatically. Register a reset handler t

[for-6.1 v2 1/2] Update linux headers to 5.12-rc8 + FUSE_SYNCFS

2021-04-26 Thread Greg Kurz
NOT YET IN UPSTREAM LINUX. DO NOT MERGE. Signed-off-by: Greg Kurz --- include/standard-headers/drm/drm_fourcc.h | 23 - include/standard-headers/linux/ethtool.h | 54 ++- include/standard-headers/linux/fuse.h | 13 ++- include/standard-headers/linux/input.h

[for-6.1 v2 0/2] virtiofsd: Add support for FUSE_SYNCFS request

2021-04-26 Thread Greg Kurz
io-fs/2021-April/msg00166.html - propagate syncfs() errors to client (Vivek) Greg Kurz (2): Update linux headers to 5.12-rc8 + FUSE_SYNCFS virtiofsd: Add support for FUSE_SYNCFS request include/standard-headers/drm/drm_fourcc.h | 23 - include/standard-headers/linux/ethtool.h

[for-6.1 v2 2/2] virtiofsd: Add support for FUSE_SYNCFS request

2021-04-26 Thread Greg Kurz
may be optimized in the future, but enforce correctness first. Signed-off-by: Greg Kurz --- tools/virtiofsd/fuse_lowlevel.c | 19 ++ tools/virtiofsd/fuse_lowlevel.h | 13 tools/virtiofsd/passthrough_ll.c | 29 +++ tools

Re: [Virtio-fs] [for-6.1 2/2] virtiofsd: Add support for FUSE_SYNCFS request

2021-04-21 Thread Greg Kurz
On Tue, 20 Apr 2021 14:57:19 -0400 Vivek Goyal wrote: > On Mon, Apr 19, 2021 at 05:11:42PM +0200, Greg Kurz wrote: > > Honor the expected behavior of syncfs() to synchronously flush all > > data and metadata on linux systems. Like the ->sync_fs() superblock > > opera

Re: [for-6.1 0/4] virtio: Improve boot time of virtio-scsi-pci and virtio-blk-pci

2021-04-19 Thread Greg Kurz
Ping ? On Wed, 7 Apr 2021 16:34:57 +0200 Greg Kurz wrote: > Now that virtio-scsi-pci and virtio-blk-pci map 1 virtqueue per vCPU, > a serious slow down may be observed on setups with a big enough number > of vCPUs. > > Exemple with a pseries guest on a bi-POWER9 socket system

[for-6.1 1/2] Update linux headers to 5.12-rc8 + FUSE_SYNCFS

2021-04-19 Thread Greg Kurz
NOT YET IN UPSTREAM LINUX. DO NOT MERGE. Signed-off-by: Greg Kurz --- include/standard-headers/drm/drm_fourcc.h | 23 - include/standard-headers/linux/ethtool.h | 54 ++- include/standard-headers/linux/fuse.h | 14 ++- include/standard-headers/linux/input.h

[for-6.1 2/2] virtiofsd: Add support for FUSE_SYNCFS request

2021-04-19 Thread Greg Kurz
an unbounded time penalty to syncfs(). This may be optimized in the future, but enforce correctness first. Signed-off-by: Greg Kurz --- tools/virtiofsd/fuse_lowlevel.c | 19 ++ tools/virtiofsd/fuse_lowlevel.h | 13 tools/virtiofsd/passthro

[for-6.1 0/2] virtiofsd: Add support for FUSE_SYNCFS request

2021-04-19 Thread Greg Kurz
FUSE_SYNCFS allows the client to flush the host page cache. This isn't available in upstream linux yet, but the following tree can be used to test: https://gitlab.com/gkurz/linux/-/tree/virtio-fs-sync Greg Kurz (2): Update linux headers to 5.12-rc8 + FUSE_SYNCFS virtiofsd: Add suppor

Re: [Virtio-fs] [PATCH 1/2] virtiofsd: Allow use "-o xattrmap" without "-o xattr"

2021-04-16 Thread Greg Kurz
On Wed, 14 Apr 2021 20:12:06 + Carlos Venegas wrote: > When -o xattrmap is used, it will not work unless xattr is enabled. > > This patch enables xattr when -o xattrmap is used. > > Signed-off-by: Carlos Venegas > --- > tools/virtiofsd/passthrough_ll.c | 1 + > 1 file changed, 1 insertion

Re: [Virtio-fs] [PATCH v2 01/25] DAX: vhost-user: Rework slave return values

2021-04-16 Thread Greg Kurz
t_notifier(struct vhost_dev *dev, > - VhostUserVringArea > *area, > - int fd) > +static uint64_t vhost_user_slave_handle_vring_host_notifier( > +

Re: [PATCH v4 09/12] qtest/migration-test: Skip tests if KVM not builtin on s390x/ppc64

2021-04-16 Thread Greg Kurz
gt; > Signed-off-by: Philippe Mathieu-Daudé > --- LGTM Reviewed-by: Greg Kurz > Cc: David Gibson > Cc: Greg Kurz > Cc: Halil Pasic > Cc: Cornelia Huck > Cc: Christian Borntraeger > Cc: qemu-...@nongnu.org > Cc: qemu-s3...@nongnu.org > --- > tests/qtest/migr

Re: [PATCH 1/2] qdev: Separate implementations of qdev_get_machine() for user and system

2021-04-15 Thread Greg Kurz
On Thu, 15 Apr 2021 21:07:33 +0200 Philippe Mathieu-Daudé wrote: > On 4/15/21 6:56 PM, Greg Kurz wrote: > > On Thu, 15 Apr 2021 18:45:45 +0200 > > Philippe Mathieu-Daudé wrote: > > > >> On 4/15/21 3:30 PM, Greg Kurz wrote: > >>> On Thu, 15 Apr 2021 1

Re: [PATCH 1/2] qdev: Separate implementations of qdev_get_machine() for user and system

2021-04-15 Thread Greg Kurz
On Thu, 15 Apr 2021 18:45:45 +0200 Philippe Mathieu-Daudé wrote: > On 4/15/21 3:30 PM, Greg Kurz wrote: > > On Thu, 15 Apr 2021 14:39:55 +0200 > > Philippe Mathieu-Daudé wrote: > > > >> On 4/9/21 6:03 PM, Greg Kurz wrote: > >>> Despite its simple name

Re: [PATCH 1/2] qdev: Separate implementations of qdev_get_machine() for user and system

2021-04-15 Thread Greg Kurz
On Thu, 15 Apr 2021 14:39:55 +0200 Philippe Mathieu-Daudé wrote: > On 4/9/21 6:03 PM, Greg Kurz wrote: > > Despite its simple name and common usage of "getting a pointer to > > the machine" in system-mode emulation, qdev_get_machine() has some > > subtilities. &

Re: [PATCH 1/2] qdev: Separate implementations of qdev_get_machine() for user and system

2021-04-15 Thread Greg Kurz
On Tue, 13 Apr 2021 18:25:42 -0400 Eduardo Habkost wrote: > On Fri, Apr 09, 2021 at 06:03:38PM +0200, Greg Kurz wrote: > > Despite its simple name and common usage of "getting a pointer to > > the machine" in system-mode emulation, qdev_get_machine() has some > >

Re: [PATCH 1/2] qdev: Separate implementations of qdev_get_machine() for user and system

2021-04-15 Thread Greg Kurz
On Sat, 10 Apr 2021 10:59:25 +0200 Markus Armbruster wrote: > Greg Kurz writes: > > > Despite its simple name and common usage of "getting a pointer to > > the machine" in system-mode emulation, qdev_get_machine() has some > > subtilities. > > > >

Re: [Virtio-fs] [PATCH v2 08/25] DAX: virtio-fs: Add vhost-user slave commands for mapping

2021-04-14 Thread Greg Kurz
On Wed, 14 Apr 2021 16:51:20 +0100 "Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > The daemon may request that fd's be mapped into the virtio-fs cache > visible to the guest. > These mappings are triggered by commands sent over the slave fd > from the daemon. > > Sig

Re: [PATCH 1/2] qdev: Separate implementations of qdev_get_machine() for user and system

2021-04-09 Thread Greg Kurz
On Fri, 9 Apr 2021 16:14:41 -0400 Eduardo Habkost wrote: > On Fri, Apr 09, 2021 at 06:03:38PM +0200, Greg Kurz wrote: > [...] > > In order to avoid further subtle breakages like this, change the > > implentation of qdev_get_machine() to: > > - keep the existing behavio

[PATCH 1/2] qdev: Separate implementations of qdev_get_machine() for user and system

2021-04-09 Thread Greg Kurz
s for system and user mode. $ ./qemu-system-ppc64 -device power8_v2.0-spapr-cpu-core,help qemu-system-ppc64: ../../hw/core/machine.c:1290: qdev_get_machine: Assertion `machine != NULL' failed. Aborted (core dumped) Reported-by: Thomas Huth Signed-off-by: Greg Kurz --- hw/core/machin

[PATCH 2/2] cpu/core: Fix "help" of CPU core device types

2021-04-09 Thread Greg Kurz
Reported-by: Thomas Huth Fixes: 3df261b6676b ("softmmu/vl.c: Handle '-cpu help' and '-device help' before 'no default machine'") Cc: peter.mayd...@linaro.org Signed-off-by: Greg Kurz --- hw/cpu/core.c | 10 -- 1 file changed, 8 insertions(+), 2 de

[PATCH 0/2] cpu/core: Fix "help" of CPU core device types

2021-04-09 Thread Greg Kurz
the system mode specific code usually assume MACHINE(qdev_get_machine()). This series brings separate implementations between user and system mode. The breakage with "cpu-code,help" is fixed by using current_machine. Greg Kurz (2): qdev: Separate implementations of qdev_get_machine(

[PATCH] virtiofsd: Fix side-effect in assert()

2021-04-09 Thread Greg Kurz
gt;root.fd); Fixes: bdfd66788349 ("virtiofsd: Fix xattr operations") Cc: misono.tomoh...@jp.fujitsu.com Signed-off-by: Greg Kurz --- tools/virtiofsd/passthrough_ll.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/tools/virtiofsd/passthrough_ll.c b/too

Re: [PATCH] checkpatch: Fix use of uninitialized value

2021-04-08 Thread Greg Kurz
checkfilename() : sub checkfilename { my ($name, $acpi_testexpected, $acpi_nontestexpected) = @_; [...] if (defined $$acpi_testexpected and defined $$acpi_nontestexpected) { ERROR("Do not add expected files together with tests, " . > # Pre-sc

[PATCH] checkpatch: Fix use of uninitialized value

2021-04-07 Thread Greg Kurz
ot;) Cc: isaku.yamah...@intel.com Signed-off-by: Greg Kurz --- scripts/checkpatch.pl |1 + 1 file changed, 1 insertion(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 8f7053ec9b26..3d185cceac94 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -1532,6 +1

[for-6.1 3/4] virtio-scsi: Set host notifiers and callbacks separately

2021-04-07 Thread Greg Kurz
ading virtio_scsi_vring_init() to only setup the host notifier and set the callback in the caller. This will allow to batch addition/deletion of ioeventds in a single memory transaction, which is expected to greatly improve initialization time. Signed-off-by: Greg Kurz --- hw/scsi/virtio-scsi-dataplane.c

[for-6.1 1/4] virtio-blk: Fix rollback path in virtio_blk_data_plane_start()

2021-04-07 Thread Greg Kurz
k: Add Error to blk_set_aio_context()") Cc: kw...@redhat.com Signed-off-by: Greg Kurz Reviewed-by: Stefan Hajnoczi --- hw/block/dataplane/virtio-blk.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c index e9050c

[for-6.1 4/4] virtio-scsi: Configure all host notifiers in a single MR transaction

2021-04-07 Thread Greg Kurz
before virtio_bus_cleanup_host_notifier() because the latter might close ioeventfds that the transaction still assumes to be around when it commits. Signed-off-by: Greg Kurz --- hw/scsi/virtio-scsi-dataplane.c | 16 1 file changed, 16 insertions(+) diff --git a/hw/scsi/virtio-scsi

[for-6.1 2/4] virtio-blk: Configure all host notifiers in a single MR transaction

2021-04-07 Thread Greg Kurz
before virtio_bus_cleanup_host_notifier() because the latter might close ioeventfds that the transaction still assumes to be around when it commits. Signed-off-by: Greg Kurz --- hw/block/dataplane/virtio-blk.c | 25 + 1 file changed, 25 insertions(+) diff --git a/hw/block

[for-6.1 0/4] virtio: Improve boot time of virtio-scsi-pci and virtio-blk-pci

2021-04-07 Thread Greg Kurz
lify the code by directly beginning and committing the memory transaction from the device model, without all the virtio specific proxying code and no changes needed in the memory subsystem. Greg Kurz (4): virtio-blk: Fix rollback path in virtio_blk_data_plane_start() virtio-blk: Configure all h

Re: [PATCH v4 3/3] ppc: Enable 2nd DAWR support on p10

2021-04-07 Thread Greg Kurz
> cap-dawr1=off\n"); > + } else if (kvmppc_set_cap_dawr1(val) < 0) { > +error_setg(errp, "DAWR1 not supported by KVM."); Well... technically KVM does support DAWR1 but something went wrong when trying to enable it. In case you need to repost, may

Re: [PATCH 0/4] add in-tree 9pfs developers documentation

2021-04-07 Thread Greg Kurz
On Tue, 06 Apr 2021 14:27:41 +0200 Christian Schoenebeck wrote: > On Dienstag, 23. März 2021 20:40:20 CEST Christian Schoenebeck wrote: > > The original source for the QEMU 9p developers documentation is: > > > > https://wiki.qemu.org/Documentation/9p > > > > This patch set adds it as in-tree

Re: [PATCH v3] ppc/spapr: Add support for implement support for H_SCM_HEALTH

2021-04-02 Thread Greg Kurz
bool accessor to fetch it. [ Shiva ] > * Update the usage of PAPR_PMEM_UNARMED* macros [ Greg ] > * Updated patch description reference#1 to point appropriate section > in the documentation. [ Greg ] > --- Reviewed-by: Greg Kurz > hw/ppc/spapr_nvdimm.c | 36 ++

Re: [PATCH v2] ppc/spapr: Add support for implement support for H_SCM_HEALTH

2021-03-31 Thread Greg Kurz
On Thu, 1 Apr 2021 13:26:11 +1100 David Gibson wrote: > On Thu, Apr 01, 2021 at 06:35:19AM +0530, Vaibhav Jain wrote: > > Add support for H_SCM_HEALTH hcall described at [1] for spapr > > nvdimms. This enables guest to detect the 'unarmed' status of a > > specific spapr nvdimm identified by its D

Re: [RFC 3/8] virtio: Add API to batch set host notifiers

2021-03-31 Thread Greg Kurz
On Wed, 31 Mar 2021 15:47:45 +0100 Stefan Hajnoczi wrote: > On Tue, Mar 30, 2021 at 04:17:32PM +0200, Greg Kurz wrote: > > On Tue, 30 Mar 2021 14:55:42 +0100 > > Stefan Hajnoczi wrote: > > > > > On Tue, Mar 30, 2021 at 12:17:40PM +0200, Greg Kurz wrote: > &

Re: [PATCH for-6.1] hw: add compat machines for 6.1

2021-03-31 Thread Greg Kurz
> hw/i386/pc_piix.c | 14 +- > hw/i386/pc_q35.c | 13 - > hw/ppc/spapr.c | 15 +-- For the ppc part, Acked-by: Greg Kurz > hw/s390x/s390-virtio-ccw.c | 14 +- > include/hw/boards.h| 3 ++

Re: [PATCH] ppc/spapr: Add support for implement support for H_SCM_HEALTH

2021-03-31 Thread Greg Kurz
On Tue, 30 Mar 2021 22:37:06 +0530 Vaibhav Jain wrote: > > Thanks for looking into this patch Greg. My responses below inline. > > > Greg Kurz writes: > > > Hi Vaibhav, > > > > Great to see you around :-) > > :-) > > > > > O

Re: [PATCH v5 02/10] target/ppc: Disconnect hflags from MSR

2021-03-31 Thread Greg Kurz
On Wed, 31 Mar 2021 15:47:26 +1100 David Gibson wrote: > On Wed, Mar 31, 2021 at 06:04:27AM +0200, Greg Kurz wrote: > > On Wed, 31 Mar 2021 11:09:06 +1100 > > David Gibson wrote: > > > > > On Tue, Mar 30, 2021 at 08:01:13AM -0700, Richard Henderson wrote: >

Re: [PATCH qemu] spapr: Rename RTAS_MAX_ADDR to FDT_MAX_ADDR

2021-03-31 Thread Greg Kurz
not cause any behavioral change. > > Signed-off-by: Alexey Kardashevskiy > --- Reviewed-by: Greg Kurz > hw/ppc/spapr.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c > index 73a06df3b1b1..1e18a0a628

Re: [PATCH v5 02/10] target/ppc: Disconnect hflags from MSR

2021-03-30 Thread Greg Kurz
On Wed, 31 Mar 2021 11:09:06 +1100 David Gibson wrote: > On Tue, Mar 30, 2021 at 08:01:13AM -0700, Richard Henderson wrote: > > On 3/29/21 10:54 PM, David Gibson wrote: > > >B) Just the hflags patches from my / Richard's tree > > > https://gitlab.com/dgibson/qemu/-/pipelines/278497244 >

Re: [PATCH v3 3/3] ppc: Enable 2nd DAWR support on p10

2021-03-30 Thread Greg Kurz
On Tue, 30 Mar 2021 15:23:50 +0530 Ravi Bangoria wrote: > As per the PAPR, bit 0 of byte 64 in pa-features property indicates > availability of 2nd DAWR registers. i.e. If this bit is set, 2nd > DAWR is present, otherwise not. Use KVM_CAP_PPC_DAWR1 capability to > find whether kvm supports 2nd DA

Re: [PATCH v3 2/3] ppc: Rename current DAWR macros and variables

2021-03-30 Thread Greg Kurz
er and thus not changed in kernel as well as Qemu. > > Signed-off-by: Ravi Bangoria > --- Reviewed-by: Greg Kurz > include/hw/ppc/spapr.h | 2 +- > target/ppc/cpu.h| 4 ++-- > target/ppc/translate_init.c.inc | 4 ++-- > 3 files changed, 5 insertions(

Re: [PATCH] ppc/spapr: Add support for implement support for H_SCM_HEALTH

2021-03-30 Thread Greg Kurz
Hi Vaibhav, Great to see you around :-) On Mon, 29 Mar 2021 21:52:59 +0530 Vaibhav Jain wrote: > Add support for H_SCM_HEALTH hcall described at [1] for spapr > nvdimms. This enables guest to detect the 'unarmed' status of a > specific spapr nvdimm identified by its DRC and if its unarmed, mark

Re: [RFC 3/8] virtio: Add API to batch set host notifiers

2021-03-30 Thread Greg Kurz
On Tue, 30 Mar 2021 14:55:42 +0100 Stefan Hajnoczi wrote: > On Tue, Mar 30, 2021 at 12:17:40PM +0200, Greg Kurz wrote: > > On Mon, 29 Mar 2021 18:10:57 +0100 > > Stefan Hajnoczi wrote: > > > On Thu, Mar 25, 2021 at 04:07:30PM +0100, Greg Kurz wrote: > > > &

Re: [RFC 0/8] virtio: Improve boot time of virtio-scsi-pci and virtio-blk-pci

2021-03-30 Thread Greg Kurz
On Mon, 29 Mar 2021 18:35:16 +0100 Stefan Hajnoczi wrote: > On Thu, Mar 25, 2021 at 04:07:27PM +0100, Greg Kurz wrote: > > Now that virtio-scsi-pci and virtio-blk-pci map 1 virtqueue per vCPU, > > a serious slow down may be observed on setups with a big enough numb

Re: [RFC 4/8] virtio-pci: Batch add/del ioeventfds in a single MR transaction

2021-03-30 Thread Greg Kurz
On Mon, 29 Mar 2021 18:24:40 +0100 Stefan Hajnoczi wrote: > On Thu, Mar 25, 2021 at 04:07:31PM +0100, Greg Kurz wrote: > > diff --git a/softmmu/memory.c b/softmmu/memory.c > > index 1b1942d521cc..0279e5671bcb 100644 > > --- a/softmmu/memory.c > > +++ b/softmmu/memo

Re: [RFC 3/8] virtio: Add API to batch set host notifiers

2021-03-30 Thread Greg Kurz
On Mon, 29 Mar 2021 18:10:57 +0100 Stefan Hajnoczi wrote: > On Thu, Mar 25, 2021 at 04:07:30PM +0100, Greg Kurz wrote: > > Introduce VirtioBusClass methods to begin and commit a transaction > > of setting/unsetting host notifiers. These handlers will be implemented > > b

Re: [RFC 1/8] memory: Allow eventfd add/del without starting a transaction

2021-03-30 Thread Greg Kurz
On Mon, 29 Mar 2021 18:03:49 +0100 Stefan Hajnoczi wrote: > On Thu, Mar 25, 2021 at 04:07:28PM +0100, Greg Kurz wrote: > > diff --git a/include/exec/memory.h b/include/exec/memory.h > > index 5728a681b27d..98ed552e001c 100644 > > --- a/include/exec/memory.h > >

Re: [PATCH v5 02/10] target/ppc: Disconnect hflags from MSR

2021-03-29 Thread Greg Kurz
On Wed, 24 Mar 2021 11:03:02 +1100 David Gibson wrote: > On Tue, Mar 23, 2021 at 12:43:32PM -0600, Richard Henderson wrote: > > Copying flags directly from msr has drawbacks: (1) msr bits > > mean different things per cpu, (2) msr has 64 bits on 64 cpus > > while tb->flags has only 32 bits. > >

Re: [RFC 0/8] virtio: Improve boot time of virtio-scsi-pci and virtio-blk-pci

2021-03-25 Thread Greg Kurz
On Thu, 25 Mar 2021 17:43:10 + Stefan Hajnoczi wrote: > On Thu, Mar 25, 2021 at 01:05:16PM -0400, Michael S. Tsirkin wrote: > > On Thu, Mar 25, 2021 at 04:07:27PM +0100, Greg Kurz wrote: > > > Now that virtio-scsi-pci and virtio-blk-pci map 1 virtqueue per vCPU, > > &

Re: [RFC 0/8] virtio: Improve boot time of virtio-scsi-pci and virtio-blk-pci

2021-03-25 Thread Greg Kurz
On Thu, 25 Mar 2021 13:05:16 -0400 "Michael S. Tsirkin" wrote: > On Thu, Mar 25, 2021 at 04:07:27PM +0100, Greg Kurz wrote: > > Now that virtio-scsi-pci and virtio-blk-pci map 1 virtqueue per vCPU, > > a serious slow down may be observed on setups with a big e

[RFC 5/8] virtio-blk: Fix rollback path in virtio_blk_data_plane_start()

2021-03-25 Thread Greg Kurz
k: Add Error to blk_set_aio_context()") Cc: kw...@redhat.com Signed-off-by: Greg Kurz --- hw/block/dataplane/virtio-blk.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c index e9050c8987e7..d7b5c95d26d9 1

[RFC 7/8] virtio-scsi: Set host notifiers and callbacks separately

2021-03-25 Thread Greg Kurz
me of VMs with high number of vCPUs. Signed-off-by: Greg Kurz --- hw/scsi/virtio-scsi-dataplane.c | 46 - 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/hw/scsi/virtio-scsi-dataplane.c b/hw/scsi/virtio-scsi-dataplane.c index 4ad879340645..11b53ab

[RFC 4/8] virtio-pci: Batch add/del ioeventfds in a single MR transaction

2021-03-25 Thread Greg Kurz
benefit of this batching feature must be converted to use the virtio_bus_set_host_notifiers() API. Signed-off-by: Greg Kurz --- hw/virtio/virtio-pci.h | 1 + hw/virtio/virtio-pci.c | 53 +- softmmu/memory.c | 4 ++-- 3 files changed, 40 insertions

[RFC 3/8] virtio: Add API to batch set host notifiers

2021-03-25 Thread Greg Kurz
virtio_bus_unset_and_cleanup_host_notifiers(), after transaction commit. Signed-off-by: Greg Kurz --- include/hw/virtio/virtio-bus.h | 4 hw/virtio/virtio-bus.c | 34 ++ 2 files changed, 38 insertions(+) diff --git a/include/hw/virtio/virtio-bus.h b/include/hw/virtio/virtio-bus.h index

[RFC 6/8] virtio-blk: Use virtio_bus_set_host_notifiers()

2021-03-25 Thread Greg Kurz
This allows the virtio-blk-pci device to batch additions and deletions of host notifiers. This significantly improves boot time of VMs with a high number of vCPUs, e.g. from 3m26.408s down to 0m59.923s for a pseries machine with 384 vCPUs. Signed-off-by: Greg Kurz --- hw/block/dataplane/virtio

[RFC 8/8] virtio-scsi: Use virtio_bus_set_host_notifiers()

2021-03-25 Thread Greg Kurz
This allows the virtio-scsi-pci device to batch additions and deletions of host notifiers. This significantly improves boot time of VMs with a high number of vCPUs, e.g. from 6m13.969s down to 1m4.268s for a pseries machine with 384 vCPUs. Signed-off-by: Greg Kurz --- hw/scsi/virtio-scsi

[RFC 1/8] memory: Allow eventfd add/del without starting a transaction

2021-03-25 Thread Greg Kurz
) and memory_region_del_eventfd() that take an extra bool argument to control if a transaction should be started or not. No behavior change at this point. Signed-off-by: Greg Kurz --- include/exec/memory.h | 48 --- softmmu/memory.c

[RFC 2/8] virtio: Introduce virtio_bus_set_host_notifiers()

2021-03-25 Thread Greg Kurz
ff-by: Greg Kurz --- include/hw/virtio/virtio-bus.h | 3 +++ hw/virtio/virtio-bus.c | 36 ++ 2 files changed, 39 insertions(+) diff --git a/include/hw/virtio/virtio-bus.h b/include/hw/virtio/virtio-bus.h index ef8abe49c5a1..6d1e4ee3e886 100644 --- a/inclu

[RFC 0/8] virtio: Improve boot time of virtio-scsi-pci and virtio-blk-pci

2021-03-25 Thread Greg Kurz
.com/show_bug.cgi?id=1927108 which reported the issue for virtio-scsi-pci. Greg Kurz (8): memory: Allow eventfd add/del without starting a transaction virtio: Introduce virtio_bus_set_host_notifiers() virtio: Add API to batch set host notifiers virtio-pci: Batch add/del ioeventfds in a s

Re: Crashes with qemu-system-ppc64

2021-03-25 Thread Greg Kurz
On Wed, 24 Mar 2021 10:17:55 +0100 Paolo Bonzini wrote: > On 24/03/21 00:35, Philippe Mathieu-Daudé wrote: > > Hmmm does this assert() matches your comment? > > > > -- >8 -- > > diff --git a/hw/core/qdev.c b/hw/core/qdev.c > > index cefc5eaa0a9..41cbee77d14 100644 > > --- a/hw/core/qdev.c > > ++

Re: Crashes with qemu-system-ppc64

2021-03-24 Thread Greg Kurz
On Wed, 24 Mar 2021 00:35:05 +0100 Philippe Mathieu-Daudé wrote: > On 3/24/21 12:00 AM, Greg Kurz wrote: > > Cc'ing David > > > > On Tue, 23 Mar 2021 17:48:36 +0100 > > Thomas Huth wrote: > > > >> > >> In case anyone is interest

Re: Crashes with qemu-system-ppc64

2021-03-23 Thread Greg Kurz
Cc'ing David On Tue, 23 Mar 2021 17:48:36 +0100 Thomas Huth wrote: > > In case anyone is interested in fixing those, there are two regressions with > qemu-system-ppc64 in the current master branch: > > $ ./qemu-system-ppc64 -M ppce500 -device macio-oldworld > qemu-system-ppc64: ../../devel/qe

[PATCH v2] target/ppc/kvm: Cache timebase frequency

2021-03-17 Thread Greg Kurz
his allows kvmppc_get_tbfreq() to use zero as an indicator that kvmppc_get_tbfreq_procfs() hasn't been called yet. With this patch applied: 384 0.518382 Signed-off-by: Greg Kurz --- v2: - do the caching in a distinct function for clarity (Philippe) - rename 'retval&

Re: [PATCH] target/ppc/kvm: Cache timebase frequency

2021-03-17 Thread Greg Kurz
On Wed, 17 Mar 2021 16:39:04 +0100 Philippe Mathieu-Daudé wrote: > On 3/17/21 4:24 PM, Greg Kurz wrote: > > Each vCPU core exposes its timebase frequency in the DT. When running > > under KVM, this means parsing /proc/cpuinfo in order to get the timebase > > freq

[PATCH] target/ppc/kvm: Cache timebase frequency

2021-03-17 Thread Greg Kurz
of the host CPU is identical for all cores and it is an invariant for the VM lifetime. Cache it instead of doing the same expensive parsing again and again. With this patch applied: 384 0.518382 Signed-off-by: Greg Kurz --- target/ppc/kvm.c | 11 +-- 1 file

Re: [PATCH 8/9] hw/9pfs/9p-synth: Replaced qemu_mutex_lock with QEMU_LOCK_GUARD

2021-03-15 Thread Greg Kurz
On Mon, 15 Mar 2021 17:07:50 +0100 Christian Schoenebeck wrote: > On Samstag, 13. März 2021 08:51:21 CET Greg Kurz wrote: > > On Sat, 13 Mar 2021 07:43:38 +0200 > > > > Mahmoud Mandour wrote: > > > Thanks for the fast review. I asked on the QEMU IRC channel >

Re: [Virtio-fs] [PATCH 3/3] virtiofsd: Don't allow empty filenames

2021-03-15 Thread Greg Kurz
On Mon, 15 Mar 2021 15:18:48 + "Dr. David Alan Gilbert" wrote: > * Greg Kurz (gr...@kaod.org) wrote: > > On Sun, 14 Mar 2021 19:36:04 -0400 > > Vivek Goyal wrote: > > > > > On Fri, Mar 12, 2021 at 03:10:03PM +0100, Greg Kurz wrote: > >

Re: [Virtio-fs] [PATCH 3/3] virtiofsd: Don't allow empty filenames

2021-03-15 Thread Greg Kurz
On Sun, 14 Mar 2021 19:36:04 -0400 Vivek Goyal wrote: > On Fri, Mar 12, 2021 at 03:10:03PM +0100, Greg Kurz wrote: > > POSIX.1-2017 clearly stipulates that empty filenames aren't > > allowed ([1] and [2]). Since virtiofsd is supposed to mirror > > the host file system

[Bug 1846816] Re: Booting error on AIX 6.1 "Illegal Trap Instruction Interrupt in Kernel""

2021-03-14 Thread Greg Kurz
I no longer work for IBM so I can't be sure, but I'm not aware of virtio support in AIX 7.1. As said in another comment, the "Unimplemented SPAPR hcall 0x02b8" trace reflects that QEMU doesn't implement PEM (Partition Energy Management) as described in section 14.14 of LoPAPR. I can'

Re: [PATCH 8/9] hw/9pfs/9p-synth: Replaced qemu_mutex_lock with QEMU_LOCK_GUARD

2021-03-12 Thread Greg Kurz
atches from this series or will only one maintainer pick up all the patches after they have been acked by the other maintainers ? > On Thu, Mar 11, 2021 at 1:59 PM Christian Schoenebeck < > qemu_...@crudebyte.com> wrote: > > > On Donnerstag, 11. März 2021 12:52:45 CET Greg Ku

[PATCH] spapr: Assert DIMM unplug state in spapr_memory_unplug()

2021-03-12 Thread Greg Kurz
. g_assert() that spapr_pending_dimm_unplugs_find() cannot return NULL in spapr_memory_unplug() to make this clear and silence Coverity. Fixes: Coverity CID 1450767 Signed-off-by: Greg Kurz --- hw/ppc/spapr.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index

Re: [Virtio-fs] [PATCH 1/3] virtiofsd: Don't allow empty paths in lookup_name()

2021-03-12 Thread Greg Kurz
On Fri, 12 Mar 2021 09:13:36 -0600 Connor Kuehl wrote: > On 3/12/21 8:10 AM, Greg Kurz wrote: > > When passed an empty filename, lookup_name() returns the inode of > > the parent directory, unless the parent is the root in which case > > the st_dev doesn't match and lo

[PATCH 2/3] virtiofsd: Convert some functions to return bool

2021-03-12 Thread Greg Kurz
Both currently only return 0 or 1. Signed-off-by: Greg Kurz --- tools/virtiofsd/passthrough_ll.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c index 27a6c636dcaf..f63016d35626 100644 --- a/tools

[PATCH 1/3] virtiofsd: Don't allow empty paths in lookup_name()

2021-03-12 Thread Greg Kurz
r NULL" for all directories. Signed-off-by: Greg Kurz --- tools/virtiofsd/passthrough_ll.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c index fc7e1b1e8e2b..27a6c636dcaf 100644 --- a/tools/virtiofsd/passthro

[PATCH 3/3] virtiofsd: Don't allow empty filenames

2021-03-12 Thread Greg Kurz
group.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13 Signed-off-by: Greg Kurz --- tools/virtiofsd/passthrough_ll.c | 35 1 file changed, 35 insertions(+) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c index f63016

[PATCH 0/3] virtiofsd: Deal with empty filenames

2021-03-12 Thread Greg Kurz
hence never see empty names in client requests. Detect this early and systematically fail the request with ENOENT in this case. No regression is observed with the POSIX-oriented pjdfstest file system test suite (https://github.com/pjd/pjdfstest). Greg Kurz (3): virtiofsd: Don't allow emp

Re: [PATCH v2 1/8] powerpc/xive: Use cpu_to_node() instead of ibm,chip-id property

2021-03-12 Thread Greg Kurz
;> On 3/9/21 6:08 PM, Daniel Henrique Barboza wrote: > >>>> > >>>> > >>>> On 3/9/21 12:33 PM, Cédric Le Goater wrote: > >>>>> On 3/8/21 6:13 PM, Greg Kurz wrote: > >>>>>> On Wed, 3 Mar 2021 18:48:50 +0100 > >>

[PATCH v2 6/7] vhost-user: Monitor slave channel in vhost_user_read()

2021-03-12 Thread Greg Kurz
() based on an event that was already handled by the nested loop. Signed-off-by: Greg Kurz --- v2: - also monitor G_IO_HUP (Stefan) - refactored the code a bit --- hw/virtio/vhost-user.c | 35 --- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/hw

[PATCH v2 3/7] vhost-user: Factor out duplicated slave_fd teardown code

2021-03-12 Thread Greg Kurz
Signed-off-by: Greg Kurz --- hw/virtio/vhost-user.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index acde1d293684..cb0c98f30a8d 100644 --- a/hw/virtio/vhost-user.c +++ b/hw/virtio/vhost-user.c

[PATCH v2 7/7] virtiofsd: Release vu_dispatch_lock when stopping queue

2021-03-12 Thread Greg Kurz
ock being held. Signed-off-by: Greg Kurz Reviewed-by: Vivek Goyal Reviewed-by: Stefan Hajnoczi --- tools/virtiofsd/fuse_virtio.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tools/virtiofsd/fuse_virtio.c b/tools/virtiofsd/fuse_virtio.c index 523ee64fb7ae..3e13997406bf 100644 --- a/to

[PATCH v2 1/7] vhost-user: Drop misleading EAGAIN checks in slave_read()

2021-03-12 Thread Greg Kurz
p the checks everywhere in this function for the sake of clarity. Signed-off-by: Greg Kurz --- hw/virtio/vhost-user.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index 2fdd5daf74bb..6af9b43a7232 100644 --- a/hw/virtio/

[PATCH v2 2/7] vhost-user: Fix double-close on slave_read() error path

2021-03-12 Thread Greg Kurz
of the descriptor was recycled by some other thread in the meantime. This code duplication complicates rollback for no real good benefit. Do the closing in a unique place, under a new fdcleanup: goto label at the end of the function. Signed-off-by: Greg Kurz --- hw/virtio/vhost-user.c | 11

[PATCH v2 5/7] vhost-user: Introduce nested event loop in vhost_user_read()

2021-03-12 Thread Greg Kurz
ardev I/O for now in vhost_user_read() and push the actual reading to a one-shot handler. A subsequent patch will teach the loop to monitor and process messages from the slave channel as well. [1] https://github.com/jedisct1/Blogbench Suggested-by: Stefan Hajnoczi Signed-off-by: Greg Kurz --- v2: - Docume

[PATCH v2 4/7] vhost-user: Convert slave channel to QIOChannelSocket

2021-03-12 Thread Greg Kurz
just like we don't break it if some other type of ancillary data is received : this isn't explicitely violating the protocol per-se so it seems better to ignore it. The current code errors out on short reads and writes. Use the qio_channel_*_all() variants to address this on the way. Sign

[PATCH v2 0/7] virtiofsd: Avoid potential deadlocks

2021-03-12 Thread Greg Kurz
ommits/virtio-fs-dax-no-deadlock [4] https://github.com/jedisct1/Blogbench Changes since v2: - added some preliminary fixes and cleanups for the slave channel code - re-factored some code and addressed comments (see individual patches) - more testing Greg Kurz (7): vhost-user: Drop misleadi

Re: [PULL 00/20] ppc-for-6.0 queue 20210310

2021-03-11 Thread Greg Kurz
On Thu, 11 Mar 2021 16:54:23 +0100 Greg Kurz wrote: > On Thu, 11 Mar 2021 07:31:40 -0600 > Richard Henderson wrote: > > > On 3/10/21 10:56 PM, David Gibson wrote: > > >> *pc = env->nip; > > >> -    *cs_base = 0; > > >> -    *f

Re: [PATCH 1/1] spapr.c: remove 'ibm,chip-id' from DT

2021-03-11 Thread Greg Kurz
part of PAPR, this is something that we've been exposing to guests with existing machine types and someone could have found a use for it or still using a pre-4.14 kernel, e.g. debian stretch still relies on 4.9. In theory we should change this behavior in the default machine only. But in case D

Re: [PULL 00/20] ppc-for-6.0 queue 20210310

2021-03-11 Thread Greg Kurz
On Thu, 11 Mar 2021 07:31:40 -0600 Richard Henderson wrote: > On 3/10/21 10:56 PM, David Gibson wrote: > >> *pc = env->nip; > >> -    *cs_base = 0; > >> -    *flags = env->hflags; > >> +    *cs_base = env->hflags; > >> +    *flags = 0; > >>  } > > > > Ah, that one. It caused a regression

Re: [PATCH 8/9] hw/9pfs/9p-synth: Replaced qemu_mutex_lock with QEMU_LOCK_GUARD

2021-03-11 Thread Greg Kurz
On Thu, 11 Mar 2021 11:49:06 +0100 Christian Schoenebeck wrote: > On Donnerstag, 11. März 2021 04:15:37 CET Mahmoud Mandour wrote: > > Replaced a call to qemu_mutex_lock and its respective call to > > qemu_mutex_unlock and used QEMU_LOCK_GUARD macro in their place. > > This simplifies the code by

Re: [PATCH 8/9] hw/9pfs/9p-synth: Replaced qemu_mutex_lock with QEMU_LOCK_GUARD

2021-03-10 Thread Greg Kurz
s goto paths. > > Signed-off-by: Mahmoud Mandour > --- Nice cleanup. Thanks ! Acked-by: Greg Kurz > hw/9pfs/9p-synth.c | 12 > 1 file changed, 4 insertions(+), 8 deletions(-) > > diff --git a/hw/9pfs/9p-synth.c b/hw/9pfs/9p-synth.c > index 7eb210ffa8..473ef914

Re: [PATCH 2/4] vhost-user: Convert slave channel to QIOChannelSocket

2021-03-10 Thread Greg Kurz
On Wed, 10 Mar 2021 11:43:58 + Daniel P. Berrangé wrote: > On Tue, Mar 09, 2021 at 09:23:22PM +0100, Greg Kurz wrote: > > On Tue, 9 Mar 2021 15:17:21 + > > Stefan Hajnoczi wrote: > > > > > On Mon, Mar 08, 2021 at 01:31:39PM +0100, Greg Kurz wrote: > >

Re: [PATCH 2/4] vhost-user: Convert slave channel to QIOChannelSocket

2021-03-10 Thread Greg Kurz
On Wed, 10 Mar 2021 11:27:16 + Stefan Hajnoczi wrote: > On Tue, Mar 09, 2021 at 09:23:22PM +0100, Greg Kurz wrote: > > On Tue, 9 Mar 2021 15:17:21 + > > Stefan Hajnoczi wrote: > > > > > On Mon, Mar 08, 2021 at 01:31:39PM +0100, Greg Kurz wrote: > >

Re: [PATCH] docs/system: Document the removal of "compat" property for POWER CPUs

2021-03-09 Thread Greg Kurz
On Tue, 9 Mar 2021 21:52:40 +0100 Laurent Vivier wrote: > Le 22/02/2021 à 12:28, Greg Kurz a écrit : > > This is just an oversight. > > > > Fixes: f518be3aa35b ("target/ppc: Remove "compat" property of server class > > POWER CPUs") >

Re: [PATCH 3/4] vhost-user: Monitor slave channel in vhost_user_read()

2021-03-09 Thread Greg Kurz
On Tue, 9 Mar 2021 15:18:56 + Stefan Hajnoczi wrote: > On Mon, Mar 08, 2021 at 01:31:40PM +0100, Greg Kurz wrote: > > @@ -363,8 +367,30 @@ static int vhost_user_read(struct vhost_dev *dev, > > VhostUserMsg *msg) > > qemu_chr_be_update_read_ha

Re: [PATCH v2] MAINTAINERS: Fix the location of tools manuals

2021-03-09 Thread Greg Kurz
nd qemu-block now, since I think it could go through the trivial or block > tree. > For the virtfs change: Acked-by: Greg Kurz > > On 2/4/21 10:59 AM, Philippe Mathieu-Daudé wrote: > >> On 2/4/21 2:54 PM, Wainer dos Santos Moschetta wrote: > >>> The qemu-img.rs

<    1   2   3   4   5   6   7   8   9   10   >