Re: [PATCH] hw/ssi: imx_spi: Improve chip select handling

2021-09-04 Thread Guenter Roeck
On 9/4/21 4:19 PM, Philippe Mathieu-Daudé wrote: On 9/5/21 1:06 AM, Bin Meng wrote: On Sun, Sep 5, 2021 at 1:13 AM Guenter Roeck wrote: On 9/2/21 12:29 PM, Peter Maydell wrote: On Thu, 2 Sept 2021 at 17:09, Guenter Roeck wrote: On 9/2/21 8:58 AM, Peter Maydell wrote: On Sun, 8 Aug 2021 a

Re: [PATCH] hw/ssi: imx_spi: Improve chip select handling

2021-09-04 Thread Guenter Roeck
On 9/4/21 4:06 PM, Bin Meng wrote: On Sun, Sep 5, 2021 at 1:13 AM Guenter Roeck wrote: On 9/2/21 12:29 PM, Peter Maydell wrote: On Thu, 2 Sept 2021 at 17:09, Guenter Roeck wrote: On 9/2/21 8:58 AM, Peter Maydell wrote: On Sun, 8 Aug 2021 at 02:34, Guenter Roeck wrote: The control regis

[PATCH] user: Mark cpu_loop() with noreturn attribute

2021-09-04 Thread Philippe Mathieu-Daudé
cpu_loop() never exits, so mark it with QEMU_NORETURN. Signed-off-by: Philippe Mathieu-Daudé --- bsd-user/qemu.h | 2 +- linux-user/qemu.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index c02e8a5ca1a..05bee7aefe5 100644 --- a/bsd-us

[PATCH v2 23/24] accel/tcg: Restrict TCGCPUOps::cpu_exec_interrupt() to sysemu

2021-09-04 Thread Philippe Mathieu-Daudé
All targets call TCGCPUOps::cpu_exec_interrupt() from sysemu code. Move its declaration to restrict it to system emulation. Extend the code guarded. Restrict the static inlined need_replay_interrupt() method to avoid a "defined but not used" warning. Reviewed-by: Richard Henderson Signed-off-by:

[PATCH v2 22/24] target/xtensa: Restrict cpu_exec_interrupt() handler to sysemu

2021-09-04 Thread Philippe Mathieu-Daudé
Restrict cpu_exec_interrupt() and its callees to sysemu. Reviewed-by: Warner Losh Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/xtensa/cpu.h| 4 ++-- target/xtensa/cpu.c| 2 +- target/xtensa/exc_helper.c | 7 ++- 3 files changed, 5 insertio

[PATCH v2 21/24] target/rx: Restrict cpu_exec_interrupt() handler to sysemu

2021-09-04 Thread Philippe Mathieu-Daudé
Restrict cpu_exec_interrupt() and its callees to sysemu. Reviewed-by: Warner Losh Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/rx/cpu.h| 2 ++ target/rx/cpu.c| 2 +- target/rx/helper.c | 4 3 files changed, 7 insertions(+), 1 deletion(-) diff --

[PATCH v2 17/24] target/ppc: Restrict cpu_exec_interrupt() handler to sysemu

2021-09-04 Thread Philippe Mathieu-Daudé
Restrict cpu_exec_interrupt() and its callees to sysemu. Reviewed-by: Warner Losh Acked-by: David Gibson Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/ppc/cpu.h | 4 ++-- target/ppc/cpu_init.c| 2 +- target/ppc/excp_helper.c | 21 +++

[PATCH v2 15/24] target/nios2: Restrict cpu_exec_interrupt() handler to sysemu

2021-09-04 Thread Philippe Mathieu-Daudé
Restrict cpu_exec_interrupt() and its callees to sysemu. Reviewed-by: Warner Losh Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/nios2/cpu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target/nios2/cpu.c b/target/nios2/cpu.c index 5

[PATCH v2 14/24] target/mips: Restrict cpu_exec_interrupt() handler to sysemu

2021-09-04 Thread Philippe Mathieu-Daudé
Restrict cpu_exec_interrupt() and its callees to sysemu. Reviewed-by: Warner Losh Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/mips/tcg/tcg-internal.h | 5 +++-- target/mips/cpu.c | 2 +- target/mips/tcg/exception.c | 18 -

[PATCH v2 12/24] target/m68k: Restrict cpu_exec_interrupt() handler to sysemu

2021-09-04 Thread Philippe Mathieu-Daudé
Restrict cpu_exec_interrupt() and its callees to sysemu. Reviewed-by: Warner Losh Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/m68k/cpu.h | 2 ++ target/m68k/cpu.c | 2 +- target/m68k/op_helper.c | 16 +++- 3 files changed, 6 inserti

[PATCH v2 24/24] user: Remove cpu_get_pic_interrupt() stubs

2021-09-04 Thread Philippe Mathieu-Daudé
cpu_get_pic_interrupt() is now unreachable from user-mode, delete the unnecessary stubs. Reviewed-by: Warner Losh Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/i386/cpu.h | 2 +- bsd-user/main.c | 7 --- linux-user/main.c | 7 --- 3 files changed, 1

[PATCH v2 18/24] target/riscv: Restrict cpu_exec_interrupt() handler to sysemu

2021-09-04 Thread Philippe Mathieu-Daudé
Restrict cpu_exec_interrupt() and its callees to sysemu. Reviewed-by: Warner Losh Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/riscv/cpu.h| 2 +- target/riscv/cpu.c| 2 +- target/riscv/cpu_helper.c | 5 - 3 files changed, 2 insertions(+),

