[PATCH v8 3/5] vhost-user-scsi: support reconnect to backend

2023-10-08 Thread Li Feng
If the backend crashes and restarts, the device is broken. This patch adds reconnect for vhost-user-scsi. This patch also improves the error messages, and reports some silent errors. Tested with spdk backend. Signed-off-by: Li Feng --- hw/scsi/vhost-scsi-common.c | 16 +-

[PATCH v8 5/5] vhost-user: fix lost reconnect

2023-10-08 Thread Li Feng
When the vhost-user is reconnecting to the backend, and if the vhost-user fails at the get_features in vhost_dev_init(), then the reconnect will fail and it will not be retriggered forever. The reason is: When the vhost-user fails at get_features, the vhost_dev_cleanup will be called immediately.

[PATCH v8 1/5] vhost-user-common: send get_inflight_fd once

2023-10-08 Thread Li Feng
Currently the get_inflight_fd will be sent every time the device is started, and the backend will allocate shared memory to save the inflight state. If the backend finds that it receives the second get_inflight_fd, it will release the previous shared memory, which breaks inflight working logic.

[PATCH v8 0/5] Implement reconnect for vhost-user-scsi

2023-10-08 Thread Li Feng
Changes for v8: - [PATCH 3/5] vhost-user-scsi: support reconnect to backend - Fix code style suggested by Manos Pitsidianakis - [PATCH 4/5] vhost-user-scsi: start vhost when guest kicks - Use 'DEVICE()' macro in vhost_user_scsi_handle_output to replace the

[PATCH v8 4/5] vhost-user-scsi: start vhost when guest kicks

2023-10-08 Thread Li Feng
Let's keep the same behavior as vhost-user-blk. Some old guests kick virtqueue before setting VIRTIO_CONFIG_S_DRIVER_OK. Signed-off-by: Li Feng Reviewed-by: Raphael Norwitz --- hw/scsi/vhost-user-scsi.c | 48 +++ 1 file changed, 44 insertions(+), 4

[PATCH v8 2/5] vhost: move and rename the conn retry times

2023-10-08 Thread Li Feng
Multiple devices need this macro, move it to a common header. Signed-off-by: Li Feng Reviewed-by: Raphael Norwitz --- hw/block/vhost-user-blk.c | 4 +--- hw/virtio/vhost-user-gpio.c | 3 +-- include/hw/virtio/vhost.h | 2 ++ 3 files changed, 4 insertions(+), 5 deletions(-) diff --git

Re: [PATCH v7 3/5] vhost-user-scsi: support reconnect to backend

2023-10-08 Thread Li Feng
Thanks for your comments, I will submit the v8. > On 8 Oct 2023, at 6:46 PM, Manos Pitsidianakis > wrote: > > Hello Li, I have some trivial style comments you could possibly address in a > next version: > > On Sun, 08 Oct 2023 12:12, Li Feng wrote: >> diff --git a/hw/scsi/vhost-user-scsi.c

Re: [PATCH 2/2] target/riscv/tcg-cpu.c: add extension properties for all cpus

2023-10-08 Thread Alistair Francis
On Fri, Sep 29, 2023 at 8:39 PM Daniel P. Berrangé wrote: > > On Tue, Sep 26, 2023 at 03:31:09PM -0300, Daniel Henrique Barboza wrote: > > At this moment we do not expose extension properties for vendor CPUs > > because that would allow users to change them via command line. The > > drawback is

Re: [PATCH 0/6] riscv: RVA22U64 profile support

2023-10-08 Thread Alistair Francis
On Fri, Sep 29, 2023 at 10:54 PM Daniel P. Berrangé wrote: > > On Fri, Sep 29, 2023 at 09:49:47AM -0300, Daniel Henrique Barboza wrote: > > > > > > On 9/29/23 08:55, Daniel P. Berrangé wrote: > > > On Fri, Sep 29, 2023 at 08:29:08AM -0300, Daniel Henrique Barboza wrote: > > > > > > > > > > > > On

[PATCH 1/3] vfio/pci: Fix a potential memory leak in vfio_listener_region_add

2023-10-08 Thread Zhenzhong Duan
When there is an failure in vfio_listener_region_add() and the section belongs to a ram device, there is an inaccurate error report which should never be related to vfio_dma_map failure. The memory holding err is also incrementally leaked in each failure. Fix it by reporting the real error and

[PATCH 2/3] vfio/ap: Remove pointless apdev variable

2023-10-08 Thread Zhenzhong Duan
No need to double-cast, call VFIO_AP_DEVICE() on DeviceState. No functional changes. Signed-off-by: Zhenzhong Duan --- hw/vfio/ap.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c index 22e564f4f7..e083a19eac 100644 --- a/hw/vfio/ap.c

[PATCH 3/3] vfio/ccw: Remove redundant definition of TYPE_VFIO_CCW

2023-10-08 Thread Zhenzhong Duan
No functional changes. Signed-off-by: Zhenzhong Duan --- include/hw/s390x/vfio-ccw.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/hw/s390x/vfio-ccw.h b/include/hw/s390x/vfio-ccw.h index 63a909eb7e..4209d27657 100644 --- a/include/hw/s390x/vfio-ccw.h +++

[PATCH 0/3] vfio: memory leak fix and code cleanup

2023-10-08 Thread Zhenzhong Duan
Hi, This trivial patchset fixes a incremental memory leak in rare case, and some cleanup on ap/ccw. This patchset is based on vfio-next. Thanks Zhenzhong Zhenzhong Duan (3): vfio/pci: Fix a potential memory leak in vfio_listener_region_add vfio/ap: Remove pointless apdev variable

Re: [PATCH] target/riscv: deprecate capital 'Z' CPU properties

2023-10-08 Thread Alistair Francis
On Sun, Oct 8, 2023 at 3:15 AM Daniel Henrique Barboza wrote: > > At this moment there are eleven CPU extension properties that starts > with capital 'Z': Zifencei, Zicsr, Zihintntl, Zihintpause, Zawrs, Zfa, > Zfh, Zfhmin, Zve32f, Zve64f and Zve64d. All other extensions are named > with

Re: [PATCH] target/riscv: deprecate capital 'Z' CPU properties

2023-10-08 Thread Alistair Francis
On Sun, Oct 8, 2023 at 3:15 AM Daniel Henrique Barboza wrote: > > At this moment there are eleven CPU extension properties that starts > with capital 'Z': Zifencei, Zicsr, Zihintntl, Zihintpause, Zawrs, Zfa, > Zfh, Zfhmin, Zve32f, Zve64f and Zve64d. All other extensions are named > with

Re: [PATCH v2] target/riscv: pmp: Ignore writes when RW=01

2023-10-08 Thread Alistair Francis
On Mon, Sep 25, 2023 at 9:11 PM Mayuresh Chitale wrote: > > As per the Priv spec: "The R, W, and X fields form a collective WARL > field for which the combinations with R=0 and W=1 are reserved." > However currently such writes are not ignored as ought to be. The > combinations with RW=01 are

RE: [PATCH v4 10/15] vfio/ccw: Use vfio_[attach/detach]_device

2023-10-08 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Sent: Monday, October 9, 2023 1:46 AM >Subject: Re: [PATCH v4 10/15] vfio/ccw: Use vfio_[attach/detach]_device > >Hi Zhenzhong, >On 10/8/23 12:21, Duan, Zhenzhong wrote: >> Hi Eric, >> >>> -Original Message- >>> From: Eric Auger >>> Sent:

Re: [PATCH v2] target/riscv: pmp: Ignore writes when RW=01

2023-10-08 Thread Alistair Francis
On Mon, Sep 25, 2023 at 9:11 PM Mayuresh Chitale wrote: > > As per the Priv spec: "The R, W, and X fields form a collective WARL > field for which the combinations with R=0 and W=1 are reserved." > However currently such writes are not ignored as ought to be. The > combinations with RW=01 are

Re: [PATCH v3 4/5] hw/char: riscv_htif: replace exit calls with proper shutdown

2023-10-08 Thread Alistair Francis
On Mon, Oct 2, 2023 at 7:32 PM Clément Chigot wrote: > > On Fri, Sep 22, 2023 at 7:20 AM Alistair Francis wrote: > > > > On Thu, Sep 7, 2023 at 9:26 PM Clément Chigot wrote: > > > > > > This replaces the exit calls by shutdown requests, ensuring a proper > > > cleanup of Qemu. Otherwise, some

Re: [PATCH] target/riscv/tcg: remove RVG warning

2023-10-08 Thread Alistair Francis
On Tue, Oct 3, 2023 at 10:26 PM Daniel Henrique Barboza wrote: > > Vendor CPUs that set RVG are displaying user warnings about other > extensions that RVG must enable, one warning per CPU. E.g.: > > $ ./build/qemu-system-riscv64 -smp 8 -M virt -cpu veyron-v1 -nographic > qemu-system-riscv64:

Re: [PATCH] target/riscv/tcg: remove RVG warning

2023-10-08 Thread Alistair Francis
On Tue, Oct 3, 2023 at 10:26 PM Daniel Henrique Barboza wrote: > > Vendor CPUs that set RVG are displaying user warnings about other > extensions that RVG must enable, one warning per CPU. E.g.: > > $ ./build/qemu-system-riscv64 -smp 8 -M virt -cpu veyron-v1 -nographic > qemu-system-riscv64:

Re: [PATCH 0/2] riscv, kvm: support KVM_GET_REG_LIST

2023-10-08 Thread Alistair Francis
On Tue, Oct 3, 2023 at 9:34 PM Daniel Henrique Barboza wrote: > > Hi, > > Starting on Linux 6.6 the QEMU RISC-V KVM driver now supports > KMV_GET_REG_LIST. This API will make it simpler for the QEMU KVM driver > to determine whether a KVM reg is present or not. > > We'll use this API to fetch

