All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Nicholas Piggin" <npiggin@gmail.com>
To: "Harsh Prateek Bora" <harshpb@linux.ibm.com>, <qemu-ppc@nongnu.org>
Cc: <clegoate@redhat.com>, <qemu-devel@nongnu.org>,
	<mikey@neuling.org>, <vaibhav@linux.ibm.com>,
	<jniethe5@gmail.com>, <sbhat@linux.ibm.com>,
	<kconsul@linux.vnet.ibm.com>, <danielhb413@gmail.com>
Subject: Re: [PATCH v2 05/14] spapr: nested: register nested-hv api hcalls only for cap-nested-hv
Date: Wed, 29 Nov 2023 14:03:27 +1000	[thread overview]
Message-ID: <CXAZX3XHE6O8.1CFCJWZKXV9EB@wheely> (raw)
In-Reply-To: <20231012104951.194876-6-harshpb@linux.ibm.com>

On Thu Oct 12, 2023 at 8:49 PM AEST, Harsh Prateek Bora wrote:
> 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>

I think this basically makes sense anyway since if you don't enable
cap-nested-hv, then no need to register the hcalls. This patch could
be pulled to the front of the series.

Reviewed-by: Nicholas Piggin <npiggin@gmail.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)



  reply	other threads:[~2023-11-29  4:04 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-12 10:49 [PATCH v2 00/14] Nested PAPR API (KVM on PowerVM) Harsh Prateek Bora
2023-10-12 10:49 ` [PATCH v2 01/14] spapr: nested: move nested part of spapr_get_pate into spapr_nested.c Harsh Prateek Bora
2023-11-29  3:47   ` Nicholas Piggin
2023-10-12 10:49 ` [PATCH v2 02/14] spapr: nested: Introduce SpaprMachineStateNested to store related info Harsh Prateek Bora
2023-11-29  3:48   ` Nicholas Piggin
2023-10-12 10:49 ` [PATCH v2 03/14] spapr: nested: Document Nested PAPR API Harsh Prateek Bora
2023-10-12 10:49 ` [PATCH v2 04/14] spapr: nested: Introduce cap-nested-papr for " Harsh Prateek Bora
2023-11-29  4:01   ` Nicholas Piggin
2023-11-30  6:19     ` Harsh Prateek Bora
2023-11-30 11:11       ` Nicholas Piggin
2023-12-01  5:34         ` Harsh Prateek Bora
2023-10-12 10:49 ` [PATCH v2 05/14] spapr: nested: register nested-hv api hcalls only for cap-nested-hv Harsh Prateek Bora
2023-11-29  4:03   ` Nicholas Piggin [this message]
2023-10-12 10:49 ` [PATCH v2 06/14] spapr: nested: Introduce H_GUEST_[GET|SET]_CAPABILITIES hcalls Harsh Prateek Bora
2023-10-12 10:49 ` [PATCH v2 07/14] spapr: nested: Introduce H_GUEST_[CREATE|DELETE] hcalls Harsh Prateek Bora
2023-10-12 10:49 ` [PATCH v2 08/14] spapr: nested: Introduce H_GUEST_CREATE_VPCU hcall Harsh Prateek Bora
2023-10-12 10:49 ` [PATCH v2 09/14] spapr: nested: Initialize the GSB elements lookup table Harsh Prateek Bora
2023-10-12 10:49 ` [PATCH v2 10/14] spapr: nested: Introduce H_GUEST_[GET|SET]_STATE hcalls Harsh Prateek Bora
2023-10-12 10:49 ` [PATCH v2 11/14] spapr: nested: Use correct source for parttbl info for nested PAPR API Harsh Prateek Bora
2023-11-29  4:15   ` Nicholas Piggin
2023-10-12 10:49 ` [PATCH v2 12/14] spapr: nested: rename nested_host_state to nested_hv_host Harsh Prateek Bora
2023-10-12 10:49 ` [PATCH v2 13/14] spapr: nested: keep nested-hv exit code restricted to its API Harsh Prateek Bora
2023-11-29  4:16   ` Nicholas Piggin
2023-10-12 10:49 ` [PATCH v2 14/14] spapr: nested: Introduce H_GUEST_RUN_VCPU hcall Harsh Prateek Bora
2023-11-29  4:58   ` Nicholas Piggin
2023-11-13 13:15 ` [PATCH v2 00/14] Nested PAPR API (KVM on PowerVM) Nicholas Piggin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CXAZX3XHE6O8.1CFCJWZKXV9EB@wheely \
    --to=npiggin@gmail.com \
    --cc=clegoate@redhat.com \
    --cc=danielhb413@gmail.com \
    --cc=harshpb@linux.ibm.com \
    --cc=jniethe5@gmail.com \
    --cc=kconsul@linux.vnet.ibm.com \
    --cc=mikey@neuling.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=sbhat@linux.ibm.com \
    --cc=vaibhav@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.