Re: [PATCH] disas/riscv: Add support for XThead* instructions

2023-04-04 Thread Alistair Francis
On Thu, Mar 16, 2023 at 11:31 AM LIU Zhiwei wrote: > > > On 2023/3/15 21:35, Christoph Muellner wrote: > > From: Christoph Müllner > > > > Support for emulating XThead* instruction has been added recently. > > This patch adds support for these instructions to the RISC-V disassembler. > > This pat

Re: [PATCH] target/riscv: Set opcode to env->bins for illegal/virtual instruction fault

2023-04-04 Thread Alistair Francis
On Thu, Mar 30, 2023 at 1:47 PM Weiwei Li wrote: > > decode_save_opc() will not work for generate_exception(), since 0 is passed > to riscv_raise_exception() as pc in helper_raise_exception(), and bins will > not be restored in this case. > > Signed-off-by: Weiwei Li > Signed-off-by: Junqiang Wan

Re: [PATCH] target/riscv: Fix Guest Physical Address Translation

2023-04-04 Thread Alistair Francis
On Wed, Mar 29, 2023 at 3:53 AM Irina Ryapolova wrote: > > According to specification: > For Sv39x4, address bits of the guest physical address 63:41 must all be > zeros, or else a > guest-page-fault exception occurs. > > Likewise for Sv48x4 and Sv57x4. > For Sv48x4 address bits 63:50 must all be

Re: [PATCH 2/4] Add MEN Chameleon Bus via PCI carrier

2023-04-04 Thread Alistair Francis
On Wed, Mar 29, 2023 at 11:09 PM Johannes Thumshirn wrote: > > Add PCI based MEN Chameleon Bus carrier emulation. > > Signed-off-by: Johannes Thumshirn > --- > hw/mcb/Kconfig | 6 + > hw/mcb/mcb-pci.c | 307 + > hw/mcb/meson.build | 1 + > 3

Re: riscv: g_assert for NULL predicate?

2023-04-04 Thread Alistair Francis
On Mon, Apr 3, 2023 at 11:43 PM Wu, Fei wrote: > > Recent commit 0ee342256af92 switches to g_assert() for the predicate() > NULL check from returning RISCV_EXCP_ILLEGAL_INST. Qemu doesn't have > predicate() for un-allocated CSRs, then a buggy userspace application > reads CSR such as 0x4 causes qe

Re: [PATCH] target/riscv: Fix addr type for get_physical_address

2023-04-04 Thread Alistair Francis
On Wed, Mar 29, 2023 at 8:20 PM Weiwei Li wrote: > > Function get_physical_address() translates both virtual address and > guest physical address, and the latter is 34-bits for Sv32x4. So we > should use vaddr type for 'addr' parameter. > > Signed-off-by: Weiwei Li > Signed-off-by: Junqiang Wang

Re: [PATCH] target/riscv: Fix addr type for get_physical_address

2023-04-04 Thread Alistair Francis
On Wed, Mar 29, 2023 at 8:20 PM Weiwei Li wrote: > > Function get_physical_address() translates both virtual address and > guest physical address, and the latter is 34-bits for Sv32x4. So we > should use vaddr type for 'addr' parameter. > > Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang

Re: [PATCH v3 1/1] hw/riscv: Fix max size limit when put initrd to RAM

2023-04-04 Thread Alistair Francis
On Mon, Mar 13, 2023 at 11:12 PM Hang Xu wrote: > > Because the starting address of ram is not necessarily 0, > the remaining free space in ram is > ram_size - (start - ram_base) instead of ram_size-start. I think this could be clearer. It's not clear here that you mean the free space after the k

Re: [PATCH v2 00/10] target/riscv: Simplification for RVH related check and code style fix

2023-04-04 Thread Alistair Francis
On Wed, Apr 5, 2023 at 3:30 PM Alistair Francis wrote: > > On Mon, Mar 27, 2023 at 6:11 PM Weiwei Li wrote: > > > > This patchset tries to simplify the RVH related check and fix some code > > style problems, such as problems for indentation, multi-line comments and > > lines with over 80 charac

Re: [PATCH v2 00/10] target/riscv: Simplification for RVH related check and code style fix

2023-04-04 Thread Alistair Francis
On Mon, Mar 27, 2023 at 6:11 PM Weiwei Li wrote: > > This patchset tries to simplify the RVH related check and fix some code style > problems, such as problems for indentation, multi-line comments and lines > with over 80 characters. > > The port is available here: > https://github.com/plctlab/p

Re: [PATCH v2 10/10] target/riscv: Fix lines with over 80 characters

2023-04-04 Thread Alistair Francis
On Mon, Mar 27, 2023 at 6:11 PM Weiwei Li wrote: > > Fix lines with over 80 characters for both code and comments in > vector_helper.c, pmp.c and pmu.c. > > Signed-off-by: Weiwei Li > Signed-off-by: Junqiang Wang > Reviewed-by: LIU Zhiwei Acked-by: Alistair Francis Alistair > --- > target/

Re: [PATCH v2 08/10] target/riscv: Fix format for indentation

2023-04-04 Thread Alistair Francis
On Mon, Mar 27, 2023 at 6:11 PM Weiwei Li wrote: > > Fix identation problems, and try to use the same indentation strategy > in the same file. > > Signed-off-by: Weiwei Li > Signed-off-by: Junqiang Wang > Reviewed-by: LIU Zhiwei Acked-by: Alistair Francis Alistair > --- > target/riscv/arch

Re: [PATCH v2 09/10] target/riscv: Fix format for comments

2023-04-04 Thread Alistair Francis
On Mon, Mar 27, 2023 at 6:16 PM Weiwei Li wrote: > > Fix formats for multi-lines comments. > Add spaces around single line comments(after "/*" and before "*/"). > > Signed-off-by: Weiwei Li > Signed-off-by: Junqiang Wang > Acked-by: Richard Henderson > Reviewed-by: LIU Zhiwei Reviewed-by: Ali

Re: [PATCH v2 06/10] target/riscv: Remove riscv_cpu_virt_enabled()

2023-04-04 Thread Alistair Francis
On Mon, Mar 27, 2023 at 6:10 PM Weiwei Li wrote: > > Directly use env->virt_enabled instead. > > Suggested-by: LIU Zhiwei > Signed-off-by: Weiwei Li > Signed-off-by: Junqiang Wang Reviewed-by: Alistair Francis Alistair > --- > target/riscv/cpu.c| 2 +- > target/riscv/cpu.h

Re: [PATCH v2 07/10] target/riscv: Remove redundant parentheses

2023-04-04 Thread Alistair Francis
On Mon, Mar 27, 2023 at 6:12 PM Weiwei Li wrote: > > Remove redundant parentheses in get_physical_address. > > Signed-off-by: Weiwei Li > Signed-off-by: Junqiang Wang > Reviewed-by: Richard Henderson > Reviewed-by: LIU Zhiwei Reviewed-by: Alistair Francis Alistair > --- > target/riscv/cpu

Re: [PATCH v2 05/10] target/riscv: Convert env->virt to a bool env->virt_enabled

2023-04-04 Thread Alistair Francis
On Mon, Mar 27, 2023 at 6:10 PM Weiwei Li wrote: > > From: LIU Zhiwei > > Currently we only use the env->virt to encode the virtual mode enabled > status. Let's make it a bool type. > > Signed-off-by: LIU Zhiwei > Reviewed-by: Weiwei Li > Message-ID: <20230325145348.1208-1-zhiwei_...@linux.alib

Re: [PATCH v2 04/10] target/riscv: Remove check on RVH for riscv_cpu_set_virt_enabled

2023-04-04 Thread Alistair Francis
On Mon, Mar 27, 2023 at 6:12 PM Weiwei Li wrote: > > In current implementation, riscv_cpu_set_virt_enabled is only called when > RVH is enabled. > > Signed-off-by: Weiwei Li > Signed-off-by: Junqiang Wang > Reviewed-by: Richard Henderson > Reviewed-by: LIU Zhiwei Reviewed-by: Alistair Francis

Re: [PATCH v2 03/10] target/riscv: Remove check on RVH for riscv_cpu_virt_enabled

2023-04-04 Thread Alistair Francis
On Mon, Mar 27, 2023 at 6:12 PM Weiwei Li wrote: > > Since env->virt.VIRT_ONOFF is initialized as false, and will not be set > to true when RVH is disabled, so we can just return this bit(false) when > RVH is not disabled. > > Signed-off-by: Weiwei Li > Signed-off-by: Junqiang Wang > Reviewed-by

Re: [PATCH v2 02/10] target/riscv: Remove redundant check on RVH

2023-04-04 Thread Alistair Francis
On Mon, Mar 27, 2023 at 6:10 PM Weiwei Li wrote: > > Check on riscv_cpu_virt_enabled contains the check on RVH. > > Signed-off-by: Weiwei Li > Signed-off-by: Junqiang Wang > Reviewed-by: Richard Henderson > Reviewed-by: LIU Zhiwei Reviewed-by: Alistair Francis Alistair > --- > target/risc

Re: [PATCH v2 01/10] target/riscv: Remove redundant call to riscv_cpu_virt_enabled

2023-04-04 Thread Alistair Francis
On Mon, Mar 27, 2023 at 6:11 PM Weiwei Li wrote: > > The assignment is done under the condition riscv_cpu_virt_enabled()=true. > > Signed-off-by: Weiwei Li > Signed-off-by: Junqiang Wang > Reviewed-by: Richard Henderson > Reviewed-by: LIU Zhiwei Reviewed-by: Alistair Francis Alistair > ---

Re: [PATCH 1/1] target/riscv: Convert env->virt to a bool env->virt_enabled

2023-04-04 Thread Alistair Francis
On Sun, Mar 26, 2023 at 12:55 AM LIU Zhiwei wrote: > > Currently we only use the env->virt to encode the virtual mode enabled > status. Let's make it a bool type. > > Signed-off-by: LIU Zhiwei Thanks! Applied to riscv-to-apply.next Alistair > --- > target/riscv/cpu.h| 2 +- > target/

Re: [PATCH 1/1] target/riscv: Convert env->virt to a bool env->virt_enabled

2023-04-04 Thread Alistair Francis
On Sun, Mar 26, 2023 at 12:55 AM LIU Zhiwei wrote: > > Currently we only use the env->virt to encode the virtual mode enabled > status. Let's make it a bool type. > > Signed-off-by: LIU Zhiwei Reviewed-by: Alistair Francis Alistair > --- > target/riscv/cpu.h| 2 +- > target/riscv/cpu

Re: [PATCH] target/riscv: Fix itrigger when icount is used

2023-04-04 Thread Alistair Francis
On Sat, Mar 25, 2023 at 2:04 AM LIU Zhiwei wrote: > > When I boot a ubuntu image, QEMU output a "Bad icount read" message and exit. > The reason is that when execute helper_mret or helper_sret, it will > cause a call to icount_get_raw_locked (), which needs set can_do_io flag > on cpustate. > > Th

Re: [PATCH] target/riscv: Fix itrigger when icount is used

2023-04-04 Thread Alistair Francis
On Sat, Mar 25, 2023 at 2:04 AM LIU Zhiwei wrote: > > When I boot a ubuntu image, QEMU output a "Bad icount read" message and exit. > The reason is that when execute helper_mret or helper_sret, it will > cause a call to icount_get_raw_locked (), which needs set can_do_io flag > on cpustate. > > Th

Re: [PATCH 1/1] hw/core/cpu: always print cpu index with cpu state

