qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] QEMU timing requirements
@ 2011-06-25  2:34 felix.matenaar@rwth-aachen
  2011-06-25  4:26 ` Mulyadi Santosa
  0 siblings, 1 reply; 7+ messages in thread
From: felix.matenaar@rwth-aachen @ 2011-06-25  2:34 UTC (permalink / raw)
  To: qemu-devel

Hello,

I am currently implementing some heuristics using a patched qemu 
(i386-softmmu). Two of them take some time for each vm memory access. If 
I run them both, suddenly qemu segfaults while executing a BBL. Using 
just one of them never triggers this problem. Are there any known timing 
issues that could lead to the problem? Running Qemu with one cpu in one 
single process with a Windows XP guest OS.

Regards,
     Felix

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] QEMU timing requirements
  2011-06-25  2:34 [Qemu-devel] QEMU timing requirements felix.matenaar@rwth-aachen
@ 2011-06-25  4:26 ` Mulyadi Santosa
  2011-06-25 16:28   ` felix.matenaar@rwth-aachen
  0 siblings, 1 reply; 7+ messages in thread
From: Mulyadi Santosa @ 2011-06-25  4:26 UTC (permalink / raw)
  To: felix.matenaar@rwth-aachen; +Cc: qemu-devel

On Sat, Jun 25, 2011 at 09:34, felix.matenaar@rwth-aachen
<felix.matenaar@rwth-aachen.de> wrote:
> Hello,
>
> I am currently implementing some heuristics using a patched qemu
> (i386-softmmu). Two of them take some time for each vm memory access. If I
> run them both, suddenly qemu segfaults while executing a BBL. Using just one
> of them never triggers this problem.

"Two" instances of Qemu running at the same time, you mean?

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] QEMU timing requirements
  2011-06-25  4:26 ` Mulyadi Santosa
@ 2011-06-25 16:28   ` felix.matenaar@rwth-aachen
  2011-06-25 20:02     ` Mulyadi Santosa
  0 siblings, 1 reply; 7+ messages in thread
From: felix.matenaar@rwth-aachen @ 2011-06-25 16:28 UTC (permalink / raw)
  To: qemu-devel

On 06/25/2011 06:26 AM, Mulyadi Santosa wrote:
> On Sat, Jun 25, 2011 at 09:34, felix.matenaar@rwth-aachen
> <felix.matenaar@rwth-aachen.de>  wrote:
>> Hello,
>>
>> I am currently implementing some heuristics using a patched qemu
>> (i386-softmmu). Two of them take some time for each vm memory access. If I
>> run them both, suddenly qemu segfaults while executing a BBL. Using just one
>> of them never triggers this problem.
> "Two" instances of Qemu running at the same time, you mean?
>

No. What I do is using gen_helper_ to compile hooks into call/ret/jmp 
and memory access. The Heuristics can then hook the events so 
calculation is done during the execution of a basic block. I thought 
that it could be possible that Qemu sets a timeout for BBL execution to 
prevent CPU monopolization by e.g. a long sequence of rep. That would 
make sense because my heuristics calculation time falls into the BBL 
execution time for Qemu. Does anyone know more about that?

Regards,
     Felix

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] QEMU timing requirements
  2011-06-25 16:28   ` felix.matenaar@rwth-aachen
@ 2011-06-25 20:02     ` Mulyadi Santosa
  2011-06-25 22:29       ` felix.matenaar@rwth-aachen
  0 siblings, 1 reply; 7+ messages in thread
From: Mulyadi Santosa @ 2011-06-25 20:02 UTC (permalink / raw)
  To: felix.matenaar@rwth-aachen; +Cc: qemu-devel

On Sat, Jun 25, 2011 at 23:28, felix.matenaar@rwth-aachen
<felix.matenaar@rwth-aachen.de> wrote:
> No. What I do is using gen_helper_ to compile hooks into call/ret/jmp and
> memory access. The Heuristics can then hook the events so calculation is
> done during the execution of a basic block. I thought that it could be
> possible that Qemu sets a timeout for BBL execution to prevent CPU
> monopolization by e.g. a long sequence of rep. That would make sense because
> my heuristics calculation time falls into the BBL execution time for Qemu.
> Does anyone know more about that?

perhaps your heuristics code somehow coincide with the timer alarm
(PIT, HPET etc) emulation in Qemu....and somewhere your code is not
reentrant.....

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] QEMU timing requirements
  2011-06-25 20:02     ` Mulyadi Santosa