Re: [PATCH v2 2/2] target/riscv/kvm: support KVM_GET_REG_LIST

2023-10-08 Thread Alistair Francis
On Wed, Oct 4, 2023 at 12:48 AM Daniel Henrique Barboza wrote: > > KVM for RISC-V started supporting KVM_GET_REG_LIST in Linux 6.6. It > consists of a KVM ioctl() that retrieves a list of all available regs > for get_one_reg/set_one_reg. Regs that aren't present in the list aren't > supported in

Re: [PATCH v2 1/2] target/riscv/kvm: improve 'init_multiext_cfg' error msg

2023-10-08 Thread Alistair Francis
On Wed, Oct 4, 2023 at 12:46 AM Daniel Henrique Barboza wrote: > > Our error message is returning the value of 'ret', which will be always > -1 in case of error, and will not be that useful: > > qemu-system-riscv64: Unable to read ISA_EXT KVM register ssaia, error -1 > > Improve the error message

Re: [PATCH 2/3] target/riscv: Support discontinuous PMU counters

2023-10-08 Thread Alistair Francis
On Wed, Oct 4, 2023 at 7:36 PM Rob Bradford wrote: > > Hi Atish, > > On Tue, 2023-10-03 at 13:25 -0700, Atish Kumar Patra wrote: > > On Tue, Oct 3, 2023 at 5:51 AM Rob Bradford > > wrote: > > > > > > There is no requirement that the enabled counters in the platform > > > are > > > continuously

Re: [PATCH 1/3] target/riscv: Propagate error from PMU setup

2023-10-08 Thread Alistair Francis
On Tue, Oct 3, 2023 at 10:53 PM Rob Bradford wrote: > > More closely follow the QEMU style by returning an Error and propagating > it there is an error relating to the PMU setup. > > Further simplify the function by removing the num_counters parameter as > this is available from the passed in cpu

[PATCH v3 3/3] target/hexagon: avoid shadowing globals

2023-10-08 Thread Brian Cain
The typedef `vaddr` is shadowed by `vaddr` identifiers, so we rename the identifiers to avoid shadowing the type name. The global `tcg_env` is shadowed by local `tcg_env` arguments, so we rename the function arguments to avoid shadowing the global. Signed-off-by: Brian Cain ---

[PATCH v3 2/3] target/hexagon: fix some occurrences of -Wshadow=local

2023-10-08 Thread Brian Cain
Of the changes in this commit, the changes in `HELPER(commit_hvx_stores)()` are less obvious. They are required because of some macro invocations like SCATTER_OP_WRITE_TO_MEM(). e.g.: In file included from ../target/hexagon/op_helper.c:31: ../target/hexagon/mmvec/macros.h:205:18: error:

[PATCH v3 0/3] hexagon: GETPC() fixes, shadowing fixes

2023-10-08 Thread Brian Cain
Changes since v2: - rebased, suggested by Markus - s/cpu_env/tcg_env/ - For local shadows: s/tcg_env/tcg_env_/ Brian Cain (2): target/hexagon: fix some occurrences of -Wshadow=local target/hexagon: avoid shadowing globals Matheus Tavares Bernardino (1): target/hexagon:

[PATCH v3 1/3] target/hexagon: move GETPC() calls to top level helpers

2023-10-08 Thread Brian Cain
From: Matheus Tavares Bernardino As docs/devel/loads-stores.rst states: ``GETPC()`` should be used with great care: calling it in other functions that are *not* the top level ``HELPER(foo)`` will cause unexpected behavior. Instead, the value of ``GETPC()`` should be read from the helper

[PATCH v2] target/riscv: Use a direct cast for better performance

2023-10-08 Thread Richard W.M. Jones
RISCV_CPU(cs) uses a checked cast. When QOM cast debugging is enabled this adds about 5% total overhead when emulating RV64 on x86-64 host. Using a RISC-V guest with 16 vCPUs, 16 GB of guest RAM, virtio-blk disk. The guest has a copy of the qemu source tree. The test involves compiling the

[PATCH v2] target/riscv: Use a direct cast for better performance

2023-10-08 Thread Richard W.M. Jones
v1 was here: https://lists.nongnu.org/archive/html/qemu-devel/2023-10/msg02021.html v2 is functionally exactly the same, except I changed s/qemu cast/QOM cast/ in the comment, and added the Reviewed-by tag received for the first version. Rich.

Re: [PATCH 2/3] hw/pci-host: Add emulation of Mai Logic Articia S

2023-10-08 Thread BALATON Zoltan
On Sun, 8 Oct 2023, Mark Cave-Ayland wrote: On 05/10/2023 23:13, BALATON Zoltan wrote: The Articia S is a generic chipset supporting several different CPUs that were used on some PPC boards. This is a minimal emulation of the parts needed for emulating the AmigaOne board. Signed-off-by:

Re: [PATCH v8 00/29] Consolidate PIIX south bridges

