From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Armv5 target
Date: Wed, 2 Feb 2005 19:17:01 +0000 [thread overview]
Message-ID: <200502021917.02193.paul@codesourcery.com> (raw)
In-Reply-To: <200502021918.47411.uli@suse.de>
> > I've attached two programs. segv-test.c tests for the kernel bug.
>
> This program hangs in an endless segfault loop when I run it in qemu-arm.
> The kernel version does not seem to matter here, I have tried 2.6.11,
> 2.6.5 and 2.4.21. Has anybody ever observed this and/or knows what it is
> caused by? (The test works fine on i386 and on a real ARM machine.)
The host kernel bug seems specific to this particular kernel. I've tried other
2.6.9 kernels on different machines, and a 2.6.10 kernel on this machine, and
they all work ok. I guess it's a fluke miscompilation or something.
The reason it goes into an infinite loop when run under qemu is as follows:
The generated code causes a segfault trying to write to protected memory.
On a real machine the signal handler unprotects the memory, and keeps going.
Inside qemu the host signal handler just queues the target signal. For most
signals this is ok; the target handler will be invoke at the end of the TB.
However in this case we need to run the target handler immediately, otherwise
the segv will occur again when we try and continue.
I think fixing this requires executing the target signal handler code from
within the host signal handler. As an added complication we only want to do
this for signals received while executing target code.
Paul
next prev parent reply other threads:[~2005-02-02 20:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-31 20:19 [Qemu-devel] Armv5 target Paul Brook
2005-01-31 22:44 ` Lennert Buytenhek
2005-01-31 23:13 ` Paul Brook
2005-02-02 1:26 ` Paul Brook
2005-02-02 12:01 ` Lennert Buytenhek
2005-02-02 15:47 ` Paul Brook
2005-02-02 18:18 ` Ulrich Hecht
2005-02-02 19:17 ` Paul Brook [this message]
2005-02-03 14:08 ` Ulrich Hecht
2005-02-03 15:43 ` Paul Brook
2005-02-03 9:59 ` Sylvain Petreolle
2005-02-03 11:25 ` Ulrich Hecht
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=200502021917.02193.paul@codesourcery.com \
--to=paul@codesourcery.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 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).