[PATCH v2 19/24] target/sh4: Restrict cpu_exec_interrupt() handler to sysemu

2021-09-04 Thread Philippe Mathieu-Daudé
Restrict cpu_exec_interrupt() and its callees to sysemu. Reviewed-by: Warner Losh Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/sh4/cpu.h| 4 ++-- target/sh4/cpu.c| 2 +- target/sh4/helper.c | 9 ++--- 3 files changed, 5 insertions(+), 10 deletions

[PATCH v2 20/24] target/sparc: Restrict cpu_exec_interrupt() handler to sysemu

2021-09-04 Thread Philippe Mathieu-Daudé
Restrict cpu_exec_interrupt() and its callees to sysemu. Reviewed-by: Warner Losh Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/sparc/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c index da6

[PATCH v2 11/24] target/i386: Move x86_cpu_exec_interrupt() under sysemu/ folder

2021-09-04 Thread Philippe Mathieu-Daudé
Following the logic of commit 30493a030ff ("i386: split seg_helper into user-only and sysemu parts"), move x86_cpu_exec_interrupt() under sysemu/seg_helper.c. Signed-off-by: Philippe Mathieu-Daudé --- I prefer to not squash this into the previous patch because the ifdef'ry removal (in previous pa

[PATCH v2 08/24] target/cris: Restrict cpu_exec_interrupt() handler to sysemu

2021-09-04 Thread Philippe Mathieu-Daudé
Restrict cpu_exec_interrupt() and its callees to sysemu. Reviewed-by: Warner Losh Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/cris/cpu.h| 2 +- target/cris/cpu.c| 4 ++-- target/cris/helper.c | 17 ++--- 3 files changed, 5 insertions(+)

[PATCH v2 16/24] target/openrisc: Restrict cpu_exec_interrupt() handler to sysemu

2021-09-04 Thread Philippe Mathieu-Daudé
Restrict cpu_exec_interrupt() and its callees to sysemu. Reviewed-by: Warner Losh Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/openrisc/cpu.h | 5 +++-- target/openrisc/cpu.c | 2 +- target/openrisc/interrupt.c | 2 -- target/openrisc/meson.build

[PATCH v2 10/24] target/i386: Restrict cpu_exec_interrupt() handler to sysemu

2021-09-04 Thread Philippe Mathieu-Daudé
Restrict cpu_exec_interrupt() and its callees to sysemu. Reviewed-by: Warner Losh Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/i386/tcg/helper-tcg.h | 2 ++ target/i386/tcg/seg_helper.c | 10 ++ target/i386/tcg/tcg-cpu.c| 2 +- 3 files changed,

[PATCH v2 06/24] target/alpha: Restrict cpu_exec_interrupt() handler to sysemu

