All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: Scott Wood <scottwood@freescale.com>,
	Bharat Bhushan <Bharat.Bhushan@freescale.com>
Cc: 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, 24 Jul 2014 15:04:37 +0000	[thread overview]
Message-ID: <53D12085.7040609@suse.de> (raw)
In-Reply-To: <1405644953.7714.54.camel@snotra.buserror.net>


On 18.07.14 02:55, Scott Wood wrote:
> 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"?

No good reason. Bharat, could you please send a quick patch to rename them?


Alex


WARNING: multiple messages have this Message-ID (diff)
From: Alexander Graf <agraf@suse.de>
To: Scott Wood <scottwood@freescale.com>,
	Bharat Bhushan <Bharat.Bhushan@freescale.com>
Cc: 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, 24 Jul 2014 17:04:37 +0200	[thread overview]
Message-ID: <53D12085.7040609@suse.de> (raw)
In-Reply-To: <1405644953.7714.54.camel@snotra.buserror.net>


On 18.07.14 02:55, Scott Wood wrote:
> 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"?

No good reason. Bharat, could you please send a quick patch to rename them?


Alex

  reply	other threads:[~2014-07-24 15:04 UTC|newest]

Thread overview: 21+ 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-17 11:43   ` Bharat Bhushan
2014-07-18  0:55   ` Scott Wood
2014-07-18  0:55     ` Scott Wood
2014-07-24 15:04     ` Alexander Graf [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:43   ` 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:43   ` 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:43   ` 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:43   ` Bharat Bhushan
2014-07-17 11:31 ` [PATCH 6/6 v2] kvm: ppc: Add SPRN_EPR get helper function Bharat Bhushan
2014-07-17 11:43   ` Bharat Bhushan
2014-07-17 13:44   ` Alexander Graf
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
2014-07-17 13:46   ` 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=53D12085.7040609@suse.de \
    --to=agraf@suse.de \
    --cc=Bharat.Bhushan@freescale.com \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=scottwood@freescale.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.