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

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

 



On 21.01.2010, at 04:22, Liu Yu-B13201 wrote:

> 
> 
>> -----Original Message-----
>> From: Alexander Graf [mailto:agraf@xxxxxxx] 
>> Sent: Wednesday, January 20, 2010 6:47 PM
>> To: Liu Yu-B13201
>> Cc: kvm-ppc@xxxxxxxxxxxxxxx; avi@xxxxxxxxxx; hollis@xxxxxxxxxxxxxx
>> Subject: Re: [PATCH 3/3] kvmppc/e500: fix tlbcfg emulation
>> Importance: High
>> 
>> 
>> On 20.01.2010, at 09:03, Liu Yu wrote:
>> 
>>> Signed-off-by: Liu Yu <yu.liu@xxxxxxxxxxxxx>
>>> ---
>>> arch/powerpc/kvm/e500_emulate.c |    4 ++--
>>> 1 files changed, 2 insertions(+), 2 deletions(-)
>>> 
>>> diff --git a/arch/powerpc/kvm/e500_emulate.c 
>> b/arch/powerpc/kvm/e500_emulate.c
>>> index 95f8ec8..97337dd 100644
>>> --- a/arch/powerpc/kvm/e500_emulate.c
>>> +++ b/arch/powerpc/kvm/e500_emulate.c
>>> @@ -165,7 +165,7 @@ int kvmppc_core_emulate_mfspr(struct 
>> kvm_vcpu *vcpu, int sprn, int rt)
>>> 
>>> 	case SPRN_TLB0CFG:
>>> 	{
>>> -		ulong tmp = SPRN_TLB0CFG;
>>> +		ulong tmp = mfspr(SPRN_TLB0CFG);
>> 
>> Does this SPR value change? I hope not :-). If not, better 
>> read it once on init and then use it from there.
>> 
> 
> Out of curiousity. Does read it once in order to get better performance?
> If yes, I think read from register is faster than read from mem.

Well, performance and clean structure. Nothing should keep us from having different parameters in the guest than we have in the host.

Also, as soon as nesting comes into play, reads from memory are definitely faster.

But if you think it's not worth the effort, keep it as it is.

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

[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