2021-09-04 Thread Philippe Mathieu-Daudé
Restrict cpu_exec_interrupt() and its callees to sysemu. Reviewed-by: Warner Losh Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/alpha/cpu.h| 2 +- target/alpha/cpu.c| 2 +- target/alpha/helper.c | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(

[PATCH v2 05/24] accel/tcg: Rename user-mode do_interrupt hack as fake_user_interrupt

2021-09-04 Thread Philippe Mathieu-Daudé
do_interrupt() is sysemu specific. However due to some X86 specific hack, it is also used in user-mode emulation, which is why it couldn't be restricted to CONFIG_SOFTMMU (see the comment around added in commit 78271684719: "cpu: tcg_ops: move to tcg-cpu-ops.h, keep a pointer in CPUClass"). Keep th

[PATCH v2 13/24] target/microblaze: Restrict cpu_exec_interrupt() handler to sysemu

2021-09-04 Thread Philippe Mathieu-Daudé
Restrict cpu_exec_interrupt() and its callees to sysemu. Reviewed-by: Warner Losh Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/microblaze/cpu.h| 2 ++ target/microblaze/cpu.c| 2 +- target/microblaze/helper.c | 13 ++--- 3 files changed, 5 i

[PATCH v2 07/24] target/arm: Restrict cpu_exec_interrupt() handler to sysemu

2021-09-04 Thread Philippe Mathieu-Daudé
Restrict cpu_exec_interrupt() and its callees to sysemu. Reviewed-by: Warner Losh Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/arm/cpu.h | 3 +-- target/arm/cpu.c | 7 +-- target/arm/cpu_tcg.c | 6 +++--- 3 files changed, 9 insertions(+), 7 deleti

[PATCH v2 03/24] target/i386: Simplify TARGET_X86_64 #ifdef'ry

2021-09-04 Thread Philippe Mathieu-Daudé
Merge two TARGET_X86_64 consecutive blocks. Reviewed-by: Warner Losh Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/i386/tcg/seg_helper.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target/i386/tcg/seg_helper.c b/target/i386/tcg/seg_h

[PATCH v2 01/24] target/avr: Remove pointless use of CONFIG_USER_ONLY definition

2021-09-04 Thread Philippe Mathieu-Daudé
Commit f1c671f96cb ("target/avr: Introduce basic CPU class object") added to target/avr/cpu.h: #ifdef CONFIG_USER_ONLY #error "AVR 8-bit does not support user mode" #endif Remove the CONFIG_USER_ONLY definition introduced by mistake in commit 78271684719 ("cpu: tcg_ops: move to tcg-cpu-ops.

[PATCH v2 09/24] target/hppa: Restrict cpu_exec_interrupt() handler to sysemu

2021-09-04 Thread Philippe Mathieu-Daudé
Restrict cpu_exec_interrupt() and its callees to sysemu. Reviewed-by: Warner Losh Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/hppa/cpu.h| 4 ++-- target/hppa/cpu.c| 2 +- target/hppa/int_helper.c | 7 ++- 3 files changed, 5 insertions(+),

[PATCH v2 04/24] target/xtensa: Restrict do_transaction_failed() to sysemu

2021-09-04 Thread Philippe Mathieu-Daudé
The do_transaction_failed() is restricted to system emulation since commit cbc183d2d9f ("cpu: move cc->transaction_failed to tcg_ops"). Reviewed-by: Warner Losh Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/xtensa/cpu.h | 2 ++ 1 file changed, 2 insertions(+)

[PATCH v2 00/24] accel/tcg: Restrict TCGCPUOps::cpu_exec_interrupt() to sysemu

2021-09-04 Thread Philippe Mathieu-Daudé
Missing review: - 01 target/avr: Remove pointless use of CONFIG_USER_ONLY definition - 11 target/i386: Move x86_cpu_exec_interrupt() under sysemu/ folder Hi, The TCGCPUOps::cpu_exec_interrupt() handler is specific to system emulation. This series remove it from user-mode. To do so we have to deal

[PATCH v2 02/24] target/i386: Restrict sysemu-only fpu_helper helpers

2021-09-04 Thread Philippe Mathieu-Daudé
Restrict some sysemu-only fpu_helper helpers (see commit 83a3d9c7402: "i386: separate fpu_helper sysemu-only parts"). Reviewed-by: Warner Losh Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/i386/cpu.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/targe

Re: [PATCH 16/24] target/openrisc: Restrict cpu_exec_interrupt() handler to sysemu

2021-09-04 Thread Philippe Mathieu-Daudé
On 9/2/21 10:24 PM, Warner Losh wrote: > > > On Thu, Sep 2, 2021 at 9:18 AM Philippe Mathieu-Daudé > wrote: > > Restrict cpu_exec_interrupt() and its callees to sysemu. > > Signed-off-by: Philippe Mathieu-Daudé > > --- >  tar

Re: [RFC PATCH 04/24] accel/tcg: Rename user-mode do_interrupt hack as fake_user_exception

2021-09-04 Thread Philippe Mathieu-Daudé
On 9/3/21 9:07 PM, Richard Henderson wrote: > On 9/2/21 5:16 PM, Philippe Mathieu-Daudé wrote: >> do_interrupt() is sysemu specific. However due to some X86 >> specific hack, it is also used in user-mode emulation, which >> is why it couldn't be restricted to CONFIG_SOFTMMU (see the >> comment arou

Re: [PATCH] hw/ssi: imx_spi: Improve chip select handling

2021-09-04 Thread Philippe Mathieu-Daudé
On 9/5/21 1:06 AM, Bin Meng wrote: > On Sun, Sep 5, 2021 at 1:13 AM Guenter Roeck wrote: >> >> On 9/2/21 12:29 PM, Peter Maydell wrote: >>> On Thu, 2 Sept 2021 at 17:09, Guenter Roeck wrote: On 9/2/21 8:58 AM, Peter Maydell wrote: > On Sun, 8 Aug 2021 at 02:34, Guenter Roeck wrote:

[PATCH v7 2/2] memory: Have 'info mtree' remove duplicated Address Space information

2021-09-04 Thread Philippe Mathieu-Daudé
Per Peter Maydell [*]: 'info mtree' monitor command was designed on the assumption that there's really only one or two interesting address spaces, and with more recent developments that's just not the case any more. Similarly about how the FlatView are sorted using a GHashTable, sort the Ad

[PATCH v7 1/2] memory: Split mtree_info() as mtree_info_flatview() + mtree_info_as()

2021-09-04 Thread Philippe Mathieu-Daudé
While mtree_info() handles both ASes and flatviews cases, the two cases share basically no code. Split mtree_info() as mtree_info_flatview() + mtree_info_as() to simplify. Suggested-by: Peter Maydell Reviewed-by: David Hildenbrand Reviewed-by: Peter Xu Reviewed-by: Richard Henderson Signed-off

[PATCH v7 0/2] memory: Have 'info mtree' remove duplicated Address Space information

2021-09-04 Thread Philippe Mathieu-Daudé
Series fully reviewed. Follow Peter Maydell suggestions: - Split mtree_info() as mtree_info_flatview() + mtree_info_as() - Remove duplicated Address Space information Since v6: - Added missing vertical whitespace (rth) - Added rth's R-b Since v5: - Fixed messed up during v3->v4 (peterx) . Rest

Re: [PATCH] hw/ssi: imx_spi: Improve chip select handling

2021-09-04 Thread Bin Meng
On Sun, Sep 5, 2021 at 1:13 AM Guenter Roeck wrote: > > On 9/2/21 12:29 PM, Peter Maydell wrote: > > On Thu, 2 Sept 2021 at 17:09, Guenter Roeck wrote: > >> > >> On 9/2/21 8:58 AM, Peter Maydell wrote: > >>> On Sun, 8 Aug 2021 at 02:34, Guenter Roeck wrote: > > The control register doe

Re: [PATCH] MAINTAINERS: add myself as partial audio reviewer

2021-09-04 Thread Philippe Mathieu-Daudé
On 9/4/21 3:13 PM, Christian Schoenebeck wrote: > Volunteering as reviewer for some of the audio backends; namely > ALSA, CoreAudio and JACK. > > Signed-off-by: Christian Schoenebeck > --- > MAINTAINERS | 3 +++ > 1 file changed, 3 insertions(+) Thanks! Reviewed-by: Philippe Mathieu-Daudé

Re: [PULL 00/14] aspeed queue

2021-09-04 Thread Philippe Mathieu-Daudé
On 9/4/21 7:33 AM, Cédric Le Goater wrote: > On 9/3/21 10:41 PM, Philippe Mathieu-Daudé wrote: >> Hi Peter, >> >> On 9/3/21 9:40 PM, Cédric Le Goater wrote: >>> The following changes since commit 8880cc4362fde4ecdac0b2092318893118206fcf: >>> >>> Merge remote-tracking branch 'remotes/cschoenebeck/

[PULL 15/35] vhost: correctly detect the enabling IOMMU

2021-09-04 Thread Michael S. Tsirkin
From: Jason Wang Vhost used to compare the dma_as against the address_space_memory to detect whether the IOMMU is enabled or not. This might not work well since the virito-bus may call get_dma_as if VIRTIO_F_IOMMU_PLATFORM is set without an actual IOMMU enabled when device is plugged. In the case

[PULL 08/35] vhost-user: add missing space in error message

2021-09-04 Thread Michael S. Tsirkin
From: Alyssa Ross This would previously give error messages like > Received unexpected msg type.Expected 0 received 1 Signed-off-by: Alyssa Ross Message-Id: <20210806143926.315725-1...@alyssa.is> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/vhost-user.c |

[PULL 35/35] vhost-vdpa: remove the unncessary queue_index assignment

2021-09-04 Thread Michael S. Tsirkin
From: Jason Wang The queue_index of NetClientState should be assigned in set_netdev() afterwards, so trying to net_vhost_vdpa_init() is meaningless. This patch removes this. Reviewed-by: Stefano Garzarella Signed-off-by: Jason Wang Message-Id: <20210903091031.47303-12-jasow...@redhat.com> Revi

[PULL 32/35] vhost-vdpa: fix leaking of vhost_net in vhost_vdpa_add()

2021-09-04 Thread Michael S. Tsirkin
From: Jason Wang Fixes: 1e0a84ea49b68 ("vhost-vdpa: introduce vhost-vdpa net client") Reviewed-by: Stefano Garzarella Signed-off-by: Jason Wang Message-Id: <20210903091031.47303-9-jasow...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- net/vhost-vdpa.c | 1

[PULL 33/35] vhost-vdpa: tweak the error label in vhost_vdpa_add()

2021-09-04 Thread Michael S. Tsirkin
From: Jason Wang Introduce new error label to avoid the unnecessary checking of net pointer. Fixes: 1e0a84ea49b68 ("vhost-vdpa: introduce vhost-vdpa net client") Signed-off-by: Jason Wang Message-Id: <20210903091031.47303-10-jasow...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: M

[PULL 31/35] vhost-vdpa: don't cleanup twice in vhost_vdpa_add()

2021-09-04 Thread Michael S. Tsirkin
From: Jason Wang The previous vhost_net_cleanup is sufficient for freeing, calling vhost_vdpa_del() in this case will lead an extra round of free. Note that this kind of "double free" is safe since vhost_dev_cleanup() zero the whole structure. Reviewed-by: Stefano Garzarella Signed-off-by: Jaso

[PULL 34/35] vhost-vdpa: fix the wrong assertion in vhost_vdpa_init()

2021-09-04 Thread Michael S. Tsirkin
From: Jason Wang Vhost_vdpa_add() can fail for various reasons, so the assertion of the succeed is wrong. Instead, we should free the NetClientState and propagate the error to the caller Reviewed-by: Stefano Garzarella Signed-off-by: Jason Wang Message-Id: <20210903091031.47303-11-jasow...@red

[PULL 29/35] vhost_net: do not assume nvqs is always 2

2021-09-04 Thread Michael S. Tsirkin
From: Jason Wang This patch switches to initialize dev.nvqs from the VhostNetOptions instead of assuming it was 2. This is useful for implementing control virtqueue support which will be a single vhost_net structure with a single cvq. Note that nvqs is still set to 2 for all users and this patch

[PULL 26/35] vhost-vdpa: correctly return err in vhost_vdpa_set_backend_cap()

2021-09-04 Thread Michael S. Tsirkin
From: Jason Wang We should return error code instead of zero, otherwise there's no way for the caller to detect the failure. Signed-off-by: Jason Wang Message-Id: <20210903091031.47303-3-jasow...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/virtio/vhos

[PULL 30/35] vhost-vdpa: remove the unnecessary check in vhost_vdpa_add()

2021-09-04 Thread Michael S. Tsirkin
From: Jason Wang The VhostVDPAState is just allocated by qemu_new_net_client() via g_malloc0() in net_vhost_vdpa_init(). So s->vhost_net is NULL for sure, let's remove this unnecessary check in vhost_vdpa_add(). Signed-off-by: Jason Wang Message-Id: <20210903091031.47303-7-jasow...@redhat.com>

[PULL 25/35] vhost-vdpa: remove unused variable "acked_features"

2021-09-04 Thread Michael S. Tsirkin
From: Jason Wang "acked_features" is unused, let's remove that. Signed-off-by: Jason Wang Message-Id: <20210903091031.47303-2-jasow...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- net/vhost-vdpa.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/vho

[PULL 22/35] hw/virtio: Add flatview update in vhost_user_cleanup()

2021-09-04 Thread Michael S. Tsirkin
From: Yuwei Zhang Qemu will crash on vhost backend unexpected exit and re-connect │ in some case due to access released memory. Signed-off-by: Yuwei Zhang Message-Id: <20210830123433.45727-1-zhangyuwei.9...@bytedance.com>

[PULL 21/35] hw/virtio: Remove NULL check in virtio_free_region_cache()

2021-09-04 Thread Michael S. Tsirkin
From: Philippe Mathieu-Daudé virtio_free_region_cache() is called within call_rcu(), always with a non-NULL argument. Ensure new code keep it that way by replacing the NULL check by an assertion. Add a comment this function is called within call_rcu(). Signed-off-by: Philippe Mathieu-Daudé Mess

[PULL 28/35] vhost: use unsigned int for nvqs

2021-09-04 Thread Michael S. Tsirkin
From: Jason Wang Switch to use unsigned int for nvqs since it's not expected to be negative. Reviewed-by: Eli Cohen Signed-off-by: Jason Wang Message-Id: <20210903091031.47303-5-jasow...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/vhos

[PULL 24/35] tests/vhost-user-bridge.c: Fix typo in help message

2021-09-04 Thread Michael S. Tsirkin
From: Peter Maydell Fix a typo in the help message printed by vhost-user-bridge. Signed-off-by: Peter Maydell Message-Id: <20210901152713.25701-1-peter.mayd...@linaro.org> Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michae

[PULL 13/35] virtio-bus: introduce iommu_enabled()

2021-09-04 Thread Michael S. Tsirkin
From: Jason Wang This patch introduce a new method for the virtio-bus for the transport to report whether or not the IOMMU is enabled for the device. Signed-off-by: Jason Wang Message-Id: <20210804034803.1644-2-jasow...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsir

[PULL 27/35] vhost_net: remove the meaningless assignment in vhost_net_start_one()

2021-09-04 Thread Michael S. Tsirkin
From: Jason Wang The nvqs and vqs have been initialized during vhost_net_init() and are not expected to change during the life cycle of vhost_net structure. So this patch removes the meaningless assignment. Reviewed-by: Eli Cohen Signed-off-by: Jason Wang Message-Id: <20210903091031.47303-4-ja

[PULL 17/35] hw/pci: remove all references to find_i440fx function

2021-09-04 Thread Michael S. Tsirkin
From: Ani Sinha commit c0e427d6eb5fefc538 ("hw/acpi/ich9: Enable ACPI PCI hot-plug") removed all uses of find_i440fx() function. This has been replaced by the more generic call acpi_get_i386_pci_host() which maybe able to find the root bus both for i440fx machine type as well as for the q35 machi

[PULL 18/35] hw/acpi: use existing references to pci device struct within functions

2021-09-04 Thread Michael S. Tsirkin
From: Ani Sinha There is no need to use fresh typecasts to get references to pci device structs when there is an existing reference to pci device struct. Use existing reference. Minor cleanup. Signed-off-by: Ani Sinha Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210825031949.919376-3-..

[PULL 11/35] virtio-balloon: don't start free page hinting if postcopy is possible

2021-09-04 Thread Michael S. Tsirkin
From: David Hildenbrand Postcopy never worked properly with 'free-page-hint=on', as there are at least two issues: 1) With postcopy, the guest will never receive a VIRTIO_BALLOON_CMD_ID_DONE and consequently won't release free pages back to the OS once migration finishes. The issue is