2023-10-08 Thread Chuck Zmudzinski
On 10/7/23 8:38 AM, Bernhard Beschow wrote: > This series consolidates the implementations of the PIIX3 and PIIX4 south > bridges and makes PIIX4 usable in the PC machine via an experimental command > line parameter. The motivation is to resolve duplicate code between the device > models as well

Re: [PATCH v4 10/15] vfio/ccw: Use vfio_[attach/detach]_device

2023-10-08 Thread Eric Auger
Hi Zhenzhong, On 10/8/23 12:21, Duan, Zhenzhong wrote: > Hi Eric, > >> -Original Message- >> From: Eric Auger >> Sent: Wednesday, October 4, 2023 11:44 PM >> Subject: [PATCH v4 10/15] vfio/ccw: Use vfio_[attach/detach]_device >> >> Let the vfio-ccw device use vfio_attach_device() and >>

Re: [PATCH 15/19] parallels: Remove unnecessary data_end field

2023-10-08 Thread Alexander Ivanov
On 10/7/23 19:54, Mike Maslenkin wrote: On Sat, Oct 7, 2023 at 5:30 PM Alexander Ivanov wrote: On 10/7/23 13:21, Mike Maslenkin wrote: On Sat, Oct 7, 2023 at 1:18 PM Alexander Ivanov wrote: On 10/6/23 21:43, Mike Maslenkin wrote: On Mon, Oct 2, 2023 at 12:01 PM Alexander Ivanov

RE: [PATCH v2 3/3] target/hexagon: avoid shadowing globals

2023-10-08 Thread Brian Cain
> -Original Message- > From: ltaylorsimp...@gmail.com > Sent: Friday, October 6, 2023 11:01 AM > To: Brian Cain ; qemu-devel@nongnu.org > Cc: arm...@redhat.com; richard.hender...@linaro.org; phi...@linaro.org; > peter.mayd...@linaro.org; Matheus Bernardino (QUIC) > ;

[PATCH QEMU] tulip: Fix LXT970 PHY registers

2023-10-08 Thread ~disean
From: Dmitry Borisov Fix incorrect MII status value (0xf02c). Use default values from a 21143-based board: https://www.beowulf.org/pipermail/tulip-bug/2000-February/000485.html Signed-off-by: Dmitry Borisov --- hw/net/tulip.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) mode

[PATCH QEMU] tulip: Fix LXT970 PHY registers

2023-10-08 Thread ~disean
From: Dmitry Borisov Fix incorrect MII status value (0xf02c). Use default values from a 21143-based board: https://www.beowulf.org/pipermail/tulip-bug/2000-February/000485.html Signed-off-by: Dmitry Borisov --- hw/net/tulip.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) mode

Re: [PATCH v7 3/5] vhost-user-scsi: support reconnect to backend

2023-10-08 Thread Manos Pitsidianakis
Hello Li, I have some trivial style comments you could possibly address in a next version: On Sun, 08 Oct 2023 12:12, Li Feng wrote: diff --git a/hw/scsi/vhost-user-scsi.c b/hw/scsi/vhost-user-scsi.c index df6b66cc1a..5df24faff4 100644 --- a/hw/scsi/vhost-user-scsi.c +++

Re: [PATCH] hw/virtio/virtio-gpu: Fix compiler warning when compiling with -Wshadow

2023-10-08 Thread Philippe Mathieu-Daudé
On 8/10/23 10:57, Michael S. Tsirkin wrote: On Fri, Oct 06, 2023 at 06:45:08PM +0200, Thomas Huth wrote: Avoid using trivial variable names in macros, otherwise we get the following compiler warning when compiling with -Wshadow=local: In file included from

[PATCH] migration: Use g_autofree to simplify ram_dirty_bitmap_reload()

2023-10-08 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- Based-on: --- migration/ram.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 982fbbeee1..4cb948cfd0 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -4164,11 +4164,11 @@

Re: [PATCH v3 03/10] migration: Refactor error handling in source return path

2023-10-08 Thread Philippe Mathieu-Daudé
On 5/10/23 18:05, Peter Xu wrote: On Thu, Oct 05, 2023 at 08:11:33AM +0200, Philippe Mathieu-Daudé wrote: Hi Peter, On 5/10/23 00:02, Peter Xu wrote: rp_state.error was a boolean used to show error happened in return path thread. That's not only duplicating error reporting

Re: [PATCH 1/3] via-ide: Fix legacy mode emulation

2023-10-08 Thread BALATON Zoltan
On Sun, 8 Oct 2023, Mark Cave-Ayland wrote: On 05/10/2023 23:13, BALATON Zoltan wrote: The initial value for BARs were set in reset method for emulating legacy mode at start but this does not work because PCI code resets BARs after calling device reset method. This is certainly something

RE: [PATCH v4 10/15] vfio/ccw: Use vfio_[attach/detach]_device

