qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] QEMU & multithreaded device emulation


From: Emmanuel Blot
Subject: [Qemu-devel] QEMU & multithreaded device emulation
Date: Wed, 23 Jan 2013 13:02:57 +0100

Hi,

I need to emulate a ARM-based SoC that handles a continuous
datastream, extracting and injection data with DMA tranfers from/to
the guest main memory.

I've been using the cpu_physical_memory_* (read/write/map/unmap)
functions to perform data transfer, but I'd like to use several
dedicated native/host threads to emulate the datastream pipe, as many
CPU-intensive tasks (encryption, decryption, filtering) are involved
and to take advantage of multi-core host CPUS.

What is the best approach to write this kind of code with the current
version of QEMU (1.4 dev)?

Concurrent threads need to access guest main memory, and report
completion (I'm using qemu_bh_schedule to report completion). I do not
see other possible locations for race conditions for now.

Is this possible ? I've not been able to figure out if this is the
right way to go, how to protect the cpu_physical_memory_* &
qemu_bh_schedule from race conditions.

Or am I taking a dead-end path?

Thanks,
Manu



reply via email to

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