All of lore.kernel.org
 help / color / mirror / Atom feed
* [PULL 0/1] target-arm queue
@ 2021-11-22 13:43 Peter Maydell
  2021-11-22 13:43 ` [PULL 1/1] Revert "arm: tcg: Adhere to SMCCC 1.3 section 5.2" Peter Maydell
  2021-11-22 18:06 ` [PULL 0/1] target-arm queue Peter Maydell
  0 siblings, 2 replies; 12+ messages in thread
From: Peter Maydell @ 2021-11-22 13:43 UTC (permalink / raw)
  To: qemu-devel; +Cc: Richard Henderson

Just one patch for rc2, a revert.

-- PMM

The following changes since commit 49aaac3548bc5a4632a14de939d5312b28dc1ba2:

  Merge tag 'linux-user-for-6.2-pull-request' of git://github.com/vivier/qemu into staging (2021-11-22 10:33:13 +0100)

are available in the Git repository at:

  https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20211122

for you to fetch changes up to 4825eaae4fdd56fba0febdfbdd7bf9684ae3ee0d:

  Revert "arm: tcg: Adhere to SMCCC 1.3 section 5.2" (2021-11-22 13:41:48 +0000)

----------------------------------------------------------------
target-arm queue:
 * revert SMCCC/PSCI change, as it regresses some usecases for some boards

----------------------------------------------------------------
Peter Maydell (1):
      Revert "arm: tcg: Adhere to SMCCC 1.3 section 5.2"

 target/arm/psci.c | 35 +++++++++++++++++++++++++++++------
 1 file changed, 29 insertions(+), 6 deletions(-)


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PULL 1/1] Revert "arm: tcg: Adhere to SMCCC 1.3 section 5.2"
  2021-11-22 13:43 [PULL 0/1] target-arm queue Peter Maydell
@ 2021-11-22 13:43 ` Peter Maydell
  2021-11-22 18:06 ` [PULL 0/1] target-arm queue Peter Maydell
  1 sibling, 0 replies; 12+ messages in thread
From: Peter Maydell @ 2021-11-22 13:43 UTC (permalink / raw)
  To: qemu-devel; +Cc: Richard Henderson

This reverts commit 9fcd15b9193e819b6cc2fd0a45e3506148812bb4.

This change turns out to cause regressions, for instance on the
imx6ul boards as described here:
https://lore.kernel.org/qemu-devel/c8b89685-7490-328b-51a3-48711c140a84@tribudubois.net/

The primary cause of that regression is that the guest code running
at EL3 expects SMCs (not related to PSCI) to do what they would if
our PSCI emulation was not present at all, but after this change
they instead set a value in R0/X0 and continue.

We could fix that by a refactoring that allowed us to only turn on
the PSCI emulation if we weren't booting the guest at EL3, but there
is a more tangled problem with the highbank board, which:
 (1) wants to enable PSCI emulation
 (2) has a bit of guest code that it wants to run at EL3 and
     to perform SMC calls that trap to the monitor vector table:
     this is the boot stub code that is written to memory by
     arm_write_secure_board_setup_dummy_smc() and which the
     highbank board enables by setting bootinfo->secure_board_setup

We can't satisfy both of those and also have the PSCI emulation
handle all SMC instruction executions regardless of function
identifier value.

This is too tricky to try to sort out before 6.2 is released;
revert this commit so we can take the time to get it right in
the 7.0 release.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20211119163419.557623-1-peter.maydell@linaro.org
---
 target/arm/psci.c | 35 +++++++++++++++++++++++++++++------
 1 file changed, 29 insertions(+), 6 deletions(-)

diff --git a/target/arm/psci.c b/target/arm/psci.c
index b279c0b9a45..6709e280133 100644
--- a/target/arm/psci.c
+++ b/target/arm/psci.c
@@ -27,13 +27,15 @@
 
 bool arm_is_psci_call(ARMCPU *cpu, int excp_type)
 {
-    /*
-     * Return true if the exception type matches the configured PSCI conduit.
-     * This is called before the SMC/HVC instruction is executed, to decide
-     * whether we should treat it as a PSCI call or with the architecturally
+    /* Return true if the r0/x0 value indicates a PSCI call and
+     * the exception type matches the configured PSCI conduit. This is
+     * called before the SMC/HVC instruction is executed, to decide whether
+     * we should treat it as a PSCI call or with the architecturally
      * defined behaviour for an SMC or HVC (which might be UNDEF or trap
      * to EL2 or to EL3).
      */
+    CPUARMState *env = &cpu->env;
+    uint64_t param = is_a64(env) ? env->xregs[0] : env->regs[0];
 
     switch (excp_type) {
     case EXCP_HVC:
@@ -50,7 +52,27 @@ bool arm_is_psci_call(ARMCPU *cpu, int excp_type)
         return false;
     }
 
-    return true;
+    switch (param) {
+    case QEMU_PSCI_0_2_FN_PSCI_VERSION:
+    case QEMU_PSCI_0_2_FN_MIGRATE_INFO_TYPE:
+    case QEMU_PSCI_0_2_FN_AFFINITY_INFO:
+    case QEMU_PSCI_0_2_FN64_AFFINITY_INFO:
+    case QEMU_PSCI_0_2_FN_SYSTEM_RESET:
+    case QEMU_PSCI_0_2_FN_SYSTEM_OFF:
+    case QEMU_PSCI_0_1_FN_CPU_ON:
+    case QEMU_PSCI_0_2_FN_CPU_ON:
+    case QEMU_PSCI_0_2_FN64_CPU_ON:
+    case QEMU_PSCI_0_1_FN_CPU_OFF:
+    case QEMU_PSCI_0_2_FN_CPU_OFF:
+    case QEMU_PSCI_0_1_FN_CPU_SUSPEND:
+    case QEMU_PSCI_0_2_FN_CPU_SUSPEND:
+    case QEMU_PSCI_0_2_FN64_CPU_SUSPEND:
+    case QEMU_PSCI_0_1_FN_MIGRATE:
+    case QEMU_PSCI_0_2_FN_MIGRATE:
+        return true;
+    default:
+        return false;
+    }
 }
 
 void arm_handle_psci_call(ARMCPU *cpu)
@@ -172,9 +194,10 @@ void arm_handle_psci_call(ARMCPU *cpu)
         break;
     case QEMU_PSCI_0_1_FN_MIGRATE:
     case QEMU_PSCI_0_2_FN_MIGRATE:
-    default:
         ret = QEMU_PSCI_RET_NOT_SUPPORTED;
         break;
+    default:
+        g_assert_not_reached();
     }
 
 err:
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PULL 0/1] target-arm queue
  2021-11-22 13:43 [PULL 0/1] target-arm queue Peter Maydell
  2021-11-22 13:43 ` [PULL 1/1] Revert "arm: tcg: Adhere to SMCCC 1.3 section 5.2" Peter Maydell
@ 2021-11-22 18:06 ` Peter Maydell
  2021-11-22 18:14   ` Richard Henderson
  1 sibling, 1 reply; 12+ messages in thread
From: Peter Maydell @ 2021-11-22 18:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: Richard Henderson

On Mon, 22 Nov 2021 at 13:43, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> Just one patch for rc2, a revert.
>
> -- PMM
>
> The following changes since commit 49aaac3548bc5a4632a14de939d5312b28dc1ba2:
>
>   Merge tag 'linux-user-for-6.2-pull-request' of git://github.com/vivier/qemu into staging (2021-11-22 10:33:13 +0100)
>
> are available in the Git repository at:
>
>   https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20211122
>
> for you to fetch changes up to 4825eaae4fdd56fba0febdfbdd7bf9684ae3ee0d:
>
>   Revert "arm: tcg: Adhere to SMCCC 1.3 section 5.2" (2021-11-22 13:41:48 +0000)
>
> ----------------------------------------------------------------
> target-arm queue:
>  * revert SMCCC/PSCI change, as it regresses some usecases for some boards

Since this hasn't been applied yet I'll reroll it to add Eric's
"don't bump the ITS version fields" patch. (But if you get here
first that's fine too.)

-- PMM


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PULL 0/1] target-arm queue
  2021-11-22 18:06 ` [PULL 0/1] target-arm queue Peter Maydell
@ 2021-11-22 18:14   ` Richard Henderson
  0 siblings, 0 replies; 12+ messages in thread
From: Richard Henderson @ 2021-11-22 18:14 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel

On 11/22/21 7:06 PM, Peter Maydell wrote:
> On Mon, 22 Nov 2021 at 13:43, Peter Maydell <peter.maydell@linaro.org> wrote:
>>
>> Just one patch for rc2, a revert.
>>
>> -- PMM
>>
>> The following changes since commit 49aaac3548bc5a4632a14de939d5312b28dc1ba2:
>>
>>    Merge tag 'linux-user-for-6.2-pull-request' of git://github.com/vivier/qemu into staging (2021-11-22 10:33:13 +0100)
>>
>> are available in the Git repository at:
>>
>>    https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20211122
>>
>> for you to fetch changes up to 4825eaae4fdd56fba0febdfbdd7bf9684ae3ee0d:
>>
>>    Revert "arm: tcg: Adhere to SMCCC 1.3 section 5.2" (2021-11-22 13:41:48 +0000)
>>
>> ----------------------------------------------------------------
>> target-arm queue:
>>   * revert SMCCC/PSCI change, as it regresses some usecases for some boards
> 
> Since this hasn't been applied yet I'll reroll it to add Eric's
> "don't bump the ITS version fields" patch. (But if you get here
> first that's fine too.)

Gitlab has been dreadfully slow this evening, but it's applied now.


r~



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PULL 0/1] target-arm queue
  2023-12-04 14:33 Peter Maydell
@ 2023-12-05 12:33 ` Stefan Hajnoczi
  0 siblings, 0 replies; 12+ messages in thread
From: Stefan Hajnoczi @ 2023-12-05 12:33 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 115 bytes --]

Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PULL 0/1] target-arm queue
@ 2023-12-04 14:33 Peter Maydell
  2023-12-05 12:33 ` Stefan Hajnoczi
  0 siblings, 1 reply; 12+ messages in thread
From: Peter Maydell @ 2023-12-04 14:33 UTC (permalink / raw)
  To: qemu-devel

Just one fix for rc3. Technically this isn't a regression since
8.1, but it is a small change that avoids the user being able
to select an oddball combination of CPU features that currently
QEMU will assert on.

thanks
-- PMM

The following changes since commit 29b5d70cb70574b499517ec9e9f80dea496a3cc0:

  Merge tag 'pull-ppc-for-8.2-20231130' of https://gitlab.com/npiggin/qemu into staging (2023-12-01 07:29:52 -0500)

are available in the Git repository at:

  https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20231204-1

for you to fetch changes up to f7767ca301796334f74b9b642b395a4bd3e3dbac:

  target/arm: Disable SME if SVE is disabled (2023-12-04 13:34:16 +0000)

----------------------------------------------------------------
target-arm queue:
 * Turn off SME if SVE is turned off (this combination doesn't
   currently work and QEMU will assert if you try it)

----------------------------------------------------------------
Peter Maydell (1):
      target/arm: Disable SME if SVE is disabled

 target/arm/cpu.c | 10 ++++++++++
 1 file changed, 10 insertions(+)


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PULL 0/1] target-arm queue
  2023-03-28 12:26 Peter Maydell
@ 2023-03-28 16:00 ` Peter Maydell
  0 siblings, 0 replies; 12+ messages in thread
From: Peter Maydell @ 2023-03-28 16:00 UTC (permalink / raw)
  To: qemu-devel

