Re: [PATCH v2 3/3] kvmppc/e500: fix tlbcfg emulation

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

 



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?

The rest looks good.

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

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux