Re: [PATCH v2 11/16] ppc/pnv: add pnv-phb-root-port device

2022-06-03 Thread Daniel Henrique Barboza
On 6/2/22 05:12, Mark Cave-Ayland wrote: On 31/05/2022 22:49, Daniel Henrique Barboza wrote: We have two very similar root-port devices, pnv-phb3-root-port and pnv-phb4-root-port. Both consist of a wrapper around the PCIESlot device that, until now, has no additional attributes. The main di

Re: [PATCH] hw/nvme: clear aen mask on reset

2022-06-03 Thread Keith Busch
On Thu, May 12, 2022 at 11:30:55AM +0200, Klaus Jensen wrote: > From: Klaus Jensen > > The internally maintained AEN mask is not cleared on reset. Fix this. Looks good. Reviewed-by: Keith Busch

Re: [PATCH v2 08/16] ppc/pnv: user created pnv-phb for powernv9

2022-06-03 Thread Daniel Henrique Barboza
On 6/2/22 13:33, Frederic Barrat wrote: On 31/05/2022 23:49, Daniel Henrique Barboza wrote: To enable user creatable PnvPHB devices for powernv9 we'll revert the powernv9 related changes made in 9c10d86fee "ppc/pnv: Remove user-created PHB{3,4,5} devices". This change alone isn't enough to

[PATCH] hw/nvme: Fix deallocate when metadata is present

2022-06-03 Thread Jonathan Derrick
When metadata is present in the namespace and deallocates are issued, the first deallocate could fail to zero the block range, resulting in another deallocation to be issued. Normally after the deallocation completes and the range is checked for zeroes, a deallocation is then issued for the metadat

[PATCH] linux-user/x86_64: Fix ELF_PLATFORM

2022-06-03 Thread Richard Henderson
We had been using the i686 platform string for x86_64. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1041 Signed-off-by: Richard Henderson --- linux-user/elfload.c | 30 +- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/linux-user/elfload.c

Re: [PULL 00/11] hw/nvme updates

2022-06-03 Thread Richard Henderson
On 6/3/22 12:53, Klaus Jensen wrote: From: Klaus Jensen Hi Peter, The following changes since commit 70e975203f366f2f30daaeb714bb852562b7b72f: Merge tag 'pull-request-2022-06-03' of https://gitlab.com/thuth/qemu into staging (2022-06-03 06:43:38 -0700) are available in the Git repository

[PATCH] test/tcg/arm: Use -mfloat-abi=soft for test-armv6m-undef

2022-06-03 Thread Richard Henderson
GCC11 from crossbuild-essential-armhf from ubuntu 22.04 errors: cc1: error: ‘-mfloat-abi=hard’: selected architecture lacks an FPU Signed-off-by: Richard Henderson --- tests/tcg/arm/Makefile.softmmu-target | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tcg/arm/Makefile

[PATCH 00/28] target/arm: Split out ptw.c from helper.c

2022-06-03 Thread Richard Henderson
The object here is to move 2500 lines out of helper.c. Yay! r~ Richard Henderson (28): target/arm: Move stage_1_mmu_idx decl to internals.h target/arm: Move get_phys_addr to ptw.c target/arm: Move get_phys_addr_v5 to ptw.c target/arm: Move get_phys_addr_v6 to ptw.c target/arm: Move g

[PATCH 01/28] target/arm: Move stage_1_mmu_idx decl to internals.h

2022-06-03 Thread Richard Henderson
Move the decl from ptw.h to internals.h. Provide an inline version for user-only, just as we do for arm_stage1_mmu_idx. Move an endif down to make the definition in helper.c be system only. Signed-off-by: Richard Henderson --- target/arm/internals.h | 5 + target/arm/helper.c| 5 ++---

[PATCH 03/28] target/arm: Move get_phys_addr_v5 to ptw.c

2022-06-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/ptw.h| 15 +++-- target/arm/helper.c | 137 +++- target/arm/ptw.c| 123 +++ 3 files changed, 140 insertions(+), 135 deletions(-) diff --git a/target/arm/ptw.h b/ta

[PATCH 02/28] target/arm: Move get_phys_addr to ptw.c

2022-06-03 Thread Richard Henderson
Begin moving all of the page table walking functions out of helper.c, starting with get_phys_addr(). Create a temporary header file, "ptw.h", in which to share declarations between the two C files while we are moving functions. Move a few declarations to "internals.h", which will remain used by m