@ 2011-06-25 22:29       ` felix.matenaar@rwth-aachen
  2011-06-26  4:49         ` Mulyadi Santosa
  0 siblings, 1 reply; 7+ messages in thread
From: felix.matenaar@rwth-aachen @ 2011-06-25 22:29 UTC (permalink / raw)
  To: qemu-devel

On 06/25/2011 10:02 PM, Mulyadi Santosa wrote:
> On Sat, Jun 25, 2011 at 23:28, felix.matenaar@rwth-aachen
> <felix.matenaar@rwth-aachen.de>  wrote:
>> No. What I do is using gen_helper_ to compile hooks into call/ret/jmp and
>> memory access. The Heuristics can then hook the events so calculation is
>> done during the execution of a basic block. I thought that it could be
>> possible that Qemu sets a timeout for BBL execution to prevent CPU
>> monopolization by e.g. a long sequence of rep. That would make sense because
>> my heuristics calculation time falls into the BBL execution time for Qemu.
>> Does anyone know more about that?
> perhaps your heuristics code somehow coincide with the timer alarm
> (PIT, HPET etc) emulation in Qemu....and somewhere your code is not
> reentrant.....
>

Think I found the problem. It was a bug in my code and because of some 
weird circumstances, backtrace and addresses seemed to be a segfault in 
a BBL.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] QEMU timing requirements
  2011-06-25 22:29       ` felix.matenaar@rwth-aachen
@ 2011-06-26  4:49         ` Mulyadi Santosa
  2011-06-26 17:49           ` felix.matenaar@rwth-aachen
  0 siblings, 1 reply; 7+ messages in thread
From: Mulyadi Santosa @ 2011-06-26  4:49 UTC (permalink / raw)
  To: felix.matenaar@rwth-aachen; +Cc: qemu-devel

On Sun, Jun 26, 2011 at 05:29, felix.matenaar@rwth-aachen
<felix.matenaar@rwth-aachen.de> wrote:
> Think I found the problem. It was a bug in my code and because of some weird
> circumstances, backtrace and addresses seemed to be a segfault in a BBL.

glad you find it..... care to share to everyone what's really goin'
on? who knows it will reveal somekind of hidden problem in
Qemu/TCG....

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] QEMU timing requirements
  2011-06-26  4:49         ` Mulyadi Santosa
@ 2011-06-26 17:49           ` felix.matenaar@rwth-aachen
  0 siblings, 0 replies; 7+ messages in thread
From: felix.matenaar@rwth-aachen @ 2011-06-26 17:49 UTC (permalink / raw)
  To: qemu-devel

On 06/26/2011 06:49 AM, Mulyadi Santosa wrote:
> On Sun, Jun 26, 2011 at 05:29, felix.matenaar@rwth-aachen
> <felix.matenaar@rwth-aachen.de>  wrote:
>> Think I found the problem. It was a bug in my code and because of some weird
>> circumstances, backtrace and addresses seemed to be a segfault in a BBL.
> glad you find it..... care to share to everyone what's really goin'
> on? who knows it will reveal somekind of hidden problem in
> Qemu/TCG....
>
Yes I care. But the bug was not in Qemu. It was an integer underflow 
caused by a race condition. The behavior of the bug just seemed to be a 
problem with Qemu timers but it is not. So I thought it doesn't make 
much sense to share a bug in my code with the list...

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-06-26 17:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-25  2:34 [Qemu-devel] QEMU timing requirements felix.matenaar@rwth-aachen
2011-06-25  4:26 ` Mulyadi Santosa
2011-06-25 16:28   ` felix.matenaar@rwth-aachen
2011-06-25 20:02     ` Mulyadi Santosa
2011-06-25 22:29       ` felix.matenaar@rwth-aachen
2011-06-26  4:49         ` Mulyadi Santosa
2011-06-26 17:49           ` felix.matenaar@rwth-aachen

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