Re: [PATCH for-9.0 v3 0/2] qtest/virtio-9p-test.c: fix slow tests

2024-03-27 Thread Greg Kurz
On Wed, 27 Mar 2024 11:20:09 -0300 Daniel Henrique Barboza wrote: > Hi, > > In this new version we took a different approach after the discussions > we had in [1]. The tests are now untouched, and we're addressing the root > cause directly: the fact that we have a single temp dir for all the

Re: [PATCH for-9.0 1/3] qtest/virtio-9p-test.c: consolidate create dir, file and symlink tests

2024-03-27 Thread Greg Kurz
> wrote: > > >> On 3/27/24 05:47, Christian Schoenebeck wrote: > > >>> On Tuesday, March 26, 2024 6:47:17 PM CET Daniel Henrique Barboza wrote: > > >>>> On 3/26/24 14:05, Greg Kurz wrote: > > >>>>> On Tue, 26 Mar 2024 10:2

Re: [PATCH for-9.0 1/3] qtest/virtio-9p-test.c: consolidate create dir, file and symlink tests

2024-03-26 Thread Greg Kurz
On Tue, 26 Mar 2024 10:26:04 -0300 Daniel Henrique Barboza wrote: > The local 9p driver in virtio-9p-test.c its temporary dir right at the > start of qos-test (via virtio_9p_create_local_test_dir()) and only > deletes it after qos-test is finished (via > virtio_9p_remove_local_test_dir()). > >

Re: [PATCH for-9.0 0/3] qtest/virtio-9p-test.c: fix slow tests

2024-03-26 Thread Greg Kurz
Bom dia Daniel ! On Tue, 26 Mar 2024 10:26:03 -0300 Daniel Henrique Barboza wrote: > Hi, > > Thomas reported in [1] a problem that happened with the RISC-V machine > where some tests from virtio-9p-test.c were failing with '-m slow', i.e. > enabling slow tests. > > In the end it wasn't a

Re: [PATCH 1/3] hw/i386: Add `\n` to hint message

2024-01-30 Thread Greg Kurz
On Tue, 30 Jan 2024 21:43:27 +0530 Ani Sinha wrote: > > > > On 30-Jan-2024, at 21:26, Greg Kurz wrote: > > > > error_fprintf() doesn't add newlines. > > ^ > > Should be error_printf(). Ditto for other patches. > Thanks. Posted a

[PATCH v2 1/3] hw/i386: Add `\n` to hint message

2024-01-30 Thread Greg Kurz
error_printf() doesn't add newlines. Signed-off-by: Greg Kurz --- hw/i386/acpi-build.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index edc979379c03..e990b0ae927f 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi

[PATCH v2 0/3] acpi-build: Fix hint messages

2024-01-30 Thread Greg Kurz
ACPI build for ARM, i386 and Loongarch all have the same warning report with a hint for the user. The hint is printed with error_printf() as expected but it lacks the terminating '\n'. v2: - s/error_fprintf/error_printf in commit logs (Ani) Greg Kurz (3): hw/i386: Add `\n` to hint message hw

[PATCH v2 3/3] hw/arm: Add `\n` to hint message

2024-01-30 Thread Greg Kurz
error_printf() doesn't add newlines. Signed-off-by: Greg Kurz --- hw/arm/virt-acpi-build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 17aeec7a6f56..48febde1ccd1 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm

[PATCH v2 2/3] hw/loongarch: Add `\n` to hint message

2024-01-30 Thread Greg Kurz
error_printf() doesn't add newlines. Signed-off-by: Greg Kurz --- hw/loongarch/acpi-build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/loongarch/acpi-build.c b/hw/loongarch/acpi-build.c index 730bc4a748c4..a1c419874123 100644 --- a/hw/loongarch/acpi-build.c +++ b/hw

[PATCH 3/3] hw/arm: Add `\n` to hint message

2024-01-30 Thread Greg Kurz
error_fprintf() doesn't add newlines. Signed-off-by: Greg Kurz --- hw/arm/virt-acpi-build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 17aeec7a6f56..48febde1ccd1 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm

[PATCH 0/3] acpi-build: Fix hint messages

