From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Cc: mika.westerberg@iki.fi, Riku Voipio <riku.voipio@iki.fi>
Subject: Re: [Qemu-devel] [PATCH] Revived GUEST_BASE support for usermode emulation targets [v3]
Date: Tue, 5 May 2009 15:34:33 +0100 [thread overview]
Message-ID: <200905051534.33577.paul@codesourcery.com> (raw)
In-Reply-To: <20090505141817.GA31454@kos.to>
On Tuesday 05 May 2009, Riku Voipio wrote:
> On Tue, May 05, 2009 at 02:53:31PM +0100, Paul Brook wrote:
> > On Tuesday 05 May 2009, Riku Voipio wrote:
> > > +++ b/tcg/x86_64/tcg-target.c
> > > @@ -616,15 +616,15 @@ static void tcg_out_qemu_ld(TCGContext *s, const
> > > /* movzbl */
> > > - tcg_out_modrm_offset(s, 0xb6 | P_EXT, data_reg, r0, 0);
> > > + tcg_out_modrm_offset(s, 0xb6 | P_EXT, data_reg, r0,
> > > GUEST_BASE);
> >
> > This breaks when GUEST_BASE is large.
>
> usually we don't set it to very large, just high enough to overcome
> mmap_min_addr limits.
I'd expect a common use would be to move a 32-bit guest to an entirely empty
range of address space. Chances are this is going to be >4G.
> > 32-bit x86 is probably ok because GUEST_BASE is always a 32-bit value.
> > This is not true for x86-64. Incidentally tcg_out_modrm doesn't seem to
> > check this, and silently generates broken code.
>
> Should we rather check for a mazimum size on guest_base or revert to the
> lea -based version?
I expect LEA has the same bug. We definitely need to be able to handle large
offsets on 64-bit hosts, though obviously we want to avoid the overhead when
the offset is small.
Paul
next prev parent reply other threads:[~2009-05-05 14:34 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-29 18:03 [Qemu-devel] [PATCH 01/10] export mmap_find_vma for shmat riku.voipio
2009-04-29 18:03 ` [Qemu-devel] [PATCH 02/10] Implement shm* syscalls and fix 64/32bit errors riku.voipio
2009-04-29 18:03 ` [Qemu-devel] [PATCH 03/10] linux-user: implemented ELF coredump support for ARM target [v2] riku.voipio
2009-04-29 18:03 ` [Qemu-devel] [PATCH 04/10] linux-user: added x86 and x86_64 support for ELF coredump riku.voipio
2009-04-29 18:03 ` [Qemu-devel] [PATCH 05/10] linux-user: strace now handles guest strings correctly riku.voipio
2009-04-29 18:03 ` [Qemu-devel] [PATCH 06/10] Revived GUEST_BASE support for usermode emulation targets [v2] riku.voipio
2009-04-29 19:50 ` malc
2009-05-05 13:27 ` [Qemu-devel] [PATCH] Revived GUEST_BASE support for usermode emulation targets [v3] Riku Voipio
2009-05-05 13:53 ` Paul Brook
2009-05-05 14:18 ` Riku Voipio
2009-05-05 14:34 ` Paul Brook [this message]
2009-05-05 18:02 ` malc
2009-05-05 20:46 ` [Qemu-devel] [PATCH] Revived GUEST_BASE support for usermode emulation targets [v4] Riku Voipio
2009-05-15 2:25 ` Paul Brook
2009-05-15 8:41 ` Martin Mohring
2009-05-15 9:50 ` Paul Brook
2009-05-15 9:57 ` Riku Voipio
2009-05-15 10:02 ` Paul Brook
2009-05-15 10:09 ` Paul Brook
2009-05-15 12:07 ` malc
2009-05-15 10:12 ` Martin Mohring
2009-05-15 14:13 ` Riku Voipio
2009-05-15 15:25 ` Martin Mohring
2009-04-30 7:07 ` [Qemu-devel] [PATCH 06/10] Revived GUEST_BASE support for usermode emulation targets [v2] Martin Mohring
2009-04-29 18:03 ` [Qemu-devel] [PATCH 07/10] linux-user: fix utimensat when used as futimens riku.voipio
2009-04-29 18:03 ` [Qemu-devel] [PATCH 08/10] Fix struct termios host - target translation riku.voipio
2009-04-29 18:03 ` [Qemu-devel] [PATCH 09/10] linux-user: fix utimensat with NULL timespec riku.voipio
2009-04-29 18:03 ` [Qemu-devel] [PATCH 10/10] Return EOPNOTSUPP instead of ENOSYS for *xattr* syscalls riku.voipio
2009-04-30 7:09 ` [Qemu-devel] [PATCH 01/10] export mmap_find_vma for shmat Martin Mohring
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=200905051534.33577.paul@codesourcery.com \
--to=paul@codesourcery.com \
--cc=mika.westerberg@iki.fi \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
/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).