[PULL 19/35] MAINTAINERS: Added myself as a reviewer for acpi/smbios subsystem

2021-09-04 Thread Michael S. Tsirkin
From: Ani Sinha I have developed an interest in this space and hopefully can lend some helping hand to Igor and Michael in reviewing simpler patches. Signed-off-by: Ani Sinha Reviewed-by: Philippe Mathieu-Daudé Acked-by: Igor Mammedov Message-Id: <20210825031949.919376-4-...@anisinha.ca> Revi

[PULL 23/35] tests/vhost-user-bridge.c: Sanity check socket path length

2021-09-04 Thread Michael S. Tsirkin
From: Peter Maydell The vhost-user-bridge binary accepts a UNIX socket path on the command line. Sanity check that this is short enough to fit into a sockaddr_un before copying it in. Fixes: Coverity CID 1432866 Signed-off-by: Peter Maydell Message-Id: <20210901152632.25511-1-peter.mayd...@lina

[PULL 16/35] hw/i386/acpi-build: Get NUMA information from struct NumaState

2021-09-04 Thread Michael S. Tsirkin
From: Jingqi Liu Since commits aa57020774b ("numa: move numa global variable nb_numa_nodes into MachineState") and 7e721e7b10e ("numa: move numa global variable numa_info into MachineState"), we can get NUMA information completely from MachineState::numa_state. Remove PCMachineState::numa_nodes