[PATCH 05/28] target/arm: Move get_phys_addr_pmsav5 to ptw.c

2022-06-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/ptw.h| 4 --- target/arm/helper.c | 85 - target/arm/ptw.c| 85 + 3 files changed, 85 insertions(+), 89 deletions(-) diff --git a/target/arm/ptw.h b/ta

[PATCH 04/28] target/arm: Move get_phys_addr_v6 to ptw.c

2022-06-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/ptw.h| 11 +-- target/arm/helper.c | 161 +--- target/arm/ptw.c| 153 + 3 files changed, 161 insertions(+), 164 deletions(-) diff --git a/target/arm/ptw.h b/ta

[PATCH 07/28] target/arm: Move get_phys_addr_pmsav7 to ptw.c

2022-06-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/ptw.h| 10 +-- target/arm/helper.c | 194 +--- target/arm/ptw.c| 190 +++ 3 files changed, 198 insertions(+), 196 deletions(-) diff --git a/target/arm/ptw.h b/

[PATCH 14/28] target/arm: Move combine_cacheattrs and subroutines to ptw.c

2022-06-03 Thread Richard Henderson
There are a handful of helpers for combine_cacheattrs that we can move at the same time as the main entry point. Signed-off-by: Richard Henderson --- target/arm/ptw.h| 3 - target/arm/helper.c | 218 --- target/arm/ptw.c| 221

[PATCH 11/28] target/arm: Move v8m_security_lookup to ptw.c

2022-06-03 Thread Richard Henderson
This function has one private helper, v8m_is_sau_exempt, so move that at the same time. Signed-off-by: Richard Henderson --- target/arm/helper.c | 123 -- target/arm/ptw.c| 126 2 files changed, 126 insertio

[PATCH 06/28] target/arm: Move get_phys_addr_pmsav7_default to ptw.c

2022-06-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/ptw.h| 3 +++ target/arm/helper.c | 41 - target/arm/ptw.c| 41 + 3 files changed, 44 insertions(+), 41 deletions(-) diff --git a/target/arm/ptw.h b/target/arm

[PATCH 10/28] target/arm: Move pmsav7_use_background_region to ptw.c

2022-06-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/ptw.h| 2 -- target/arm/helper.c | 19 --- target/arm/ptw.c| 21 + 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/target/arm/ptw.h b/target/arm/ptw.h index 8d2e239714..d2d2711908 100644

[PATCH 22/28] target/arm: Move ap_to_tw_prot etc to ptw.c

2022-06-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/ptw.h| 10 -- target/arm/helper.c | 77 -- target/arm/ptw.c| 81 + 3 files changed, 81 insertions(+), 87 deletions(-) diff --git a/target/arm/ptw.h b/ta

[PATCH 13/28] target/arm: Move get_level1_table_address to ptw.c

2022-06-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/ptw.h| 4 ++-- target/arm/helper.c | 26 +- target/arm/ptw.c| 23 +++ 3 files changed, 26 insertions(+), 27 deletions(-) diff --git a/target/arm/ptw.h b/target/arm/ptw.h index 6c47a57599..dd6fb93

[PATCH 08/28] target/arm: Move get_phys_addr_pmsav8 to ptw.c

2022-06-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/ptw.h| 5 --- target/arm/helper.c | 75 --- target/arm/ptw.c| 77 + 3 files changed, 77 insertions(+), 80 deletions(-) diff --git a/target/arm/ptw.h b/targ

[PATCH 12/28] target/arm: Move m_is_{ppb,system}_region to ptw.c

2022-06-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/ptw.h| 3 --- target/arm/helper.c | 15 --- target/arm/ptw.c| 16 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/target/arm/ptw.h b/target/arm/ptw.h index d2d2711908..6c47a57599 100644 --- a/ta

[PATCH 17/28] target/arm: Move {arm_s1_, }regime_using_lpae_format to tlb_helper.c

2022-06-03 Thread Richard Henderson
These functions are used for both page table walking and for deciding what format in which to deliver exception results. Since ptw.c is only present for system mode, put the functions into tlb_helper.c. Signed-off-by: Richard Henderson --- target/arm/helper.c | 24 t

[PATCH 09/28] target/arm: Move pmsav8_mpu_lookup to ptw.c