2023-10-08 Thread Duan, Zhenzhong
Hi Eric, >-Original Message- >From: Eric Auger >Sent: Wednesday, October 4, 2023 11:44 PM >Subject: [PATCH v4 10/15] vfio/ccw: Use vfio_[attach/detach]_device > >Let the vfio-ccw device use vfio_attach_device() and >vfio_detach_device(), hence hiding the details of the used >IOMMU

[PATCH v7 1/5] vhost-user-common: send get_inflight_fd once

2023-10-08 Thread Li Feng
Currently the get_inflight_fd will be sent every time the device is started, and the backend will allocate shared memory to save the inflight state. If the backend finds that it receives the second get_inflight_fd, it will release the previous shared memory, which breaks inflight working logic.

[PATCH v7 0/5] Implement reconnect for vhost-user-scsi

2023-10-08 Thread Li Feng
Changes for v7: - [PATCH 3/5] vhost-user-scsi: support reconnect to backend - Add reporting the error in vhost-scsi; - Rebase to master and fix the conflict. - Add "Reviewed-by" tags. Changes for v6: - [PATCH] vhost-user: fix lost reconnect - Fix missing assign event_cb. Changes for v5: -

[PATCH v7 4/5] vhost-user-scsi: start vhost when guest kicks

2023-10-08 Thread Li Feng
Let's keep the same behavior as vhost-user-blk. Some old guests kick virtqueue before setting VIRTIO_CONFIG_S_DRIVER_OK. Signed-off-by: Li Feng Reviewed-by: Raphael Norwitz --- hw/scsi/vhost-user-scsi.c | 48 +++ 1 file changed, 44 insertions(+), 4

[PATCH v7 5/5] vhost-user: fix lost reconnect

2023-10-08 Thread Li Feng
When the vhost-user is reconnecting to the backend, and if the vhost-user fails at the get_features in vhost_dev_init(), then the reconnect will fail and it will not be retriggered forever. The reason is: When the vhost-user fails at get_features, the vhost_dev_cleanup will be called immediately.

[PATCH v7 2/5] vhost: move and rename the conn retry times

2023-10-08 Thread Li Feng
Multiple devices need this macro, move it to a common header. Signed-off-by: Li Feng Reviewed-by: Raphael Norwitz --- hw/block/vhost-user-blk.c | 4 +--- hw/virtio/vhost-user-gpio.c | 3 +-- include/hw/virtio/vhost.h | 2 ++ 3 files changed, 4 insertions(+), 5 deletions(-) diff --git

[PATCH v7 3/5] vhost-user-scsi: support reconnect to backend

2023-10-08 Thread Li Feng
If the backend crashes and restarts, the device is broken. This patch adds reconnect for vhost-user-scsi. This patch also improves the error messages, and reports some silent errors. Tested with spdk backend. Signed-off-by: Li Feng --- hw/scsi/vhost-scsi-common.c | 16 +-

Re: [PATCH] contrib/vhost-user-gpu: Fix compiler warning when compiling with -Wshadow

2023-10-08 Thread Michael S. Tsirkin
On Fri, Oct 06, 2023 at 07:35:18PM +0200, Thomas Huth wrote: > Rename some variables to avoid compiler warnings when compiling > with -Wshadow=local. > > Signed-off-by: Thomas Huth > --- > contrib/vhost-user-gpu/vugpu.h | 8 > contrib/vhost-user-gpu/vhost-user-gpu.c | 6 +++---

Re: [PATCH] hw/virtio/virtio-gpu: Fix compiler warning when compiling with -Wshadow

2023-10-08 Thread Michael S. Tsirkin
On Fri, Oct 06, 2023 at 06:45:08PM +0200, Thomas Huth wrote: > Avoid using trivial variable names in macros, otherwise we get > the following compiler warning when compiling with -Wshadow=local: > > In file included from ../../qemu/hw/display/virtio-gpu-virgl.c:19: >

Re: [PATCH v6 1/5] vhost-user-common: send get_inflight_fd once

2023-10-08 Thread Li Feng
On Sun, Oct 8, 2023 at 4:51 PM Michael S. Tsirkin wrote: > > On Sun, Oct 08, 2023 at 04:49:05PM +0800, Li Feng wrote: > > On Fri, Sep 29, 2023 at 8:55 AM Raphael Norwitz > > wrote: > > > > > > > > > > > > > On Sep 22, 2023, at 7:46 AM, Li Feng wrote: > > > > > > > > Currently the

Re: [PATCH v6 0/5] Implement reconnect for vhost-user-scsi

2023-10-08 Thread Li Feng
On Sun, Oct 8, 2023 at 4:49 PM Michael S. Tsirkin wrote: > > On Fri, Sep 22, 2023 at 07:46:10PM +0800, Li Feng wrote: > > Changes for v6: > > - [PATCH] vhost-user: fix lost reconnect > > - Fix missing assign event_cb. > > > Pls don't make vN+1 a reply to vN - start a new thread > with each

Re: [PATCH] contrib/vhost-user-gpu: Fix compiler warning when compiling with -Wshadow

