linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
To: Aravinda Prasad <aravinda@linux.vnet.ibm.com>,
	aik@au1.ibm.com, linuxppc-dev@lists.ozlabs.org
Cc: mahesh@linux.vnet.ibm.com, benh@au1.ibm.com, paulus@samba.org
Subject: Re: [PATCH] Add private HCALL to inform updated RTAS base and entry
Date: Wed, 27 Aug 2014 10:47:46 +0530	[thread overview]
Message-ID: <87bnr67bph.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <20140825130010.1029.65141.stgit@aravindap>

Aravinda Prasad <aravinda@linux.vnet.ibm.com> writes:

> This patch adds a private HCALL to inform qemu the updated
> rtas-base and rtas-entry address when OS invokes the call
> "instantiate-rtas". This is required as qemu allocates the
> error reporting structure in RTAS space upon a machine check
> exception and hence needs to know the updated RTAS.
>
> Enhancements to qemu to handle the private HCALL, prepare
> error log and invoke machine check notification routine
> are in a separate patch.
>
> Signed-off-by: Nikunj A. Dadhania <nikunj@linux.vnet.ibm.com>
> Signed-off-by: Aravinda Prasad <aravinda@linux.vnet.ibm.com>

Thanks, applied.

> ---
>  board-qemu/slof/rtas.fs   |    6 +++++-
>  lib/libhvcall/hvcall.code |    6 ++++++
>  lib/libhvcall/hvcall.in   |    1 +
>  lib/libhvcall/libhvcall.h |    4 +++-
>  4 files changed, 15 insertions(+), 2 deletions(-)
>
> diff --git a/board-qemu/slof/rtas.fs b/board-qemu/slof/rtas.fs
> index 41e30c2..c081b57 100644
> --- a/board-qemu/slof/rtas.fs
> +++ b/board-qemu/slof/rtas.fs
> @@ -174,7 +174,11 @@ rtas-node set-node
>
>  : instantiate-rtas ( adr -- entry )
>      dup rtas-base swap rtas-size move
> -    rtas-entry rtas-base - +
> +    dup rtas-entry rtas-base - +
> +    2dup hv-rtas-update 0 <> IF
> +    ." Failed to update RTAS " cr
> +    THEN
> +    nip   
>  ;
>
>  device-end
> diff --git a/lib/libhvcall/hvcall.code b/lib/libhvcall/hvcall.code
> index 744469f..0ff50f2 100644
> --- a/lib/libhvcall/hvcall.code
> +++ b/lib/libhvcall/hvcall.code
> @@ -111,6 +111,12 @@ PRIM(hv_X2d_cas)
>  	TOS.u = hv_cas(vec, buf, size);
>  MIRP
>
> +PRIM(hv_X2d_rtas_X2d_update)
> +	unsigned long rtas_entry   = TOS.u; POP;
> +	unsigned long rtas_base    = TOS.u;
> +	TOS.u = hv_generic(KVMPPC_H_RTAS_UPDATE, rtas_base, rtas_entry);
> +MIRP
> +
>  PRIM(get_X2d_print_X2d_version)
>  	unsigned long addr = TOS.u; POP;
>  	get_print_banner(addr);
> diff --git a/lib/libhvcall/hvcall.in b/lib/libhvcall/hvcall.in
> index e99d6d1..4437b77 100644
> --- a/lib/libhvcall/hvcall.in
> +++ b/lib/libhvcall/hvcall.in
> @@ -30,4 +30,5 @@ cod(RX!)
>
>  cod(hv-logical-memop)
>  cod(hv-cas)
> +cod(hv-rtas-update)
>  cod(get-print-version)
> diff --git a/lib/libhvcall/libhvcall.h b/lib/libhvcall/libhvcall.h
> index 6356a62..193b738 100644
> --- a/lib/libhvcall/libhvcall.h
> +++ b/lib/libhvcall/libhvcall.h
> @@ -24,7 +24,9 @@
>  #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_H_REPORT_MC_ERR  (KVMPPC_HCALL_BASE + 0x4)
> +#define KVMPPC_HCALL_MAX        KVMPPC_H_NMI_MCE
>
>  #ifndef __ASSEMBLY__

      reply	other threads:[~2014-08-27  5:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-25 13:00 [PATCH] Add private HCALL to inform updated RTAS base and entry Aravinda Prasad
2014-08-27  5:17 ` Nikunj A Dadhania [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=87bnr67bph.fsf@linux.vnet.ibm.com \
    --to=nikunj@linux.vnet.ibm.com \
    --cc=aik@au1.ibm.com \
    --cc=aravinda@linux.vnet.ibm.com \
    --cc=benh@au1.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mahesh@linux.vnet.ibm.com \
    --cc=paulus@samba.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).