[PATCH] target/arm: Use TCF0 and TFSRE0 for unprivileged tag checks

2021-02-19 Thread Peter Collingbourne via
Section D6.7 of the ARM ARM states: For the purpose of determining Tag Check Fault handling, unprivileged load and store instructions are treated as if executed at EL0 when executed at either: - EL1, when the Effective value of PSTATE.UAO is 0. - EL2, when both the Effective value of HCR_EL2.{E2H,

[PATCH v3 3/3] arm/hvf: Add a WFI handler

2020-12-01 Thread Peter Collingbourne via
Sleep on WFI until the VTIMER is due but allow ourselves to be woken up on IPI. Signed-off-by: Peter Collingbourne --- v3: - move the simplified locking to a separate patch - spin on sleep <2ms v2: - simplify locking further - wait indefinitely on disabled or masked timers accel/hvf/hvf-cpus.c

[PATCH v3 1/3] Revert "hvf: Actually set SIG_IPI mask"

2020-12-01 Thread Peter Collingbourne via
From: Alexander Graf This reverts commit 926a35700f0c14d6b95cbf8c3c3cce55ec7ffc3e. You can just drop patch 3 of your v2 instead of taking this commit. --- accel/hvf/hvf-cpus.c | 1 - 1 file changed, 1 deletion(-) diff --git a/accel/hvf/hvf-cpus.c b/accel/hvf/hvf-cpus.c index 4360f64671..e613c2

[PATCH v3 2/3] arm/hvf: Do some cleanups

2020-12-01 Thread Peter Collingbourne via
- Stop setting current_cpu - Remove the previous WFx handler - Simplify locking - Remove the unused ret variable in hvf_vcpu_exec Signed-off-by: Peter Collingbourne --- include/sysemu/hvf_int.h | 2 - target/arm/hvf/hvf.c | 106 ++- 2 files changed, 5 in

[PATCH v2 2/2] arm/hvf: Stop setting current_cpu

2020-12-01 Thread Peter Collingbourne via
This variable is already being set by the generic HVF code and it's a thread-local variable so I don't see how it can be overwritten. Signed-off-by: Peter Collingbourne --- target/arm/hvf/hvf.c | 8 1 file changed, 8 deletions(-) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c

[PATCH v2 1/2] arm/hvf: Optimize and simplify WFI handling

2020-12-01 Thread Peter Collingbourne via
Sleep on WFx until the VTIMER is due but allow ourselves to be woken up on IPI. Signed-off-by: Peter Collingbourne --- v2: - simplify locking further - wait indefinitely on disabled or masked timers accel/hvf/hvf-cpus.c | 5 +- include/sysemu/hvf_int.h | 3 +- target/arm/hvf/hvf.c |

[PATCH] arm/hvf: Optimize and simplify WFI handling

2020-12-01 Thread Peter Collingbourne via
Sleep on WFx until the VTIMER is due but allow ourselves to be woken up on IPI. Signed-off-by: Peter Collingbourne --- Alexander Graf wrote: > I would love to take a patch from you here :). I'll still be stuck for a > while with the sysreg sync rework that Peter asked for before I can look > at W