From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:39045) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWRFW-0005Un-7F for qemu-devel@nongnu.org; Mon, 21 May 2012 07:58:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SWRFU-0006E8-Bg for qemu-devel@nongnu.org; Mon, 21 May 2012 07:58:05 -0400 Received: from cantor2.suse.de ([195.135.220.15]:49959 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWRFU-0006Dv-2A for qemu-devel@nongnu.org; Mon, 21 May 2012 07:58:04 -0400 Message-ID: <4FBA2DC5.9020400@suse.de> Date: Mon, 21 May 2012 13:57:57 +0200 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1512121653.606644.1337094765947.JavaMail.www@wwinf8306> <4FB27400.3010908@suse.de> <27874590.608345.1337095907076.JavaMail.www@wwinf8306> <4FB28591.4090709@suse.de> <189253069.454583.1337155108168.JavaMail.www@wwinf8304> <842600711.2527751.1337584877321.JavaMail.www@wwinf8221> In-Reply-To: <842600711.2527751.1337584877321.JavaMail.www@wwinf8221> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] Get current env within io_handler ? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "nicolas.sauzede" Cc: Blue Swirl , Peter Maydell , qemu-devel@nongnu.org, "Edgar E. Iglesias" Am 21.05.2012 09:21, schrieb nicolas.sauzede: > Hi Peter,=20 >=20 >> Message du 19/05/12 11:39 >> De : "Peter Maydell"=20 >> A : "Blue Swirl"=20 >> Copie =C3=A0 : "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. >=20 > 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 w= ork, 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 --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg