[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kvm-ppc
Subject:    Re: [PATCH] KVM: PPC: e500: Emulate TMCFG0 TMRN register
From:       Scott Wood <scottwood () freescale ! com>
Date:       2015-09-24 22:17:01
Message-ID: 1443133021.32298.60.camel () freescale ! com
[Download RAW message or body]

On Thu, 2015-09-24 at 09:56 +0300, Laurentiu Tudor wrote:
> Emulate TMCFG0 TMRN register exposing one HW thread per vcpu.
> 
> Signed-off-by: Mihai Caraman <mihai.caraman@freescale.com>
> [Laurentiu.Tudor@freescale.com: rebased on latest kernel,
>  use define instead of hardcoded value]
> Signed-off-by: Laurentiu Tudor <Laurentiu.Tudor@freescale.com>
> ---
> Needs this patch: https://patchwork.ozlabs.org/patch/521752/
> 
>  arch/powerpc/include/asm/disassemble.h |  5 +++++
>  arch/powerpc/kvm/e500_emulate.c        | 11 +++++++++++
>  2 files changed, 16 insertions(+)

KVM patches should be sent to kvm@vger.kernel.org in addition to kvm-
ppc@vger.kernel.org.

> @@ -165,6 +167,15 @@ int kvmppc_core_emulate_op_e500(struct kvm_run *run, 
> struct kvm_vcpu *vcpu,
>                       emulated = kvmppc_e500_emul_tlbivax(vcpu, ea);
>                       break;
>  
> +             case XOP_MFTMR:
> +                     /* Expose one thread per vcpu */
> +                     if (get_tmrn(inst) == TMRN_TMCFG0)
> +                             kvmppc_set_gpr(vcpu, rt,
> +                                            1 | (1 << TMRN_TMCFG0_NATHRD_SHIFT));
> +                     else
> +                             emulated = EMULATE_FAIL;
> +                     break;

Line length.  Please move the implementation into its own function like all 
the others.

-Scott

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

Configure | About | News | Add a list | Sponsored by KoreLogic