[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 05/14] spapr: nested: register nested-hv api hcalls only for c
From: |
Harsh Prateek Bora |
Subject: |
[PATCH v2 05/14] spapr: nested: register nested-hv api hcalls only for cap-nested-hv |
Date: |
Thu, 12 Oct 2023 16:19:42 +0530 |
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 <harshpb@linux.ibm.com>
---
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
- [PATCH v2 00/14] Nested PAPR API (KVM on PowerVM), Harsh Prateek Bora, 2023/10/12
- [PATCH v2 01/14] spapr: nested: move nested part of spapr_get_pate into spapr_nested.c, Harsh Prateek Bora, 2023/10/12
- [PATCH v2 04/14] spapr: nested: Introduce cap-nested-papr for Nested PAPR API, Harsh Prateek Bora, 2023/10/12
- [PATCH v2 03/14] spapr: nested: Document Nested PAPR API, Harsh Prateek Bora, 2023/10/12
- [PATCH v2 06/14] spapr: nested: Introduce H_GUEST_[GET|SET]_CAPABILITIES hcalls., Harsh Prateek Bora, 2023/10/12
- [PATCH v2 02/14] spapr: nested: Introduce SpaprMachineStateNested to store related info., Harsh Prateek Bora, 2023/10/12
- [PATCH v2 08/14] spapr: nested: Introduce H_GUEST_CREATE_VPCU hcall., Harsh Prateek Bora, 2023/10/12
- [PATCH v2 09/14] spapr: nested: Initialize the GSB elements lookup table., Harsh Prateek Bora, 2023/10/12
- [PATCH v2 05/14] spapr: nested: register nested-hv api hcalls only for cap-nested-hv,
Harsh Prateek Bora <=
- [PATCH v2 11/14] spapr: nested: Use correct source for parttbl info for nested PAPR API., Harsh Prateek Bora, 2023/10/12
- [PATCH v2 13/14] spapr: nested: keep nested-hv exit code restricted to its API., Harsh Prateek Bora, 2023/10/12
- [PATCH v2 10/14] spapr: nested: Introduce H_GUEST_[GET|SET]_STATE hcalls., Harsh Prateek Bora, 2023/10/12
- [PATCH v2 07/14] spapr: nested: Introduce H_GUEST_[CREATE|DELETE] hcalls., Harsh Prateek Bora, 2023/10/12
- [PATCH v2 12/14] spapr: nested: rename nested_host_state to nested_hv_host, Harsh Prateek Bora, 2023/10/12
- [PATCH v2 14/14] spapr: nested: Introduce H_GUEST_RUN_VCPU hcall., Harsh Prateek Bora, 2023/10/12