2024-01-30 Thread Greg Kurz
ACPI build for ARM, i386 and Loongarch all have the same warning report with a hint for the user. The hint is printed with error_printf() as expected but it lacks the terminating '\n'. Greg Kurz (3): hw/i386: Add `\n` to hint message hw/loongarch: Add `\n` to hint message hw/arm: Add `\n

[PATCH 1/3] hw/i386: Add `\n` to hint message

2024-01-30 Thread Greg Kurz
error_fprintf() doesn't add newlines. Signed-off-by: Greg Kurz --- hw/i386/acpi-build.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index edc979379c03..e990b0ae927f 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi

[PATCH 2/3] hw/loongarch: Add `\n` to hint message

2024-01-30 Thread Greg Kurz
error_fprintf() doesn't add newlines. Signed-off-by: Greg Kurz --- hw/loongarch/acpi-build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/loongarch/acpi-build.c b/hw/loongarch/acpi-build.c index 730bc4a748c4..a1c419874123 100644 --- a/hw/loongarch/acpi-build.c +++ b/hw

Re: [PATCH 2/6] hw/9pfs/9p-synth: Use RCU_READ macro

2024-01-23 Thread Greg Kurz
t; --- > hw/9pfs/9p-synth.c | 24 > 1 file changed, 12 insertions(+), 12 deletions(-) > Acked-by: Greg Kurz > diff --git a/hw/9pfs/9p-synth.c b/hw/9pfs/9p-synth.c > index 0ac79a500b..419ea69e3a 100644 > --- a/hw/9pfs/9p-synth.c > +++ b/hw/9pfs/9p-syn

Re: [PATCH 20/71] hw/9pfs: Constify VMState

2023-11-05 Thread Greg Kurz
On Sun, 5 Nov 2023 22:57:36 -0800 Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- Acked-by: Greg Kurz > hw/9pfs/virtio-9p-device.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9

Re: [PATCH 07/13] RFC migration: icp/server is a mess

2023-10-20 Thread Greg Kurz
On Fri, 20 Oct 2023 17:49:38 +1000 "Nicholas Piggin" wrote: > On Fri Oct 20, 2023 at 7:39 AM AEST, Greg Kurz wrote: > > On Thu, 19 Oct 2023 21:08:25 +0200 > > Juan Quintela wrote: > > > > > Current code does: > > > - register pre_2_10

Re: [PATCH 07/13] RFC migration: icp/server is a mess

2023-10-20 Thread Greg Kurz
On Fri, 20 Oct 2023 09:30:44 +0200 Juan Quintela wrote: > Greg Kurz wrote: > > On Thu, 19 Oct 2023 21:08:25 +0200 > > Juan Quintela wrote: > > > >> Current code does: > >> - register pre_2_10_vmstate_dummy_icp with "icp/server" and instance

Re: [PATCH 07/13] RFC migration: icp/server is a mess

2023-10-19 Thread Greg Kurz
2_10_vmstate_dummy_icp > * unregister pre_2_10_vmstate_dummy_icp > * register real vmstate_icp > > As the initialization of this machine is already complex enough, I > need help from PPC maintainers to fix this. > > Volunteers? > > CC: Cedric Le Goater > CC:

Re: [PATCH 07/13] RFC migration: icp/server is a mess

2023-10-19 Thread Greg Kurz
able to answer some questions or to review someone else's patch that gets rid of the offending code, at best. Cheers, -- Greg > CC: Cedric Le Goater > CC: Daniel Henrique Barboza > CC: David Gibson > CC: Greg Kurz > > Signed-off-by: Juan Quintela > --- > hw

Re: [PATCH] MAINTAINERS: Nick Piggin PPC maintainer, other PPC changes

2023-09-15 Thread Greg Kurz
uired knowledge and motivation to drive the boat. > Have a good trip Nick ! :-) > - Greg Kurz is being removed from all qemu-ppc entries. Greg has moved > to other areas of interest and will retire from qemu-ppc. Thanks Mr > Kurz for all the years of service. > My pleasure !

Re: [PATCH v5 8/9] fsdev: Use ThrottleDirection instread of bool is_write

2023-08-07 Thread Greg Kurz
On Fri, 28 Jul 2023 10:20:05 +0800 zhenwei pi wrote: > 'bool is_write' style is obsolete from throttle framework, adapt > fsdev to the new style. > > Cc: Greg Kurz > Reviewed-by: Hanna Czenczek > Signed-off-by: zhenwei pi Reviewed-by: Greg Kurz > --- > fsdev/qe

Re: [PATCH v6] ppc: Enable 2nd DAWR support on p10

2023-07-08 Thread Greg Kurz
On Fri, 7 Jul 2023 21:31:47 +0530 Shivaprasad G Bhat wrote: > On 7/7/23 17:52, Daniel Henrique Barboza wrote: > > > > > > On 7/7/23 08:59, Greg Kurz wrote: > >> Hi Daniel and Shiva ! > >> > >> On Fri, 7 Jul 2023 08:09:47 -0300 > >> Daniel

Re: [PATCH v6] ppc: Enable 2nd DAWR support on p10

2023-07-07 Thread Greg Kurz
r not. If it's supported, allow user to set > > the pa-feature bit in guest DT using cap-dawr1 machine capability. Though, > > watchpoint on powerpc TCG guest is not supported and thus 2nd DAWR is not > > enabled for TCG mode. > > > > Signed-off-by: Ravi Bangoria >

Re: [PATCH] MAINTAINERS: raise status of 9p to 'Maintained'

2023-07-03 Thread Greg Kurz
:-) > Based-on: > Signed-off-by: Christian Schoenebeck > --- Reviewed-by: Greg Kurz > MAINTAINERS | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/MAINTAINERS b/MAINTAINERS > index e8a3205eb4..71f2479ec5 100644 > --- a/MAINTAINERS > +

Re: [PATCH v4] target: ppc: Use MSR_HVB bit to get the target endianness for memory dump

2023-07-03 Thread Greg Kurz
LE > LE powernv(OPAL/PowerNV) BE > LE pseries(OPAL/PowerNV/pSeries) KVMHV LE > LE pseries TCG LE > > Fixes: 5609400a4228 ("target/ppc: Set the correct endianness for powernv > memory > dump

Re: [PATCH] ppc: spapr: Fix device tree entries in absence of XIVE native mode

2023-06-30 Thread Greg Kurz
On Fri, 30 Jun 2023 11:00:56 +0530 Gautam Menghani wrote: > Currently, XIVE native exploitation mode is not supported in nested > guests. When we boot up a nested guest on PowerNV platform, we observe > the following entries in the device tree of nested guest: > > ``` > device_type =

Re: [PATCH v3 6/6] target/ppc: Remove pointless checks of CONFIG_USER_ONLY in 'kvm_ppc.h'

2023-06-29 Thread Greg Kurz
On Tue, 27 Jun 2023 13:51:24 +0200 Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- Reviewed-by: Greg Kurz > target/ppc/kvm_ppc.h | 5 - > 1 file changed, 5 deletions(-) > > diff --git a/target/ppc/kvm_ppc.h b/target/ppc/kvm_ppc.h

