Re: [Qemu-devel] Get current env within io_handler ?

2012-05-21 Thread Edgar E. Iglesias
On Mon, May 21, 2012 at 06:40:38PM +, Blue Swirl wrote: > On Mon, May 21, 2012 at 6:28 PM, Peter Maydell > wrote: > > On 21 May 2012 19:08, Blue Swirl wrote: > >> On Mon, May 21, 2012 at 10:36 AM, Peter Maydell > >> wrote: > >>> I think it would be nice to have this in upstream qemu; howeve

Re: [Qemu-devel] Get current env within io_handler ?

2012-05-21 Thread Blue Swirl
On Mon, May 21, 2012 at 6:28 PM, Peter Maydell wrote: > On 21 May 2012 19:08, Blue Swirl wrote: >> On Mon, May 21, 2012 at 10:36 AM, Peter Maydell >> wrote: >>> I think it would be nice to have this in upstream qemu; however adding >>> transaction properties to the IO interface would be quite tr

Re: [Qemu-devel] Get current env within io_handler ?

2012-05-21 Thread Peter Maydell
On 21 May 2012 19:08, Blue Swirl wrote: > On Mon, May 21, 2012 at 10:36 AM, Peter Maydell > wrote: >> I think it would be nice to have this in upstream qemu; however adding >> transaction properties to the IO interface would be quite tricky I >> suspect... > > This is limited to CPU and CPU local

Re: [Qemu-devel] Get current env within io_handler ?

2012-05-21 Thread Blue Swirl
On Mon, May 21, 2012 at 10:36 AM, Peter Maydell wrote: > On 21 May 2012 08:21, nicolas.sauzede wrote: >> 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

Re: [Qemu-devel] Get current env within io_handler ?

2012-05-21 Thread Andreas Färber
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 curr

Re: [Qemu-devel] Get current env within io_handler ?

2012-05-21 Thread Peter Maydell
On 21 May 2012 08:21, nicolas.sauzede wrote: > 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

Re: [Qemu-devel] Get current env within io_handler ?

2012-05-21 Thread 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: &g

Re: [Qemu-devel] Get current env within io_handler ?

2012-05-19 Thread Peter Maydell
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 a

Re: [Qemu-devel] Get current env within io_handler ?

2012-05-19 Thread Blue Swirl
On Wed, May 16, 2012 at 7:58 AM, nicolas.sauzede wrote: >> First, please don't top-post and please don't use HTML emails. > > Sorry about that. > >> Yes, there is work towards getting rid of implicit AREG0 env. This will >> be leading towards removing the register-pinned AREG0. > > Will this AREG0

Re: [Qemu-devel] Get current env within io_handler ?

2012-05-16 Thread nicolas.sauzede
> First, please don't top-post and please don't use HTML emails. Sorry about that. > Yes, there is work towards getting rid of implicit AREG0 env. This will > be leading towards removing the register-pinned AREG0. Will this AREG0 removal be optional/configurable if the patches hit the mainstrea

Re: [Qemu-devel] Get current env within io_handler ?

2012-05-16 Thread nicolas.sauzede
> Yes, it's entirely intentional to prevent io handlers from accessing CPUState. > > For what you're doing, you need to hook more deeply into target-arm before > the > dispatch actually happens. Ok, but then I guess that this kind of hooks may be less generic than the traditional "io_handler"

Re: [Qemu-devel] Get current env within io_handler ?

2012-05-15 Thread Andreas Färber
t; NS, > > > Message du 15/05/12 17:20 > > De : "Andreas Färber" > > A : "nicolas.sauzede" > > Copie à : qemu-devel@nongnu.org > > Objet : Re: [Qemu-devel] Get current env within io_handler ? > > > > Am 15.05.2012 1

Re: [Qemu-devel] Get current env within io_handler ?

2012-05-15 Thread Anthony Liguori
On 05/15/2012 10:31 AM, nicolas.sauzede wrote: Sorry, What I meant was the IO handlers we can register, when initializing an io memory area : iomemtype = cpu_register_io_memory(tlm_qemu_readfn, tlm_qemu_writefn, s,

Re: [Qemu-devel] Get current env within io_handler ?

2012-05-15 Thread Peter Maydell
On 15 May 2012 16:31, nicolas.sauzede wrote: > What I meant was the IO handlers we can register, when initializing an io > memory area : > >     iomemtype = cpu_register_io_memory(tlm_qemu_readfn, >    tlm_qemu_writefn, s, >  

[Qemu-devel] Get current env within io_handler ?

2012-05-15 Thread nicolas.sauzede
Hi list, I've implemented a way to link a qemu instance (arm) to a running TLM simulation. That allows me to use qemu-system-arm as a minimal ARM ISS without any hardware device implemented within qemu, all the peripherals are implemented in the TLM simulation. This works by entering the TLM wor

Re: [Qemu-devel] Get current env within io_handler ?

2012-05-15 Thread nicolas.sauzede
s for your support, NS, > Message du 15/05/12 17:20 > De : "Andreas Färber" > A : "nicolas.sauzede" > Copie à : qemu-devel@nongnu.org > Objet : Re: [Qemu-devel] Get current env within io_handler ? > > Am 15.05.2012 17:12, schrieb nicolas.sauzede: > > [

Re: [Qemu-devel] Get current env within io_handler ?

2012-05-15 Thread Andreas Färber
Am 15.05.2012 17:12, schrieb nicolas.sauzede: > [...] when trying smp mode, I can't manage to retrieve the current env > (ie: current smp processor number, registers, etc..), > because it seems like the "cpu_single_env" variable is set to NULL > explicitly in cpu-exec.c : > /* fail safe : neve