(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: > +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? -- Hollis Blanchard IBM Linux Technology Center -- 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