On 18.07.2011, at 20:06, Scott Wood wrote:

> On Mon, 18 Jul 2011 18:30:51 +0200
> Alexander Graf <[email protected]> wrote:
> 
>> 
>> On 18.07.2011, at 18:12, Scott Wood wrote:
>> 
>>> On Mon, 18 Jul 2011 11:16:10 +0200
>>> Alexander Graf <[email protected]> wrote:
>>> 
>>>> 
>>>> On 08.07.2011, at 01:41, Scott Wood wrote:
>>>> 
>>>>> It should contain the way, not the absolute TLB0 index.
>>>>> 
>>>>> Signed-off-by: Scott Wood <[email protected]>
>>>>> ---
>>>>> arch/powerpc/kvm/e500_tlb.c |    3 +++
>>>>> 1 files changed, 3 insertions(+), 0 deletions(-)
>>>>> 
>>>>> diff --git a/arch/powerpc/kvm/e500_tlb.c b/arch/powerpc/kvm/e500_tlb.c
>>>>> index 13c432e..2e99d66 100644
>>>>> --- a/arch/powerpc/kvm/e500_tlb.c
>>>>> +++ b/arch/powerpc/kvm/e500_tlb.c
>>>>> @@ -788,6 +788,9 @@ int kvmppc_e500_emul_tlbsx(struct kvm_vcpu *vcpu, int 
>>>>> rb)
>>>>>   }
>>>>> 
>>>>>   if (gtlbe) {
>>>>> +         if (tlbsel == 0)
>>>>> +                 esel &= KVM_E500_TLB0_WAY_NUM - 1;
>>>> 
>>>> Is it guaranteed that MAS0_ESEL always returns at most the TLB1 index nr?
>>> 
>>> What's the relevance of TLB1 here?
>>> 
>>> For TLB0, esel is supposed to contain the way, not the index into the full
>>> TLB.
>> 
>> Well, for both esel is supposed to contain the way, just that for TLB1 it 
>> happens to be the index, or am I misunderstanding something here?
>> The question was basically why we need to mask out on TLB0, but not on TLB1.
> 
> It would be a no-op on TLB1, because there's only one "set".

I guess I'm merely not understanding why we have the non-way bits set in TLB0 
entries, but not in TLB1 ones :). Do we pass in the real array index?


Alex

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

Reply via email to