On 22 June 2012 09:20, Peter Crosthwaite <peter.crosthwa...@petalogix.com> wrote: > Its a machine model that instantiated some block devices concurrently. > Theres some chicken-and-egg issues with the instantiation such that > they have the happen concurrently. One device instantiates a block > device (pflash_cfi_01) from coroutine context. block then check > qemu_in_coroutine() which returns true so it uses my coroutine for its > inner workings, whereas if it were a normal machine model it would > kick of its own coroutine to do its block stuff.
I think the problem here is trying to instantiate bits of the machine model inside coroutines -- that just sounds wrong to me. Model and device instantiate should be a straightforward single threaded bit of code; if it isn't then something needs to be straightened out so you don't have your chicken-and-egg problem. -- PMM