qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] using mmap?


From: Joseph Miller
Subject: Re: [Qemu-devel] using mmap?
Date: Thu, 14 Dec 2006 12:01:32 -0500
User-agent: Thunderbird 1.5.0.7 (X11/20060927)

Tim Olson wrote:

On Dec 13, 2006, at 10:04 AM, Joseph Miller wrote:


Can someone elaborate on this a little? What is the difference between the SOFTMMU and the mmap()? Should I be using the --enable-system or the --disable-system for win32 guest on i386 debian host? Can someone give a little more insight on this technicality?

For full system emulation, qemu needs to support the emulated processor's ability to perform virtual->physical address translation for every memory reference (including data loads/stores and non-pc-relative branches). Using the SOFTMMU method, this is done at basic-block translation time by inlining a software TLB lookup routine for each memory reference. This expands a simple target load instruction into a sequence of ~20 host processor instructions (for x86 target, ppc host I see about 25 instructions for TLB lookup).

The other way to handle this would be to use the host's MMU to do the translation directly, via an mmap() system call which sets up the translation. Then the translated basic block would contain memory references using the target system's virtual address values, and the translation would occur in the host's hardware MMU during execution (fast), rather than having to execute a software TLB lookup. However, there are a number of restrictions to using mmap() translation (host and target address spaces cannot overlap, etc.) It appears that this feature has been removed from current versions of qemu, so the only way to do full system emulation is via the SOFTMMU method.

    -- tim



_______________________________________________
Qemu-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/qemu-devel


Does anyone know the reason for the removal of the mmap()? I have used a benchmarking tool (I think it was 3D Mark05 or 3D Mark06) and the memory access in the guest WinXP was slooooooow. Does anyone have any insight on making the hardware MMU function for linux-x86 host to WinXP 32-bit guest, even partially? Wouldn't this be a *significant* performance enhancement for this setup which I'm sure is a common one? Maybe this can be implemented for regular processes on the guest and only use the softmmu for the kernel? Would someone point me in the right direction for technical information? I have had to switch to vmware free player until Qemu+KQEMU reaches a point of similar performance, but I would really rather see Qemu advance further.

-Joseph




reply via email to

[Prev in Thread] Current Thread [Next in Thread]