mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
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>
This commit is contained in:
parent
71c33ef000
commit
f560562602
3 changed files with 113 additions and 1 deletions
|
@ -586,8 +586,10 @@ struct SpaprMachineState {
|
|||
#define H_WATCHDOG 0x45C
|
||||
#define H_GUEST_GET_CAPABILITIES 0x460
|
||||
#define H_GUEST_SET_CAPABILITIES 0x464
|
||||
#define H_GUEST_CREATE 0x470
|
||||
#define H_GUEST_DELETE 0x488
|
||||
|
||||
#define MAX_HCALL_OPCODE H_GUEST_SET_CAPABILITIES
|
||||
#define MAX_HCALL_OPCODE H_GUEST_DELETE
|
||||
|
||||
/* The hcalls above are standardized in PAPR and implemented by pHyp
|
||||
* as well.
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue