Re: [PATCH v6 1/9] vfio/iommufd: Introduce auto domain creation

2024-07-22 Thread Cédric Le Goater
On 7/23/24 06:38, Duan, Zhenzhong wrote: -Original Message- From: Joao Martins Subject: [PATCH v6 1/9] vfio/iommufd: Introduce auto domain creation There's generally two modes of operation for IOMMUFD: 1) The simple user API which intends to perform relatively simple things with IOM

Re: [PATCH v6 5/9] vfio/iommufd: Probe and request hwpt dirty tracking capability

2024-07-22 Thread Cédric Le Goater
On 7/23/24 08:13, Joao Martins wrote: On 23/07/2024 06:11, Duan, Zhenzhong wrote: -Original Message- From: Joao Martins Subject: [PATCH v6 5/9] vfio/iommufd: Probe and request hwpt dirty tracking capability In preparation to using the dirty tracking UAPI, probe whether the IOMMU sup

Re: [PATCH] target/riscv: Add a property to set vl to ceil(AVL/2)

2024-07-22 Thread Frank Chang
Reviewed-by: Frank Chang Jason Chien 於 2024年7月23日 週二 上午1:51寫道: > > RVV spec allows implementations to set vl with values within > [ceil(AVL/2),VLMAX] when VLMAX < AVL < 2*VLMAX. This commit adds a > property "rvv_vl_half_avl" to enable setting vl = ceil(AVL/2). This > behavior helps identify com

Re: [PATCH 14/14] bsd-user: Add aarch64 build to tree

2024-07-22 Thread Philippe Mathieu-Daudé
On 23/7/24 03:17, Richard Henderson wrote: On 7/23/24 08:11, Philippe Mathieu-Daudé wrote: On 23/7/24 00:06, Warner Losh wrote: On Mon, Jul 22, 2024 at 3:54 PM Philippe Mathieu-Daudé mailto:phi...@linaro.org>> wrote:     Hi Warner,     On 22/7/24 23:43, Warner Losh wrote: > Add the a

Re: [PATCH v5 12/13] vfio/migration: Don't block migration device dirty tracking is unsupported

2024-07-22 Thread Cédric Le Goater
On 7/22/24 20:01, Joao Martins wrote: On 22/07/2024 18:04, Cédric Le Goater wrote: On 7/22/24 18:29, Joao Martins wrote: On 22/07/2024 16:58, Cédric Le Goater wrote: On 7/22/24 17:42, Joao Martins wrote: On 22/07/2024 16:13, Cédric Le Goater wrote: On 7/22/24 17:01, Joao Martins wrote: On 2

Re: [PATCH v6 4/4] docs: add test for firmware.json QAPI

2024-07-22 Thread Thomas Weißschuh
Hi Philippe, On Tue, Jul 23, 2024 at 12:15:24AM GMT, Philippe Mathieu-Daudé wrote: > Hi Thomas, > > On 19/7/24 09:37, Thomas Weißschuh wrote: > > To make sure that the QAPI description stays valid, add a testcase. > > > > Suggested-by: Philippe Mathieu-Daudé > > Link: > > https://lore.kernel.o

Re: [PATCH v4] osdep: add a qemu_close_all_open_fd() helper

2024-07-22 Thread Philippe Mathieu-Daudé
Hi Clément, On 17/7/24 14:45, Clément Léger wrote: Since commit 03e471c41d8b ("qemu_init: increase NOFILE soft limit on POSIX"), the maximum number of file descriptors that can be opened are raised to nofile.rlim_max. On recent debian distro, this yield a maximum of 1073741816 file descriptors.

Re: [RFC PATCH v5 1/8] build-sys: Add rust feature option

2024-07-22 Thread Zhao Liu
Hi Manos, On Mon, Jul 22, 2024 at 02:43:31PM +0300, Manos Pitsidianakis wrote: > Date: Mon, 22 Jul 2024 14:43:31 +0300 > From: Manos Pitsidianakis > Subject: [RFC PATCH v5 1/8] build-sys: Add rust feature option > X-Mailer: git-send-email 2.44.0 > > Add rust feature in meson.build, configure, to

Re: [PATCH v6 5/9] vfio/iommufd: Probe and request hwpt dirty tracking capability

2024-07-22 Thread Joao Martins
On 23/07/2024 06:11, Duan, Zhenzhong wrote: > > >> -Original Message- >> From: Joao Martins >> Subject: [PATCH v6 5/9] vfio/iommufd: Probe and request hwpt dirty >> tracking capability >> >> In preparation to using the dirty tracking UAPI, probe whether the IOMMU >> supports dirty tracki

Re: [PATCH v5] virtio-pci: Fix the use of an uninitialized irqfd

2024-07-22 Thread Jason Wang
On Mon, Jul 22, 2024 at 4:42 PM Cindy Lu wrote: > > > > On Mon, 22 Jul 2024 at 15:24, Jason Wang wrote: > > > > Hi Cindy > > > > On Fri, Jul 19, 2024 at 1:25 PM Cindy Lu wrote: > > > > > > The crash was reported in MAC OS and NixOS, here is the link for this bug > > > https://gitlab.com/qemu-pro

Re: [PATCH 1/1] target/riscv: Remove redundant insn length check for zama16b

2024-07-22 Thread Richard Henderson
On 7/23/24 15:29, LIU Zhiwei wrote: The more detailed information about its meaning is in priviledged 1.13 specification. More exactly, in 3.6.4. Misaligned Atomicity Granule PMA. The specification said: "The misaligned atomicity granule PMA applies only to AMOs, loads and stores defined in t

Re: [PATCH v5 4/5] target/ppc: Introduce 'PowerPCCPUClass::logical_pvr'

2024-07-22 Thread Aditya Gupta
On 23/07/24 10:43, Nicholas Piggin wrote: On Thu Jun 6, 2024 at 10:16 PM AEST, Aditya Gupta wrote: Introduce 'PnvChipClass::logical_pvr' to know corresponding logical PVR of a PowerPC CPU. This helps to have a one-to-one mapping between PVR and logical PVR for a CPU, and used in a later commit

Re: [PATCH 14/14] bsd-user: Add aarch64 build to tree

2024-07-22 Thread Richard Henderson
On 7/23/24 07:43, Warner Losh wrote: Add the aarch64 bsd-user fragments needed to build the new aarch64 code. Signed-off-by: Warner Losh --- configs/targets/aarch64-bsd-user.mak | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 configs/targets/aarch64-bsd-user.mak Reviewed-by: R

Re: [PATCH 10/14] bsd-user: Hard wire aarch64 to be 4k pages only

2024-07-22 Thread Richard Henderson
On 7/23/24 15:01, Warner Losh wrote: It's a compile issue that this won't solve: ... It's fixable, but will take a fair amount more time that I have before the deadline... Ok, fair. Reviewed-by: Richard Henderson r~

Re: [RFC 3/5] i386/kvm: Support event with select&umask format in KVM PMU filter