[PULL 10/35] Use PCI_HOST_BRIDGE macro

2021-09-04 Thread Michael S. Tsirkin
From: Eduardo Habkost OBJECT_CHECK(PciHostState, ..., TYPE_PCI_HOST_BRIDGE) is exactly what the PCI_HOST_BRIDGE macro does. We can just use the macro instead of using OBJECT_CHECK manually. Signed-off-by: Eduardo Habkost Message-Id: <20210805193431.307761-7-ehabk...@redhat.com> Reviewed-by: Ig

[PULL 20/35] hw/virtio: Document virtio_queue_packed_empty_rcu is called within RCU

2021-09-04 Thread Michael S. Tsirkin
From: Philippe Mathieu-Daudé While virtio_queue_packed_empty_rcu() uses the '_rcu' suffix, it is not obvious it is called within rcu_read_lock(). All other functions from this file called with the RCU locked have a comment describing it. Document this one similarly for consistency. Signed-off-by

[PULL 12/35] virtio-balloon: free page hinting cleanups

2021-09-04 Thread Michael S. Tsirkin
From: David Hildenbrand Let's compress the code a bit to improve readability. We can drop the vm_running check in virtio_balloon_free_page_start() as it's already properly checked in the single caller. Cc: Wei Wang Cc: Michael S. Tsirkin Cc: Philippe Mathieu-Daudé Cc: Alexander Duyck Cc: Jua

