Since cap-nested-hv and cap-nested-papr are mutually exclusive, now it makes sense to register api specfic hcalls only when respective capability is enabled, hence this change.
Signed-off-by: Harsh Prateek Bora <[email protected]> --- hw/ppc/spapr_caps.c | 1 + hw/ppc/spapr_hcall.c | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/ppc/spapr_caps.c b/hw/ppc/spapr_caps.c index 9b53f19ec8..ed3e638334 100644 --- a/hw/ppc/spapr_caps.c +++ b/hw/ppc/spapr_caps.c @@ -456,6 +456,7 @@ static void cap_nested_kvm_hv_apply(SpaprMachineState *spapr, if (!spapr->nested.api) { spapr->nested.api = NESTED_API_KVM_HV; + spapr_register_nested(); } else { error_setg(errp, "Nested-HV APIs are mutually exclusive/incompatible"); error_append_hint(errp, "Please use either cap-nested-hv or " diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c index 522a2396c7..8ae55087ec 100644 --- a/hw/ppc/spapr_hcall.c +++ b/hw/ppc/spapr_hcall.c @@ -1635,8 +1635,6 @@ static void hypercall_register_types(void) spapr_register_hypercall(KVMPPC_H_CAS, h_client_architecture_support); spapr_register_hypercall(KVMPPC_H_UPDATE_DT, h_update_dt); - - spapr_register_nested(); } type_init(hypercall_register_types) -- 2.39.3