2024-07-22 Thread Mi, Dapeng
On 7/19/2024 4:40 PM, Zhao Liu wrote: > Hi Dapeng, > > On Thu, Jul 18, 2024 at 01:28:25PM +0800, Mi, Dapeng wrote: > > [snip] > >>> +case KVM_PMU_EVENT_FMT_X86_DEFAULT: { >>> +uint64_t select, umask; >>> + >>> +ret = qemu_strtou64(str_event->u.x86_default.select, N

Re: [PATCH 1/1] target/riscv: Remove redundant insn length check for zama16b

2024-07-22 Thread LIU Zhiwei
On 2024/7/23 10:11, Richard Henderson wrote: On 7/23/24 11:30, LIU Zhiwei wrote: Both trans_fld/fsd/flw/fsw and gen_load/store will never be a translation function for compressed instructions, thus we can remove instruction length check for them. Suggested-by: Alistair Francis Signed-off-by:

RE: [PATCH v5 06/13] vfio/{iommufd,container}: Remove caps::aw_bits

2024-07-22 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: Re: [PATCH v5 06/13] vfio/{iommufd,container}: Remove >caps::aw_bits > >On 22/07/2024 06:22, Duan, Zhenzhong wrote: >> >> >>> -Original Message- >>> From: Joao Martins >>> Subject: [PATCH v5 06/13] vfio/{iommufd,container}: Remov

Re: [PATCH v5 2/5] target/ppc: Add Power11 DD2.0 processor

2024-07-22 Thread Nicholas Piggin
On Thu Jun 6, 2024 at 10:16 PM AEST, Aditya Gupta wrote: > Add CPU target code to add support for new Power11 Processor. > > Power11 core is same as Power10, hence reuse functions defined for > Power10. > > Cc: Cédric Le Goater > Cc: Daniel Henrique Barboza > Cc: Frédéric Barrat > Cc: Harsh Prat

Re: [PATCH v5 1/5] target/ppc: reduce code duplication across Power9/10 init code

2024-07-22 Thread Nicholas Piggin
On Thu Jun 6, 2024 at 10:16 PM AEST, Aditya Gupta wrote: > From: Harsh Prateek Bora > > Power9/10 initialization code consists of a lot of logical OR of > various flag bits as supported by respective Power platform during its > initialization, most of which is duplicated and only selected bits are

Re: [PULL 0/4] hw/nvme patches

2024-07-22 Thread Richard Henderson
On 7/23/24 02:40, Klaus Jensen wrote: From: Klaus Jensen Hi, The following changes since commit a7ddb48bd1363c8bcdf42776d320289c42191f01: Merge tag 'pull-aspeed-20240721' ofhttps://github.com/legoater/qemu into staging (2024-07-22 07:52:05 +1000) are available in the Git repository at:

Re: [PATCH v5 4/5] target/ppc: Introduce 'PowerPCCPUClass::logical_pvr'

2024-07-22 Thread Nicholas Piggin
On Thu Jun 6, 2024 at 10:16 PM AEST, Aditya Gupta wrote: > Introduce 'PnvChipClass::logical_pvr' to know corresponding logical PVR > of a PowerPC CPU. > This helps to have a one-to-one mapping between PVR and logical PVR for > a CPU, and used in a later commit to handle cases where PCR of two > gen

Re: [PATCH 13/14] bsd-user: Make compile for non-linux user-mode stuff

2024-07-22 Thread Warner Losh
On Mon, Jul 22, 2024 at 4:01 PM Philippe Mathieu-Daudé wrote: > Hi Warner, > > On 22/7/24 23:43, Warner Losh wrote: > > We include the files that define PR_MTE_TCF_SHIFT only on Linux, but use > > them unconditionally. Restrict its use to Linux-only. > > We should check that in meson, i.e.: > > c

RE: [PATCH v6 3/9] vfio/iommufd: Add hw_caps field to HostIOMMUDeviceCaps

2024-07-22 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: [PATCH v6 3/9] vfio/iommufd: Add hw_caps field to >HostIOMMUDeviceCaps > >Store the value of @caps returned by iommufd_backend_get_device_info() >in a new field HostIOMMUDeviceCaps::hw_caps. Right now the only value is >whether device IOM

RE: [PATCH v6 5/9] vfio/iommufd: Probe and request hwpt dirty tracking capability

2024-07-22 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: [PATCH v6 5/9] vfio/iommufd: Probe and request hwpt dirty >tracking capability > >In preparation to using the dirty tracking UAPI, probe whether the IOMMU >supports dirty tracking. This is done via the data stored in >hiod::caps::hw_caps

Re: [PATCH 14/14] bsd-user: Add aarch64 build to tree

2024-07-22 Thread Warner Losh
Oh, also, can I get a reviewed-by? Warner On Mon, Jul 22, 2024 at 11:08 PM Warner Losh wrote: > > > On Mon, Jul 22, 2024 at 7:17 PM Richard Henderson < > richard.hender...@linaro.org> wrote: > >> On 7/23/24 08:11, Philippe Mathieu-Daudé wrote: >> > On 23/7/24 00:06, Warner Losh wrote: >> >> >>

Re: [PATCH v5 5/5] target/ppc: Fix regression due to Power10 and Power11 having same PCR

2024-07-22 Thread Aditya Gupta
On 23/07/24 10:28, Nicholas Piggin wrote: On Thu Jun 6, 2024 at 10:16 PM AEST, Aditya Gupta wrote: Power11 has the same PCR (Processor Compatibility Register) value, as Power10. Due to this, QEMU considers Power11 as a valid compat-mode for Power10, ie. earlier it was possible to run QEMU wit

Re: [PATCH 14/14] bsd-user: Add aarch64 build to tree

2024-07-22 Thread Warner Losh
On Mon, Jul 22, 2024 at 7:17 PM Richard Henderson < richard.hender...@linaro.org> wrote: > On 7/23/24 08:11, Philippe Mathieu-Daudé wrote: > > On 23/7/24 00:06, Warner Losh wrote: > >> > >> > >> On Mon, Jul 22, 2024 at 3:54 PM Philippe Mathieu-Daudé < > phi...@linaro.org > >>

RE: [PATCH v6 9/9] vfio/common: Allow disabling device dirty page tracking

2024-07-22 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: [PATCH v6 9/9] vfio/common: Allow disabling device dirty page >tracking > >The property 'x-pre-copy-dirty-page-tracking' allows disabling the whole >tracking of VF pre-copy phase of dirty page tracking, though it means >that it will only

Re: [PATCH 0/2] Postcopy migration and vhost-user errors

2024-07-22 Thread Prasad Pandit
On Sun, 21 Jul 2024 at 01:11, Michael S. Tsirkin wrote: > > > > On Wed, Jul 17, 2024 at 04:55:52AM -0400, Michael S. Tsirkin wrote: > > > > > I just want to understand how we managed to have two threads > > > > > talking in parallel. BQL is normally enough, which path > > > > > manages to invoke v

Re: [PATCH v5 1/5] target/ppc: reduce code duplication across Power9/10 init code

2024-07-22 Thread Aditya Gupta
On 23/07/24 09:51, Nicholas Piggin wrote: On Thu Jun 6, 2024 at 10:16 PM AEST, Aditya Gupta wrote: From: Harsh Prateek Bora Power9/10 initialization code consists of a lot of logical OR of various flag bits as supported by respective Power platform during its initialization, most of which is

Re: [PATCH v5 2/5] target/ppc: Add Power11 DD2.0 processor

2024-07-22 Thread Aditya Gupta
Hi Nick, On 23/07/24 10:00, Nicholas Piggin wrote: <...snip...> +{ /* POWER11, ISA3.10 */ +.name = "power11", +.pvr = CPU_POWERPC_LOGICAL_3_10_PLUS, Might call that _P11 rather than _PLUS, but I can fold that in my tree. Sure, makes sense, I can make these changes, and se

Re: [PATCH 10/14] bsd-user: Hard wire aarch64 to be 4k pages only

2024-07-22 Thread Warner Losh
On Mon, Jul 22, 2024 at 7:10 PM Richard Henderson < richard.hender...@linaro.org> wrote: > On 7/23/24 07:43, Warner Losh wrote: > > Only support 4k pages for aarch64 binaries. The variable page size stuff > > isn't working just yet, so put in this lessor-of-evils kludge until that > > is complete.

Re: [PATCH v5 5/5] target/ppc: Fix regression due to Power10 and Power11 having same PCR

2024-07-22 Thread Nicholas Piggin
On Thu Jun 6, 2024 at 10:16 PM AEST, Aditya Gupta wrote: > Power11 has the same PCR (Processor Compatibility Register) value, as > Power10. > > Due to this, QEMU considers Power11 as a valid compat-mode for Power10, > ie. earlier it was possible to run QEMU with '-M > pseries,max-compat-mode=power

Re: [PATCH 1/2] vhost-user: add a write-read lock

2024-07-22 Thread Prasad Pandit
On Sun, 21 Jul 2024 at 01:11, Michael S. Tsirkin wrote: > So it's not a rw lock. It's just a mutex. > Lock should be named after what they protect, not > after where they are held. > In this case, this ensures only 1 request is > outstanding at a time. > So vhost_user_request_reply_lock Okay, wil

RE: [PATCH v6 8/9] vfio/migration: Don't block migration device dirty tracking is unsupported

2024-07-22 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: [PATCH v6 8/9] vfio/migration: Don't block migration device dirty >tracking is unsupported > >By default VFIO migration is set to auto, which will support live >migration if the migration capability is set *and* also dirty page >tracking

RE: [PATCH v6 1/9] vfio/iommufd: Introduce auto domain creation

2024-07-22 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: [PATCH v6 1/9] vfio/iommufd: Introduce auto domain creation > >There's generally two modes of operation for IOMMUFD: > >1) The simple user API which intends to perform relatively simple things >with IOMMUs e.g. DPDK. The process generall

Re: [PATCH] ppc/pnv: Update Power10's cfam id to use Power10 DD2

2024-07-22 Thread Aditya Gupta
Hi Nick, On 23/07/24 09:48, Nicholas Piggin wrote: On Mon Jul 22, 2024 at 7:17 PM AEST, Aditya Gupta wrote: Hello, Any comments on this change ? Though this isn't urgent and won't change behaviour much, mainly other than skiboot recognising the chip as P10 DD2. Hey Aditya, Yeah I missed th

RE: [PATCH v5 05/13] vfio/iommufd: Introduce auto domain creation

2024-07-22 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: Re: [PATCH v5 05/13] vfio/iommufd: Introduce auto domain >creation > >On 22/07/2024 06:16, Duan, Zhenzhong wrote: >>> -Original Message- >>> From: Joao Martins >>> Subject: [PATCH v5 05/13] vfio/iommufd: Introduce auto domain >cr

Re: [PATCH v5 3/5] ppc/pseries: Add Power11 cpu type

2024-07-22 Thread Nicholas Piggin
On Thu Jun 6, 2024 at 10:16 PM AEST, Aditya Gupta wrote: > Add sPAPR CPU Core definition for Power11 > > Cc: David Gibson (reviewer:sPAPR (pseries)) > Cc: Harsh Prateek Bora (reviewer:sPAPR (pseries)) > Cc: Cédric Le Goater > Cc: Daniel Henrique Barboza > Cc: Frédéric Barrat > Cc: Harsh Pratee

Re: [PATCH v5 2/5] target/ppc: Add Power11 DD2.0 processor

2024-07-22 Thread Nicholas Piggin
On Thu Jun 6, 2024 at 10:16 PM AEST, Aditya Gupta wrote: > Add CPU target code to add support for new Power11 Processor. > > Power11 core is same as Power10, hence reuse functions defined for > Power10. > > Cc: Cédric Le Goater > Cc: Daniel Henrique Barboza > Cc: Frédéric Barrat > Cc: Harsh Prat

Re: [PATCH v5 1/5] target/ppc: reduce code duplication across Power9/10 init code

2024-07-22 Thread Nicholas Piggin
On Thu Jun 6, 2024 at 10:16 PM AEST, Aditya Gupta wrote: > From: Harsh Prateek Bora > > Power9/10 initialization code consists of a lot of logical OR of > various flag bits as supported by respective Power platform during its > initialization, most of which is duplicated and only selected bits are

Re: [PATCH] ppc/pnv: Update Power10's cfam id to use Power10 DD2

2024-07-22 Thread Nicholas Piggin
On Mon Jul 22, 2024 at 7:17 PM AEST, Aditya Gupta wrote: > Hello, > > Any comments on this change ? > > Though this isn't urgent and won't change behaviour much, mainly other > than skiboot recognising the chip as P10 DD2. Hey Aditya, Yeah I missed this in my last PR but I have it in my tree. T

Re: [PULL v2 00/16] Final bits for 9.1-rc0 (docker, plugins, gdbstub, semihosting)

2024-07-22 Thread Richard Henderson
On 7/23/24 09:04, Alex Bennée wrote: The following changes since commit a7ddb48bd1363c8bcdf42776d320289c42191f01: Merge tag 'pull-aspeed-20240721' ofhttps://github.com/legoater/qemu into staging (2024-07-22 07:52:05 +1000) are available in the Git repository at: https://gitlab.com/stsqu

Re: [PATCH 1/1] target/riscv: Remove redundant insn length check for zama16b

2024-07-22 Thread Alistair Francis
On Tue, Jul 23, 2024 at 12:13 PM Richard Henderson wrote: > > On 7/23/24 11:30, LIU Zhiwei wrote: > > Both trans_fld/fsd/flw/fsw and gen_load/store will never be a > > translation function for compressed instructions, thus we can > > remove instruction length check for them. > > > > Suggested-by:

[PATCH 03/12] target/arm: Use set/clear_helper_retaddr in SVE and SME helpers

2024-07-22 Thread Richard Henderson
Avoid a race condition with munmap in another thread. Use around blocks that exclusively use "host_fn". Keep the blocks as small as possible, but without setting and clearing for every operation on one page. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/tcg/sme_help

[PATCH 04/12] target/ppc/mem_helper.c: Remove a conditional from dcbz_common()

2024-07-22 Thread Richard Henderson
From: BALATON Zoltan Instead of passing a bool and select a value within dcbz_common() let the callers pass in the right value to avoid this conditional statement. On PPC dcbz is often used to zero memory and some code uses it a lot. This change improves the run time of a test case that copies me

[PATCH 11/12] target/s390x: Use set/clear_helper_retaddr in mem_helper.c

2024-07-22 Thread Richard Henderson
Avoid a race condition with munmap in another thread. For access_memset and access_memmove, manage the value within the helper. For uses of access_{get,set}_byte, manage the value across the for loops. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/s390x/tcg/mem_helper.

[PATCH 06/12] target/ppc: Split out helper_dbczl for 970

2024-07-22 Thread Richard Henderson
We can determine at translation time whether the insn is or is not dbczl. We must retain a runtime check against the HID5 register, but we can move that to a separate function that never affects other ppc models. Reviewed-by: Nicholas Piggin Reviewed-by: BALATON Zoltan Signed-off-by: Richard He

[PATCH 12/12] target/riscv: Simplify probing in vext_ldff

2024-07-22 Thread Richard Henderson
The current pairing of tlb_vaddr_to_host with extra is either inefficient (user-only, with page_check_range) or incorrect (system, with probe_pages). For proper non-fault behaviour, use probe_access_flags with its nonfault parameter set to true. Reviewed-by: Max Chou Acked-by: Alistair Francis

[PATCH 02/12] target/arm: Use set/clear_helper_retaddr in helper-a64.c

2024-07-22 Thread Richard Henderson
Use these in helper_dc_dva and the FEAT_MOPS routines to avoid a race condition with munmap in another thread. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/tcg/helper-a64.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/target/a

[PATCH 08/12] target/ppc: Improve helper_dcbz for user-only

2024-07-22 Thread Richard Henderson
Mark the reserve_addr check unlikely. Use tlb_vaddr_to_host instead of probe_write, relying on the memset itself to test for page writability. Use set/clear_helper_retaddr so that we can properly unwind on segfault. With this, a trivial loop around guest memset will no longer spend nearly 25% of

[PATCH 10/12] target/s390x: Use user_or_likely in access_memmove

2024-07-22 Thread Richard Henderson
Invert the conditional, indent the block, and use the macro that expands to true for user-only. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/s390x/tcg/mem_helper.c | 54 +-- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a

[PATCH 05/12] target/ppc: Hoist dcbz_size out of dcbz_common

2024-07-22 Thread Richard Henderson
The 970 logic does not apply to dcbzep, which is an e500 insn. Reviewed-by: Nicholas Piggin Reviewed-by: BALATON Zoltan Signed-off-by: Richard Henderson --- target/ppc/mem_helper.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/target/ppc/m

[PATCH 01/12] accel/tcg: Move {set, clear}_helper_retaddr to cpu_ldst.h

2024-07-22 Thread Richard Henderson
Use of these in helpers goes hand-in-hand with tlb_vaddr_to_host and other probing functions. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- accel/tcg/user-retaddr.h | 28 include/exec/cpu_ldst.h | 34 ++ accel/tcg/c

[PATCH 00/12] tcg patch queue

2024-07-22 Thread Richard Henderson
The following changes since commit a7ddb48bd1363c8bcdf42776d320289c42191f01: Merge tag 'pull-aspeed-20240721' of https://github.com/legoater/qemu into staging (2024-07-22 07:52:05 +1000) are available in the Git repository at: https://gitlab.com/rth7680/qemu.git tags/pull-tcg-20240723 for

[PATCH 09/12] target/s390x: Use user_or_likely in do_access_memset

2024-07-22 Thread Richard Henderson
Eliminate the ifdef by using a predicate that is always true with CONFIG_USER_ONLY. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/s390x/tcg/mem_helper.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/target/s390x/tcg/mem_helper.c b/target/s390x

[PATCH 07/12] target/ppc: Merge helper_{dcbz,dcbzep}

2024-07-22 Thread Richard Henderson
Merge the two and pass the mmu_idx directly from translation. Swap the argument order in dcbz_common to avoid extra swaps. Reviewed-by: Nicholas Piggin Signed-off-by: Richard Henderson --- target/ppc/helper.h | 3 +-- target/ppc/mem_helper.c | 14 -- target/ppc/translate.c |

RE: [PATCH v5 09/13] vfio/iommufd: Probe and request hwpt dirty tracking capability

2024-07-22 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: Re: [PATCH v5 09/13] vfio/iommufd: Probe and request hwpt dirty >tracking capability > >On 22/07/2024 15:09, Joao Martins wrote: >> On 22/07/2024 09:58, Joao Martins wrote: >>> On 22/07/2024 07:05, Duan, Zhenzhong wrote: > -

Re: [PATCH] intel-iommu: fix Read DMAR IQA REG DW

2024-07-22 Thread Yee Li
> or devmem2 read the reg: > > "devmem2 0xfed90090" > "/dev/mem opened." > "Memory mapped at address 0x7f983014f000." > "Value at address 0xFED90090 (0x7f983014f000): 0x0" Sorry, correct the devmem2 read value. "Value at address 0xFED90090 (0x7f983014f000): 0x1DA801"

RE: [PATCH 2/2] vfio/ccw: Don't initialize HOST_IOMMU_DEVICE with mdev

2024-07-22 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Farman >Subject: Re: [PATCH 2/2] vfio/ccw: Don't initialize HOST_IOMMU_DEVICE >with mdev > >On Mon, 2024-07-22 at 17:36 +0200, Cédric Le Goater wrote: >> On 7/22/24 17:09, Joao Martins wrote: >> > On 22/07/2024 15:57, Eric Farman wrote: >> > > On Mon, 2024

Re: [PATCH] intel-iommu: fix Read DMAR IQA REG DW

2024-07-22 Thread Yee Li
> > When dmar_readq or devmem2 read the DW of IQA always 0UL because > > "& VTD_IQA_QS". So, try to fix it. > > > > case: > > after vtd_mem_write > > IQA val: 0x100206801 > > > > after vtd_mem_read > > IQA val: 0x100206001 > > > > Signed-off-by: yeeli > > > how was this tested? If VT-D hardware s

RE: [PATCH v5 05/13] vfio/iommufd: Introduce auto domain creation

2024-07-22 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Subject: Re: [PATCH v5 05/13] vfio/iommufd: Introduce auto domain >creation > >On 7/22/24 10:50, Joao Martins wrote: >> On 22/07/2024 06:16, Duan, Zhenzhong wrote: -Original Message- From: Joao Martins Subject: [PATCH v

Re: [PULL 00/12] QTests, Avocado and s390x fixes for 9.1 softfreeze

2024-07-22 Thread Richard Henderson
On 7/22/24 22:00, Thomas Huth wrote: Hi Richard! The following changes since commit a7ddb48bd1363c8bcdf42776d320289c42191f01: Merge tag 'pull-aspeed-20240721' ofhttps://github.com/legoater/qemu into staging (2024-07-22 07:52:05 +1000) are available in the Git repository at: https://g

Re: [PATCH 1/1] target/riscv: Remove redundant insn length check for zama16b

2024-07-22 Thread Richard Henderson
On 7/23/24 11:30, LIU Zhiwei wrote: Both trans_fld/fsd/flw/fsw and gen_load/store will never be a translation function for compressed instructions, thus we can remove instruction length check for them. Suggested-by: Alistair Francis Signed-off-by: LIU Zhiwei That is both false (trans_fld is

[PATCH 1/1] target/riscv: Remove redundant insn length check for zama16b

2024-07-22 Thread LIU Zhiwei
Both trans_fld/fsd/flw/fsw and gen_load/store will never be a translation function for compressed instructions, thus we can remove instruction length check for them. Suggested-by: Alistair Francis Signed-off-by: LIU Zhiwei --- target/riscv/insn_trans/trans_rvd.c.inc | 4 ++-- target/riscv/insn_

Re: [PATCH 14/14] bsd-user: Add aarch64 build to tree

2024-07-22 Thread Richard Henderson
On 7/23/24 08:11, Philippe Mathieu-Daudé wrote: On 23/7/24 00:06, Warner Losh wrote: On Mon, Jul 22, 2024 at 3:54 PM Philippe Mathieu-Daudé > wrote:     Hi Warner,     On 22/7/24 23:43, Warner Losh wrote: > Add the aarch64 bsd-user fragments needed to build th

Re: [PULL 05/30] target/riscv: Support Zama16b extension

2024-07-22 Thread LIU Zhiwei
On 2024/7/23 7:32, Alistair Francis wrote: On Thu, Jul 18, 2024 at 12:10 PM Alistair Francis wrote: From: LIU Zhiwei Zama16b is the property that misaligned load/stores/atomics within a naturally aligned 16-byte region are atomic. According to the specification, Zama16b applies only to AMO

Re: [PATCH 13/14] bsd-user: Make compile for non-linux user-mode stuff

2024-07-22 Thread Richard Henderson
On 7/23/24 07:43, Warner Losh wrote: We include the files that define PR_MTE_TCF_SHIFT only on Linux, but use them unconditionally. Restrict its use to Linux-only. Signed-off-by: Warner Losh --- target/arm/gdbstub64.c | 4 1 file changed, 4 insertions(+) Reviewed-by: Richard Henderson

Re: [PATCH 12/14] bsd-user: Define TARGET_SIGSTACK_ALIGN and use it to round stack

2024-07-22 Thread Richard Henderson
On 7/23/24 07:43, Warner Losh wrote: Most (all?) targets require stacks to be properly aligned. Rather than a series of ifdefs in bsd-user/signal.h, instead use a manditory #define for all architectures. Signed-off-by: Warner Losh --- bsd-user/aarch64/target_arch_signal.h | 2 ++ bsd-user/arm

Re: [PATCH 11/14] bsd-user: Sync fork_start/fork_end with linux-user

2024-07-22 Thread Richard Henderson
On 7/23/24 07:43, Warner Losh wrote: -/* - * Child processes created by fork() only have a single thread. Discard - * information about the parent threads. - */ +/* Child processes created by fork() only have a single thread. + Discard informati

Re: [PATCH 10/14] bsd-user: Hard wire aarch64 to be 4k pages only

2024-07-22 Thread Richard Henderson
On 7/23/24 07:43, Warner Losh wrote: Only support 4k pages for aarch64 binaries. The variable page size stuff isn't working just yet, so put in this lessor-of-evils kludge until that is complete. Hmm. In what way is it not working? What if we limit this to bsd-user/main.c instead? set_pref

[PATCH v4 5/7] Convert 'info mem' to use generic iterator

2024-07-22 Thread Don Porter
In the case of nested paging, change the output slightly to show both the guest's and host's view. For example: (qemu) info mem Info guest mem (guest virtual to guest physical mappings): 00800080-00800085c000 0005c000 ur- 008000a0-008000a1 0001 ur-

[PATCH v4 6/7] Convert x86_cpu_get_memory_mapping() to use generic iterators

2024-07-22 Thread Don Porter
Signed-off-by: Don Porter --- target/i386/arch_memory_mapping.c | 305 ++ 1 file changed, 19 insertions(+), 286 deletions(-) diff --git a/target/i386/arch_memory_mapping.c b/target/i386/arch_memory_mapping.c index ef29e4b42f..bb97443f0f 100644 --- a/target/i386/arch_

[PATCH v4 2/7] Import vmcs12 definition from Linux/KVM

2024-07-22 Thread Don Porter
Signed-off-by: Don Porter --- target/i386/kvm/vmcs12.h | 213 +++ 1 file changed, 213 insertions(+) create mode 100644 target/i386/kvm/vmcs12.h diff --git a/target/i386/kvm/vmcs12.h b/target/i386/kvm/vmcs12.h new file mode 100644 index 00..c7b139f4db

[PATCH v4 4/7] Convert 'info tlb' to use generic iterator.

2024-07-22 Thread Don Porter
If the the guest is using nested page tables, change the output format slightly, to first show guest virtual to guest physical, then guest physical to host physical, as below: (qemu) info tlb Info guest TLB (guest virtual to guest physical): 00800080: 0076a000 ---U-P 00800

[PATCH v4 3/7] Add an "info pg" command that prints the current page tables

2024-07-22 Thread Don Porter
The new "info pg" monitor command prints the current page table, including virtual address ranges, flag bits, and snippets of physical page numbers. Completely filled regions of the page table with compatible flags are "folded", with the result that the complete output for a freshly booted x86-64

[PATCH v4 7/7] Convert x86_mmu_translate() to use common code.

2024-07-22 Thread Don Porter
Signed-off-by: Don Porter --- target/i386/tcg/helper-tcg.h | 2 +- target/i386/tcg/sysemu/excp_helper.c | 417 ++- 2 files changed, 30 insertions(+), 389 deletions(-) diff --git a/target/i386/tcg/helper-tcg.h b/target/i386/tcg/helper-tcg.h index 1cbeab9161..8f63

[PATCH v4 1/7] Code motion: expose some TCG definitions for page table walk consolidation.

2024-07-22 Thread Don Porter
Signed-off-by: Don Porter --- include/hw/core/sysemu-cpu-ops.h | 6 + target/i386/cpu.h| 5 ++-- target/i386/helper.c | 36 +++ target/i386/tcg/helper-tcg.h | 32 target/i386/tcg/seg_helper.c

[PATCH v4 0/7] Rework x86 page table walks

2024-07-22 Thread Don Porter
This version of the 'info pg' command adopts Peter Maydell's request to write guest-agnostic page table iterator and accessor code, along with architecture-specific hooks. The first patch in this series contributes a generic page table iterator and an x86 instantiation. As a client, we first intro

Re: [PATCH 09/14] bsd-user: Simplify the implementation of execve

2024-07-22 Thread Richard Henderson
On 7/23/24 07:43, Warner Losh wrote: From: Doug Rabson This removes the logic which prepends the emulator to each call to execve and fexecve. This is not necessary with the existing imgact_binmisc support and it avoids the need to install the emulator binary into jail environments when using 'bi

Re: [PULL 26/30] target/riscv: Do not setup pmu timer if OF is disabled

2024-07-22 Thread Richard Henderson
On 7/23/24 10:43, Alistair Francis wrote: #define get_field(reg, mask) (((reg) & \ (uint64_t)(mask)) / ((mask) & ~((mask) << 1))) Notice that part of this expression is "(mask) << 1". So Coverity complains that we took a constant value and shifted it right off the top. I think

Re: [PULL 00/63] virtio,pci,pc: features,fixes

2024-07-22 Thread Richard Henderson
On 7/23/24 10:20, Michael S. Tsirkin wrote: Fails ubsan testing: https://gitlab.com/qemu-project/qemu/-/jobs/7397450714 ../publish/hw/net/virtio-net.c:3895:18: runtime error: member access within null pointer of type 'struct vhost_net' r~ Thanks! this is just make check under ubsan build, r

Re: [PULL 26/30] target/riscv: Do not setup pmu timer if OF is disabled

2024-07-22 Thread Alistair Francis
On Tue, Jul 23, 2024 at 9:33 AM Atish Kumar Patra wrote: > > On Sat, Jul 20, 2024 at 8:19 AM Peter Maydell > wrote: > > > > On Thu, 18 Jul 2024 at 03:15, Alistair Francis wrote: > > > > > > From: Atish Patra > > > > > > The timer is setup function is invoked in both hpmcounter > > > write and

Re: [PATCH 0/3] Resolve vt82c686 and piix4 qemu_irq memory leaks

2024-07-22 Thread Michael S. Tsirkin
On Mon, Jul 22, 2024 at 10:21:30PM +, Bernhard Beschow wrote: > > > Am 20. Juli 2024 18:38:42 UTC schrieb "Michael S. Tsirkin" : > >On Thu, Jul 04, 2024 at 10:58:51PM +0200, Bernhard Beschow wrote: > >> This series first turns vt82c686's "INTR" pin into a named GPIO for better > >> comprehens

Re: [PULL 00/63] virtio,pci,pc: features,fixes

2024-07-22 Thread Michael S. Tsirkin
On Tue, Jul 23, 2024 at 07:32:56AM +1000, Richard Henderson wrote: > On 7/22/24 10:16, Michael S. Tsirkin wrote: > > A couple of fixes are outstanding, will merge later. > > > > > > The following changes since commit a87a7c449e532130d4fa8faa391ff7e1f04ed660: > > > >Merge tag 'pull-loongarch-

Re: [PULL 29/63] hw/pci: Do not add ROM BAR for SR-IOV VF

2024-07-22 Thread Michael S. Tsirkin
On Mon, Jul 22, 2024 at 11:21:13PM +0900, Akihiko Odaki wrote: > On 2024/07/22 9:17, Michael S. Tsirkin wrote: > > From: Akihiko Odaki > > > > A SR-IOV VF cannot have a ROM BAR. > > > > Co-developed-by: Yui Washizu > > Signed-off-by: Akihiko Odaki > > Message-Id: <20240715-sriov-v5-1-3f5539093

Re: [PULL 26/30] target/riscv: Do not setup pmu timer if OF is disabled

2024-07-22 Thread Atish Kumar Patra
On Sat, Jul 20, 2024 at 8:19 AM Peter Maydell wrote: > > On Thu, 18 Jul 2024 at 03:15, Alistair Francis wrote: > > > > From: Atish Patra > > > > The timer is setup function is invoked in both hpmcounter > > write and mcountinhibit write path. If the OF bit set, the > > LCOFI interrupt is disable

Re: [PULL 05/30] target/riscv: Support Zama16b extension

2024-07-22 Thread Alistair Francis
On Thu, Jul 18, 2024 at 12:10 PM Alistair Francis wrote: > > From: LIU Zhiwei > > Zama16b is the property that misaligned load/stores/atomics within > a naturally aligned 16-byte region are atomic. > > According to the specification, Zama16b applies only to AMOs, loads > and stores defined in the

Re: [PATCH] plugins: fix race condition with scoreboards

2024-07-22 Thread Pierrick Bouvier
@Alex: If possible, this patch should be included for the release to come. On 7/22/24 16:23, Pierrick Bouvier wrote: A deadlock can be created if a new vcpu (a) triggers a scoreboard reallocation, and another vcpu (b) wants to create a new scoreboard at the same time. In this case, (a) holds th

Re: [PULL 21/30] target/riscv: Implement privilege mode filtering for cycle/instret

2024-07-22 Thread Atish Kumar Patra
On Sat, Jul 20, 2024 at 7:44 AM Peter Maydell wrote: > > On Thu, 18 Jul 2024 at 03:12, Alistair Francis wrote: > > > > From: Atish Patra > > > > Privilege mode filtering can also be emulated for cycle/instret by > > tracking host_ticks/icount during each privilege mode switch. This > > patch imp

Re: [PATCH 2/2] linux-user/main: Check errno when getting AT_EXECFD

2024-07-22 Thread Richard Henderson
On 7/21/24 19:08, Vivian Wang wrote: It's possible for AT_EXECFD to end up with a valid value of 0. Check errno when using qemu_getauxval instead of return value to handle this case. Not handling this case leads to a confusing condition where the executable ends up as fd 0, i.e. stdin. Signed-o

Re: [PATCH 1/2] util/getauxval: Ensure setting errno if not found

2024-07-22 Thread Richard Henderson
On 7/21/24 19:08, Vivian Wang wrote: Sometimes zero is a valid value for getauxval (e.g. AT_EXECFD). Make sure that we can distinguish between a valid zero value and a not found entry by setting errno. Ignore getauxval from sys/auxv.h on glibc < 2.19 because it does not set errno. Signed-off-by

[PATCH] plugins: fix race condition with scoreboards

2024-07-22 Thread Pierrick Bouvier
A deadlock can be created if a new vcpu (a) triggers a scoreboard reallocation, and another vcpu (b) wants to create a new scoreboard at the same time. In this case, (a) holds the plugin lock, and starts an exclusive section, waiting for (b). But at the same time, (b) is waiting for plugin lock.

Re: [PATCH 13/14] bsd-user: Make compile for non-linux user-mode stuff

2024-07-22 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > Hi Warner, > > On 22/7/24 23:43, Warner Losh wrote: >> We include the files that define PR_MTE_TCF_SHIFT only on Linux, but use >> them unconditionally. Restrict its use to Linux-only. > > We should check that in meson, i.e.: > > config_host_data.set('CONFIG_PRCTL

[PULL v2 00/16] Final bits for 9.1-rc0 (docker, plugins, gdbstub, semihosting)

2024-07-22 Thread Alex Bennée
The following changes since commit a7ddb48bd1363c8bcdf42776d320289c42191f01: Merge tag 'pull-aspeed-20240721' of https://github.com/legoater/qemu into staging (2024-07-22 07:52:05 +1000) are available in the Git repository at: https://gitlab.com/stsquad/qemu.git tags/pull-maintainer-9.1-rc0

Re: [RFC PATCH v2 0/9] migration/multifd: Remove multifd_send_state->pages

2024-07-22 Thread Peter Xu
On Mon, Jul 22, 2024 at 06:20:28PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Mon, Jul 22, 2024 at 05:21:48PM -0300, Fabiano Rosas wrote: > >> Peter Xu writes: > >> > >> > On Mon, Jul 22, 2024 at 02:59:05PM -0300, Fabiano Rosas wrote: > >> >> Hi, > >> >> > >> >> In this v2 I took

Re: [PULL 00/16] Final bits for 9.1-rc0 (docker, plugins, gdbstub, semihosting)

2024-07-22 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > On 22/7/24 23:07, Philippe Mathieu-Daudé wrote: >> Hi Alex, >> On 22/7/24 13:03, Alex Bennée wrote: >>> warn: No match for commit c135d5eaafe7aa2533da663d8e5a34a424b71eb9 >>> found at https://gitlab.com/stsquad/qemu.git >>> warn: Are you sure you pushed >>> 'pull-

Re: [PULL 00/25] Misc QEMU-GA patches 2024-07-22

2024-07-22 Thread Richard Henderson
On 7/22/24 17:00, Konstantin Kostiuk wrote: The following changes since commit 23fa74974d8c96bc95cbecc0d4e2d90f984939f6: Merge tag 'pull-target-arm-20240718' ofhttps://git.linaro.org/people/pmaydell/qemu-arm into staging (2024-07-19 07:02:17 +1000) are available in the Git repository at:

Re: [PATCH v2 6/7] util/fifo8: Expose fifo8_pop_buf()

2024-07-22 Thread Mark Cave-Ayland
On 22/07/2024 22:39, Philippe Mathieu-Daudé wrote: Hi Mark, On 22/7/24 23:26, Mark Cave-Ayland wrote: On 22/07/2024 17:07, Philippe Mathieu-Daudé wrote: Extract fifo8_pop_buf() from hw/scsi/esp.c and expose it as part of the API. This function takes care of non-contiguous (wrapped) FIFO buf

Re: [PATCH 0/3] Resolve vt82c686 and piix4 qemu_irq memory leaks

2024-07-22 Thread Bernhard Beschow
Am 20. Juli 2024 18:38:42 UTC schrieb "Michael S. Tsirkin" : >On Thu, Jul 04, 2024 at 10:58:51PM +0200, Bernhard Beschow wrote: >> This series first turns vt82c686's "INTR" pin into a named GPIO for better >> comprehensibility. It then continues fixing qemu_irq memory leaks in vt82c686 >> and pi

  1   2   3   4   5   >