On 22.01.2010, at 12:12, Liu Yu-B13201 wrote: > > >> -----Original Message----- >> From: Alexander Graf [mailto:agraf@xxxxxxx] >> Sent: Friday, January 22, 2010 7:05 PM >> To: Liu Yu-B13201 >> Cc: kvm-ppc@xxxxxxxxxxxxxxx; kvm@xxxxxxxxxxxxxxx >> Subject: Re: [PATCH v2 3/3] kvmppc/e500: fix tlbcfg emulation >> >> >> On 22.01.2010, at 11:50, Liu Yu wrote: >> >>> commit 55fb1027c1cf9797dbdeab48180da530e81b1c39 doesn't >> update tlbcfg correctly. >>> Fix it and move this part to init code. >>> >>> Signed-off-by: Liu Yu <yu.liu@xxxxxxxxxxxxx> >>> --- >>> arch/powerpc/include/asm/kvm_e500.h | 2 ++ >>> arch/powerpc/kvm/e500_emulate.c | 20 ++------------------ >>> arch/powerpc/kvm/e500_tlb.c | 6 ++++++ >>> 3 files changed, 10 insertions(+), 18 deletions(-) >>> >>> diff --git a/arch/powerpc/include/asm/kvm_e500.h >> b/arch/powerpc/include/asm/kvm_e500.h >>> index 569dfd3..7fea26f 100644 >>> --- a/arch/powerpc/include/asm/kvm_e500.h >>> +++ b/arch/powerpc/include/asm/kvm_e500.h >>> @@ -56,6 +56,8 @@ struct kvmppc_vcpu_e500 { >>> u32 l1csr1; >>> u32 hid0; >>> u32 hid1; >>> + u32 tlb0cfg; >>> + u32 tlb1cfg; >>> >>> struct kvm_vcpu vcpu; >>> }; >>> diff --git a/arch/powerpc/kvm/e500_emulate.c >> b/arch/powerpc/kvm/e500_emulate.c >>> index 95f8ec8..8e3edfb 100644 >>> --- a/arch/powerpc/kvm/e500_emulate.c >>> +++ b/arch/powerpc/kvm/e500_emulate.c >>> @@ -164,25 +164,9 @@ int kvmppc_core_emulate_mfspr(struct >> kvm_vcpu *vcpu, int sprn, int rt) >>> kvmppc_set_gpr(vcpu, rt, vcpu_e500->mas7); break; >>> >>> case SPRN_TLB0CFG: >>> - { >>> - ulong tmp = SPRN_TLB0CFG; >>> - >>> - tmp &= ~0xfffUL; >>> - tmp |= vcpu_e500->guest_tlb_size[0]; >>> - kvmppc_set_gpr(vcpu, rt, tmp); >>> - break; >>> - } >>> - >>> + kvmppc_set_gpr(vcpu, rt, vcpu_e500->tlb0cfg); break; >> >> So before the guest couldn't change the guest TLB size and >> now it can? Is that on purpose? Mind to explain why the old >> code was there? >> > > What? The register is readonly. > I was thinking we could change guest TLB size online. > But I don't think guest kernel would like that. Oh, I see. Mind to resend this patch with a patch description that explains that? :-) Alex-- 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