Re: [Qemu-devel] [RFC] Host vs Guest memory allocation

2010-04-12 Thread Avi Kivity
On 04/12/2010 06:56 PM, Alexander Graf wrote: For fully system emulation on the other hand I can imagine quite some nice tricks one could pull. On PPC hosts you get a huge number of VSIDs that are basically like tags on the TLB. So if you'd give every x86 page table one VSID you'd potentially

Re: [Qemu-devel] [RFC] Host vs Guest memory allocation

2010-04-12 Thread Alexander Graf
On 12.04.2010, at 17:49, Avi Kivity wrote: > On 04/12/2010 06:39 PM, Alexander Graf wrote: >> >>> Pass everything through memory; will there be many transitions apart from >>> trapping instructions and missing translations? >>> >> I don't see how that would help with the 64-on-32 issue. Yo

Re: [Qemu-devel] [RFC] Host vs Guest memory allocation

2010-04-12 Thread Avi Kivity
On 04/12/2010 06:39 PM, Alexander Graf wrote: Pass everything through memory; will there be many transitions apart from trapping instructions and missing translations? I don't see how that would help with the 64-on-32 issue. You still don't get a 64 bit address space from running insid

Re: [Qemu-devel] [RFC] Host vs Guest memory allocation

2010-04-12 Thread Alexander Graf
On 12.04.2010, at 17:09, Avi Kivity wrote: > 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'v

Re: [Qemu-devel] [RFC] Host vs Guest memory allocation

2010-04-12 Thread Avi Kivity
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 i

Re: [Qemu-devel] [RFC] Host vs Guest memory allocation

2010-04-12 Thread Richard Henderson
On 04/12/2010 04:48 AM, Avi Kivity wrote: (1) Enable softmmu for userland. This is of course the highest overhead, but will work for all combinations. ... You could reduce the overhead somewhat by using kvm for memory translation on hosts that support it. Of course tcg translation and syscall

Re: [Qemu-devel] [RFC] Host vs Guest memory allocation

2010-04-12 Thread Richard Henderson
On 04/12/2010 04:25 AM, Paul Brook wrote: (1) Enable softmmu for userland. This is of course the highest overhead, but will work for all combinations. This has a significant performance hit, and gets very tricky for things like mmaped files. It has the advantage of actually working for s

Re: [Qemu-devel] [RFC] Host vs Guest memory allocation

2010-04-12 Thread Avi Kivity
On 04/06/2010 02:18 AM, Aurelien Jarno wrote: (1) Enable softmmu for userland. This is of course the highest overhead, but will work for all combinations. This option would solve a lot of problems and simplify a lot of code: unaligned access on hosts requiring strict alignements, d

Re: [Qemu-devel] [RFC] Host vs Guest memory allocation

2010-04-12 Thread Paul Brook
> The Problem: > > CONFIG_USER_ONLY kinda sorta tries to manage the distinction between > qemu memory and guest memory. This can be seen in the PAGE_RESERVED > frobbing and qemu_malloc etc. However, it doesn't handle random malloc > calls eg from libc itself or other libraries in use. > > Possibl

Re: [Qemu-devel] [RFC] Host vs Guest memory allocation

2010-04-05 Thread Aurelien Jarno
On Mon, Apr 05, 2010 at 03:45:23PM -0700, Richard Henderson wrote: > The Problem: > > CONFIG_USER_ONLY kinda sorta tries to manage the distinction between > qemu memory and guest memory. This can be seen in the PAGE_RESERVED > frobbing and qemu_malloc etc. However, it doesn't handle random malloc

[Qemu-devel] [RFC] Host vs Guest memory allocation

2010-04-05 Thread Richard Henderson
The Problem: CONFIG_USER_ONLY kinda sorta tries to manage the distinction between qemu memory and guest memory. This can be seen in the PAGE_RESERVED frobbing and qemu_malloc etc. However, it doesn't handle random malloc calls eg from libc itself or other libraries in use. Possible solutions: Th