Re: [PATCH 1/6 v2] kvm: ppc: bookehv: Added wrapper macros for shadow registers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>
> ---
> 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


--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM Development]     [KVM ARM]     [KVM ia64]     [Linux Virtualization]     [Linux USB Devel]     [Linux Video]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux