qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
To: qemu-ppc@nongnu.org
Cc: qemu-devel@nongnu.org, sjitindarsingh@gmail.com,
	david@gibson.dropbear.id.au
Subject: [Qemu-devel] [QEMU-PPC] [PATCH 2/2] ppc/spapr: Enable H_PURR in-kernel handling
Date: Mon, 24 Jun 2019 15:58:12 +1000	[thread overview]
Message-ID: <20190624055812.3906-2-sjitindarsingh@gmail.com> (raw)
In-Reply-To: <20190624055812.3906-1-sjitindarsingh@gmail.com>

Enable in-kernel handling of the hcall H_PURR. This means that if the
kernel implements an hcall handler for H_PURR, it will be used.

Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
---
 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 39e698e9b0..b62dce8876 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -2851,6 +2851,9 @@ static void spapr_machine_init(MachineState *machine)
 
         /* Enable H_PAGE_INIT */
         kvmppc_enable_h_page_init();
+
+        /* Enable H_PURR */
+        kvmppc_enable_h_purr();
     }
 
     /* allocate RAM */
diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c
index 3bf0a46c33..0fd3ef4d48 100644
--- a/target/ppc/kvm.c
+++ b/target/ppc/kvm.c
@@ -2075,6 +2075,11 @@ void kvmppc_enable_h_page_init(void)
     kvmppc_enable_hcall(kvm_state, H_PAGE_INIT);
 }
 
+void kvmppc_enable_h_purr(void)
+{
+    kvmppc_enable_hcall(kvm_state, H_PURR);
+}
+
 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 45776cad79..b5d2feab22 100644
--- a/target/ppc/kvm_ppc.h
+++ b/target/ppc/kvm_ppc.h
@@ -24,6 +24,7 @@ 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_enable_h_purr(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);
@@ -145,6 +146,10 @@ static inline void kvmppc_enable_h_page_init(void)
 {
 }
 
+static inline void kvmppc_enable_h_purr(void)
+{
+}
+
 static inline void kvmppc_set_papr(PowerPCCPU *cpu)
 {
 }
-- 
2.13.6



  reply	other threads:[~2019-06-24  6:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-24  5:58 [Qemu-devel] [QEMU-PPC] [PATCH 1/2] ppc/spapr: Add implementation of hcall H_PURR Suraj Jitindar Singh
2019-06-24  5:58 ` Suraj Jitindar Singh [this message]
2019-06-28  9:29 ` David Gibson
2019-07-01  4:23   ` Suraj Jitindar Singh
2019-07-01  4:42     ` David Gibson

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=20190624055812.3906-2-sjitindarsingh@gmail.com \
    --to=sjitindarsingh@gmail.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /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).