On Tue, 28 Mar 2023 at 13:26, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> The following changes since commit e3debd5e7d0ce031356024878a0a18b9d109354a:
>
>   Merge tag 'pull-request-2023-03-24' of https://gitlab.com/thuth/qemu into staging (2023-03-24 16:08:46 +0000)
>
> are available in the Git repository at:
>
>   https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20230328
>
> for you to fetch changes up to 46e3b237c52e0c48bfd81bce020b51fbe300b23a:
>
>   target/arm/gdbstub: Only advertise M-profile features if TCG available (2023-03-28 10:53:40 +0100)
>
> ----------------------------------------------------------------
> target-arm queue:
>  * fix part of the "TCG-disabled builds are broken" issue
>
> ----------------------------------------------------------------


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/8.0
for any user-visible changes.

-- PMM


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PULL 0/1] target-arm queue
@ 2023-03-28 12:26 Peter Maydell
  2023-03-28 16:00 ` Peter Maydell
  0 siblings, 1 reply; 12+ messages in thread
From: Peter Maydell @ 2023-03-28 12:26 UTC (permalink / raw)
  To: qemu-devel

The following changes since commit e3debd5e7d0ce031356024878a0a18b9d109354a:

  Merge tag 'pull-request-2023-03-24' of https://gitlab.com/thuth/qemu into staging (2023-03-24 16:08:46 +0000)

are available in the Git repository at:

  https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20230328

for you to fetch changes up to 46e3b237c52e0c48bfd81bce020b51fbe300b23a:

  target/arm/gdbstub: Only advertise M-profile features if TCG available (2023-03-28 10:53:40 +0100)

----------------------------------------------------------------
target-arm queue:
 * fix part of the "TCG-disabled builds are broken" issue

----------------------------------------------------------------
Philippe Mathieu-Daudé (1):
      target/arm/gdbstub: Only advertise M-profile features if TCG available

 target/arm/gdbstub.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PULL 0/1] target-arm queue
  2022-08-09 12:13 Peter Maydell
@ 2022-08-09 19:17 ` Richard Henderson
  0 siblings, 0 replies; 12+ messages in thread
From: Richard Henderson @ 2022-08-09 19:17 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel

On 8/9/22 05:13, Peter Maydell wrote:
> Just one bugfix patch for this rc:
> 
> The following changes since commit ca5f3d4df1b47d7f66a109cdb504e83dfd7ec433:
> 
>    Merge tag 'pull-la-20220808' of https://gitlab.com/rth7680/qemu into staging (2022-08-08 19:51:12 -0700)
> 
> are available in the Git repository at:
> 
>    https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20220809
> 
> for you to fetch changes up to c7f26ded6d5065e4116f630f6a490b55f6c5f58e:
> 
>    icount: Take iothread lock when running QEMU timers (2022-08-09 10:55:14 +0100)
> 
> ----------------------------------------------------------------
> target-arm queue:
>   * icount: Take iothread lock when running QEMU timers

Applied, thanks.  Please update https://wiki.qemu.org/ChangeLog/7.1 as appropriate.


r~


> 
> ----------------------------------------------------------------
> Peter Maydell (1):
>        icount: Take iothread lock when running QEMU timers
> 
>   accel/tcg/tcg-accel-ops-icount.c | 6 ++++++
>   1 file changed, 6 insertions(+)
> 



^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PULL 0/1] target-arm queue
@ 2022-08-09 12:13 Peter Maydell
  2022-08-09 19:17 ` Richard Henderson
  0 siblings, 1 reply; 12+ messages in thread
From: Peter Maydell @ 2022-08-09 12:13 UTC (permalink / raw)
  To: qemu-devel

Just one bugfix patch for this rc:

The following changes since commit ca5f3d4df1b47d7f66a109cdb504e83dfd7ec433:

  Merge tag 'pull-la-20220808' of https://gitlab.com/rth7680/qemu into staging (2022-08-08 19:51:12 -0700)

are available in the Git repository at:

  https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20220809

for you to fetch changes up to c7f26ded6d5065e4116f630f6a490b55f6c5f58e:

  icount: Take iothread lock when running QEMU timers (2022-08-09 10:55:14 +0100)

----------------------------------------------------------------
target-arm queue:
 * icount: Take iothread lock when running QEMU timers

----------------------------------------------------------------
Peter Maydell (1):
      icount: Take iothread lock when running QEMU timers

 accel/tcg/tcg-accel-ops-icount.c | 6 ++++++
 1 file changed, 6 insertions(+)


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PULL 0/1] target-arm queue
  2021-11-22 18:44 Peter Maydell
@ 2021-11-23  8:40 ` Richard Henderson
  0 siblings, 0 replies; 12+ messages in thread
From: Richard Henderson @ 2021-11-23  8:40 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel

On 11/22/21 7:44 PM, Peter Maydell wrote:
> Apologies for sending two pullreqs today; Eric's patch came in a
> few hours after I sent the first one but it's definitely a
> release-critical fix.
> 
> -- PMM
> 
> The following changes since commit 89d2f9e4c63799f7f03e9180c63b7dc45fc2a04a:
> 
>    Merge tag 'pull-target-arm-20211122' of https://git.linaro.org/people/pmaydell/qemu-arm into staging (2021-11-22 16:35:54 +0100)
> 
> are available in the Git repository at:
> 
>    https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20211122-1
> 
> for you to fetch changes up to 33a0c404fb90a3fa8eea6ebf5c535fc7bc0b9912:
> 
>    hw/intc/arm_gicv3_its: Revert version increments in vmstate_its (2021-11-22 18:17:19 +0000)
> 
> ----------------------------------------------------------------
> target-arm queue:
>   * drop spurious bump of ITS vmstate version fields
> 
> ----------------------------------------------------------------
> Eric Auger (1):
>        hw/intc/arm_gicv3_its: Revert version increments in vmstate_its
> 
>   hw/intc/arm_gicv3_its_common.c | 2 --
>   1 file changed, 2 deletions(-)

Applied, thanks.

r~



^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PULL 0/1] target-arm queue
@ 2021-11-22 18:44 Peter Maydell
  2021-11-23  8:40 ` Richard Henderson
  0 siblings, 1 reply; 12+ messages in thread
From: Peter Maydell @ 2021-11-22 18:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: Richard Henderson

Apologies for sending two pullreqs today; Eric's patch came in a
few hours after I sent the first one but it's definitely a
release-critical fix.

-- PMM

The following changes since commit 89d2f9e4c63799f7f03e9180c63b7dc45fc2a04a:

  Merge tag 'pull-target-arm-20211122' of https://git.linaro.org/people/pmaydell/qemu-arm into staging (2021-11-22 16:35:54 +0100)

are available in the Git repository at:

  https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20211122-1

for you to fetch changes up to 33a0c404fb90a3fa8eea6ebf5c535fc7bc0b9912:

  hw/intc/arm_gicv3_its: Revert version increments in vmstate_its (2021-11-22 18:17:19 +0000)

----------------------------------------------------------------
target-arm queue:
 * drop spurious bump of ITS vmstate version fields

----------------------------------------------------------------
Eric Auger (1):
      hw/intc/arm_gicv3_its: Revert version increments in vmstate_its

 hw/intc/arm_gicv3_its_common.c | 2 --
 1 file changed, 2 deletions(-)


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-12-05 14:19 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-22 13:43 [PULL 0/1] target-arm queue Peter Maydell
2021-11-22 13:43 ` [PULL 1/1] Revert "arm: tcg: Adhere to SMCCC 1.3 section 5.2" Peter Maydell
2021-11-22 18:06 ` [PULL 0/1] target-arm queue Peter Maydell
2021-11-22 18:14   ` Richard Henderson
2021-11-22 18:44 Peter Maydell
2021-11-23  8:40 ` Richard Henderson
2022-08-09 12:13 Peter Maydell
2022-08-09 19:17 ` Richard Henderson
2023-03-28 12:26 Peter Maydell
2023-03-28 16:00 ` Peter Maydell
2023-12-04 14:33 Peter Maydell
2023-12-05 12:33 ` Stefan Hajnoczi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.