[PULL 14/35] virtio-pci: implement iommu_enabled()

2021-09-04 Thread Michael S. Tsirkin
From: Jason Wang This patch implements the PCI transport version of iommu_enabled. This is done by comparing the address space returned by pci_device_iommu_address_space() against address_space_memory. Note that an ideal approach is to use pci_device_iommu_address_space() in get_dma_as(), but it

[PULL 06/35] hw/acpi: refactor acpi hp modules so that targets can just use what they need

2021-09-04 Thread Michael S. Tsirkin
From: Ani Sinha Currently various acpi hotplug modules like cpu hotplug, memory hotplug, pci hotplug, nvdimm hotplug are all pulled in when CONFIG_ACPI_X86 is turned on. This brings in support for whole lot of subsystems that some targets like mips does not need. They are added just to satisfy sy

[PULL 09/35] acpi: Delete broken ACPI_GED_X86 macro

2021-09-04 Thread Michael S. Tsirkin
From: Eduardo Habkost The macro never worked and never will, because the AcpiGedX86State type never existed. Signed-off-by: Eduardo Habkost Message-Id: <20210805193431.307761-2-ehabk...@redhat.com> Reviewed-by: Igor Mammedov Reviewed-by: Gerd Hoffmann Reviewed-by: Michael S. Tsirkin Signed-o

[PULL 00/35] pc,pci,virtio: fixes, cleanups

2021-09-04 Thread Michael S. Tsirkin
The following changes since commit 8880cc4362fde4ecdac0b2092318893118206fcf: Merge remote-tracking branch 'remotes/cschoenebeck/tags/pull-9p-20210902' into staging (2021-09-03 08:27:38 +0100) are available in the Git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for

[PULL 07/35] hw/virtio: move vhost_set_backend_type() to vhost.c

2021-09-04 Thread Michael S. Tsirkin
From: Tiberiu Georgescu Just a small refactor patch. vhost_set_backend_type() gets called only in vhost.c, so we can move the function there and make it static. We can then extern the visibility of kernel_ops, to match the other VhostOps in vhost-backend.h. The VhostOps constants now make more s

[PULL 04/35] hw/acpi: define PIIX4 acpi pci hotplug property strings at a single place

2021-09-04 Thread Michael S. Tsirkin
From: Ani Sinha Now that we have "acpi-pci-hotplug-with-bridge-support" PIIX4 PM property being used for both q35 and i440fx machine types, it is better that we defined this property string at a single place within a header file like other PIIX4 properties. We can then use this single definition

[PULL 05/35] q35: catch invalid cpu hotplug configuration

2021-09-04 Thread Michael S. Tsirkin
From: Gerd Hoffmann Related: https://bugzilla.redhat.com//show_bug.cgi?id=1985924 Signed-off-by: Gerd Hoffmann Message-Id: <20210812102341.3316254-1-kra...@redhat.com> Reviewed-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/isa/lpc_ich9.c | 13

[PULL 03/35] vhost: make SET_VRING_ADDR, SET_FEATURES send replies

2021-09-04 Thread Michael S. Tsirkin
From: Denis Plotnikov On vhost-user-blk migration, qemu normally sends a number of commands to enable logging if VHOST_USER_PROTOCOL_F_LOG_SHMFD is negotiated. Qemu sends VHOST_USER_SET_FEATURES to enable buffers logging and VHOST_USER_SET_VRING_ADDR per each started ring to enable "used ring" da

[PULL 01/35] vhost-vdpa: Do not send empty IOTLB update batches

2021-09-04 Thread Michael S. Tsirkin
From: Eugenio Pérez With the introduction of the batch hinting, meaningless batches can be created with no IOTLB updates if the memory region was skipped by vhost_vdpa_listener_skipped_section. This is the case of host notifiers memory regions, device un/realize, and others. This causes the vdpa

[PULL 02/35] hw/virtio: Fix leak of host-notifier memory-region

2021-09-04 Thread Michael S. Tsirkin
From: Yajun Wu If call virtio_queue_set_host_notifier_mr fails, should free host-notifier memory-region. Fixes: 44866521bd ("vhost-user: support registering external host notifiers") Signed-off-by: Yajun Wu Message-Id: <1629077555-19907-1-git-send-email-yaj...@nvidia.com> Reviewed-by: Michael S

[PATCH v10 15/16] target/riscv: Remove RVB (replaced by Zb[abcs])

2021-09-04 Thread Philipp Tomsich
With everything classified as Zb[abcs] and pre-0.93 draft-B instructions that are not part of Zb[abcs] removed, we can remove the remaining support code for RVB. Note that RVB has been retired for good and misa.B will neither mean 'some' or 'all of' Zb*: https://lists.riscv.org/g/tech-bitmanip/m

[PATCH v10 11/16] target/riscv: Add orc.b instruction for Zbb, removing gorc/gorci

