From: Hollis Blanchard <hollisb@us.ibm.com>
To: kvm-ppc@vger.kernel.org
Subject: [kvm-ppc-devel] KVM kernel/userspace TLB interface
Date: Tue, 08 Jan 2008 00:21:28 +0000 [thread overview]
Message-ID: <1199751688.5741.40.camel@basalt> (raw)
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
next reply other threads:[~2008-01-08 0:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-08 0:21 Hollis Blanchard [this message]
2008-01-08 7:12 ` [kvm-ppc-devel] KVM kernel/userspace TLB interface 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
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=1199751688.5741.40.camel@basalt \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox