qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] PCI device waiting for some external (shared memory) events


From: Michael Moese
Subject: [Qemu-devel] PCI device waiting for some external (shared memory) events
Date: Tue, 10 Sep 2013 18:10:43 +0200

Hello dear Qemu developers,
I have some weird issues with a PCI device I have developed.
I am using shared memory to create an abstraction from the Qemu-PCI device I developed and forward all requests to another process running a SystemC device (this should not matter here).

In my pci-read and write implementations I lock a mutex on the shared memory, then write address, data and r/w-flag to the shared memory, then I poll for a completion-flag.

This seems to work quite fine while writing data, which happen in some kind of posted writes, so I finish the operation as soon as possible.
When I execute a pci memory read from inside the guest the read-function still gets executed, but Qemu gets stuck then.

Using gdb I could find out Qemu claims some pthread mutexes (I don't use pthreads-mutexes myself, so there won't be any conflicts with that) - which seems to take forever (gave it like 30 minutes).

I hope I could describe my situation somewhat understandable.

Now my question is, am I doing something I must not when just busy-waiting for the completion flag?

Is there another way to "stop" the simulated CPU during this transfer and resume afterwards?


Thanks for your time reading this. I'd be happy to get any suggestions, and if required I could add some code of my experiments.


Michael

--
Michael Moese
Baumgartenweg 1
91452 Wilhermsdorf
Mobil: +49 176 61 05 94 99
Fax: +49 3212 11 42 49 7

reply via email to

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