public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Bharat Bhushan <Bharat.Bhushan@freescale.com>
Cc: <agraf@suse.de>, <kvm-ppc@vger.kernel.org>, <kvm@vger.kernel.org>,
	<stuart.yoder@freescale.com>
Subject: Re: [PATCH 1/6 v2] kvm: ppc: bookehv: Added wrapper macros for shadow registers
Date: Thu, 17 Jul 2014 19:55:53 -0500	[thread overview]
Message-ID: <1405644953.7714.54.camel@snotra.buserror.net> (raw)
In-Reply-To: <1405596700-2699-2-git-send-email-Bharat.Bhushan@freescale.com>

On Thu, 2014-07-17 at 17:01 +0530, Bharat Bhushan wrote:
> There are shadow registers like, GSPRG[0-3], GSRR0, GSRR1 etc on
> BOOKE-HV and these shadow registers are guest accessible.
> So these shadow registers needs to be updated on BOOKE-HV.
> This patch adds new macro for get/set helper of shadow register .
> 
> Signed-off-by: Bharat Bhushan <Bharat.Bhushan@freescale.com>
> ---
> v1->v2
>  - Fix compilation for book3s (separate macro etc)
> 
>  arch/powerpc/include/asm/kvm_ppc.h | 44 +++++++++++++++++++++++++++++++-------
>  1 file changed, 36 insertions(+), 8 deletions(-)
> 
> diff --git a/arch/powerpc/include/asm/kvm_ppc.h b/arch/powerpc/include/asm/kvm_ppc.h
> index f3f7611..7646994 100644
> --- a/arch/powerpc/include/asm/kvm_ppc.h
> +++ b/arch/powerpc/include/asm/kvm_ppc.h
> @@ -475,8 +475,20 @@ static inline bool kvmppc_shared_big_endian(struct kvm_vcpu *vcpu)
>  #endif
>  }
>  
> +#define SPRNG_WRAPPER_GET(reg, e500hv_spr)				\
> +static inline ulong kvmppc_get_##reg(struct kvm_vcpu *vcpu)		\
> +{									\
> +	return mfspr(e500hv_spr);					\
> +}									\
> +
> +#define SPRNG_WRAPPER_SET(reg, e500hv_spr)				\
> +static inline void kvmppc_set_##reg(struct kvm_vcpu *vcpu, ulong val)	\
> +{									\
> +	mtspr(e500hv_spr, val);						\
> +}									\

Why "e500hv" rather than "bookehv"?

-Scott

  reply	other threads:[~2014-07-18  0:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1405596700-2699-1-git-send-email-Bharat.Bhushan@freescale.com>
2014-07-17 11:31 ` [PATCH 1/6 v2] kvm: ppc: bookehv: Added wrapper macros for shadow registers Bharat Bhushan
2014-07-18  0:55   ` Scott Wood [this message]
2014-07-24 15:04     ` Alexander Graf
2014-07-17 11:31 ` [PATCH 2/6 v2] kvm: ppc: booke: Use the shared struct helpers of SRR0 and SRR1 Bharat Bhushan
2014-07-17 11:31 ` [PATCH 3/6 v2] kvm: ppc: booke: Use the shared struct helpers of SPRN_DEAR Bharat Bhushan
2014-07-17 11:31 ` [PATCH 4/6 v2] kvm: ppc: booke: Add shared struct helpers of SPRN_ESR Bharat Bhushan
2014-07-17 11:31 ` [PATCH 5/6 v2] kvm: ppc: booke: Use the shared struct helpers for SPRN_SPRG0-7 Bharat Bhushan
2014-07-17 11:31 ` [PATCH 6/6 v2] kvm: ppc: Add SPRN_EPR get helper function Bharat Bhushan
2014-07-17 13:44   ` Alexander Graf
2014-07-17 13:51   ` mihai.caraman
2014-07-17 13:46 ` [PATCH 0/6 v2] Cleanup and fixes related to helper SPRN_XX functions Alexander Graf

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=1405644953.7714.54.camel@snotra.buserror.net \
    --to=scottwood@freescale.com \
    --cc=Bharat.Bhushan@freescale.com \
    --cc=agraf@suse.de \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=stuart.yoder@freescale.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