qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fabrice Bellard <fabrice@bellard.org>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] 4G address space remapping on 64-bit host
Date: Fri, 29 Jun 2007 22:48:36 +0200	[thread overview]
Message-ID: <46857024.3050706@bellard.org> (raw)
In-Reply-To: <f43fc5580706290948p38b26255pd9bd1285b16b324a@mail.gmail.com>

Blue Swirl wrote:
> On 6/29/07, Fabrice Bellard <fabrice@bellard.org> wrote:
>> In fact, running in 64 bit is not necessary : It is simpler and more
>> efficient to use kqemu (or KVM) to handle the address space remapping.
>> The trick is to run the translator in the upper part or lower part of
>> the 32 bit address space and to protect it with segments.
> 
> Would that be hard to implement for the kqemu case? What is your
> guesstimate on what kind of performance benefit would Sparc32
> emulation get from that?

The kqemu part could be quite simple. A new execution mode could be 
added so that:

- shadow page table faults generate a specific signal in the user guest 
code.
- A kqemu "syscall" callable from the user guest code could be used to 
do the equivalent of tlb_set_page(), tlb_flush_page() and tlb_flush().

Note that I don't think it is worth using Xen for that. Modifying kqemu 
(or even KVM) should be more flexible. With kqemu it could also work on 
FreeBSD, Solaris, Windows and Linux.

The more complicated part is to split QEMU in two parts : one part 
containing the translator (and maybe some devices) would be executed as 
guest user code in kqemu. The other part would be executed as a regular 
process to handle what is left (graphic, disk access, etc).

If TB where MMIO accesses are done are compiled specifically, I think it 
can be quite efficient.

For the specific sparc32 case, I think that a better register window 
handling and a faster soft mmu code (using 4MB TLBs as it was proposed 
in a patch long ago) should already give an important speed boost (say a 
factor 1.5 to 2). The kqemu optimisation should give at least as much 
performance gain, depending on the ratio of instructions which do a 
memory access and on the number of TLB faults.

Regards,

Fabrice.

  reply	other threads:[~2007-06-29 20:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-29  9:41 [Qemu-devel] 4G address space remapping on 64-bit host Blue Swirl
2007-06-29 10:15 ` Fabrice Bellard
2007-06-29 16:48   ` Blue Swirl
2007-06-29 20:48     ` Fabrice Bellard [this message]
2007-07-03  7:48       ` Blue Swirl
2007-06-29 13:00 ` Paul Brook
2007-06-29 17:14   ` Gwenole Beauchesne
2007-06-29 21:03     ` Paul Brook

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=46857024.3050706@bellard.org \
    --to=fabrice@bellard.org \
    --cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).