On 10/4/23 14:57, Harsh Prateek Bora wrote:
diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c
index 9b1f225d4a..ca609cb5a4 100644
--- a/hw/ppc/spapr_hcall.c
+++ b/hw/ppc/spapr_hcall.c
@@ -1580,6 +1580,7 @@ static void hypercall_register_types(void)
      spapr_register_hypercall(KVMPPC_H_UPDATE_DT, h_update_dt);
      spapr_register_nested();
+    init_nested();

This is for hcall registration, not general subsystem init I think.
Arguably not sure if it matters, it just looks odd for everything
else to be an hcall except this. I would just add a new init
function.

I have introduced a new spapr_nested_init routine in spapr_nested.c which shall be called from spapr_instance_init. I think we can move GSB init there.

I revisited the code and feel it is better to do it post hypercall registrations in cap apply for nested-papr only as this init is needed only for nested papr API.

Reply via email to