|
From: | Avi Kivity |
Subject: | Re: [Qemu-devel] [RFC] Host vs Guest memory allocation |
Date: | Mon, 12 Apr 2010 18:09:54 +0300 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Thunderbird/3.0.4 |
On 04/12/2010 05:55 PM, Richard Henderson wrote:
You could reduce the overhead somewhat by using kvm for memory translation on hosts that support it. Of course tcg translation and syscall costs will grow by the exit overhead.I've thought about this a bit, and what seemed to be the stickler is what is the environment that runs in the guest? TCG generated code is of course fine, but what about the helper functions? How can wetell whether a given helper function can run in the restricted environment of the guest or whether it needs to transition back to the environment of the host to do its work?
I'd guess all helpers can run in guest context except those that cause a transition to target kernel mode.
I suppose the obvious solution is some sort of flag on the function that well-maintained ports will set. But the whole marshalling thing is still pretty tricky.
Pass everything through memory; will there be many transitions apart from trapping instructions and missing translations?
For extra points run the translator in guest context. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.
[Prev in Thread] | Current Thread | [Next in Thread] |