2023-10-08 Thread Michael S. Tsirkin
On Fri, Oct 06, 2023 at 07:35:18PM +0200, Thomas Huth wrote: > Rename some variables to avoid compiler warnings when compiling > with -Wshadow=local. > > Signed-off-by: Thomas Huth Reviewed-by: Michael S. Tsirkin > --- > contrib/vhost-user-gpu/vugpu.h | 8 >

Re: [PATCH v6 1/5] vhost-user-common: send get_inflight_fd once

2023-10-08 Thread Li Feng
On Fri, Sep 29, 2023 at 8:55 AM Raphael Norwitz wrote: > > > > > On Sep 22, 2023, at 7:46 AM, Li Feng wrote: > > > > Currently the get_inflight_fd will be sent every time the device is > > started, and > > the backend will allocate shared memory to save the inflight state. If the > > backend

Re: [PATCH v6 1/5] vhost-user-common: send get_inflight_fd once

2023-10-08 Thread Michael S. Tsirkin
On Sun, Oct 08, 2023 at 04:49:05PM +0800, Li Feng wrote: > On Fri, Sep 29, 2023 at 8:55 AM Raphael Norwitz > wrote: > > > > > > > > > On Sep 22, 2023, at 7:46 AM, Li Feng wrote: > > > > > > Currently the get_inflight_fd will be sent every time the device is > > > started, and > > > the backend

Re: [PATCH v6 0/5] Implement reconnect for vhost-user-scsi

2023-10-08 Thread Michael S. Tsirkin
On Fri, Sep 22, 2023 at 07:46:10PM +0800, Li Feng wrote: > Changes for v6: > - [PATCH] vhost-user: fix lost reconnect > - Fix missing assign event_cb. Pls don't make vN+1 a reply to vN - start a new thread with each version please. > Changes for v5: > - No logic has been changed, just move

Re: [PATCH v6 3/5] vhost-user-scsi: support reconnect to backend

2023-10-08 Thread Li Feng
Sorry, the reply is late due to being on vacation for half a month. On Fri, Sep 29, 2023 at 8:55 AM Raphael Norwitz wrote: > > One comment on the logging stuff in vhost-scsi. As far as I can tell the > logging in vhost-user-scsi looks good. > > Markus - does this look better to you? Otherwise

[PULL 1/2] target/loongarch: fix ASXE flag conflict

2023-10-08 Thread Song Gao
From: Jiajie Chen HW_FLAGS_EUEN_ASXE acccidentally conflicts with HW_FLAGS_CRMD_PG, enabling LASX instructions even when CSR_EUEN.ASXE=0. Closes: https://gitlab.com/qemu-project/qemu/-/issues/1907 Signed-off-by: Jiajie Chen Reviewed-by: Richard Henderson Reviewed-by: Song Gao Message-Id:

[PULL 0/2] loongarch-to-apply queue

2023-10-08 Thread Song Gao
-20231008 for you to fetch changes up to e1fc0cf1fb65c5f049bef4661d0e3278e51e2560: target/loongarch: Add preldx instruction (2023-10-08 15:02:15 +0800) pull-loongarch-20231008

[PULL 2/2] target/loongarch: Add preldx instruction

2023-10-08 Thread Song Gao
Resolve the issue of starting the Loongnix 20.5[1] system failure. Logs: Loading Linux 4.19.0-19-loongson-3 ... Loading initial ramdisk ... PROGRESS CODE: V02010004 I0 PROGRESS CODE: V03101019 I0 Error: unknown opcode. 903a3e6c: 0x382c6d82 [1]

Re: [PATCH] hw/virtio/virtio-gpu: Fix compiler warning when compiling with -Wshadow

2023-10-08 Thread Marc-André Lureau
On Fri, Oct 6, 2023 at 8:46 PM Thomas Huth wrote: > > Avoid using trivial variable names in macros, otherwise we get > the following compiler warning when compiling with -Wshadow=local: > > In file included from ../../qemu/hw/display/virtio-gpu-virgl.c:19: >

Re: [PATCH] contrib/vhost-user-gpu: Fix compiler warning when compiling with -Wshadow

2023-10-08 Thread Marc-André Lureau
On Fri, Oct 6, 2023 at 9:35 PM Thomas Huth wrote: > > Rename some variables to avoid compiler warnings when compiling > with -Wshadow=local. > > Signed-off-by: Thomas Huth Reviewed-by: Marc-André Lureau > --- > contrib/vhost-user-gpu/vugpu.h | 8 >

[PULL 14/20] mac_via: work around underflow in TimeDBRA timing loop in SETUPTIMEK

2023-10-08 Thread Laurent Vivier
From: Mark Cave-Ayland The MacOS toolbox ROM calculates the number of branches that can be executed per millisecond as part of its timer calibration. Since modern hosts are considerably quicker than original hardware, the negative counter reaches zero before the calibration completes leading to

[PULL 15/20] mac_via: workaround NetBSD ADB bus enumeration issue