2023-04-04 Thread Alistair Francis
On Tue, Feb 7, 2023 at 9:46 AM Dongli Zhang wrote: > > The cpu_dump_state() does not print the cpu index. When the > cpu_dump_state() is invoked due to the KVM failure, we are not able to tell > from which CPU the state is. The below is an example. > > KVM internal error. Suberror: 764064 > RAX=00

Re: [PATCH v2] target/riscv: Add RVV registers to log

2023-04-04 Thread Alistair Francis
On Fri, Mar 10, 2023 at 12:01 AM Ivan Klokov wrote: > > Added QEMU option 'rvv' to add RISC-V RVV registers to log like regular regs. > > Signed-off-by: Ivan Klokov > --- > v2: >- fix option name >- fix byte ordering > --- > accel/tcg/cpu-exec.c | 3 +++ > include/hw/core/cpu.h | 2 ++

Re: [PATCH v3 1/1] hw/riscv: Add signature dump function for spike to run ACT tests

2023-04-04 Thread Alistair Francis
On Tue, Mar 7, 2023 at 1:30 PM Weiwei Li wrote: > > Add signature and signature-granularity properties in spike to specify the > target > signatrue file and the line size for signature data. > > Recgonize the signature section between begin_signature and end_signature > symbols > when loading el

Re: [PATCH v6 3/6] target/riscv: Fix target address to update badaddr

2023-04-04 Thread Alistair Francis
On Tue, Apr 4, 2023 at 12:08 PM Weiwei Li wrote: > > Compute the target address before storing it into badaddr > when mis-aligned exception is triggered. > Use a target_pc temp to store the target address to avoid > the confusing operation that udpate target address into > cpu_pc before misalign c

Re: [PATCH v6 2/6] target/riscv: Update cur_pmmask/base when xl changes

2023-04-04 Thread Alistair Francis
On Tue, Apr 4, 2023 at 12:08 PM Weiwei Li wrote: > > write_mstatus() can only change current xl when in debug mode. > And we need update cur_pmmask/base in this case. > > Signed-off-by: Weiwei Li > Signed-off-by: Junqiang Wang > Reviewed-by: LIU Zhiwei Reviewed-by: Alistair Francis Alistair

Re: [PATCH v6 1/6] target/riscv: Fix pointer mask transformation for vector address

2023-04-04 Thread Alistair Francis
On Tue, Apr 4, 2023 at 12:09 PM Weiwei Li wrote: > > actual_address = (requested_address & ~mpmmask) | mpmbase. > > Signed-off-by: Weiwei Li > Signed-off-by: Junqiang Wang > Reviewed-by: Daniel Henrique Barboza > Reviewed-by: LIU Zhiwei Acked-by: Alistair Francis Alistair > --- > target/r

Re: [PATCH] target/riscv: Fix priv version dependency for vector and zfh

2023-04-04 Thread Alistair Francis
On Tue, Mar 21, 2023 at 2:35 PM LIU Zhiwei wrote: > > Vector implicitly enables zve64d, zve64f, zve32f sub extensions. As vector > only requires PRIV_1_10_0, these sub extensions should not require priv > version > higher than that. > > The same for Zfh. > > Signed-off-by: LIU Zhiwei Thanks! A

Re: [PATCH v12 00/10] support subsets of code size reduction extension

2023-04-04 Thread Alistair Francis
On Tue, Mar 7, 2023 at 6:16 PM Weiwei Li wrote: > > This patchset implements RISC-V Zc* extension v1.0.3-1 version instructions. > > Specification: > https://github.com/riscv/riscv-code-size-reduction/tree/main/Zc-specification > > The port is available here: > https://github.com/plctlab/plct-qemu

Re: [PATCH v12 10/10] target/riscv: Add support for Zce

2023-04-04 Thread Alistair Francis
On Tue, Mar 7, 2023 at 6:16 PM Weiwei Li wrote: > > Add and expose property for Zce: > * Specifying Zce without F includes Zca, Zcb, Zcmp, Zcmt. > * Specifying Zce with F includes Zca, Zcb, Zcmp, Zcmt and Zcf. > > Signed-off-by: Weiwei Li > Signed-off-by: Junqiang Wang Reviewed-by: Alistair Fra

Re: [PATCH] target/riscv: fix invalid riscv, event-to-mhpmcounters entry

2023-04-04 Thread Alistair Francis
On Wed, Apr 5, 2023 at 3:35 AM Conor Dooley wrote: > > From: Conor Dooley > > dt-validate complains: > > soc: pmu: {'riscv,event-to-mhpmcounters': > > [[1, 1, 524281], [2, 2, 524284], [65561, 65561, 524280], > > [65563, 65563, 524280], [65569, 65569, 524280], [0, 0, 0], [0, 0]], > > pmu: riscv,ev

Re: [PATCH] target/riscv: Set opcode to env->bins for illegal/virtual instruction fault

2023-04-04 Thread Alistair Francis
On Thu, Mar 30, 2023 at 1:47 PM Weiwei Li wrote: > > decode_save_opc() will not work for generate_exception(), since 0 is passed > to riscv_raise_exception() as pc in helper_raise_exception(), and bins will > not be restored in this case. > > Signed-off-by: Weiwei Li > Signed-off-by: Junqiang Wan

Re: [PATCH] target/riscv: fix invalid riscv, event-to-mhpmcounters entry

2023-04-04 Thread Alistair Francis
On Wed, Apr 5, 2023 at 3:35 AM Conor Dooley wrote: > > From: Conor Dooley > > dt-validate complains: > > soc: pmu: {'riscv,event-to-mhpmcounters': > > [[1, 1, 524281], [2, 2, 524284], [65561, 65561, 524280], > > [65563, 65563, 524280], [65569, 65569, 524280], [0, 0, 0], [0, 0]], > > pmu: riscv,ev

Re: [PATCH 14/16] hw/i3c: remote_i3c: Add model

2023-04-04 Thread Jeremy Kerr
Hi Joe, > > 1) Is this something that qemu upstream would accept? Do we need a > > formal description of the guest-to-host interface somewhere? Or is there > > a more standard way of exposing busses like this? > > > Not sure! I'm open to ideas. > I think the most controversial portion of the remo

Re: [PATCH 00/16] i3c: aspeed: Add I3C support

2023-04-04 Thread Joel Stanley
On Wed, 5 Apr 2023 at 02:07, Jeremy Kerr wrote: > > Hi Joe, > > > > > Jeremy, how different is it ? Could we introduce properties or sub > > > > classes, to support both. > > > > > > The differences (at least from the view of the current Linux driver > > > implementation) are very minor; unless we

Re: [PATCH 00/16] i3c: aspeed: Add I3C support

2023-04-04 Thread Jeremy Kerr
Hi Joe, > > > Jeremy, how different is it ? Could we introduce properties or sub > > > classes, to support both. > > > > The differences (at least from the view of the current Linux driver > > implementation) are very minor; unless we want to be errata-compatible, > > you could use the dw driver

Re: [PATCH 14/16] hw/i3c: remote_i3c: Add model

2023-04-04 Thread Joe Komlodi
Hi Jeremy, On Sun, Apr 2, 2023 at 11:14 PM Jeremy Kerr wrote: > > Hi Joe, > > > Adds a model to communicate to remote I3C devices over chardev. This > > allows QEMU to communicate to I3C targets that exist outside of QEMU. > > Nice! > > I've been wanting something similar for a while, both for i2

Re: [PATCH 00/16] i3c: aspeed: Add I3C support

2023-04-04 Thread Joe Komlodi
Hi all, On Sun, Apr 2, 2023 at 1:11 AM Jeremy Kerr wrote: > > Hi Cédric, > > > > Isn't this the designware i3c ip block, and as such could we name > > > it so? > > > > Currently, QEMU only has a model for a dummy Aspeed I3C variant so > > this is a great addition. > > [...] > > > According to rec

Re: [PATCH] Revert "memory: Optimize replay of guest mapping"

2023-04-04 Thread Philippe Mathieu-Daudé
On 4/4/23 22:37, Michael S. Tsirkin wrote: From: Peter Maydell This reverts commit 6da24341866fa940fd7d575788a2319514941c77 ("memory: Optimize replay of guest mapping"). This change breaks the mps3-an547 board under TCG (and probably other TCG boards using an IOMMU), which now assert: $ ./bui

Re: [PATCH] tap: fix net_init_tap() return code

2023-04-04 Thread Philippe Mathieu-Daudé
On 4/4/23 18:00, Steve Sistare wrote: When net_init_tap() succeeds for a multi-queue device, it returns a non-zero ret=1 code to its caller, because of this code where ret becomes Indeed g_unix_set_fd_nonblocking() returns TRUE on success. Reviewed-by: Philippe Mathieu-Daudé 1 when g_unix_s

Re: [PATCH 00/13] block: remove aio_disable_external() API

2023-04-04 Thread Stefan Hajnoczi
On Tue, Apr 04, 2023 at 03:43:20PM +0200, Paolo Bonzini wrote: > On 4/3/23 20:29, Stefan Hajnoczi wrote: > > The aio_disable_external() API temporarily suspends file descriptor > > monitoring > > in the event loop. The block layer uses this to prevent new I/O requests > > being > > submitted from

Re: [PATCH 11/13] block/fuse: take AioContext lock around blk_exp_ref/unref()

2023-04-04 Thread Stefan Hajnoczi
On Tue, Apr 04, 2023 at 03:46:34PM +0200, Paolo Bonzini wrote: > On 4/3/23 20:30, Stefan Hajnoczi wrote: > > These functions must be called with the AioContext acquired: > > > >/* Callers must hold exp->ctx lock */ > >void blk_exp_ref(BlockExport *exp) > >... > >/* Callers must hol

Re: [PATCH v9 0/5] Add zoned storage emulation to virtio-blk driver

2023-04-04 Thread Stefan Hajnoczi
On Tue, Apr 04, 2023 at 11:46:13PM +0800, Sam Li wrote: > Stefan Hajnoczi 于2023年4月3日周一 20:18写道: > > > > On Wed, 29 Mar 2023 at 01:01, Michael S. Tsirkin wrote: > > > > > > On Mon, Mar 27, 2023 at 10:45:48PM +0800, Sam Li wrote: > > > > > > virtio bits look ok. > > > > > > Reviewed-by: Michael S.

Re: [PULL 36/53] memory: Optimize replay of guest mapping

2023-04-04 Thread Michael S. Tsirkin
On Tue, Apr 04, 2023 at 09:23:21PM +0100, Peter Maydell wrote: > On Tue, 4 Apr 2023 at 20:13, Michael S. Tsirkin wrote: > > > > On Tue, Apr 04, 2023 at 07:00:04PM +0100, Peter Maydell wrote: > > > On Thu, 2 Mar 2023 at 08:26, Michael S. Tsirkin wrote: > > > > > > > > From: Zhenzhong Duan > > > >

[PATCH] Revert "memory: Optimize replay of guest mapping"

2023-04-04 Thread Michael S. Tsirkin
From: Peter Maydell This reverts commit 6da24341866fa940fd7d575788a2319514941c77 ("memory: Optimize replay of guest mapping"). This change breaks the mps3-an547 board under TCG (and probably other TCG boards using an IOMMU), which now assert: $ ./build/x86/qemu-system-arm --machine mps3-an547 -

Re: [PULL 36/53] memory: Optimize replay of guest mapping

2023-04-04 Thread Peter Xu
On Tue, Apr 04, 2023 at 09:23:21PM +0100, Peter Maydell wrote: > On Tue, 4 Apr 2023 at 20:13, Michael S. Tsirkin wrote: > > > > On Tue, Apr 04, 2023 at 07:00:04PM +0100, Peter Maydell wrote: > > > On Thu, 2 Mar 2023 at 08:26, Michael S. Tsirkin wrote: > > > > > > > > From: Zhenzhong Duan > > > >

Re: [PULL 36/53] memory: Optimize replay of guest mapping

2023-04-04 Thread Peter Maydell
On Tue, 4 Apr 2023 at 20:13, Michael S. Tsirkin wrote: > > On Tue, Apr 04, 2023 at 07:00:04PM +0100, Peter Maydell wrote: > > On Thu, 2 Mar 2023 at 08:26, Michael S. Tsirkin wrote: > > > > > > From: Zhenzhong Duan > > > > > > On x86, there are two notifiers registered due to vtd-ir memory region

Re: [PULL 092/126] hw/display/sm501: Add fallbacks to pixman routines

2023-04-04 Thread Peter Maydell
On Tue, 4 Apr 2023 at 20:26, BALATON Zoltan wrote: > On Tue, 4 Apr 2023, Peter Maydell wrote: > > Should the iteration expression just be deleted, or should the > > statement in the loop be updating i rather than just setting it? > > In a previous version I've tried to update i from the loop but t

Re: [PULL 092/126] hw/display/sm501: Add fallbacks to pixman routines

2023-04-04 Thread BALATON Zoltan
On Tue, 4 Apr 2023, Peter Maydell wrote: On Mon, 27 Feb 2023 at 14:38, Philippe Mathieu-Daudé wrote: From: BALATON Zoltan Pixman may return false if it does not have a suitable implementation. Add fallbacks to handle such cases. Signed-off-by: BALATON Zoltan Reported-by: Rene Engel Tested

Re: [PULL 36/53] memory: Optimize replay of guest mapping

2023-04-04 Thread Michael S. Tsirkin
On Tue, Apr 04, 2023 at 07:00:04PM +0100, Peter Maydell wrote: > On Thu, 2 Mar 2023 at 08:26, Michael S. Tsirkin wrote: > > > > From: Zhenzhong Duan > > > > On x86, there are two notifiers registered due to vtd-ir memory region > > splitting the whole address space. During replay of the address s

Re: [PULL 0/4] last minute tcg fixes

2023-04-04 Thread Peter Maydell
+0100) > > are available in the Git repository at: > > https://gitlab.com/rth7680/qemu.git tags/pull-tcg-20230404 > > for you to fetch changes up to 1ffbe5d681b06ea95b1728fc556899f63834553a: > > tcg/sparc64: Disable d

Re: [PULL for 8.0 00/10] misc fixes (tests, gdbstub, metadata)

2023-04-04 Thread Peter Maydell
On Tue, 4 Apr 2023 at 15:59, Alex Bennée wrote: > > The following changes since commit 51a6dc9d394098e8f4141fad869a1ee9585f54f8: > > Merge tag 'pull-target-arm-20230403' of > https://git.linaro.org/people/pmaydell/qemu-arm into staging (2023-04-03 > 17:01:47 +0100) > > are available in the Git

Re: [PULL 0/1] NBD patches for 8.0-tc3

2023-04-04 Thread Peter Maydell
On Tue, 4 Apr 2023 at 15:43, Eric Blake wrote: > > The following changes since commit 51a6dc9d394098e8f4141fad869a1ee9585f54f8: > > Merge tag 'pull-target-arm-20230403' of > https://git.linaro.org/people/pmaydell/qemu-arm into staging (2023-04-03 > 17:01:47 +0100) > > are available in the Git

Re: [PATCH] hw/xen: Fix memory leak in libxenstore_open() for Xen

2023-04-04 Thread Peter Maydell
On Tue, 4 Apr 2023 at 19:25, David Woodhouse wrote: > > From: David Woodhouse > > There was a superfluous allocation of the XS handle, leading to it > being leaked on both the error path and the success path (where it gets > allocated again). > > Spotted by Coverity (CID 1508098). > > Fixes: ba2a

[PATCH] hw/xen: Fix memory leak in libxenstore_open() for Xen

2023-04-04 Thread David Woodhouse
From: David Woodhouse There was a superfluous allocation of the XS handle, leading to it being leaked on both the error path and the success path (where it gets allocated again). Spotted by Coverity (CID 1508098). Fixes: ba2a92db1ff6 ("hw/xen: Add xenstore operations to allow redirection to in

Re: [PULL 13/27] hw/xen: Add xenstore operations to allow redirection to internal emulation

2023-04-04 Thread David Woodhouse
On Tue, 2023-04-04 at 18:45 +0100, Peter Maydell wrote: > On Tue, 4 Apr 2023 at 18:45, David Woodhouse > wrote: > > > > On Tue, 2023-04-04 at 18:35 +0100, Peter Maydell wrote: > > > On Tue, 7 Mar 2023 at 18:27, David Woodhouse > > > > > > wrote: > > > > > > > > From: Paul Durrant > > > > > >

Re: [PULL 36/53] memory: Optimize replay of guest mapping

2023-04-04 Thread Peter Maydell
On Thu, 2 Mar 2023 at 08:26, Michael S. Tsirkin wrote: > > From: Zhenzhong Duan > > On x86, there are two notifiers registered due to vtd-ir memory region > splitting the whole address space. During replay of the address space > for each notifier, the whole address space is scanned which is > unn

Re: [PULL 13/27] hw/xen: Add xenstore operations to allow redirection to internal emulation

2023-04-04 Thread Peter Maydell
On Tue, 4 Apr 2023 at 18:45, David Woodhouse wrote: > > On Tue, 2023-04-04 at 18:35 +0100, Peter Maydell wrote: > > On Tue, 7 Mar 2023 at 18:27, David Woodhouse > > wrote: > > > > > > From: Paul Durrant > > > > > > Signed-off-by: Paul Durrant > > > Signed-off-by: David Woodhouse > > > Reviewed

Re: [PULL 13/27] hw/xen: Add xenstore operations to allow redirection to internal emulation

2023-04-04 Thread David Woodhouse
On Tue, 2023-04-04 at 18:35 +0100, Peter Maydell wrote: > On Tue, 7 Mar 2023 at 18:27, David Woodhouse > wrote: > > > > From: Paul Durrant > > > > Signed-off-by: Paul Durrant > > Signed-off-by: David Woodhouse > > Reviewed-by: Paul Durrant > > --- > > Hi; Coverity points out a memory leak i

Re: [PULL 092/126] hw/display/sm501: Add fallbacks to pixman routines

2023-04-04 Thread Peter Maydell
On Mon, 27 Feb 2023 at 14:38, Philippe Mathieu-Daudé wrote: > > From: BALATON Zoltan > > Pixman may return false if it does not have a suitable implementation. > Add fallbacks to handle such cases. > > Signed-off-by: BALATON Zoltan > Reported-by: Rene Engel > Tested-by: Rene Engel > Message-Id

Re: [PULL 13/27] hw/xen: Add xenstore operations to allow redirection to internal emulation

2023-04-04 Thread Peter Maydell
On Tue, 7 Mar 2023 at 18:27, David Woodhouse wrote: > > From: Paul Durrant > > Signed-off-by: Paul Durrant > Signed-off-by: David Woodhouse > Reviewed-by: Paul Durrant > --- Hi; Coverity points out a memory leak in this code (CID 1508098): > +static struct qemu_xs_handle *libxenstore_open(vo

[PATCH] target/riscv: fix invalid riscv,event-to-mhpmcounters entry

2023-04-04 Thread Conor Dooley
From: Conor Dooley dt-validate complains: > soc: pmu: {'riscv,event-to-mhpmcounters': > [[1, 1, 524281], [2, 2, 524284], [65561, 65561, 524280], > [65563, 65563, 524280], [65569, 65569, 524280], [0, 0, 0], [0, 0]], > pmu: riscv,event-to-mhpmcounters:6: [0, 0] is too short There are bogus 0 entri

Re: [PATCH 2/4] block: Split padded I/O vectors exceeding IOV_MAX

2023-04-04 Thread Hanna Czenczek
On 04.04.23 10:10, Vladimir Sementsov-Ogievskiy wrote: On 03.04.23 16:33, Hanna Czenczek wrote: (Sorry for the rather late reply... Thanks for the review!) On 20.03.23 11:31, Vladimir Sementsov-Ogievskiy wrote: On 17.03.23 20:50, Hanna Czenczek wrote: [...] diff --git a/block/io.c b/block/

Re: [PATCH 01/16] qga/qapi-schema: Tidy up documentation of guest-fsfreeze-status

2023-04-04 Thread Konstantin Kostiuk
Reviewed-by: Konstantin Kostiuk On Tue, Apr 4, 2023 at 2:59 PM Markus Armbruster wrote: > Delete "error state indicates", because it doesn't make sense. > I suspect it was an accident. > > Signed-off-by: Markus Armbruster > --- > qga/qapi-schema.json | 2 +- > 1 file changed, 1 insertion(+),

Re: [PATCH] aio-wait: avoid AioContext lock in aio_wait_bh_oneshot()

2023-04-04 Thread Paolo Bonzini
On 4/4/23 17:33, Stefan Hajnoczi wrote: There is no need for the AioContext lock in aio_wait_bh_oneshot(). It's easy to remove the lock from existing callers and then switch from AIO_WAIT_WHILE() to AIO_WAIT_WHILE_UNLOCKED() in aio_wait_bh_oneshot(). Document that the AioContext lock should not

[PULL for-8.0? 0/1] Bug fix for QEMU 8.0-rc4

2023-04-04 Thread Paolo Bonzini
The following changes since commit f00506aeca2f6d92318967693f8da8c713c163f3: Merge tag 'pull-tcg-20230328' of https://gitlab.com/rth7680/qemu into staging (2023-03-29 11:19:19 +0100) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you to fe

[PULL 1/1] kvm: dirty-ring: Fix race with vcpu creation

2023-04-04 Thread Paolo Bonzini
From: Peter Xu It's possible that we want to reap a dirty ring on a vcpu that is during creation, because the vcpu is put onto list (CPU_FOREACH visible) before initialization of the structures. In this case: qemu_init_vcpu x86_cpu_realizefn cpu_exec_realizefn cpu_list_a

Re: [PATCH v4 03/10] kvm: dirty-ring: Fix race with vcpu creation

2023-04-04 Thread Paolo Bonzini
On 4/4/23 18:36, Peter Xu wrote: Oh.. I just noticed that both vcpu creation and destruction will require BQL, while right now dirty ring reaping also requires BQL (taken at all callers of kvm_dirty_ring_reap()).. so I assume even the current patch will be race-free already? Oh, indeed! Queued

Re: [PATCH] stm32vldiscovery: allow overriding of RAM size

2023-04-04 Thread Lucas C. Villa Real
On Tue, Apr 4, 2023 at 3:23 AM Alexandre IOOSS wrote: > On 4/3/23 16:48, Lucas C. Villa Real wrote: > > On Mon, Apr 3, 2023 at 10:54 AM Peter Maydell > > wrote: > > > > On Mon, 3 Apr 2023 at 13:51, Lucas Villa Real > > wrote: >

Re: [PATCH v4 03/10] kvm: dirty-ring: Fix race with vcpu creation

2023-04-04 Thread Peter Xu
On Tue, Apr 04, 2023 at 06:08:41PM +0200, Paolo Bonzini wrote: > Il mar 4 apr 2023, 16:11 Peter Xu ha scritto: > > > Hi, Paolo! > > > > On Tue, Apr 04, 2023 at 03:32:38PM +0200, Paolo Bonzini wrote: > > > On 2/16/23 17:18, huang...@chinatelecom.cn wrote: > > > > diff --git a/accel/kvm/kvm-all.c b

Re: [PULL 10/19] aspeed: fby35: Add a bootrom for the BMC

2023-04-04 Thread Cédric Le Goater
On 4/4/23 17:54, Peter Maydell wrote: On Thu, 14 Jul 2022 at 16:45, Cédric Le Goater wrote: The BMC boots from the first flash device by fetching instructions from the flash contents. Add an alias region on 0x0 for this purpose. There are currently performance issues with this method (TBs bein

Re: [PATCH qemu.git v3 8/8] hw/timer/imx_epit: fix compare timer handling

2023-04-04 Thread Axel Heider
Peter, Hi; Coverity has just noticed an issue with this patch: [...] Here we declare the is_oneshot variable... [...] ...but here we declare another is_oneshot, which shadows the first declaration... ...so here when the inner variable is no longer in scope, the value of the outer is_oneshot vari

Re: [PATCH v2 05/11] qemu-options: finesse the recommendations around -blockdev

2023-04-04 Thread Kevin Wolf
Am 04.04.2023 um 17:07 hat Michael Tokarev geschrieben: > 04.04.2023 16:57, Kevin Wolf пишет: > > Let's not make the use of -drive look more advisable than it really is. > > If you're writing a management tool/script and you're still using -drive > > today, you're doing it wrong. > > Kevin, maybe

Re: [PATCH v4 03/10] kvm: dirty-ring: Fix race with vcpu creation

2023-04-04 Thread Paolo Bonzini
Il mar 4 apr 2023, 16:11 Peter Xu ha scritto: > Hi, Paolo! > > On Tue, Apr 04, 2023 at 03:32:38PM +0200, Paolo Bonzini wrote: > > On 2/16/23 17:18, huang...@chinatelecom.cn wrote: > > > diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c > > > index 9b26582655..47483cdfa0 100644 > > > --- a/ac

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

2023-04-04 Thread Peter Maydell
Git repository at: > > https://gitlab.com/gaosong/qemu.git tags/pull-loongarch-20230404 > > for you to fetch changes up to ec28dd6c6fc1366504003c25828953cac49e2da7: > > target/loongarch: Enables plugins to ge

[PATCH] tap: fix net_init_tap() return code

2023-04-04 Thread Steve Sistare
When net_init_tap() succeeds for a multi-queue device, it returns a non-zero ret=1 code to its caller, because of this code where ret becomes 1 when g_unix_set_fd_nonblocking succeeds. Luckily, the only current call site checks for negative, rather than non-zero. ret = g_unix_set_fd_nonblocki

Re: an issue for device hot-unplug

2023-04-04 Thread Yu Zhang
> this patch targets corner case of early boot where > guest hasn't initialized ACPI subsystem yet and 'broken' > management asking to unplug device too early which leads > to device stuck in being unplugged state due to regression > in QEMU. > However, It doesn't apply to fully booted guest. by a

Re: [RFC PATCH] docs/about/deprecated: Deprecate 32-bit host systems

2023-04-04 Thread BALATON Zoltan
On Tue, 4 Apr 2023, Cédric Le Goater wrote: Unrelated to KVM: Do you happen to know whether there are any problems when running 32-bit guests with TCG with the mac99 or g3beige machine while using qemu-system-ppc64 ? We removed rfi support for 64bit machine in QEMU 2.7. Commit a2e71b28e8 ("pp

Re: [RFC PATCH v1 00/26] migration: File based migration with multifd and fixed-ram

2023-04-04 Thread Peter Xu
On Tue, Apr 04, 2023 at 05:10:52PM +0200, Claudio Fontana wrote: > On 4/4/23 16:53, Peter Xu wrote: > > On Tue, Apr 04, 2023 at 10:00:16AM +0200, Claudio Fontana wrote: > >> Hi Peter, > > > > Hi, Claudio, > > > >> > >> On 4/3/23 21:26, Peter Xu wrote: > >>> Hi, Claudio, > >>> > >>> Thanks for the

Re: [PULL 10/19] aspeed: fby35: Add a bootrom for the BMC

2023-04-04 Thread Peter Maydell
On Thu, 14 Jul 2022 at 16:45, Cédric Le Goater wrote: > > The BMC boots from the first flash device by fetching instructions > from the flash contents. Add an alias region on 0x0 for this > purpose. There are currently performance issues with this method (TBs > being flushed too often), so as a fa

[PULL 1/4] Revert "linux-user/arm: Take more care allocating commpage"

2023-04-04 Thread Richard Henderson
This reverts commit 4f5c67f8df7f26e559509c68c45e652709edd23f. This exposes bugs in target_mmap et al with respect to overflow with the final page of the guest address space. To be fixed in the next development cycle. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- lin

[PULL 2/4] accel/tcg: Fix overwrite problems of tcg_cflags

2023-04-04 Thread Richard Henderson
From: Weiwei Li CPUs often set CF_PCREL in tcg_cflags before qemu_init_vcpu(), in which tcg_cflags will be overwrited by tcg_cpu_init_cflags(). Fixes: 4be790263ffc ("accel/tcg: Replace `TARGET_TB_PCREL` with `CF_PCREL`") Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed

[PULL 0/4] last minute tcg fixes

2023-04-04 Thread Richard Henderson
u.git tags/pull-tcg-20230404 for you to fetch changes up to 1ffbe5d681b06ea95b1728fc556899f63834553a: tcg/sparc64: Disable direct linking for goto_tb (2023-04-04 08:43:04 -0700) Revert "linux-user/arm: Take more care allocating

[PULL 3/4] accel/tcg: Fix jump cache set in cpu_exec_loop

2023-04-04 Thread Richard Henderson
Assign pc and use store_release to assign tb. Fixes: 2dd5b7a1b91 ("accel/tcg: Move jmp-cache `CF_PCREL` checks to caller") Reported-by: Weiwei Li Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- accel/tcg/cpu-exec.c | 17 + 1 file changed, 13 insertions(+), 4 del

[PULL 4/4] tcg/sparc64: Disable direct linking for goto_tb

2023-04-04 Thread Richard Henderson
Something is wrong with this code, and also wrong with gdb on the sparc systems to which I have access, so I cannot debug it either. Disable for now, so the release is not broken. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- tcg/sparc64/tcg-target.c.inc | 30 ---

Re: [RFC PATCH] docs/about/deprecated: Deprecate 32-bit host systems

2023-04-04 Thread BALATON Zoltan
On Tue, 4 Apr 2023, Thomas Huth wrote: On 05/02/2023 23.12, Mark Cave-Ayland wrote: On 30/01/2023 20:45, Alex Bennée wrote: Daniel P. Berrangé writes: On Mon, Jan 30, 2023 at 11:47:02AM +, Peter Maydell wrote: On Mon, 30 Jan 2023 at 11:44, Thomas Huth wrote: Testing 32-bit host OS s

Re: [PATCH v9 0/5] Add zoned storage emulation to virtio-blk driver

2023-04-04 Thread Sam Li
Stefan Hajnoczi 于2023年4月3日周一 20:18写道: > > On Wed, 29 Mar 2023 at 01:01, Michael S. Tsirkin wrote: > > > > On Mon, Mar 27, 2023 at 10:45:48PM +0800, Sam Li wrote: > > > > virtio bits look ok. > > > > Reviewed-by: Michael S. Tsirkin > > > > merge through block layer tree I'm guessing? > > Sounds g

Re: [PATCH qemu.git v3 8/8] hw/timer/imx_epit: fix compare timer handling

2023-04-04 Thread Peter Maydell
On Thu, 1 Dec 2022 at 15:42, ~axelheider wrote: > > From: Axel Heider > > - fix #1263 for CR writes > - rework compare time handling > - The compare timer has to run even if CR.OCIEN is not set, > as SR.OCIF must be updated. > - The compare timer fires exactly once when the > compare

Re: [RFC PATCH] docs/about/deprecated: Deprecate 32-bit host systems

2023-04-04 Thread BALATON Zoltan
On Tue, 4 Apr 2023, Cédric Le Goater wrote: [ adding Zoltan ] On 4/4/23 16:00, Thomas Huth wrote: On 05/02/2023 23.12, Mark Cave-Ayland wrote: On 30/01/2023 20:45, Alex Bennée wrote: Daniel P. Berrangé writes: On Mon, Jan 30, 2023 at 11:47:02AM +, Peter Maydell wrote: On Mon, 30 Jan

Re: [PATCH for-8.0] tcg/sparc64: Disable direct linking for goto_tb

2023-04-04 Thread Richard Henderson
On 4/4/23 08:32, Alex Bennée wrote: Richard Henderson writes: Something is wrong with this code, and also wrong with gdb on the sparc systems to which I have access, so I cannot debug it either. Disable for now, so the release is not broken. Why isn't this a revert then? A revert of a228a

Re: [PATCH v6 4/6] target/riscv: Add support for PC-relative translation

2023-04-04 Thread liweiwei
On 2023/4/4 23:27, Richard Henderson wrote: On 4/4/23 08:14, liweiwei wrote: On 2023/4/4 22:57, Richard Henderson wrote: On 4/4/23 07:33, liweiwei wrote: If we want to hide all of them in gen_pc_plus_diff,  then we need calculate the diff for pc_succ_insn or introduce a new API for it, sin

[PATCH v8 4/4] block: add some trace events for zone append

2023-04-04 Thread Sam Li
Signed-off-by: Sam Li Reviewed-by: Dmitry Fomichev Reviewed-by: Stefan Hajnoczi --- block/file-posix.c | 3 +++ block/trace-events | 2 ++ 2 files changed, 5 insertions(+) diff --git a/block/file-posix.c b/block/file-posix.c index a7130b1024..825301467e 100644 --- a/block/file-posix.c +++ b/bl

[PATCH v8 1/4] file-posix: add tracking of the zone write pointers

2023-04-04 Thread Sam Li
Since Linux doesn't have a user API to issue zone append operations to zoned devices from user space, the file-posix driver is modified to add zone append emulation using regular writes. To do this, the file-posix driver tracks the wp location of all zones of the device. It uses an array of uint64_

Re: [PATCH for-8.0] tcg/sparc64: Disable direct linking for goto_tb

2023-04-04 Thread Alex Bennée
Richard Henderson writes: > Something is wrong with this code, and also wrong with gdb on the > sparc systems to which I have access, so I cannot debug it either. > Disable for now, so the release is not broken. Why isn't this a revert then? > > Signed-off-by: Richard Henderson > --- > tcg/

[PATCH v8 0/4] Add zone append write for zoned device

2023-04-04 Thread Sam Li
This patch series add zone append operation based on the previous zoned device support part. The file-posix driver is modified to add zone append emulation using regular writes. v8: - address review comments [Stefan] * fix zone_mgmt covering multiple zones case * fix memory leak bug of wps in

[PATCH] aio-wait: avoid AioContext lock in aio_wait_bh_oneshot()

2023-04-04 Thread Stefan Hajnoczi
There is no need for the AioContext lock in aio_wait_bh_oneshot(). It's easy to remove the lock from existing callers and then switch from AIO_WAIT_WHILE() to AIO_WAIT_WHILE_UNLOCKED() in aio_wait_bh_oneshot(). Document that the AioContext lock should not be held across aio_wait_bh_oneshot(). Hold

[PATCH v8 2/4] block: introduce zone append write for zoned devices

2023-04-04 Thread Sam Li
A zone append command is a write operation that specifies the first logical block of a zone as the write position. When writing to a zoned block device using zone append, the byte offset of the call may point at any position within the zone to which the data is being appended. Upon completion the d

  1   2   3   >