From: "J. Mayer" <l_indien@magic.fr>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] amd64 compile
Date: Sun, 25 Apr 2004 20:20:48 +0200 [thread overview]
Message-ID: <1082917248.14652.7.camel@rapid> (raw)
In-Reply-To: <Pine.LNX.4.44.0404251715500.31508-100000@wrasse.demon.co.uk>
[-- Attachment #1: Type: text/plain, Size: 1751 bytes --]
On Sun, 2004-04-25 at 18:23, Martin Garton wrote:
> On Sun, 25 Apr 2004, J. Mayer wrote:
>
> > Your patch is incorrect:
> > - don't remove the -Wall: the warnings you can see are mostly bugs
due
> > to the fact that qemu assumes that unsigned long is 32 bits long.
>
> Sorry - That was for my testing. I didn't mean to include that in the
> patch.
Don't have to be sorry, IMHO, all tries can bring good ideas :-)
> I wasn't attempting to fix those warnings/bugs yet.
>
> Do you think a solution to the problem on hosts where sizeof(void *)
!=
> sizeof(int) could be best solved by macros such as pointer_to_int()
and
> int_to_pointer() which did whatever is appropriate for that host?
>
> Of course it depends how its being used, I don't know enough about the
> code to tell whether its storing int values in pointers (which would
be
> fine and could be handled by a macro) or vice versa (which obviously
> wouldnt)
Fabrice pointed out that it's quite more complicated. This approach
would solve the case where host_ulong is 64 bits and target_ulong is 32
bits. But we still could not be able to emulate a 64 bits machine on a
32 bits host.
> > - to compile qemu usermode emulation, you need to edit the amd64.ld
> > file, which is duplicated. Remove half of the file, and the link
won't
> > fail.
Here's another patch that makes me able to launch PPC programs on my
amd64 and may be able to fix usermode emulation for all 64 bits hosts.
The bug was that the host mmap start address always remained the same
when requested address is NULL,
which makes mmap to be remapped elsewhere, above 4GB, on my machine.
And another patch is there to fix use of debug flags with usermode
emulation.
--
J. Mayer <l_indien@magic.fr>
Never organized
[-- Attachment #2: mmap.c.diff --]
[-- Type: text/x-patch, Size: 1233 bytes --]
Index: linux-user/mmap.c
===================================================================
RCS file: /cvsroot/qemu/qemu/linux-user/mmap.c,v
retrieving revision 1.5
diff -u -d -w -B -b -d -p -r1.5 mmap.c
--- linux-user/mmap.c 17 Mar 2004 23:46:04 -0000 1.5
+++ linux-user/mmap.c 25 Apr 2004 17:16:26 -0000
@@ -152,6 +152,9 @@ long target_mmap(unsigned long start, un
int flags, int fd, unsigned long offset)
{
unsigned long ret, end, host_start, host_end, retaddr, host_offset, host_len;
+#if defined(__alpha__) || defined(__sparc__) || defined(__x86_64__)
+ static unsigned long last_start = 0x40000000;
+#endif
#ifdef DEBUG_MMAP
{
@@ -190,8 +193,10 @@ long target_mmap(unsigned long start, un
if (!(flags & MAP_FIXED)) {
#if defined(__alpha__) || defined(__sparc__) || defined(__x86_64__)
/* tell the kenel to search at the same place as i386 */
- if (host_start == 0)
- host_start = 0x40000000;
+ if (host_start == 0) {
+ host_start = last_start;
+ last_start += HOST_PAGE_ALIGN(len);
+ }
#endif
if (host_page_size != real_host_page_size) {
/* NOTE: this code is only for debugging with '-p' option */
[-- Attachment #3: main.c.diff --]
[-- Type: text/x-patch, Size: 730 bytes --]
Index: linux-user/main.c
===================================================================
RCS file: /cvsroot/qemu/qemu/linux-user/main.c,v
retrieving revision 1.47
diff -u -d -w -B -b -d -p -r1.47 main.c
--- linux-user/main.c 12 Apr 2004 20:39:29 -0000 1.47
+++ linux-user/main.c 25 Apr 2004 17:30:32 -0000
@@ -850,8 +845,7 @@ int main(int argc, char **argv)
} else if (!strcmp(r, "d")) {
int mask;
CPULogItem *item;
-
- mask = cpu_str_to_log_mask(optarg);
+ mask = cpu_str_to_log_mask(argv[optind++]);
if (!mask) {
printf("Log items (comma separated):\n");
for(item = cpu_log_items; item->mask != 0; item++) {
next prev parent reply other threads:[~2004-04-25 18:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-25 15:32 [Qemu-devel] amd64 compile Martin Garton
2004-04-25 16:07 ` J. Mayer
2004-04-25 16:23 ` Martin Garton
2004-04-25 18:20 ` J. Mayer [this message]
2004-04-25 18:40 ` J. Mayer
2004-04-25 19:02 ` Fabrice Bellard
2004-04-25 19:46 ` J. Mayer
2004-04-25 17:46 ` [Qemu-devel] " Gabriel Ebner
2004-04-25 18:09 ` J. Mayer
2004-04-25 18:38 ` [Qemu-devel] " Gabriel Ebner
2004-04-25 18:52 ` J. Mayer
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=1082917248.14652.7.camel@rapid \
--to=l_indien@magic.fr \
--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).