2023-10-08 Thread Laurent Vivier
From: Mark Cave-Ayland NetBSD assumes it can send its first ADB command after sending the ADB_BUSRESET command in ADB_STATE_NEW without changing the state back to ADB_STATE_IDLE first as detailed in the ADB protocol. Add a workaround to detect this condition at the start of ADB enumeration and

[PULL 07/20] audio: add Apple Sound Chip (ASC) emulation

2023-10-08 Thread Laurent Vivier
From: Mark Cave-Ayland The Apple Sound Chip was primarily used by the Macintosh II to generate sound in hardware which was previously handled by the toolbox ROM with software interrupts. Implement both the standard ASC and also the enhanced ASC (EASC) functionality which is used in the Quadra

[PULL 10/20] q800: add easc bool machine class property to switch between ASC and EASC

2023-10-08 Thread Laurent Vivier
From: Mark Cave-Ayland This determines whether the Apple Sound Chip (ASC) is set to enhanced mode (default) or to original mode. The real Q800 hardware used an EASC chip however a lot of older software only works with the older ASC chip. Adding this as a machine parameter allows QEMU to be used

[PULL 03/20] q800: add machine id register

2023-10-08 Thread Laurent Vivier
From: Mark Cave-Ayland MacOS reads this address to identify the hardware. This is a basic implementation returning the ID of Quadra 800. Details: http://mess.redump.net/mess/driver_info/mac_technical_notes "There are 3 ID schemes [...] The third and most scalable is a machine ID register

[PULL 16/20] mac_via: implement ADB_STATE_IDLE state if shift register in input mode

2023-10-08 Thread Laurent Vivier
From: Mark Cave-Ayland NetBSD switches directly to IDLE state without switching the shift register to input mode. Duplicate the existing ADB_STATE_IDLE logic in input mode from when the shift register is in output mode which allows the ADB autopoll handler to handle the response. Signed-off-by:

[PULL 01/20] q800-glue.c: convert to Resettable interface

2023-10-08 Thread Laurent Vivier
From: Mark Cave-Ayland Convert the GLUE device to 3-phase reset. The legacy method doesn't do anything that's invalid in the hold phase, so the conversion is simple and not a behaviour change. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier

[PULL 12/20] swim: split into separate IWM and ISM register blocks

2023-10-08 Thread Laurent Vivier
From: Mark Cave-Ayland The swim chip provides an implementation of both Apple's IWM and ISM floppy disk controllers. Split the existing implementation into separate register banks for each controller, whilst also switching the IWM registers from 16-bit to 8-bit as implemented in real hardware.

[PULL 08/20] asc: generate silence if FIFO empty but engine still running

2023-10-08 Thread Laurent Vivier
From: Mark Cave-Ayland MacOS (un)helpfully leaves the FIFO engine running even when all the samples have been written to the hardware, and expects the FIFO status flags and IRQ to be updated continuously. There is an additional problem in that not all audio backends guarantee an all-zero

[PULL 06/20] q800: allow accesses to RAM area even if less memory is available

2023-10-08 Thread Laurent Vivier
From: Mark Cave-Ayland MacOS attempts a series of writes and reads over the entire RAM area in order to determine the amount of RAM within the machine. Allow accesses to the entire RAM area ignoring writes and always reading zero for areas where there is no physical RAM installed to allow MacOS

[PULL 05/20] q800: add IOSB subsystem

2023-10-08 Thread Laurent Vivier
From: Mark Cave-Ayland It is needed because it defines the BIOSConfig area. Co-developed-by: Laurent Vivier Signed-off-by: Mark Cave-Ayland Reviewed-by: BALATON Zoltan Message-ID: <20231004083806.757242-6-mark.cave-ayl...@ilande.co.uk> Signed-off-by: Laurent Vivier --- MAINTAINERS

Re: [PATCH 1/6] tap: Fix virtio-net header buffer size

2023-10-08 Thread Michael S. Tsirkin
On Sun, Oct 08, 2023 at 02:29:10PM +0900, Akihiko Odaki wrote: > The largest possible virtio-net header is struct virtio_net_hdr_v1_hash. > > Fixes: fbbdbddec0 ("tap: allow extended virtio header with hash info") > Signed-off-by: Akihiko Odaki This thread is malformed BTW: cover letter seems to

[PULL 09/20] q800: add Apple Sound Chip (ASC) audio to machine

2023-10-08 Thread Laurent Vivier
From: Mark Cave-Ayland The Quadra 800 has the enhanced ASC (EASC) audio chip which supports both the legacy IRQ routing through VIA2 and also "A/UX" mode routing direct to the CPU. Co-developed-by: Laurent Vivier Signed-off-by: Mark Cave-Ayland Message-ID:

[PULL 02/20] q800: add djMEMC memory controller

2023-10-08 Thread Laurent Vivier
From: Mark Cave-Ayland The djMEMC controller is used to store information related to the physical memory configuration. Co-developed-by: Laurent Vivier Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20231004083806.757242-3-mark.cave-ayl...@ilande.co.uk>

