[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 04/10] arm: Set PSCI to 0.2 for HVF
From: |
Roman Bolshakov |
Subject: |
Re: [PATCH v3 04/10] arm: Set PSCI to 0.2 for HVF |
Date: |
Thu, 3 Dec 2020 04:03:26 +0300 |
On Wed, Dec 02, 2020 at 08:04:02PM +0100, 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>
> ---
> target/arm/cpu.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/target/arm/cpu.c b/target/arm/cpu.c
> index 07492e9f9a..db6f7c34ed 100644
> --- a/target/arm/cpu.c
> +++ b/target/arm/cpu.c
> @@ -1062,6 +1062,10 @@ static void arm_cpu_initfn(Object *obj)
> if (tcg_enabled()) {
> cpu->psci_version = 2; /* TCG implements PSCI 0.2 */
> }
> +
> + if (hvf_enabled()) {
> + cpu->psci_version = 2; /* HVF uses TCG's PSCI */
> + }
If HVF is piggybacking on TCG and they're both the same versions would
it be better if:
> - if (tcg_enabled()) {
> - cpu->psci_version = 2; /* TCG implements PSCI 0.2 */
> + if (tcg_enabled() || hvf_enabled()) {
> + cpu->psci_version = 2; /* TCG implements PSCI 0.2 */
> }
That'd avoid a case where they get out of sync.
Thanks,
Roman
> }
>
> static Property arm_cpu_gt_cntfrq_property =
> --
> 2.24.3 (Apple Git-128)
>
- [PATCH v3 00/10] hvf: Implement Apple Silicon Support, Alexander Graf, 2020/12/02
- [PATCH v3 01/10] hvf: Add hypervisor entitlement to output binaries, Alexander Graf, 2020/12/02
- [PATCH v3 02/10] hvf: Move common code out, Alexander Graf, 2020/12/02
- [PATCH v3 03/10] hvf: Introduce hvf vcpu struct, Alexander Graf, 2020/12/02
- [PATCH v3 04/10] arm: Set PSCI to 0.2 for HVF, Alexander Graf, 2020/12/02
- Re: [PATCH v3 04/10] arm: Set PSCI to 0.2 for HVF,
Roman Bolshakov <=
- [PATCH v3 05/10] hvf: arm: Mark CPU as dirty on reset, Alexander Graf, 2020/12/02
[PATCH v3 08/10] arm/hvf: Add a WFI handler, Alexander Graf, 2020/12/02
[PATCH v3 07/10] arm: Add Hypervisor.framework build target, Alexander Graf, 2020/12/02