spapr: nested: register nested-hv api hcalls only for cap-nested-hv

Since cap-nested-hv is an optional capability, it makes sense to register
api specfic hcalls only when respective capability is enabled. This
requires to introduce a new API to unregister hypercalls to maintain
sanity across guest reboot since caps are re-applied across reboots and
re-registeration of hypercalls would hit assert otherwise.

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>
This commit is contained in:
Harsh Prateek Bora 2024-03-08 16:49:27 +05:30 committed by Nicholas Piggin
parent 868cb6bac5
commit 6026fdbdbd
5 changed files with 50 additions and 5 deletions

View file

@ -95,7 +95,6 @@ struct nested_ppc_state {
int64_t tb_offset;
};
void spapr_register_nested(void);
void spapr_exit_nested(PowerPCCPU *cpu, int excp);
#endif /* HW_SPAPR_NESTED_H */