diff options
| author | Harsh Prateek Bora <harshpb@linux.ibm.com> | 2024-03-08 16:49:33 +0530 |
|---|---|---|
| committer | Nicholas Piggin <npiggin@gmail.com> | 2024-03-13 02:47:04 +1000 |
| commit | f5605626024f0a694de14fba48568533084ce4fd (patch) | |
| tree | ca8342118eca56f39075f03c43080431505d7cf9 /include/hw/ppc/spapr_nested.h | |
| parent | 71c33ef000b690f0b5c40b6f2a2898575b2bf3f9 (diff) | |
| download | focaccia-qemu-f5605626024f0a694de14fba48568533084ce4fd.tar.gz focaccia-qemu-f5605626024f0a694de14fba48568533084ce4fd.zip | |
spapr: nested: Introduce H_GUEST_[CREATE|DELETE] hcalls.
Introduce the nested PAPR hcalls:
- H_GUEST_CREATE which is used to create and allocate resources for
nested guest being created.
- H_GUEST_DELETE which is used to delete and deallocate resources
for the nested guest being deleted. It also supports deleting all nested
guests at once using a deleteAll flag.
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Diffstat (limited to 'include/hw/ppc/spapr_nested.h')
| -rw-r--r-- | include/hw/ppc/spapr_nested.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/hw/ppc/spapr_nested.h b/include/hw/ppc/spapr_nested.h index 73687e03e4..56d43e540b 100644 --- a/include/hw/ppc/spapr_nested.h +++ b/include/hw/ppc/spapr_nested.h @@ -9,8 +9,13 @@ typedef struct SpaprMachineStateNested { #define NESTED_API_KVM_HV 1 bool capabilities_set; uint32_t pvr_base; + GHashTable *guests; } SpaprMachineStateNested; +typedef struct SpaprMachineStateNestedGuest { + uint32_t pvr_logical; +} SpaprMachineStateNestedGuest; + /* Nested PAPR API related macros */ #define H_GUEST_CAPABILITIES_COPY_MEM 0x8000000000000000 #define H_GUEST_CAPABILITIES_P9_MODE 0x4000000000000000 @@ -20,6 +25,8 @@ typedef struct SpaprMachineStateNested { #define H_GUEST_CAP_COPY_MEM_BMAP 0 #define H_GUEST_CAP_P9_MODE_BMAP 1 #define H_GUEST_CAP_P10_MODE_BMAP 2 +#define PAPR_NESTED_GUEST_MAX 4096 +#define H_GUEST_DELETE_ALL_FLAG 0x8000000000000000ULL /* * Register state for entering a nested guest with H_ENTER_NESTED. |