qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: malc <av1474@comtv.ru>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] Revived GUEST_BASE support for usermode emulation targets.
Date: Fri, 10 Apr 2009 03:22:16 +0400 (MSD)	[thread overview]
Message-ID: <Pine.LNX.4.64.0904100320050.2290@linmac.oyster.ru> (raw)
In-Reply-To: <35e5475153bc8320cfa081cf6806090e19b998ab.1239288946.git.riku.voipio@iki.fi>

On Thu, 9 Apr 2009, riku.voipio@iki.fi wrote:

> From: Riku Voipio <riku.voipio@iki.fi>
> 
> From: Mika Westerberg <mika.westerberg@iki.fi>
> 
> - Now GUEST_BASE is dynamic and can be set from command line.
> - Qemu checks /proc/sys/vm/mmap_min_addr and sets GUEST_BASE
>   if needed.
> - Code generation supports GUEST_BASE for i386 and x86_64 hosts.
> 
> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
[..snip..]

> diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c
> index e0fd434..7cb51b5 100644
> --- a/tcg/i386/tcg-target.c
> +++ b/tcg/i386/tcg-target.c
> @@ -560,6 +560,12 @@ static void tcg_out_qemu_ld(TCGContext *s, const TCGArg *args,
>      /* add x(r1), r0 */
>      tcg_out_modrm_offset(s, 0x03, r0, r1, offsetof(CPUTLBEntry, addend) - 
>                           offsetof(CPUTLBEntry, addr_read));
> +#elif defined(CONFIG_USE_GUEST_BASE)
> +    /*
> +     * Add guest_base to all loads.
> +     */
> +    tcg_out_mov(s, r0, addr_reg);    /* movl addr_reg, r0 */
> +    tcg_out_addi(s, r0, GUEST_BASE); /* addl $GUEST_BASE, r0 */

I think 'lea' is warranted here, and likewise in _st and x86_64 case.

[..snip..]

-- 
mailto:av1474@comtv.ru

  reply	other threads:[~2009-04-09 23:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-09 15:05 [Qemu-devel] [PATCH 0/2] linux-user: revive GUEST_BASE support riku.voipio
2009-04-09 15:05 ` [Qemu-devel] [PATCH 1/2] linux-user: strace now handles guest strings correctly riku.voipio
2009-04-09 15:05 ` [Qemu-devel] [PATCH 2/2] Revived GUEST_BASE support for usermode emulation targets riku.voipio
2009-04-09 23:22   ` malc [this message]
2009-04-16 23:24     ` Mika Westerberg
2009-04-17 12:27       ` malc

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=Pine.LNX.4.64.0904100320050.2290@linmac.oyster.ru \
    --to=av1474@comtv.ru \
    --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).