[PATCH v5 05/11] arm: Set PSCI to 0.2 for HVF

Alexander Graf posted 11 patches 4 years, 3 months ago
Maintainers: Eduardo Habkost <ehabkost@redhat.com>, Alexander Graf <agraf@csgraf.de>, Paolo Bonzini <pbonzini@redhat.com>, Roman Bolshakov <r.bolshakov@yadro.com>, Cameron Esfahani <dirty@apple.com>, Richard Henderson <richard.henderson@linaro.org>, Peter Maydell <peter.maydell@linaro.org>
There is a newer version of this series
[PATCH v5 05/11] arm: Set PSCI to 0.2 for HVF
Posted by Alexander Graf 4 years, 3 months ago
In Hypervisor.framework, we just pass PSCI calls straight on to the QEMU emulation
of it. That means, if TCG is compatible with PSCI 0.2, so are we. Let's transpose
that fact in code too.

Signed-off-by: Alexander Graf <agraf@csgraf.de>
Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com>

---

v3 -> v4:

  - Combine both if statements
---
 target/arm/cpu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index d6188f6566..86cf167d1d 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -1062,8 +1062,8 @@ static void arm_cpu_initfn(Object *obj)
     cpu->psci_version = 1; /* By default assume PSCI v0.1 */
     cpu->kvm_target = QEMU_KVM_ARM_TARGET_NONE;
 
-    if (tcg_enabled()) {
-        cpu->psci_version = 2; /* TCG implements PSCI 0.2 */
+    if (tcg_enabled() || hvf_enabled()) {
+        cpu->psci_version = 2; /* TCG and HVF implement PSCI 0.2 */
     }
 }
 
-- 
2.24.3 (Apple Git-128)


Re: [PATCH v5 05/11] arm: Set PSCI to 0.2 for HVF
Posted by Richard Henderson 4 years, 3 months ago
On 12/11/20 9:12 AM, Alexander Graf wrote:
> In Hypervisor.framework, we just pass PSCI calls straight on to the QEMU emulation
> of it. That means, if TCG is compatible with PSCI 0.2, so are we. Let's transpose
> that fact in code too.
> 
> Signed-off-by: Alexander Graf <agraf@csgraf.de>
> Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com>

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~