[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Revived GUEST_BASE support for usermode emulati
From: |
Paul Brook |
Subject: |
Re: [Qemu-devel] [PATCH] Revived GUEST_BASE support for usermode emulation targets [v3] |
Date: |
Tue, 5 May 2009 15:34:33 +0100 |
User-agent: |
KMail/1.9.9 |
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
- [Qemu-devel] [PATCH] Revived GUEST_BASE support for usermode emulation targets [v3], Riku Voipio, 2009/05/05
- Re: [Qemu-devel] [PATCH] Revived GUEST_BASE support for usermode emulation targets [v3], Paul Brook, 2009/05/05
- Re: [Qemu-devel] [PATCH] Revived GUEST_BASE support for usermode emulation targets [v3], Riku Voipio, 2009/05/05
- Re: [Qemu-devel] [PATCH] Revived GUEST_BASE support for usermode emulation targets [v3],
Paul Brook <=
- Re: [Qemu-devel] [PATCH] Revived GUEST_BASE support for usermode emulation targets [v3], malc, 2009/05/05
- Re: [Qemu-devel] [PATCH] Revived GUEST_BASE support for usermode emulation targets [v4], Riku Voipio, 2009/05/05
- Re: [Qemu-devel] [PATCH] Revived GUEST_BASE support for usermode emulation targets [v4], Paul Brook, 2009/05/14
- Re: [Qemu-devel] [PATCH] Revived GUEST_BASE support for usermode emulation targets [v4], Martin Mohring, 2009/05/15
- Re: [Qemu-devel] [PATCH] Revived GUEST_BASE support for usermode emulation targets [v4], Paul Brook, 2009/05/15
- Re: [Qemu-devel] [PATCH] Revived GUEST_BASE support for usermode emulation targets [v4], Riku Voipio, 2009/05/15
- Re: [Qemu-devel] [PATCH] Revived GUEST_BASE support for usermode emulation targets [v4], Paul Brook, 2009/05/15
- Re: [Qemu-devel] [PATCH] Revived GUEST_BASE support for usermode emulation targets [v4], Paul Brook, 2009/05/15
- Re: [Qemu-devel] [PATCH] Revived GUEST_BASE support for usermode emulation targets [v4], malc, 2009/05/15
- Re: [Qemu-devel] [PATCH] Revived GUEST_BASE support for usermode emulation targets [v4], Martin Mohring, 2009/05/15