From: Thiemo Seufer <ths@networkno.de>
To: John Reiser <jreiser@BitWagon.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] bug: qemu-0.9.0 emulating mipsel (32-bit R3000) on amd64
Date: Wed, 9 May 2007 02:04:25 +0100 [thread overview]
Message-ID: <20070509010425.GC27336@networkno.de> (raw)
In-Reply-To: <46410CAF.50809@BitWagon.com>
John Reiser wrote:
> >>qemu-0.9.0 ...
> >>emulating Debian 2.6.18-4-qemu mipsel ...
> >>errs when gdb 6.4.90-debian (running on the emulated mipsel)
> >>single-steps the user-mode instruction ...
>
> > This looks like another instance of "Qemu/MIPS doesn't handle
> > self-modifying code correctly" (the break instructions inserted
> > by gdb are exactly this).
>
> No, the usage by gdb does *not* qualify as "self-modifying code."
In the context of Qemu system emulation it does...
> gdb uses the system call ptrace(PTRACE_POKETEXT, pid, addr, data)
> to have the emulated operating system kernel itself modify the memory
> of the child process.
... since "child processes" etc. run by the guest kernel are just a
foreign thing to Qemu.
> Nobody has to guess or to "snoop" the memory
> bus in order to discover that the instruction stream is being modified.
> Instead, there is direct notification of what is happening.
The Linux kernel happily does cache flushes, and Qemu happily ignores
them, since it doesn't implement a cache model. (A cache model is not
the answer. It would be slow, it would only paper over the problem,
it wouldn't help for uncached accesses or cacheless systems).
> If nothing
> else, then under CONFIG_QEMU the implementation of sys_ptrace()
> must notify the emulator to flush the appropriate translations.
Hacking special facilities in the guest kernel just to work around
a Qemu bug is IMHO the wrong approach.
Thiemo
prev parent reply other threads:[~2007-05-09 1:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-06 18:45 [Qemu-devel] bug: qemu-0.9.0 emulating mipsel (32-bit R3000) on amd64 John Reiser
2007-05-06 20:04 ` Thiemo Seufer
2007-05-06 20:07 ` Thiemo Seufer
2007-05-07 12:13 ` Daniel Jacobowitz
2007-05-07 15:46 ` Paul Brook
2007-05-07 22:46 ` [Qemu-devel] workaround: " John Reiser
2007-05-07 23:03 ` Paul Brook
2007-05-07 23:08 ` Paul Brook
2007-05-08 18:03 ` [Qemu-devel] bug: " Stefan Weil
2007-05-08 23:50 ` John Reiser
2007-05-09 1:04 ` Thiemo Seufer [this message]
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=20070509010425.GC27336@networkno.de \
--to=ths@networkno.de \
--cc=jreiser@BitWagon.com \
--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 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.