2021-09-04 Thread Philipp Tomsich
The 1.0.0 version of Zbb does not contain gorc/gorci. Instead, a orc.b instruction (equivalent to the orc.b pseudo-instruction built on gorci from pre-0.93 draft-B) is available, mainly targeting string-processing workloads. This commit adds the new orc.b instruction and removed gorc/gorci. Sign

[PATCH v10 06/16] target/riscv: Remove the W-form instructions from Zbs

2021-09-04 Thread Philipp Tomsich
Zbs 1.0.0 (just as the 0.93 draft-B before) does no provide for W-form instructions for Zbs (single-bit instructions). Remove them. Note that these instructions had already been removed for the 0.93 version of the draft-B extenstion and have not been present in the binutils patches circulating in

[PATCH v10 13/16] target/riscv: Add rev8 instruction, removing grev/grevi

2021-09-04 Thread Philipp Tomsich
The 1.0.0 version of Zbb does not contain grev/grevi. Instead, a rev8 instruction (equivalent to the rev8 pseudo-instruction built on grevi from pre-0.93 draft-B) is available. This commit adds the new rev8 instruction and removes grev/grevi. Note that there is no W-form of this instruction (bot

Re: [PATCH V2 18/21] virito-net: use "qps" instead of "queues" when possible

2021-09-04 Thread Michael S. Tsirkin
On Fri, Sep 03, 2021 at 05:10:28PM +0800, Jason Wang wrote: > Most of the time, "queues" really means queue pairs. So this patch > switch to use "qps" to avoid confusion. > > Signed-off-by: Jason Wang This is far from a standard terminology, except for the people like me, who's mind is permanent

[PATCH v10 12/16] target/riscv: Add a REQUIRE_32BIT macro

2021-09-04 Thread Philipp Tomsich
With the changes to Zb[abcs], there's some encodings that are different in RV64 and RV32 (e.g., for rev8 and zext.h). For these, we'll need a helper macro allowing us to select on RV32, as well. Signed-off-by: Philipp Tomsich Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- (no

[PATCH v10 16/16] disas/riscv: Add Zb[abcs] instructions

2021-09-04 Thread Philipp Tomsich
With the addition of Zb[abcs], we also need to add disassembler support for these new instructions. Signed-off-by: Philipp Tomsich Acked-by: Alistair Francis --- (no changes since v2) Changes in v2: - Fix missing ';' from last-minute whitespace cleanups. disas/riscv.c | 157

[PATCH v10 08/16] target/riscv: Reassign instructions to the Zbs-extension

2021-09-04 Thread Philipp Tomsich
The following instructions are part of Zbs: - b{set,clr,ext,inv} - b{set,clr,ext,inv}i Signed-off-by: Philipp Tomsich Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- (no changes since v3) Changes in v3: - The changes to the Zbs instructions (i.e. the REQUIRE_ZBS macro) and

[PATCH v10 03/16] target/riscv: clwz must ignore high bits (use shift-left & changed logic)

2021-09-04 Thread Philipp Tomsich
Assume clzw being executed on a register that is not sign-extended, such as for the following sequence that uses (1ULL << 63) | 392 as the operand to clzw: bseti a2, zero, 63 addia2, a2, 392 clzwa3, a2 The correct result of clzw would be 23, but the current impleme

Re: [PATCH V2 12/21] vhost-vdpa: open device fd in net_init_vhost_vdpa()

2021-09-04 Thread Michael S. Tsirkin
On Fri, Sep 03, 2021 at 05:10:22PM +0800, Jason Wang wrote: > This path switches to open device fd in net_init_vhost_vpda(). This is patch? > used to prepare for the multiqueue support. > > Reviewed-by: Stefano Garzarella > Signed-off-by: Jason Wang > --- > net/vhost-vdpa.c | 23 +

Re: [PATCH V2 17/21] vhost-net: control virtqueue support

2021-09-04 Thread Michael S. Tsirkin
On Fri, Sep 03, 2021 at 05:10:27PM +0800, Jason Wang wrote: > We assume there's no cvq in the past, this is not true when we need > control virtqueue support for vhost-user backends. So this patch > implements the control virtqueue support for vhost-net. As datapath, > the control virtqueue is also

[PATCH v10 01/16] target/riscv: Introduce temporary in gen_add_uw()

2021-09-04 Thread Philipp Tomsich
Following the recent changes in translate.c, gen_add_uw() causes failures on CF3 and SPEC2017 due to the reuse of arg1. Fix these regressions by introducing a temporary. Signed-off-by: Philipp Tomsich --- Changes in v10: - new patch target/riscv/insn_trans/trans_rvb.c.inc | 6 -- 1 file c

[PATCH v10 07/16] target/riscv: Remove shift-one instructions (proposed Zbo in pre-0.93 draft-B)

2021-09-04 Thread Philipp Tomsich
The Zb[abcs] ratification package does not include the proposed shift-one instructions. There currently is no clear plan to whether these (or variants of them) will be ratified as Zbo (or a different extension) or what the timeframe for such a decision could be. Signed-off-by: Philipp Tomsich Rev

[PATCH v10 14/16] target/riscv: Add zext.h instructions to Zbb, removing pack/packu/packh

2021-09-04 Thread Philipp Tomsich
The 1.0.0 version of Zbb does not contain pack/packu/packh. However, a zext.h instruction is provided (built on pack/packh from pre-0.93 draft-B) is available. This commit adds zext.h and removes the pack* instructions. Note that the encodings for zext.h are different between RV32 and RV64, which

[PATCH v10 05/16] target/riscv: Reassign instructions to the Zba-extension

2021-09-04 Thread Philipp Tomsich
The following instructions are part of Zba: - add.uw (RV64 only) - sh[123]add (RV32 and RV64) - sh[123]add.uw (RV64-only) - slli.uw (RV64-only) Signed-off-by: Philipp Tomsich Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- Changes in v10: - Split off gen_add_uw() fix into

[PATCH v10 10/16] target/riscv: Reassign instructions to the Zbb-extension

2021-09-04 Thread Philipp Tomsich
This reassigns the instructions that are part of Zbb into it, with the notable exceptions of the instructions (rev8, zext.w and orc.b) that changed due to gorci, grevi and pack not being part of Zb[abcs]. Signed-off-by: Philipp Tomsich Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis

[PATCH v10 04/16] target/riscv: Add x-zba, x-zbb, x-zbc and x-zbs properties

2021-09-04 Thread Philipp Tomsich
The bitmanipulation ISA extensions will be ratified as individual small extension packages instead of a large B-extension. The first new instructions through the door (these have completed public review) are Zb[abcs]. This adds new 'x-zba', 'x-zbb', 'x-zbc' and 'x-zbs' properties for these in tar

[PATCH v10 09/16] target/riscv: Add instructions of the Zbc-extension

2021-09-04 Thread Philipp Tomsich
The following instructions are part of Zbc: - clmul - clmulh - clmulr Note that these instructions were already defined in the pre-0.93 and the 0.93 draft-B proposals, but had not been omitted in the earlier addition of draft-B to QEmu. Signed-off-by: Philipp Tomsich Reviewed-by: Richard Hend

[PATCH v10 00/16] target/riscv: Update QEmu for Zb[abcs] 1.0.0

2021-09-04 Thread Philipp Tomsich
The Zb[abcs] extensions have complete public review and are nearing ratifications. These individual extensions are one part of what was previously though of as the "BitManip" (B) extension, leaving the final details of future Zb* extensions open as they will undergo further public discourse. Thi

[PATCH v10 02/16] target/riscv: fix clzw implementation to operate on arg1

2021-09-04 Thread Philipp Tomsich
The refactored gen_clzw() uses ret as its argument, instead of arg1. Fix it. Signed-off-by: Philipp Tomsich --- Changes in v10: - New patch, fixing regressions discovered with x264_r. target/riscv/insn_trans/trans_rvb.c.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ta

Re: [PATCH v2 01/35] acpi: add helper routines to initialize ACPI tables

2021-09-04 Thread Michael S. Tsirkin
On Fri, Sep 03, 2021 at 09:12:21AM +0200, Igor Mammedov wrote: > On Thu, 2 Sep 2021 14:56:00 +0200 > Eric Auger wrote: > > > Hi Igor, > > > > On 7/8/21 5:45 PM, Igor Mammedov wrote: > > > Patch introduces acpi_init_table()/acpi_table_composed() API > > > that hides pointer/offset arithmetic from

Re: [PATCH V2 0/3] virtio: Add vhost-user-i2c device's support

2021-09-04 Thread Michael S. Tsirkin
On Fri, Jul 09, 2021 at 10:30:15AM +0530, Viresh Kumar wrote: > Hello, > > This patchset adds vhost-user-i2c device's support in Qemu. Initially I tried > to > add the backend implementation as well into Qemu, but as I was looking for a > hypervisor agnostic backend implementation, I decided to k

arm: Launching EFI-enabled arm32 Linux

2021-09-04 Thread Adam Lackorzynski
Hi, while trying to launch an EFI-enabled arm32 Linux binary (zImage) I noticed I get an undefined instruction exception on the first instruction. Now this is a bit special because Linux uses a nop instruction there that also is a PE file signature ('MZ') such that the CPU runs over it and the fil

Re: [PULL 00/22] testing and plugin updates

2021-09-04 Thread Peter Maydell
On Fri, 3 Sept 2021 at 10:03, Alex Bennée wrote: > > The following changes since commit 079b1252e9de384385c9da910262312ec2e574c8: > > Merge remote-tracking branch > 'remotes/pmaydell/tags/pull-target-arm-20210901' into staging (2021-09-01 > 17:45:38 +0100) > > are available in the Git reposito

Re: [PATCH] hw/ssi: imx_spi: Improve chip select handling

2021-09-04 Thread Guenter Roeck
On 9/2/21 12:29 PM, Peter Maydell wrote: On Thu, 2 Sept 2021 at 17:09, Guenter Roeck wrote: On 9/2/21 8:58 AM, Peter Maydell wrote: On Sun, 8 Aug 2021 at 02:34, Guenter Roeck wrote: The control register does not really have a means to deselect all chip selects directly. As result, CS is ef

[PATCH v7 11/11] qcow2: use reqlist_mark_req_invalid()

2021-09-04 Thread Vladimir Sementsov-Ogievskiy
Instead of small critical sections which wants only to remove a request from the list let's use new atomic interface. And don't forget to call reqlist_free_invalid_reqs() when we are in a critical section anyway, to not overflow the RAM with invalid requests. Signed-off-by: Vladimir Sementsov-Ogie

[PATCH v7 10/11] block/reqlist: implement reqlist_mark_req_invalid()

2021-09-04 Thread Vladimir Sementsov-Ogievskiy
We do lock qcow2 s->lock only to remove request from the reqlist. That's quite inefficient. Let's implement atomic operation to avoid extra critical section. So new interface is: 1. Instead of reqlist_free_req() user may call atomic reqlist_mark_req_invalid(). 2. At some moment under mutex us

  1   2   >