qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Armv5 target


From: Paul Brook
Subject: Re: [Qemu-devel] Armv5 target
Date: Wed, 2 Feb 2005 19:17:01 +0000
User-agent: KMail/1.7.2

> > 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]