qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [QEMU-PPC] [PATCH] target/ppc/spapr: Enable H_PAGE_INIT in-kernel handling
Date: Thu, 7 Mar 2019 11:25:20 +1100	[thread overview]
Message-ID: <20190307002520.GB25123@umbus.fritz.box> (raw)
In-Reply-To: <20190306060608.19935-1-sjitindarsingh@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2529 bytes --]

On Wed, Mar 06, 2019 at 05:06:08PM +1100, Suraj Jitindar Singh wrote:
> The H_CALL H_PAGE_INIT can be used to zero or copy a page of guest
> memory. Enable the in-kernel H_PAGE_INIT handler.
> 
> The in-kernel handler takes half the time to complete compared to
> handling the H_CALL in userspace.
> 
> Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>

Applied, thanks.

> ---
>  hw/ppc/spapr.c       | 3 +++
>  target/ppc/kvm.c     | 5 +++++
>  target/ppc/kvm_ppc.h | 5 +++++
>  3 files changed, 13 insertions(+)
> 
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index cf1ef9ebd4..8ce97ff1e7 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -2822,6 +2822,9 @@ static void spapr_machine_init(MachineState *machine)
>  
>          /* H_CLEAR_MOD/_REF are mandatory in PAPR, but off by default */
>          kvmppc_enable_clear_ref_mod_hcalls();
> +
> +        /* Enable H_PAGE_INIT */
> +        kvmppc_enable_h_page_init();
>      }
>  
>      /* allocate RAM */
> diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c
> index 4e3f1e4b78..d0bfb076df 100644
> --- a/target/ppc/kvm.c
> +++ b/target/ppc/kvm.c
> @@ -2043,6 +2043,11 @@ void kvmppc_enable_clear_ref_mod_hcalls(void)
>      kvmppc_enable_hcall(kvm_state, H_CLEAR_MOD);
>  }
>  
> +void kvmppc_enable_h_page_init(void)
> +{
> +    kvmppc_enable_hcall(kvm_state, H_PAGE_INIT);
> +}
> +
>  void kvmppc_set_papr(PowerPCCPU *cpu)
>  {
>      CPUState *cs = CPU(cpu);
> diff --git a/target/ppc/kvm_ppc.h b/target/ppc/kvm_ppc.h
> index 2937b36cae..2c2ea30e87 100644
> --- a/target/ppc/kvm_ppc.h
> +++ b/target/ppc/kvm_ppc.h
> @@ -23,6 +23,7 @@ int kvmppc_set_interrupt(PowerPCCPU *cpu, int irq, int level);
>  void kvmppc_enable_logical_ci_hcalls(void);
>  void kvmppc_enable_set_mode_hcall(void);
>  void kvmppc_enable_clear_ref_mod_hcalls(void);
> +void kvmppc_enable_h_page_init(void);
>  void kvmppc_set_papr(PowerPCCPU *cpu);
>  int kvmppc_set_compat(PowerPCCPU *cpu, uint32_t compat_pvr);
>  void kvmppc_set_mpic_proxy(PowerPCCPU *cpu, int mpic_proxy);
> @@ -138,6 +139,10 @@ static inline void kvmppc_enable_clear_ref_mod_hcalls(void)
>  {
>  }
>  
> +static inline void kvmppc_enable_h_page_init(void)
> +{
> +}
> +
>  static inline void kvmppc_set_papr(PowerPCCPU *cpu)
>  {
>  }

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2019-03-07  0:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-06  6:06 [Qemu-devel] [QEMU-PPC] [PATCH] target/ppc/spapr: Enable H_PAGE_INIT in-kernel handling Suraj Jitindar Singh
2019-03-07  0:25 ` David Gibson [this message]

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=20190307002520.GB25123@umbus.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=sjitindarsingh@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).