qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 9/9] hw/ppc/spapr_hcall.c: log H_VIOCTL as unsupported


From: Daniel Henrique Barboza
Subject: [PATCH 9/9] hw/ppc/spapr_hcall.c: log H_VIOCTL as unsupported
Date: Mon, 7 Mar 2022 16:15:53 -0300

H_VIOCTL is one of many VIO (Virtualized I/O) hcalls that we do not
support in QEMU. An AIX 7.2 guest will attempt to execute this hcall a
couple of times during boot, receiving H_FUNCTION replies every time,
and eventually give it up.

There are many VIO hcalls and we don't support none. H_VIOCTL seems to
be the one that convinces the guest that we don't have VIO support in
the platform, so let's add this one as unsupported in our model.

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
---
 hw/ppc/spapr_hcall.c   | 14 ++++++++++++++
 include/hw/ppc/spapr.h |  1 +
 2 files changed, 15 insertions(+)

diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c
index f7240fbd41..ddaeea84fc 100644
--- a/hw/ppc/spapr_hcall.c
+++ b/hw/ppc/spapr_hcall.c
@@ -1618,6 +1618,17 @@ static target_ulong h_query_vas_capabilities(PowerPCCPU 
*cpu,
     return H_FUNCTION;
 }
 
+static target_ulong h_vioctl(PowerPCCPU *cpu,
+                             SpaprMachineState *spapr,
+                             target_ulong opcode,
+                             target_ulong *args)
+{
+    /* We do not support any VIO (Virtualized I/O) HCALL */
+    qemu_log_mask(LOG_UNSUPP, "Unsupported SPAPR hcall 0x"TARGET_FMT_lx"%s\n",
+                  opcode, " (H_VIOCTL)");
+    return H_FUNCTION;
+}
+
 /*
  * When this handler returns, the environment is switched to the L2 guest
  * and TCG begins running that. spapr_exit_nested() performs the switch from
@@ -1965,6 +1976,9 @@ static void hypercall_register_types(void)
     /* Unsupported VAS h-calls */
     spapr_register_hypercall(H_QUERY_VAS_CAPABILITIES,
                              h_query_vas_capabilities);
+
+    /* Unsupported Virtualized I/O (VIO) h-calls */
+    spapr_register_hypercall(H_VIOCTL, h_vioctl);
 }
 
 type_init(hypercall_register_types)
diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
index 10df519b0a..232ac7650d 100644
--- a/include/hw/ppc/spapr.h
+++ b/include/hw/ppc/spapr.h
@@ -530,6 +530,7 @@ struct SpaprMachineState {
 #define H_DEL_CONN              0x288
 #define H_JOIN                  0x298
 #define H_VASI_STATE            0x2A4
+#define H_VIOCTL                0x2A8
 #define H_ENABLE_CRQ            0x2B0
 #define H_GET_EM_PARMS          0x2B8
 #define H_SET_MPP               0x2D0
-- 
2.35.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]