All of lore.kernel.org
 help / color / mirror / Atom feed
* [kvm-ppc-devel] KVM kernel/userspace TLB interface
@ 2008-01-08  0:21 Hollis Blanchard
  2008-01-08  7:12 ` Zhang Wei
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Hollis Blanchard @ 2008-01-08  0:21 UTC (permalink / raw)
  To: kvm-ppc

Hi Zhang, the administrative tools have a need to access the guest's TLB
state, for example to create the mapping for the initial code to execute
in. This requires a kernel interface to be exported to userspace, but as
you noted, the TLBs are very different between 440 and e500.

Here are a couple ideas:
      * Specify an initial guest state to avoid the need for this
        interface. For example, we could say all initial registers are
        0, and there is a TLB entry mapping virtual 0 to (guest)
        physical 0.
      * Have a per-core interface, e.g. KVM_440_SET_TLB_ENTRY and
        KVM_e500_SET_TLB_ENTRY. These would communicate via completely
        different structures. For example, the 440 structure would look
        something like { index, TID, word 0, word 1, word 2 }. We'd
        probably want to sanity check each ioctl to make sure it matches
        the vcpu type. Not only that, but we would need core-specific
        code in userspace to actually make the call.
      * Try to abstract it so that we have a higher-level "map this"
        interface. This could look something like { virtual addr, real
        addr, size, flags }. It's up to core-specific code to select in
        which TLB to create the mapping, which entry to clobber,
        interpret the meaning of "flags", etc. I guess the big downside
        here is that if we want to dump guest state for debugging
        purposes we'd still need the core-specific interface.

We could also try supporting both #2 and #3, so that "generic" code like
qemu could use the abstracted (and shared) "map this" call, while tools
with more specific needs could still get at the underlying details. I
guess #1 and #3 is like the normal userspace/kernel interface, where you
don't ordinarily need to specify register details, but the ptrace
interface is available when needed.

Thoughts?

-- 
Hollis Blanchard
IBM Linux Technology Center


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
kvm-ppc-devel mailing list
kvm-ppc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-01-24  8:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-08  0:21 [kvm-ppc-devel] KVM kernel/userspace TLB interface Hollis Blanchard
2008-01-08  7:12 ` Zhang Wei
2008-01-08 14:03 ` Avi Kivity
2008-01-22 13:25 ` Christian Ehrhardt
2008-01-23 13:38 ` Christian Ehrhardt
2008-01-23 21:05 ` Hollis Blanchard
2008-01-24  7:23 ` Christian Ehrhardt
2008-01-24  7:37 ` Hollis Blanchard
2008-01-24  7:58 ` Zhang Wei
2008-01-24  8:01 ` Zhang Wei

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.