From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hollis Blanchard Date: Tue, 08 Jan 2008 00:21:28 +0000 Subject: [kvm-ppc-devel] KVM kernel/userspace TLB interface Message-Id: <1199751688.5741.40.camel@basalt> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-ppc@vger.kernel.org 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