RE: [PATCH 05/11] E500 core-specific code

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

 



> -----Original Message-----
> From: kvm-ppc-owner@xxxxxxxxxxxxxxx 
> [mailto:kvm-ppc-owner@xxxxxxxxxxxxxxx] On Behalf Of Hollis Blanchard
> Sent: Tuesday, December 16, 2008 7:03 AM
> To: Liu Yu-B13201
> Cc: kvm-ppc@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH 05/11] E500 core-specific code
> 
> (By the way, I know you split these patches because they're different
> files, but since patch 5 can't possibly work (or even build) without
> patches 6 and 7, they should be joined together.)
> 
> On Thu, 2008-12-11 at 17:11 +0800, Liu Yu wrote:
> > +int kvmppc_core_vcpu_translate(struct kvm_vcpu *vcpu,
> > +                               struct kvm_translation *tr)
> > +{
> > +       int index;
> > +       gva_t eaddr;
> > +       u8 pid;
> > +       u8 as;
> > +
> > +       eaddr = tr->linear_address;
> > +       pid = (tr->linear_address >> 32) & 0xff;
> > +       as = (tr->linear_address >> 40) & 0x1;
> > +
> > +       index = kvmppc_e500_tlb_search(vcpu, eaddr, as);
> 
> Why are you discarding pid here? Which brings up the next 
> point, from a
> later patch:

My mistake...
Fixed. Thanks.

> 
> > +int kvmppc_e500_tlb_search(struct kvm_vcpu *vcpu,
> > +                                               gva_t eaddr, int as)
> > +{
> > +       struct kvmppc_vcpu_e500 *vcpu_e500 = to_e500(vcpu);
> > +       int esel, tlbsel;
> > +
> > +       for (tlbsel = 0; tlbsel < 2; tlbsel++) {
> > +               esel = e500_tlb_index(vcpu_e500, eaddr, tlbsel,
> > +                               get_cur_pid(vcpu), as);
> > +               if (esel >= 0)
> > +                       return index_of(tlbsel, esel);
> > +       }
> > +
> > +       return -1;
> > +}
> 
> You can't possibly search a TLB without knowing the EA, AS, *and* PID.
> accordingly, PID should be a parameter to this function.
> 
> Now, if you told me you wanted to support e500's multiple PID 
> registers,
> I could understand that's something of an interface issue. But you're
> not, so...
> 
> By the way, do you happen to know if any major operating systems use
> PID1 or PID2?

Seems no operating system uses them.
E500-mc core has already removed them...

But head_fsl_booke.S accesses PID1 and PID2 at _start just in order to
clear them.
--
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