From: David Gibson <david@gibson.dropbear.id.au>
To: Aravinda Prasad <aravinda@linux.vnet.ibm.com>
Cc: benh@au1.ibm.com, aik@ozlabs.ru, agraf@suse.de,
qemu-devel@nongnu.org, qemu-ppc@nongnu.org, paulus@samba.org,
sam.bobroff@au1.ibm.com
Subject: Re: [Qemu-devel] [PATCH 2/4] spapr: Register and handle HCALL to receive updated RTAS region
Date: Thu, 12 Nov 2015 14:42:41 +1100 [thread overview]
Message-ID: <20151112034241.GL5852@voom.redhat.com> (raw)
In-Reply-To: <20151111171530.4328.37008.stgit@aravindap>
[-- Attachment #1: Type: text/plain, Size: 2743 bytes --]
On Wed, Nov 11, 2015 at 10:45:30PM +0530, Aravinda Prasad wrote:
> Receive updates from SLOF about the updated rtas-base.
> A separate patch for SLOF [1] adds functionality to invoke
> a private HCALL whenever OS issues instantiate-rtas with
> a new rtas-base.
>
> This is required as QEMU needs to know the updated rtas-base
> as it allocates error reporting structure in RTAS space upon
> a machine check exception.
>
> [1] https://lists.ozlabs.org/pipermail/linuxppc-dev/2014-August/120386.html
>
> Signed-off-by: Aravinda Prasad <aravinda@linux.vnet.ibm.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
With the obvious proviso that the SLOF update needs to be merged (both
to SLOF and to qemu) first.
> ---
> hw/ppc/spapr_hcall.c | 8 ++++++++
> include/hw/ppc/spapr.h | 3 ++-
> 2 files changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c
> index 652ddf6..9703ed2 100644
> --- a/hw/ppc/spapr_hcall.c
> +++ b/hw/ppc/spapr_hcall.c
> @@ -580,6 +580,13 @@ static target_ulong h_rtas(PowerPCCPU *cpu, sPAPRMachineState *spapr,
> nret, rtas_r3 + 12 + 4*nargs);
> }
>
> +static target_ulong h_rtas_update(PowerPCCPU *cpu, sPAPRMachineState *spapr,
> + target_ulong opcode, target_ulong *args)
> +{
> + spapr->rtas_addr = args[0];
> + return 0;
> +}
> +
> static target_ulong h_logical_load(PowerPCCPU *cpu, sPAPRMachineState *spapr,
> target_ulong opcode, target_ulong *args)
> {
> @@ -1008,6 +1015,7 @@ static void hypercall_register_types(void)
>
> /* qemu/KVM-PPC specific hcalls */
> spapr_register_hypercall(KVMPPC_H_RTAS, h_rtas);
> + spapr_register_hypercall(KVMPPC_H_RTAS_UPDATE, h_rtas_update);
>
> spapr_register_hypercall(H_SET_MODE, h_set_mode);
>
> diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
> index 91a61ab..b5cadd7 100644
> --- a/include/hw/ppc/spapr.h
> +++ b/include/hw/ppc/spapr.h
> @@ -347,7 +347,8 @@ struct sPAPRMachineState {
> #define KVMPPC_H_LOGICAL_MEMOP (KVMPPC_HCALL_BASE + 0x1)
> /* Client Architecture support */
> #define KVMPPC_H_CAS (KVMPPC_HCALL_BASE + 0x2)
> -#define KVMPPC_HCALL_MAX KVMPPC_H_CAS
> +#define KVMPPC_H_RTAS_UPDATE (KVMPPC_HCALL_BASE + 0x3)
> +#define KVMPPC_HCALL_MAX KVMPPC_H_RTAS_UPDATE
>
> typedef struct sPAPRDeviceTreeUpdateHeader {
> uint32_t version_id;
>
--
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: 819 bytes --]
next prev parent reply other threads:[~2015-11-12 3:44 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-11 17:15 [Qemu-devel] [PATCH 0/4] target-ppc/spapr: Add FWNMI support in QEMU for PowerKVM guests Aravinda Prasad
2015-11-11 17:15 ` [Qemu-devel] [PATCH 1/4] spapr: Extend rtas-blob Aravinda Prasad
2015-11-12 3:40 ` David Gibson
2015-11-12 8:26 ` Thomas Huth
2015-11-12 11:53 ` David Gibson
2015-11-12 18:59 ` Aravinda Prasad
2015-11-11 17:15 ` [Qemu-devel] [PATCH 2/4] spapr: Register and handle HCALL to receive updated RTAS region Aravinda Prasad
2015-11-12 3:42 ` David Gibson [this message]
2015-11-12 5:28 ` [Qemu-devel] [Qemu-ppc] " Nikunj A Dadhania
2015-11-12 7:23 ` David Gibson
2015-11-11 17:15 ` [Qemu-devel] [PATCH 3/4] spapr: Handle "ibm, nmi-register" and "ibm, nmi-interlock" RTAS calls Aravinda Prasad
2015-11-12 4:02 ` David Gibson
2015-11-12 18:04 ` Aravinda Prasad
2015-11-12 9:23 ` Thomas Huth
2015-11-12 18:52 ` Aravinda Prasad
2015-11-11 17:16 ` [Qemu-devel] [PATCH 4/4] target-ppc: Handle NMI guest exit Aravinda Prasad
2015-11-12 4:29 ` David Gibson
2015-11-12 5:20 ` Aravinda Prasad
2015-11-12 8:09 ` Thomas Huth
2015-11-12 9:40 ` Thomas Huth
2015-11-12 18:49 ` Aravinda Prasad
2015-11-16 7:52 ` Thomas Huth
2015-11-16 10:07 ` Aravinda Prasad
2015-11-16 10:41 ` Thomas Huth
2015-11-16 11:57 ` Aravinda Prasad
2015-11-13 1:57 ` David Gibson
2015-11-13 7:03 ` Thomas Huth
2015-11-16 5:45 ` David Gibson
2015-11-12 18:23 ` Aravinda Prasad
2015-11-13 1:58 ` David Gibson
2015-11-13 4:53 ` Aravinda Prasad
2015-11-13 5:57 ` David Gibson
2015-11-13 6:27 ` Aravinda Prasad
2015-11-19 1:56 ` Alexey Kardashevskiy
2015-11-19 16:02 ` Aravinda Prasad
2015-11-16 3:50 ` Paul Mackerras
2015-11-16 9:01 ` Thomas Huth
2015-11-16 11:29 ` Aravinda Prasad
2015-11-16 21:46 ` Paul Mackerras
2015-11-12 4:30 ` [Qemu-devel] [PATCH 0/4] target-ppc/spapr: Add FWNMI support in QEMU for PowerKVM guests 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=20151112034241.GL5852@voom.redhat.com \
--to=david@gibson.dropbear.id.au \
--cc=agraf@suse.de \
--cc=aik@ozlabs.ru \
--cc=aravinda@linux.vnet.ibm.com \
--cc=benh@au1.ibm.com \
--cc=paulus@samba.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=sam.bobroff@au1.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 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).