From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52830) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLBOI-00045K-Hj for qemu-devel@nongnu.org; Tue, 10 Feb 2015 09:02:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YLBOC-000318-IC for qemu-devel@nongnu.org; Tue, 10 Feb 2015 09:02:14 -0500 Received: from nm8-vm5.bullet.mail.ne1.yahoo.com ([98.138.91.230]:34852) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLBOC-000310-Ay for qemu-devel@nongnu.org; Tue, 10 Feb 2015 09:02:08 -0500 Date: Tue, 10 Feb 2015 14:02:06 +0000 (UTC) From: boddu pavan Message-ID: <806855204.1568372.1423576926781.JavaMail.yahoo@mail.yahoo.com> In-Reply-To: <54DA0A0C.2080504@redhat.com> References: <54DA0A0C.2080504@redhat.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1568371_373224737.1423576926776" Subject: Re: [Qemu-devel] QEMU data passing between modules Reply-To: boddu pavan List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel ------=_Part_1568371_373224737.1423576926776 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable yup, thanks Paolo. But i have another basic question. I hope we have some docs on this. QOM mo= del.I always really confuse with this series obj->DeviceState->SysBusDevice= ->hw_perip state. I simple assume that all the hw_emulations will be connected to SysBus(most= ly). The device state is different for each one. and an object. Does all the hw_peripherals has any root node kind of thing. Which makes al= l our nodes connected ?=20 On Tuesday, February 10, 2015 7:15 PM, Paolo Bonzini wrote: =20 =20 On 10/02/2015 14:34, boddu pavan wrote: > Yes its hardware block, and yes they are of same SOC. status is 16bit. For simplicity you can make them the same DeviceState. In order of increasing accuracy: - save the AES module's address in a global variable, and add a qemu_irq raised by the AES module when the status changes.=C2=A0 When the irq is raised, the register module uses the global variable to find the AES module and fetch the status - store the AES module's address using object_property_add_child, add a qemu_irq raised by the AES module when the status changes.=C2=A0 The regist= er module uses object_resolve_path() to get a pointer to the AES module. When the irq is raised, the register module uses the pointer to fetch the status. - add a link property in the register module that points to the AES module (object_property_add_link), and a qemu_irq raised by the AES module when the status changes.=C2=A0 Initialize the link property in the creation function for the board.=C2=A0 When the irq is raised, the register module uses the DeviceState* field corresponding to the link to find the AES module and fetch the status Paolo >=20 > On Tuesday, February 10, 2015 7:00 PM, Paolo Bonzini > wrote: >=20 >=20 > [no private messages please] >=20 > On 10/02/2015 14:27, boddu pavan wrote: >> Hi paolo, >> I have a aes module and its status should also be updated in register of >> another block, which is said to be public register. The one in which its >> updating is a private register. >> How to get the data passed and updated in another module. I see using a >> dma for register update is heavy, is there any simple one. >=20 >> >=20 > How do you define a "module"?=C2=A0 Is it a hardware block that you're > emulating (a DeviceState)?=C2=A0 Are the two modules part of the same SoC= ? > How large is the status? >=20 > Paolo >=20 >=20 >=20 >=20 ------=_Part_1568371_373224737.1423576926776 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
yup, thanks Paolo.

Bu= t i have another basic question. I hope we have some docs on this. QOM mode= l.
I alwa= ys really confuse with this series obj->DeviceState->SysBusDevice->= ;hw_perip state.

I simple assume th= at all the hw_emulations will be connected to SysBus(mostly). The device st= ate is different for each one. and an object.

Does all the hw_peripher= als has any root node kind of thing. Which makes all our nodes connected ?<= /div>


On Tuesday, February 10, 2015 7:15 PM, P= aolo Bonzini <pbonzini@redhat.com> wrote:
=




On 10/02/2015 14:34, = boddu pavan wrote:
> Yes its hardware block, and yes t= hey are of same SOC. status is 16bit.

= For simplicity you can make them the same DeviceState.
In order of increasing accuracy:

- save the AES module's address in a global variable, and add a= qemu_irq
raised by the AES module when the status change= s.  When the irq is
raised, the register module uses= the global variable to find the AES
module and fetch the= status

- store the AES module's addre= ss using object_property_add_child, add a
qemu_irq raised= by the AES module when the status changes.  The register
module uses object_resolve_path() to get a pointer to the AES module.=
When the irq is raised, the register module uses the poi= nter to fetch
the status.

- add a link property in the register module that points to the AESmodule (object_property_add_link), and a qemu_irq raised b= y the AES
module when the status changes.  Initializ= e the link property in the
creation function for the boar= d.  When the irq is raised, the register
module uses= the DeviceState* field corresponding to the link to find the
AES module and fetch the status

P= aolo


>
> On Tue= sday, February 10, 2015 7:00 PM, Paolo Bonzini
> <<= a rel=3D"nofollow" shape=3D"rect" ymailto=3D"mailto:pbonzini@redhat.com" ta= rget=3D"_blank" href=3D"mailto:pbonzini@redhat.com">pbonzini@redhat.com= > wrote:
>
>
> [no private messages please]
>
> On 10/02/2015 14:27, boddu pavan wrote:
>>= Hi paolo,
>> I have a aes module and its status sh= ould also be updated in register of
>> another bloc= k, which is said to be public register. The one in which its
>> updating is a private register.
>> How= to get the data passed and updated in another module. I see using a
>> dma for register update is heavy, is there any simple = one.
>
>>
&= gt;
> How do you define a "module"?  Is it a har= dware block that you're
> emulating (a DeviceState)?&n= bsp; Are the two modules part of the same SoC?
> How l= arge is the status?
>
> Paolo>
>
>
>



------=_Part_1568371_373224737.1423576926776--