On 8/8/25 08:54, Mohamed Mediouni wrote:
Hyper-V supports PSCI 1.3, and that implementation is exposed through
WHPX.

Signed-off-by: Mohamed Mediouni <moha...@unpredictable.fr>

Reviewed-by: Richard Henderson <richard.hender...@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouv...@linaro.org>
---
  target/arm/cpu.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index e2b2337399..3b69c9786a 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -23,6 +23,7 @@
  #include "qemu/timer.h"
  #include "qemu/log.h"
  #include "exec/page-vary.h"
+#include "system/whpx.h"
  #include "target/arm/idau.h"
  #include "qemu/module.h"
  #include "qapi/error.h"
@@ -1496,7 +1497,7 @@ static void arm_cpu_initfn(Object *obj)
      cpu->psci_version = QEMU_PSCI_VERSION_0_1; /* By default assume PSCI v0.1 
*/
      cpu->kvm_target = QEMU_KVM_ARM_TARGET_NONE;
- if (tcg_enabled() || hvf_enabled()) {
+    if (tcg_enabled() || hvf_enabled() || whpx_enabled()) {
          /* TCG and HVF implement PSCI 1.1 */

(Update comment, or simply remove it?)

          cpu->psci_version = QEMU_PSCI_VERSION_1_1;

Maybe we could implement SYSTEM_RESET2, SYSTEM_OFF2 and MEM_PROTECT*
and bump to QEMU_PSCI_VERSION_1_3. Or add UNIMP stubs and here
directly start with:

       } else if (whpx_enabled()) {
           cpu->psci_version = QEMU_PSCI_VERSION_1_3;

      }


Reply via email to