aboutsummaryrefslogtreecommitdiff
path: root/include/hw/ppc
diff options
context:
space:
mode:
authorHarsh Prateek Bora <harshpb@linux.ibm.com>2024-03-08 16:49:30 +0530
committerNicholas Piggin <npiggin@gmail.com>2024-03-13 02:47:04 +1000
commit21a8d22f58b7e8eb70f5cf48ba119d7865a37fc0 (patch)
treedaf54335ac93a26cf815fe3d4d73ddaeb26bdcf0 /include/hw/ppc
parent1331d0acc76662bd423cb06db23cf0083da695e0 (diff)
downloadqemu-21a8d22f58b7e8eb70f5cf48ba119d7865a37fc0.zip
qemu-21a8d22f58b7e8eb70f5cf48ba119d7865a37fc0.tar.gz
qemu-21a8d22f58b7e8eb70f5cf48ba119d7865a37fc0.tar.bz2
spapr: nested: keep nested-hv related code restricted to its API.
spapr_exit_nested and spapr_get_pate_nested_hv contains code which is specific to nested-hv API. Isolating code flows based on API helps extending it to be used with different API as well. Suggested-by: Nicholas Piggin <npiggin@gmail.com> Reviewed-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Harsh Prateek Bora <harshpb@linux.ibm.com> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Diffstat (limited to 'include/hw/ppc')
-rw-r--r--include/hw/ppc/spapr_nested.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/hw/ppc/spapr_nested.h b/include/hw/ppc/spapr_nested.h
index 2488ea9..bf3a7b8 100644
--- a/include/hw/ppc/spapr_nested.h
+++ b/include/hw/ppc/spapr_nested.h
@@ -5,6 +5,8 @@
typedef struct SpaprMachineStateNested {
uint64_t ptcr;
+ uint8_t api;
+#define NESTED_API_KVM_HV 1
} SpaprMachineStateNested;
/*
@@ -103,4 +105,5 @@ void spapr_exit_nested(PowerPCCPU *cpu, int excp);
typedef struct SpaprMachineState SpaprMachineState;
bool spapr_get_pate_nested_hv(SpaprMachineState *spapr, PowerPCCPU *cpu,
target_ulong lpid, ppc_v3_pate_t *entry);
+uint8_t spapr_nested_api(SpaprMachineState *spapr);
#endif /* HW_SPAPR_NESTED_H */