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.bhus...@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 -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html