From: Hollis Blanchard <hollisb@us.ibm.com>
To: kvm-ppc@vger.kernel.org
Subject: RE: [patch 0/4] add e500 platform support for KVM
Date: Thu, 11 Sep 2008 14:45:14 +0000 [thread overview]
Message-ID: <1221144314.1316.5.camel@localhost.localdomain> (raw)
In-Reply-To: <1218790228-19549-1-git-send-email-yu.liu@freescale.com>
On Thu, 2008-09-11 at 16:43 +0800, Liu Yu-B13201 wrote:
> >
> > Could you talk a little about how it differs from the 440
> > implementation? For example, how are you using TLB0 and TLB1?
> >
> > Some of the refactoring you've done, like creating completely separate
> > kvmppc_handle_tlb_miss() functions, surprises me. For example, I'd
> > expect the DTLB miss code to be refactored like this:
> >
> > case BOOKE_INTERRUPT_DTLB_MISS:
> > gtlbe = kvmppc_dtlb_search(vcpu, eaddr); <- CORE HOOK
> > if (!gtlbe) {
> > /* The guest didn't have a mapping for it. */
> > kvmppc_queue_exception(vcpu, exit_nr);
> > vcpu->arch.dear = vcpu->arch.fault_dear;
> > vcpu->arch.esr = vcpu->arch.fault_esr;
> > kvmppc_deliver_dtlb_miss(vcpu); <- CORE HOOK
> > vcpu->stat.dtlb_real_miss_exits++;
> > r = RESUME_GUEST;
> > break;
> > }
> >
> > vcpu->arch.paddr_accessed = tlb_xlate(gtlbe, eaddr);
> > gfn = vcpu->arch.paddr_accessed >> PAGE_SHIFT;
> >
> > if (kvm_is_visible_gfn(vcpu->kvm, gfn)) {
> > kvmppc_mmu_map(vcpu, eaddr, gfn, gtlbe->tid,
> > gtlbe->word2); <- CORE HOOK
> > vcpu->stat.dtlb_virt_miss_exits++;
> > r = RESUME_GUEST;
> > } else
> > r = kvmppc_emulate_mmio(run, vcpu);
> >
> > break;
> >
>
> Hollis, I'm reconsiderring this place.
> The problem is that e500 has 2 TLB, so I need to get the tlb index and
> entry index from kvmppc_dtlb_search
> And if kvm_is_visible_gfn() returns nonzero, the two index are needed to
> manipulate TLB0 or TLB1.
OK, sounds reasonable. Feel free to change the prototypes of these hooks
to whatever you need, as long as it's clean and still lets me implement
440.
For example, maybe something like this:
int kvmppc_dtlb_index(struct kvm_vcpu *vcpu, u32 eaddr);
You could then encode the TLB index in the high bits of the return
index. Alternatively, you could pass &tlb and &index, but I think I like
that less.
--
Hollis Blanchard
IBM Linux Technology Center
next prev parent reply other threads:[~2008-09-11 14:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-15 8:50 [patch 0/4] add e500 platform support for KVM Liu Yu
2008-08-21 20:54 ` Hollis Blanchard
2008-08-22 11:00 ` Liu Yu
2008-08-29 17:09 ` Hollis Blanchard
2008-08-30 3:15 ` Liu Yu
2008-09-08 17:30 ` Hollis Blanchard
2008-09-09 2:08 ` Liu Yu-B13201
2008-09-09 11:08 ` Hollis Blanchard
2008-09-11 8:43 ` Liu Yu-B13201
2008-09-11 14:45 ` Hollis Blanchard [this message]
2008-09-12 2:28 ` Liu Yu-B13201
2008-09-12 2:31 ` Liu Yu-B13201
2008-09-12 14:49 ` Hollis Blanchard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1221144314.1316.5.camel@localhost.localdomain \
--to=hollisb@us.ibm.com \
--cc=kvm-ppc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.