Re: [PATCH v3 4/6] target/ppc: Define TYPE_HOST_POWERPC_CPU in cpu-qom.h

2023-06-29 Thread Greg Kurz
On Tue, 27 Jun 2023 13:51:22 +0200 Philippe Mathieu-Daudé wrote: > TYPE_HOST_POWERPC_CPU is used in various places of cpu_init.c, > in order to restrict "kvm_ppc.h" to sysemu, move this QOM-related > definition to cpu-qom.h. > > Signed-off-by: Philippe Mathieu-Daudé

Re: [PATCH v3 5/6] target/ppc: Restrict 'kvm_ppc.h' to sysemu in cpu_init.c

2023-06-29 Thread Greg Kurz
On Tue, 27 Jun 2023 13:51:23 +0200 Philippe Mathieu-Daudé wrote: > User emulation shouldn't need any of the KVM prototypes > declared in "kvm_ppc.h". > > Signed-off-by: Philippe Mathieu-Daudé > --- Reviewed-by: Greg Kurz > target/ppc/cpu_init.c | 2 +- > 1

Re: [PATCH v3 3/6] target/ppc: Move CPU QOM definitions to cpu-qom.h

2023-06-28 Thread Greg Kurz
On Tue, 27 Jun 2023 13:51:21 +0200 Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > target/ppc/cpu-qom.h | 5 + > target/ppc/cpu.h | 6 -- > 2 files changed, 5 insertions(+), 6 deletions(-) > > diff --git a/target/ppc/cpu-qom.h b/target/ppc/cpu-qom.h >

Re: [PATCH v3 2/6] target/ppc: Reorder #ifdef'ry in kvm_ppc.h

2023-06-28 Thread Greg Kurz
On Tue, 27 Jun 2023 13:51:20 +0200 Philippe Mathieu-Daudé wrote: > Keep a single if/else/endif block checking CONFIG_KVM. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/ppc/kvm_ppc.h | 62 > 1 file changed, 28 insertions(+), 34

Re: [PATCH v3 1/6] target/ppc: Have 'kvm_ppc.h' include 'sysemu/kvm.h'

2023-06-28 Thread Greg Kurz
On Tue, 27 Jun 2023 13:51:19 +0200 Philippe Mathieu-Daudé wrote: > "kvm_ppc.h" declares: > > int kvm_handle_nmi(PowerPCCPU *cpu, struct kvm_run *run); > > 'struct kvm_run' is declared in "sysemu/kvm.h", include it. > > Signed-off-by: Philippe Mat

Re: [PATCH] target/ppc: Only generate decodetree files when TCG is enabled

2023-06-27 Thread Greg Kurz
On Mon, 26 Jun 2023 16:01:00 +0200 Philippe Mathieu-Daudé wrote: > No need to generate TCG-specific decodetree files > when TCG is disabled. > > Signed-off-by: Philippe Mathieu-Daudé > --- Reviewed-by: Greg Kurz > target/ppc/meson.build | 2 +- > 1 file changed, 1 ins

Re: [SPAM] [PATCH v4] 9pfs: deprecate 'proxy' backend

2023-06-26 Thread Greg Kurz
+ b/fsdev/qemu-fsdev.c > @@ -133,6 +133,14 @@ int qemu_fsdev_add(QemuOpts *opts, Error **errp) > } > > if (fsdriver) { > +if (strncmp(fsdriver, "proxy", 5) == 0) { > +warn_report( > +"'-fsdev proxy' and '-virtfs pr

Re: [PATCH v3] 9pfs: deprecate 'proxy' backend

2023-06-21 Thread Greg Kurz
On Wed, 21 Jun 2023 16:16:46 +0200 Christian Schoenebeck wrote: > On Wednesday, June 21, 2023 3:41:36 PM CEST Greg Kurz wrote: > > On Wed, 21 Jun 2023 15:32:39 +0200 > > Christian Schoenebeck wrote: > > > > > On Thursday, June 15, 2023 11:35:05 AM CE

Re: [PATCH v3] 9pfs: deprecate 'proxy' backend

2023-06-21 Thread Greg Kurz
On Wed, 21 Jun 2023 15:32:39 +0200 Christian Schoenebeck wrote: > On Thursday, June 15, 2023 11:35:05 AM CEST Christian Schoenebeck wrote: > > On Saturday, June 10, 2023 3:39:44 PM CEST Christian Schoenebeck wrote: > > > As recent CVE-2023-2861 once again showed, the 9p 'proxy' fs driver is in >

Re: [PATCH] hw/ppc/spapr: Test whether TCG is enabled with tcg_enabled()

2023-06-20 Thread Greg Kurz
t_vsmt_mode(SpaprMachineState > > *spapr, Error **errp) > > int ret; > > unsigned int smp_threads = ms->smp.threads; > > > > -if (!kvm_enabled() && (smp_threads > 1)) { > > +if (tcg_enabled() && (smp_threads > 1)) { Bonjour Philippe, P

Re: [SPAM] [PATCH v3] 9pfs: deprecate 'proxy' backend

2023-06-12 Thread Greg Kurz
Hi Christian, On Sat, 10 Jun 2023 15:39:44 +0200 Christian Schoenebeck wrote: > As recent CVE-2023-2861 once again showed, the 9p 'proxy' fs driver is in > bad shape. Using the 'proxy' backend was already discouraged for safety > reasons before and we recommended to use the 'local' backend

Re: [PATCH v3] 9pfs: prevent opening special files (CVE-2023-2861)

2023-06-07 Thread Greg Kurz
file directly on host > + * (especially device files), as a compromised client could potentially gain > + * access outside exported tree under certain, unsafe setups. We expect > + * client to handle I/O on special files exclusively on guest side. > + */ > +static inline int check_

Re: [PATCH v2] 9pfs: prevent opening special files (CVE-2023-2861)

2023-06-07 Thread Greg Kurz
On Wed, 07 Jun 2023 13:02:17 +0200 Christian Schoenebeck wrote: > On Tuesday, June 6, 2023 6:00:28 PM CEST Greg Kurz wrote: > > Hi Christian, > > > > On Tue, 06 Jun 2023 15:57:50 +0200 > > Christian Schoenebeck wrote: > > > > > The 9p protocol doe

Re: [PATCH v2] 9pfs: prevent opening special files (CVE-2023-2861)

2023-06-06 Thread Greg Kurz
Hi Christian, On Tue, 06 Jun 2023 15:57:50 +0200 Christian Schoenebeck wrote: > The 9p protocol does not specifically define how server shall behave when > client tries to open a special file, however from security POV it does > make sense for 9p server to prohibit opening any special file on

Re: [PATCH v3] target: ppc: Use MSR_HVB bit to get the target endianness for memory dump

2023-05-23 Thread Greg Kurz
On Tue, 23 May 2023 12:20:17 +0530 Narayana Murty N wrote: > > On 5/22/23 23:50, Greg Kurz wrote: > > On Mon, 22 May 2023 12:02:42 -0400 > > Narayana Murty N wrote: > > > >> Currently on PPC64 qemu always dumps the guest memory in > >> Big Endian

Re: [PATCH v3] target: ppc: Use MSR_HVB bit to get the target endianness for memory dump

2023-05-22 Thread Greg Kurz
On Mon, 22 May 2023 12:02:42 -0400 Narayana Murty N wrote: > Currently on PPC64 qemu always dumps the guest memory in > Big Endian (BE) format even though the guest running in Little Endian > (LE) mode. So crash tool fails to load the dump as illustrated below: > > Log : > $ virsh dump DOMAIN

Re: [PATCH] tests/9p: fix potential leak in v9fs_rreaddir()

2023-05-01 Thread Greg Kurz
On Sat, 29 Apr 2023 15:20:12 +0200 Christian Schoenebeck wrote: > On Saturday, April 29, 2023 2:04:30 PM CEST Greg Kurz wrote: > > Hi Christian ! > > Hi there, it's been a while! :) > > > On Sat, 29 Apr 2023 11:25:33 +0200 > > Christian Schoenebeck wrote: >

Re: [PATCH] tests/9p: fix potential leak in v9fs_rreaddir()

2023-04-29 Thread Greg Kurz
> [1] https://lore.kernel.org/all/1690923.g4PEXVpXuU@silver > > Reported-by: Coverity (CID 1487558) > Signed-off-by: Christian Schoenebeck > --- Good catch Coverity ! :-) Reviewed-by: Greg Kurz I still have a suggestion. See below. > tests/qtest/libqos/virtio-9p-client.c | 5 + &

Re: [PATCH 0/2] vhost-user: Remove the nested event loop to unbreak the DPDK use case

2023-01-23 Thread Greg Kurz
On Thu, 19 Jan 2023 18:24:22 +0100 Greg Kurz wrote: > The nested event loop was introduced in QEMU 6.0 to allow servicing > of requests coming from the slave channel while waiting for an ack > from the back-end on the master socket. It turns out this is fragile > and breaks if t

[PATCH 0/2] vhost-user: Remove the nested event loop to unbreak the DPDK use case

2023-01-20 Thread Greg Kurz
arises again. Greg Kurz (2): Revert "vhost-user: Monitor slave channel in vhost_user_read()" Revert "vhost-user: Introduce nested event loop in vhost_user_read()" hw/virtio/vhost-user.c | 100 - 1 file changed, 8 inserti

Re: [PATCH 1/2] Revert "vhost-user: Monitor slave channel in vhost_user_read()"

2023-01-19 Thread Greg Kurz
+0100 Greg Kurz wrote: > This reverts commit db8a3772e300c1a656331a92da0785d81667dc81. > > Motivation : this is breaking vhost-user with DPDK as reported in [0]. > > Received unexpected msg type. Expected 22 received 40 > Fail to update device iotlb > Received unexpected

[PATCH 1/2] Revert "vhost-user: Monitor slave channel in vhost_user_read()"

2023-01-19 Thread Greg Kurz
, as discussed with Maxime in the mail thread below. [0] https://lore.kernel.org/qemu-devel/43145ede-89dc-280e-b953-6a2b436de...@redhat.com/ Reported-by: Yanghang Liu Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2155173 Signed-off-by: Greg Kurz --- hw/virtio/vhost-user.c | 35

[PATCH 2/2] Revert "vhost-user: Introduce nested event loop in vhost_user_read()"

2023-01-19 Thread Greg Kurz
vhost-user: stick to -errno error return convention"). Signed-off-by: Greg Kurz --- hw/virtio/vhost-user.c | 65 -- 1 file changed, 5 insertions(+), 60 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index 7fb78af22c56..e1

Re: [PATCH v4 19/19] Drop duplicate #include

2023-01-19 Thread Greg Kurz
On Thu, 19 Jan 2023 07:59:59 +0100 Markus Armbruster wrote: > Tracked down with the help of scripts/clean-includes. > > Signed-off-by: Markus Armbruster > --- For ppc changes. Reviewed-by: Greg Kurz > include/hw/arm/fsl-imx6ul.h | 1 - > include/hw/arm/fsl-imx7.h

Re: [PULL v4 76/83] vhost-user: Support vhost_dev_start

2023-01-17 Thread Greg Kurz
On Tue, 17 Jan 2023 18:55:24 +0100 Greg Kurz wrote: > On Tue, 17 Jan 2023 16:07:00 +0100 > Maxime Coquelin wrote: > > > > > > > On 1/17/23 13:36, Greg Kurz wrote: > > > On Tue, 17 Jan 2023 13:12:57 +0100 > > > Greg Kurz wrote: > > > >

Re: [PULL v4 76/83] vhost-user: Support vhost_dev_start

2023-01-17 Thread Greg Kurz
On Tue, 17 Jan 2023 16:07:00 +0100 Maxime Coquelin wrote: > > > On 1/17/23 13:36, Greg Kurz wrote: > > On Tue, 17 Jan 2023 13:12:57 +0100 > > Greg Kurz wrote: > > > >> Hi Maxime, > >> > >> On Tue, 17 Jan 2023 10:49:37 +0100 > >>

Re: [PULL v4 76/83] vhost-user: Support vhost_dev_start

2023-01-17 Thread Greg Kurz
Hi Maxime, On Tue, 17 Jan 2023 10:49:37 +0100 Maxime Coquelin wrote: > Hi Yajun, > > On 1/16/23 08:14, Yajun Wu wrote: > > Not quite sure about the whole picture. > > > > Seems while qemu waiting response of vhost_user_get_status, dpdk send out > > VHOST_USER_SLAVE_IOTLB_MSG and trigger qemu

Re: [PULL v4 76/83] vhost-user: Support vhost_dev_start

2023-01-17 Thread Greg Kurz
On Tue, 17 Jan 2023 13:12:57 +0100 Greg Kurz wrote: > Hi Maxime, > > On Tue, 17 Jan 2023 10:49:37 +0100 > Maxime Coquelin wrote: > > > Hi Yajun, > > > > On 1/16/23 08:14, Yajun Wu wrote: > > > Not quite sure about the whole picture. >

Re: [RFC PATCH-for-8.0 07/10] hw/virtio: Directly access cached VirtIODevice::access_is_big_endian

2022-12-13 Thread Greg Kurz
On Tue, 13 Dec 2022 00:05:14 +0100 Philippe Mathieu-Daudé wrote: > Since the device endianness doesn't change at runtime, > use the cached value instead of evaluating it on each call. > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/hw/virtio/virtio-access.h | 44

Re: [PATCH v2 for-8.0 2/2] pci: drop redundant PCIDeviceClass::is_bridge field

2022-11-30 Thread Greg Kurz
_downstream.c | 1 - > hw/pci-bridge/xio3130_upstream.c | 1 - > hw/pci-host/designware.c | 1 - > hw/pci-host/xilinx-pcie.c | 1 - > hw/pci/pci.c | 20 +--- > hw/ppc/spapr_pci.c | 15 +-- For ppc

Re: [PATCH] MAINTAINERS: Add 9p test client to section "virtio-9p"

2022-11-28 Thread Greg Kurz
ficially assign it to 9p > maintainers. > > Signed-off-by: Christian Schoenebeck > --- Reviewed-by: Greg Kurz > MAINTAINERS | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index cf24910249..4f156a99f1 100644 > --- a/MAINTAI

Re: [PATCH] 9pfs: Fix some return statements in the synth backend

2022-11-28 Thread Greg Kurz
On Mon, 28 Nov 2022 08:35:22 +0100 Markus Armbruster wrote: > Greg Kurz writes: > > > The qemu_v9fs_synth_mkdir() and qemu_v9fs_synth_add_file() functions > > currently return a positive errno value on failure. This causes > > checkpatch.pl to spit several e

Re: [PATCH for-8.0 6/7] hw/intc/xics: Convert TYPE_ICS to 3-phase reset

2022-11-25 Thread Greg Kurz
On Fri, 25 Nov 2022 11:52:39 + Peter Maydell wrote: > Convert the TYPE_ICS class to 3-phase reset; this will allow us > to convert the TYPE_PHB3_MSI class which inherits from it. > > Signed-off-by: Peter Maydell > --- Reviewed-by: Greg Kurz > hw/intc/xics.c | 9 +

Re: [PATCH for-8.0 5/7] hw/intc/xics: Reset TYPE_ICS objects with device_cold_reset()

2022-11-25 Thread Greg Kurz
asses are using legacy reset or 3-phase > > reset. This allows us to remove the reset function that the subclass > > currently has to set up. > > Nice ! > Seconded. Reviewed-by: Greg Kurz > > > > Signed-off-by: Peter Maydell > > Reviewed-by: Cédric L

[PATCH] 9pfs: Fix some return statements in the synth backend

2022-11-24 Thread Greg Kurz
: +return EAGAIN; Simply change the sign. This has no consequence since callers assert() the returned value to be equal to 0. While here also get rid of the uneeded ret variables as suggested by return_directly.cocci. Reported-by: Markus Armbruster Signed-off-by: Greg Kurz --- hw/9pfs/9p

Re: [PATCH v2 1/2] cleanup: Tweak and re-run return_directly.cocci

2022-11-24 Thread Greg Kurz
On Thu, 24 Nov 2022 16:15:11 +0100 Greg Kurz wrote: > On Tue, 22 Nov 2022 14:49:16 +0100 > Markus Armbruster wrote: > > > Tweak the semantic patch to drop redundant parenthesis around the > > return expression. > > > > Coccinelle drops a comment in h

Re: [PATCH for-8.0 13/19] target/ppc: Convert to 3-phase reset

2022-11-24 Thread Greg Kurz
On Thu, 24 Nov 2022 11:50:16 + Peter Maydell wrote: > Convert the ppc CPU class to use 3-phase reset, so it doesn't > need to use device_class_set_parent_reset() any more. > > Signed-off-by: Peter Maydell > --- Reviewed-by: Greg Kurz > target/ppc/cpu-qom.h | 4

Re: [PATCH v2 1/2] cleanup: Tweak and re-run return_directly.cocci

2022-11-24 Thread Greg Kurz
rebase on this fix for your patches to pass CI. Anyway, for 9p: Reviewed-by: Greg Kurz > Signed-off-by: Markus Armbruster > --- > scripts/coccinelle/return_directly.cocci | 5 +-- > include/hw/pci/pci.h | 7 +-- > target/avr/cpu.h

Re: [PATCH 2/3] i386: kvm: disable KVM_CAP_PMU_CAPABILITY if "pmu" is disabled

2022-11-21 Thread Greg Kurz
On Sat, 19 Nov 2022 04:29:00 -0800 Dongli Zhang wrote: > The "perf stat" at the VM side still works even we set "-cpu host,-pmu" in > the QEMU command line. That is, neither "-cpu host,-pmu" nor "-cpu EPYC" > could disable the pmu virtualization in an AMD environment. > > We still see below at

Re: [PATCH v2 05/19] hw/9pfs: Update 9pfs to use the new QemuFd_t type

2022-11-19 Thread Greg Kurz
On Fri, 18 Nov 2022 14:38:00 +0100 Christian Schoenebeck wrote: > On Friday, November 18, 2022 10:29:51 AM CET Greg Kurz wrote: > > On Fri, 11 Nov 2022 12:22:11 +0800 > > Bin Meng wrote: > > > > > With this new QemuFd_t type, it significantly reduces the nu

Re: [PATCH v2 05/19] hw/9pfs: Update 9pfs to use the new QemuFd_t type

2022-11-18 Thread Greg Kurz
On Fri, 11 Nov 2022 12:22:11 +0800 Bin Meng wrote: > With this new QemuFd_t type, it significantly reduces the number of I cannot find the definition of this type, nor the definition of qemu_fd_invalid(). Missing patch ? Anyway, IIUC this type is an int for linux and a HANDLE for windows,

Re: [PATCH v2 02/19] hw/9pfs: Drop unnecessary *xattr wrapper API declarations

2022-11-18 Thread Greg Kurz
On Fri, 11 Nov 2022 12:22:08 +0800 Bin Meng wrote: > These are not used anywhere in the source tree. Drop them. > > Signed-off-by: Bin Meng > --- > This one could even go through the trivial tree right away IMHO. Reviewed-by: Greg Kurz > (no changes since v1) > >

Re: [PATCH for-8.0] MAINTAINERS: downgrade PPC KVM/TCG CPUs and pSeries to 'Odd Fixes'

2022-11-17 Thread Greg Kurz
also (hopefully) keep expectations under > check when/if these components are used in a customer product. > > Cc: Cédric Le Goater > Cc: David Gibson > Cc: Greg Kurz > Signed-off-by: Daniel Henrique Barboza > --- Reviewed-by: Greg Kurz > MAINTAINERS | 6 +++--- &g

Re: [PATCH] target/ppc: Fix build warnings when building with 'disable-tcg'

2022-11-17 Thread Greg Kurz
olves: https://gitlab.com/qemu-project/qemu/-/issues/1319 > Signed-off-by: Vaibhav Jain > Reviewed-by: Greg Kurz > Reviewed-by: Philippe Mathieu-Daudé > Tested-by: Kowshik Jois B S > > > Thanks, > > > Daniel > > On 11/16/22 10:17, V

Re: [PATCH] target/ppc: Fix build warnings when building with 'disable-tcg'

2022-11-16 Thread Greg Kurz
mu is compiled with '--enable-tcg' > > Reported-by: Kowshik Jois B S > Signed-off-by: Vaibhav Jain > --- Reviewed-by: Greg Kurz This was introduced by a recent commit. Fixes: 61bd1d29421a ("target/ppc: Convert to tcg_ops restore_state_to_opc") Vaibhav, This is serious eno

Re: [PATCH for-8.0] hw: Add compat machines for 8.0

2022-11-15 Thread Greg Kurz
re/machine.c > index 8d34caa31dc8..f264fb53b46c 100644 > --- a/hw/core/machine.c > +++ b/hw/core/machine.c > @@ -40,6 +40,9 @@ > #include "hw/virtio/virtio-pci.h" > #include "qom/object_interfaces.h" > > +GlobalProperty hw_compat_7_2[] ={}; Missi

[PATCH v3 2/2] util/log: Always send errors to logfile when daemonized

2022-11-08 Thread Greg Kurz
qemu_try_lock() which seems simpler that refactoring the code. Signed-off-by: Greg Kurz --- util/log.c | 72 -- 1 file changed, 53 insertions(+), 19 deletions(-) diff --git a/util/log.c b/util/log.c index fb843453dd49..7837ff991769 100644 --- a/util

[PATCH v3 1/2] util/log: do not close and reopen log files when flags are turned off

2022-11-08 Thread Greg Kurz
e log1 to be overwritten. This can simply be documented, since it is not a particularly surprising behavior. Suggested-by: Alex Bennée Signed-off-by: Paolo Bonzini Reviewed-by: Richard Henderson Reviewed-by: Greg Kurz Message-Id: <20221025092119.236224-1-pbonz...@redhat.com> [groug: nullify global

[PATCH v3 0/2] util/log: Always send errors to logfile when daemonized

2022-11-08 Thread Greg Kurz
and per-thread logfile - style improvements Greg Kurz (1): util/log: Always send errors to logfile when daemonized Paolo Bonzini (1): util/log: do not close and reopen log files when flags are turned off util/log.c | 84 +- 1 file changed, 58

Re: [PATCH 0/2] util/log: Make the per-thread flag immutable

2022-11-07 Thread Greg Kurz
On Sat, 5 Nov 2022 09:37:26 +1100 Richard Henderson wrote: > On 11/4/22 23:00, Greg Kurz wrote: > > While working on the "util/log: Always send errors to logfile when > > daemonized" > > series [1], I've encountered some issues with the per-thread flag. They s

[PATCH 0/2] util/log: Make the per-thread flag immutable

2022-11-04 Thread Greg Kurz
explained in this recent mail [2]. [1] https://patchew.org/QEMU/20221019151651.334334-1-gr...@kaod.org/ [2] https://lists.nongnu.org/archive/html/qemu-devel/2022-11/msg00137.html Date: Wed, 19 Oct 2022 17:16:49 +0200 Message-ID: <20221019151651.334334-1-gr...@kaod.org> Greg Kurz (2):

[PATCH 2/2] util/log: Ignore per-thread flag if global file already there

2022-11-04 Thread Greg Kurz
") Cc: richard.hender...@linaro.org Signed-off-by: Greg Kurz --- util/log.c | 4 1 file changed, 4 insertions(+) diff --git a/util/log.c b/util/log.c index b7d2b6e09cfe..c2198badf240 100644 --- a/util/log.c +++ b/util/log.c @@ -209,6 +209,10 @@ static bool qemu_set_log_internal(const char

[PATCH 1/2] util/log: Make the per-thread flag immutable

2022-11-04 Thread Greg Kurz
hread log files") Cc: richard.hender...@linaro.org Signed-off-by: Greg Kurz --- util/log.c | 5 + 1 file changed, 5 insertions(+) diff --git a/util/log.c b/util/log.c index 39866bdaf2fa..b7d2b6e09cfe 100644 --- a/util/log.c +++ b/util/log.c @@ -206,6 +206,11 @@ static bool qemu_set_log_inte

Re: [PATCH] util/log: Close per-thread log file on thread termination

2022-10-27 Thread Greg Kurz
Cc'ing stable On Fri, 21 Oct 2022 12:57:34 +0200 Greg Kurz wrote: > When `-D ${logfile} -d tid` is passed, qemu_log_trylock() creates > a dedicated log file for the current thread and opens it. The > corresponding file descriptor is cached in a __thread variable. > Nothing is d

Re: [PATCH] util/log: do not close and reopen log files when flags are turned off

2022-10-26 Thread Greg Kurz
On Tue, 25 Oct 2022 22:27:36 +0200 Paolo Bonzini wrote: > Il mar 25 ott 2022, 16:39 Greg Kurz ha scritto: > > > > > -if (logfile && (!need_to_open_file || changed_name)) { > > > > -qatomic_rcu_set(_file, NULL); > > > > H

Re: [PATCH] util/log: do not close and reopen log files when flags are turned off

2022-10-25 Thread Greg Kurz
On Tue, 25 Oct 2022 14:33:15 +0200 Greg Kurz wrote: > On Tue, 25 Oct 2022 11:21:19 +0200 > Paolo Bonzini wrote: > > > log_append makes sure that if you turn off the logging (which clears > > log_flags and makes need_to_open_file false) the old log is not > >

Re: [PATCH] util/log: do not close and reopen log files when flags are turned off

2022-10-25 Thread Greg Kurz
--- Heh I currently have a very similar patch in my tree :-) Reviewed-by: Greg Kurz I'll include this and other bug fixes as prerequisites for my on-going work on logging when daemonized. > util/log.c | 13 + > 1 file changed, 5 insertions(+), 8 deletions(-) > > diff --

Re: [PATCH v2 2/2] util/log: Always send errors to logfile when daemonized

2022-10-25 Thread Greg Kurz
On Mon, 24 Oct 2022 10:44:11 +0100 Alex Bennée wrote: > > Paolo Bonzini writes: > > > >> If we want to connect stdout/err to something when daemonized > >> then lets either have a dedicated option for that, or simply > >> tell apps not to use -daemonize and to take care of daemonzing > >>

Re: [PATCH v2 1/2] util/log: Derive thread id from getpid() on hosts w/o gettid() syscall

2022-10-21 Thread Greg Kurz
On Thu, 20 Oct 2022 12:39:41 +0200 Paolo Bonzini wrote: > On 10/19/22 17:57, Daniel P. Berrangé wrote: > >> +if (my_id == -1) { > >> +my_id = getpid() + qatomic_fetch_inc(); > >> +} > >> +return my_id; > > This doesn't look safe for linux-user when we fork, but don't exec. >

[PATCH] util/log: Close per-thread log file on thread termination

2022-10-21 Thread Greg Kurz
descriptor is leaked. The issue was found during code inspection and reproduced manually. Fix that with an atexit notifier. Fixes: 4e51069d6793 ("util/log: Support per-thread log files") Cc: richard.hender...@linaro.org Signed-off-by: Greg Kurz --- util/log.c | 9 + 1 file

Re: [PATCH v2 2/2] util/log: Always send errors to logfile when daemonized

2022-10-20 Thread Greg Kurz
On Thu, 20 Oct 2022 12:52:21 +0200 Paolo Bonzini wrote: > On 10/20/22 11:58, Daniel P. Berrangé wrote: > > > > The '-d' option enables logging in QEMU, primary for things > > related to TCG. By default that logging goes to stderr, but > > it can be sent to 1 or mnay files, using -D. IOW, -D is

Re: [PATCH v2 2/2] util/log: Always send errors to logfile when daemonized

2022-10-20 Thread Greg Kurz
On Thu, 20 Oct 2022 12:21:27 +1000 Richard Henderson wrote: > On 10/20/22 01:16, Greg Kurz wrote: > > When QEMU is started with `-daemonize`, all stdio descriptors get > > redirected to `/dev/null`. This basically means that anything > > printed with error_report(

Re: [PATCH v2 1/2] util/log: Derive thread id from getpid() on hosts w/o gettid() syscall

2022-10-20 Thread Greg Kurz
On Wed, 19 Oct 2022 16:57:54 +0100 Daniel P. Berrangé wrote: > On Wed, Oct 19, 2022 at 05:16:50PM +0200, Greg Kurz wrote: > > A subsequent patch needs to be able to differentiate the main QEMU > > thread from other threads. An obvious way to do so is to compare > > log_t

[PATCH v2 0/2] util/log: Always send errors to logfile when daemonized

2022-10-19 Thread Greg Kurz
. It is possible that they will stop doing so and catch errors through QEMU's stderr at some point, but I'm posting the patches anyway. v2: - new log_thread_id() implementation for hosts without gettid() syscall - avoid conflict between global log file and per-thread logfile - style improvements Greg Kurz

[PATCH v2 2/2] util/log: Always send errors to logfile when daemonized

2022-10-19 Thread Greg Kurz
be adapted as well by checking thread_file which is always equal to NULL for the main thread. Signed-off-by: Greg Kurz --- util/log.c | 49 - 1 file changed, 36 insertions(+), 13 deletions(-) diff --git a/util/log.c b/util/log.c index e1c2535cfcd2

[PATCH v2 1/2] util/log: Derive thread id from getpid() on hosts w/o gettid() syscall

2022-10-19 Thread Greg Kurz
code for systems without gettid() to provide the same assumption. Suggested-by: Paolo Bonzini Signed-off-by: Greg Kurz --- util/log.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/util/log.c b/util/log.c index d6eb0378c3a3..e1c2535cfcd2 100644 --- a/util/log.c +++ b

Re: [PATCH] util/log: Always send errors to logfile when daemonized

2022-10-14 Thread Greg Kurz
On Fri, 14 Oct 2022 10:51:36 +0200 Paolo Bonzini wrote: > On 10/14/22 08:08, Greg Kurz wrote: > > > > +need_to_open_file = log_flags && !per_thread; > > Pre-existing, but I think this should check log_per_thread instead of > per_thread. > Yes I

[PATCH] util/log: Always send errors to logfile when daemonized

2022-10-14 Thread Greg Kurz
. Signed-off-by: Greg Kurz --- util/log.c | 39 --- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/util/log.c b/util/log.c index d6eb0378c3a3..a4592fa9bb70 100644 --- a/util/log.c +++ b/util/log.c @@ -248,16 +248,21 @@ static bool

Re: [PATCH 00/20] tests/9p: introduce declarative function calls

2022-10-12 Thread Greg Kurz
On Wed, 12 Oct 2022 12:00:40 +0200 Christian Schoenebeck wrote: > On Dienstag, 4. Oktober 2022 22:56:44 CEST Christian Schoenebeck wrote: > > This series converts relevant 9p (test) client functions to use named > > function arguments. For instance > > > > do_walk_expect_error(v9p,

Re: [PATCH] MAINTAINERS: step back from PPC

2022-09-29 Thread Greg Kurz
d of an era. Thank you for all the dedication and accomplishments ! Reviewed-by: Greg Kurz > MAINTAINERS | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 1729c0901cea..40f4984b439b 100644 > --- a/MAINTAINERS &g

Re: [PATCH 1/1] 9pfs: avoid iterator invalidation in v9fs_mark_fids_unreclaim

2022-09-27 Thread Greg Kurz
On Tue, 27 Sep 2022 19:14:33 +0200 Christian Schoenebeck wrote: > On Dienstag, 27. September 2022 15:05:13 CEST Linus Heckemann wrote: > > Christian Schoenebeck writes: > > > Ah, you sent this fix as a separate patch on top. I actually just meant > > > that you would take my already queued

Re: [PATCH] tests/9p: split virtio-9p-test.c into tests and 9p client part

2022-09-26 Thread Greg Kurz
On Sat, 10 Sep 2022 19:46:55 +0200 Christian Schoenebeck wrote: > This patch is pure refactoring, it does not change behaviour. > > virtio-9p-test.c grew to 1657 lines. Let's split this file up between > actual 9p test cases vs. 9p test client, to make it easier to > concentrate on the actual

Re: [PATCH v3] 9pfs: use GHashTable for fid table

2022-09-08 Thread Greg Kurz
On Thu, 08 Sep 2022 18:10:28 +0200 Linus Heckemann wrote: > (sorry for the dup @Greg, forgot to reply-all) > > Greg Kurz writes: > >> > g_hash_table_steal_extended() [1] actually allows to do just that. > >> > >> g_hash_table_steal_exten

  1   2   3   4   5   6   7   8   9   10   >