[PULL 18/20] q800: add ESCC alias at 0xc000

2023-10-08 Thread Laurent Vivier
From: Mark Cave-Ayland Tests on real Q800 hardware show that the ESCC is addressable at multiple locations within the ESCC memory region - at least 0xc000, 0xc020 (as expected by the MacOS toolbox ROM) and 0xc040. All released NetBSD kernels before 10 use the 0xc000 address which causes a

[PULL 20/20] mac_via: extend timer calibration hack to work with A/UX

2023-10-08 Thread Laurent Vivier
From: Mark Cave-Ayland The A/UX timer calibration loop runs continuously until 2 consecutive iterations differ by at least 0x492 timer ticks. Modern hosts execute the timer calibration loop so fast that this situation never occurs causing a hang on boot. Use a similar method to Shoebill which

[PULL 00/20] Q800 for 8.2 patches

2023-10-08 Thread Laurent Vivier
-for-8.2-pull-request for you to fetch changes up to b4d3a83b89fba814613f7ead6b6ea92e0b2c3cd8: mac_via: extend timer calibration hack to work with A/UX (2023-10-06 10:33:43 +0200) Pull request q800 20231008 add support for booting

[PULL 04/20] q800: implement additional machine id bits on VIA1 port A

2023-10-08 Thread Laurent Vivier
From: Mark Cave-Ayland Co-developed-by: Laurent Vivier Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20231004083806.757242-5-mark.cave-ayl...@ilande.co.uk> Signed-off-by: Laurent Vivier --- hw/misc/mac_via.c | 14 +- 1 file changed, 13

[PULL 13/20] swim: update IWM/ISM register block decoding

2023-10-08 Thread Laurent Vivier
From: Mark Cave-Ayland Update the IWM/ISM register block decoding to match the description given in the "SWIM Chip Users Reference". This allows us to validate the device response to the guest OS which currently only does just enough to indicate that the floppy drive is unavailable.

[PULL 19/20] q800: add alias for MacOS toolbox ROM at 0x40000000

2023-10-08 Thread Laurent Vivier
From: Mark Cave-Ayland According to the Apple Quadra 800 Developer Note document, the Quadra 800 ROM consists of 2 ROM code sections based at offsets 0x0 and 0x80. A/UX attempts to access the toolbox ROM at the lower offset during startup, so provide a memory alias to allow the access to

[PULL 11/20] swim: add trace events for IWM and ISM registers

2023-10-08 Thread Laurent Vivier
From: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Message-ID: <20231004083806.757242-12-mark.cave-ayl...@ilande.co.uk> Signed-off-by: Laurent Vivier --- hw/block/swim.c | 14 ++ hw/block/trace-events | 7 +++ 2 files changed, 21

[PULL 17/20] mac_via: always clear ADB interrupt when switching to A/UX mode

2023-10-08 Thread Laurent Vivier
From: Mark Cave-Ayland When the NetBSD kernel initialises it can leave the ADB interrupt asserted depending upon where in the ADB poll cycle the MacOS ADB interrupt handler is when the NetBSD kernel disables interrupts. The NetBSD ADB driver uses the ADB interrupt state to determine if the ADB

Re: [PATCH] libvhost-user: Fix compiler warning with -Wshadow=local

2023-10-08 Thread Michael S. Tsirkin
On Fri, Oct 06, 2023 at 02:11:29PM +0200, Thomas Huth wrote: > Rename shadowing variables to make this code compilable > with -Wshadow=local. > > Signed-off-by: Thomas Huth Reviewed-by: Michael S. Tsirkin > --- > subprojects/libvhost-user/libvhost-user.c | 12 ++-- > 1 file changed,

Re: [PATCH 2/3] hw/pci-host: Add emulation of Mai Logic Articia S

2023-10-08 Thread Mark Cave-Ayland
On 05/10/2023 23:13, BALATON Zoltan wrote: The Articia S is a generic chipset supporting several different CPUs that were used on some PPC boards. This is a minimal emulation of the parts needed for emulating the AmigaOne board. Signed-off-by: BALATON Zoltan --- hw/pci-host/Kconfig

Re: [PULL 00/26] Audio, source reorg, HVF changes for 2023-10-06

2023-10-08 Thread Paolo Bonzini
Il ven 6 ott 2023, 13:14 Paolo Bonzini ha scritto: > The following changes since commit > da1034094d375afe9e3d8ec8980550ea0f06f7e0: > > Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into > staging (2023-10-03 07:43:44 -0400) > > are available in the Git repository at: > >

Re: [PATCH 1/3] via-ide: Fix legacy mode emulation

2023-10-08 Thread Mark Cave-Ayland
On 05/10/2023 23:13, BALATON Zoltan wrote: The initial value for BARs were set in reset method for emulating legacy mode at start but this does not work because PCI code resets BARs after calling device reset method. This is certainly something I've noticed when testing previous versions of