[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 7/9] hw/ppc/spapr_hcall.c: log H_QUERY_VAS_CAPABILITIES as unsupp
From: |
Daniel Henrique Barboza |
Subject: |
[PATCH 7/9] hw/ppc/spapr_hcall.c: log H_QUERY_VAS_CAPABILITIES as unsupported |
Date: |
Mon, 7 Mar 2022 16:15:51 -0300 |
This hcall is VAS (Virtual Accelerator Switchboard) related. VAS is a
hardware feature that allows kernelspace and userspace to communicate
directly with Nested Accelerators (NX). A description of VAS can be
found at [1].
QEMU does not implement neither VAS nor NXs. AIX guests will query VAS
capabilities once during boot.
Log this hcall as unsupported. It is worth noticing that VAS has a
handful of other hcalls (H_ALLOCATE_VAS_WINDOW, H_QUERY_VAS_WINDOW,
H_GET_NX_FAULT and others), but the AIX guest seems to be satisfied
when H_QUERY_VAS_CAPABILITIES returns H_FUNCTION and give up trying
the others. This means that there is no need to log all of them as
unsupported in QEMU.
[1] https://www.kernel.org/doc/html/latest/powerpc/vas-api.html
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
---
hw/ppc/spapr_hcall.c | 18 ++++++++++++++++++
include/hw/ppc/spapr.h | 1 +
2 files changed, 19 insertions(+)
diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c
index db6cb6bb89..fdce44daf7 100644
--- a/hw/ppc/spapr_hcall.c
+++ b/hw/ppc/spapr_hcall.c
@@ -1589,6 +1589,20 @@ static target_ulong h_best_energy(PowerPCCPU *cpu,
return H_FUNCTION;
}
+static target_ulong h_query_vas_capabilities(PowerPCCPU *cpu,
+ SpaprMachineState *spapr,
+ target_ulong opcode,
+ target_ulong *args)
+{
+ /*
+ * This HCALL is VAS (Virtual Accelerator Switchboard) related. VAS
+ * is not supported in QEMU.
+ */
+ qemu_log_mask(LOG_UNSUPP, "Unsupported SPAPR hcall 0x"TARGET_FMT_lx"%s\n",
+ opcode, " (H_QUERY_VAS_CAPABILITIES)");
+ 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
@@ -1931,6 +1945,10 @@ static void hypercall_register_types(void)
/* Unsupported PEM option h-calls */
spapr_register_hypercall(H_GET_EM_PARMS, h_get_em_parms);
spapr_register_hypercall(H_BEST_ENERGY, h_best_energy);
+
+ /* Unsupported VAS h-calls */
+ spapr_register_hypercall(H_QUERY_VAS_CAPABILITIES,
+ h_query_vas_capabilities);
}
type_init(hypercall_register_types)
diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
index 7995bc0cb6..10df519b0a 100644
--- a/include/hw/ppc/spapr.h
+++ b/include/hw/ppc/spapr.h
@@ -545,6 +545,7 @@ struct SpaprMachineState {
#define H_INVALIDATE_PID 0x378
#define H_REGISTER_PROC_TBL 0x37C
#define H_SIGNAL_SYS_RESET 0x380
+#define H_QUERY_VAS_CAPABILITIES 0x398
#define H_INT_GET_SOURCE_INFO 0x3A8
#define H_INT_SET_SOURCE_CONFIG 0x3AC
--
2.35.1
- [PATCH 0/9] add LOG_UNSUPP log type + mark hcalls as unsupp, Daniel Henrique Barboza, 2022/03/07
- [PATCH 1/9] util/log.c: add LOG_UNSUPP type, Daniel Henrique Barboza, 2022/03/07
- [PATCH 2/9] hw/ppc/spapr_hcall.c: log h_clean_slb() as unsupported, Daniel Henrique Barboza, 2022/03/07
- [PATCH 3/9] hw/ppc/spapr_hcall.c: log h_invalidate_pid() as unsupported, Daniel Henrique Barboza, 2022/03/07
- [PATCH 4/9] hw/ppc/spapr_hcall.c: log h_copy_tofrom_guest() as unsupported, Daniel Henrique Barboza, 2022/03/07
- [PATCH 5/9] hw/ppc/spapr_hcall.c: log H_GET_EM_PARMS as unsupported, Daniel Henrique Barboza, 2022/03/07
- [PATCH 6/9] hw/ppc/spapr_hcall.c: log H_BEST_ENERGY as unsupported, Daniel Henrique Barboza, 2022/03/07
- [PATCH 7/9] hw/ppc/spapr_hcall.c: log H_QUERY_VAS_CAPABILITIES as unsupported,
Daniel Henrique Barboza <=
- [PATCH 8/9] hw/ppc/spapr_hcall.c: log H_GET_PPP as unsupported, Daniel Henrique Barboza, 2022/03/07
- [PATCH 9/9] hw/ppc/spapr_hcall.c: log H_VIOCTL as unsupported, Daniel Henrique Barboza, 2022/03/07
- Re: [PATCH 0/9] add LOG_UNSUPP log type + mark hcalls as unsupp, Philippe Mathieu-Daudé, 2022/03/07
- Re: [PATCH 0/9] add LOG_UNSUPP log type + mark hcalls as unsupp, Peter Maydell, 2022/03/07