All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Laurent Desnogues <laurent.desnogues@gmail.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	patches@linaro.org, Riku Voipio <riku.voipio@iki.fi>,
	qemu-devel@nongnu.org, Aurelien Jarno <aurelien@aurel32.net>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH 0/2] make guest-base support mandatory for TCG backends
Date: Tue, 09 Oct 2012 16:58:50 +0200	[thread overview]
Message-ID: <50743BAA.8050306@redhat.com> (raw)
In-Reply-To: <CABoDooPOSX2N=Ya_D9TYRBZAFghFkKPa7f6RMV7DsN9DQpqz3g@mail.gmail.com>

Il 09/10/2012 16:50, Laurent Desnogues ha scritto:
> On Tue, Oct 9, 2012 at 3:28 PM, Richard Henderson <rth@twiddle.net> wrote:
>> On 10/09/2012 06:16 AM, Peter Maydell wrote:
>>> That is, we could drop CONFIG_USER_GUEST_BASE. Does anybody have
>>> a practical use case for the --disable-guest-base configuration?
>>
>> Nope, because the backends are good at eliminating the overhead
>> during tcg_target_qemu_prologue if guest_base turns out to be zero.
> 
> I had some difficulties getting the same code generated with
> --enable-guest-base as the one generated with --disable-guest-base,
> for ARM on x86_64.  One has to play with -B 0 and -R, and that was
> not obvious, while --disable-guest-base was obvious for me :-).
> 
> Guest ARM, host x86_64.
> 
> $ ./arm-linux-user/qemu-arm -singlestep -d in_asm,out_asm
> /work/qemu/Tests/arm/gcc-a9-O3 x
> 
> IN:
> 0x00008138:  e59fc010      ldr	ip, [pc, #16]	; 0x8150
> 
> OUT: [size=53]
> 0x602296c0:  mov    $0x8150,%ebp
> 0x602296c5:  mov    $0x2ac1f9b61000,%rdi
> 0x602296cf:  add    %rbp,%rdi
> 0x602296d2:  mov    (%rdi),%ebp
> 0x602296d4:  mov    %ebp,0x30(%r14)
> 0x602296d8:  jmpq   0x602296dd
> 0x602296dd:  mov    $0x813c,%ebp
> 0x602296e2:  mov    %ebp,0x3c(%r14)
> 0x602296e6:  mov    $0x2ac1f6760281,%rax
> 0x602296f0:  jmpq   0x6226d6b6
> 
> Running with -B 0 and playing with -R values until the program
> succeeds in loading finally produces the same code as when
> compiling QEMU with --disable-guest-base
> 
> OUT: [size=41]
> 0x602281a0:  mov    $0x8150,%ebp
> 0x602281a5:  mov    0x0(%rbp),%ebp
> 0x602281a8:  mov    %ebp,0x30(%r14)
> 0x602281ac:  jmpq   0x602281b1
> 0x602281b1:  mov    $0x813c,%ebp
> 0x602281b6:  mov    %ebp,0x3c(%r14)
> 0x602281ba:  mov    $0x2b9b26096281,%rax
> 0x602281c4:  jmpq   0x6226c1b6
> 
> I know the reason why reserved_va was set to the current value
> (cf 288e65b9eea0c9b3cbe21be46f3e24e4e8b2a090), but I
> thought it was interesting to point out the above.

Perhaps you want to revive this patch:

http://lists.gnu.org/archive/html/qemu-devel/2010-06/msg00509.html

Paolo

  reply	other threads:[~2012-10-09 14:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-09 13:16 [Qemu-devel] [PATCH 0/2] make guest-base support mandatory for TCG backends Peter Maydell
2012-10-09 13:16 ` [Qemu-devel] [PATCH 1/2] configure: Remove unnecessary host_guest_base code Peter Maydell
2012-10-09 13:30   ` Richard Henderson
2012-10-09 13:16 ` [Qemu-devel] [PATCH 2/2] tcg: Remove TCG_TARGET_HAS_GUEST_BASE define Peter Maydell
2012-10-09 13:31   ` Richard Henderson
2012-10-09 13:28 ` [Qemu-devel] [PATCH 0/2] make guest-base support mandatory for TCG backends Richard Henderson
2012-10-09 14:50   ` Laurent Desnogues
2012-10-09 14:58     ` Paolo Bonzini [this message]
2012-10-09 18:22       ` Richard Henderson
2012-10-09 14:17 ` Aurelien Jarno

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=50743BAA.8050306@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=aurelien@aurel32.net \
    --cc=laurent.desnogues@gmail.com \
    --cc=patches@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    --cc=rth@twiddle.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.