2022-06-03 Thread Richard Henderson
This is the final user of get_phys_addr_pmsav7_default within helper.c, so make it static within ptw.c. Signed-off-by: Richard Henderson --- target/arm/ptw.h| 3 - target/arm/helper.c | 136 - target/arm/ptw.c| 146 +++

[PATCH 16/28] target/arm: Move arm_{ldl,ldq}_ptw to ptw.c

2022-06-03 Thread Richard Henderson
Move the ptw load functions, plus 3 common subroutines: S1_ptw_translate, ptw_attrs_are_device, and regime_translation_big_endian. This also allows get_phys_addr_lpae to become static again. Signed-off-by: Richard Henderson --- target/arm/ptw.h| 13 target/arm/helper.c | 141 --

[PATCH 18/28] target/arm: Move arm_pamax, pamax_map into ptw.c

2022-06-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/ptw.h| 2 -- target/arm/helper.c | 25 - target/arm/ptw.c| 25 + 3 files changed, 25 insertions(+), 27 deletions(-) diff --git a/target/arm/ptw.h b/target/arm/ptw.h index 28b8cb9fb8..fba650d0

[PATCH 15/28] target/arm: Move get_phys_addr_lpae to ptw.c

2022-06-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/ptw.h| 10 ++ target/arm/helper.c | 416 +--- target/arm/ptw.c| 411 +++ 3 files changed, 429 insertions(+), 408 deletions(-) diff --git a/target/arm/ptw.h b/t

[PATCH 26/28] target/arm: Move arm_cpu_get_phys_page_attrs_debug to ptw.c

2022-06-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/helper.c | 26 -- target/arm/ptw.c| 24 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 7390798463..1c75962a3b 100644 --- a/target/

[PATCH 19/28] target/arm: Move get_S1prot, get_S2prot to ptw.c

2022-06-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/ptw.h| 3 -- target/arm/helper.c | 128 target/arm/ptw.c| 128 3 files changed, 128 insertions(+), 131 deletions(-) diff --git a/target/arm/ptw.h b/

[PATCH 27/28] target/arm: Move stage_1_mmu_idx, arm_stage1_mmu_idx to ptw.c

2022-06-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/helper.c | 32 target/arm/ptw.c| 28 2 files changed, 28 insertions(+), 32 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 1c75962a3b..1018cd24eb 100644 ---

[PATCH 25/28] target/arm: Move regime_translation_disabled to ptw.c

2022-06-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/ptw.h| 17 target/arm/helper.c | 47 - target/arm/ptw.c| 47 - 3 files changed, 46 insertions(+), 65 deletions(-) delete mode 100644 ta

[PATCH 20/28] target/arm: Move check_s2_mmu_setup to ptw.c

2022-06-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/ptw.h| 2 -- target/arm/helper.c | 70 - target/arm/ptw.c| 70 + 3 files changed, 70 insertions(+), 72 deletions(-) diff --git a/target/arm/ptw.h b/tar

[PATCH 28/28] target/arm: Pass CPUARMState to arm_ld[lq]_ptw

2022-06-03 Thread Richard Henderson
The use of ARM_CPU to recover env from cs calls object_class_dynamic_cast, which shows up on the profile. This is pointless, because all callers already have env, and the reverse operation, env_cpu, is only pointer arithmetic. Signed-off-by: Richard Henderson --- target/arm/ptw.c | 23 +-

[PATCH 21/28] target/arm: Move aa32_va_parameters to ptw.c

2022-06-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/ptw.h| 3 --- target/arm/helper.c | 64 - target/arm/ptw.c| 64 + 3 files changed, 64 insertions(+), 67 deletions(-) diff --git a/target/arm/ptw.h b/ta

[PATCH 23/28] target/arm: Move regime_is_user to ptw.c

2022-06-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/ptw.h| 1 - target/arm/helper.c | 24 target/arm/ptw.c| 22 ++ 3 files changed, 22 insertions(+), 25 deletions(-) diff --git a/target/arm/ptw.h b/target/arm/ptw.h index 85ad576794..3d3061a435 10

[PATCH 24/28] target/arm: Move regime_ttbr to ptw.c

2022-06-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/ptw.h| 1 - target/arm/helper.c | 16 target/arm/ptw.c| 16 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/target/arm/ptw.h b/target/arm/ptw.h index 3d3061a435..ed152ddaf4 100644 --- a/tar

<    1   2