Am 21.05.2012 09:21, schrieb nicolas.sauzede: > Hi Peter, > >> Message du 19/05/12 11:39 >> De : "Peter Maydell" >> A : "Blue Swirl" >> Copie à : "nicolas.sauzede" , qemu-devel@nongnu.org >> Objet : Re: [Qemu-devel] Get current env within io_handler ? >> >> On 19 May 2012 08:13, Blue Swirl wrote: >>> nicolas.sauzede wrote: >>>> Well, for example, we have the issue where we need to know if >>>> the cpu that performs a hardware io is in priviledged/secure mode, >>>> because some HW devices implemented in TLM requires such special >>>> flags on certain register accesses. >> >>> How does real HW do it? I don't think there is a bus that indicates >>> the CPU number to the device. >> >> The AMBA AXI bus includes attributes for: >> * secure/nonsecure world (used for TrustZone) >> * privileged/nonprivileged >> * instruction/data access >> * a transaction ID >> >> The transaction ID typically encodes "which core in the >> CPU made this memory transaction?". It's not always >> meaningful, eg when caching intervenes, but for device >> access you can use it. I'd tend to expect to see that in >> testbench setups rather than the real world, though. Looking >> straightforwardly at the protection attributes as Nicolas >> suggests is much more standard. > > Ok, so I guess that for now, we have to live with the lack of a way to > actually > get those io transaction properties, right ? > Do you think it would be feasible to allow it the future ? (for now, I've done > some shortcuts and ugly hardcoding in my TLM prototype to make things work, > but still..) [...] > Do you think this feature could be useful/legitimate in upstream qemu ?
You might want to coordinate that with Edgar, he did a TLM integration once. But I have no clue how close to master his fork is. Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg