All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Qemu-devel] QEMU data passing between modules
       [not found] ` <832065415.1546511.1423574820829.JavaMail.yahoo@mail.yahoo.com>
@ 2015-02-10 13:30   ` Paolo Bonzini
  2015-02-10 13:34     ` boddu pavan
  0 siblings, 1 reply; 8+ messages in thread
From: Paolo Bonzini @ 2015-02-10 13:30 UTC (permalink / raw)
  To: boddu pavan, qemu-devel

[no private messages please]

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.
> 

How do you define a "module"?  Is it a hardware block that you're
emulating (a DeviceState)?  Are the two modules part of the same SoC?
How large is the status?

Paolo

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] QEMU data passing between modules
  2015-02-10 13:30   ` [Qemu-devel] QEMU data passing between modules Paolo Bonzini
@ 2015-02-10 13:34     ` boddu pavan
  2015-02-10 13:39       ` Paolo Bonzini
  0 siblings, 1 reply; 8+ messages in thread
From: boddu pavan @ 2015-02-10 13:34 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 772 bytes --]

Yes its hardware block, and yes they are of same SOC. status is 16bit. 

     On Tuesday, February 10, 2015 7:00 PM, Paolo Bonzini <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 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.
> 

How do you define a "module"?  Is it a hardware block that you're
emulating (a DeviceState)?  Are the two modules part of the same SoC?
How large is the status?

Paolo



   

[-- Attachment #2: Type: text/html, Size: 1814 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] QEMU data passing between modules
  2015-02-10 13:34     ` boddu pavan
@ 2015-02-10 13:39       ` Paolo Bonzini
  2015-02-10 14:02         ` boddu pavan
  0 siblings, 1 reply; 8+ messages in thread
From: Paolo Bonzini @ 2015-02-10 13:39 UTC (permalink / raw)
  To: boddu pavan, qemu-devel



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.  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.  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 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.  Initialize the link property in the
creation function for the board.  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

> 
> On Tuesday, February 10, 2015 7:00 PM, Paolo Bonzini
> <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 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.
> 
>>
> 
> How do you define a "module"?  Is it a hardware block that you're
> emulating (a DeviceState)?  Are the two modules part of the same SoC?
> How large is the status?
> 
> Paolo
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] QEMU data passing between modules
  2015-02-10 13:39       ` Paolo Bonzini
@ 2015-02-10 14:02         ` boddu pavan
  2015-02-10 14:25           ` Paolo Bonzini
  0 siblings, 1 reply; 8+ messages in thread
From: boddu pavan @ 2015-02-10 14:02 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 2436 bytes --]

yup, thanks Paolo.
But i have another basic question. I hope we have some docs on this. QOM model.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(mostly). 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 all our nodes connected ? 

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

 

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.  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.  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 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.  Initialize the link property in the
creation function for the board.  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

> 
> On Tuesday, February 10, 2015 7:00 PM, Paolo Bonzini
> <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 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.
> 
>>
> 
> How do you define a "module"?  Is it a hardware block that you're
> emulating (a DeviceState)?  Are the two modules part of the same SoC?
> How large is the status?
> 
> Paolo
> 
> 
> 
> 



   

[-- Attachment #2: Type: text/html, Size: 5583 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] QEMU data passing between modules
  2015-02-10 14:02         ` boddu pavan
@ 2015-02-10 14:25           ` Paolo Bonzini
  2015-02-10 18:20             ` boddu pavan
  0 siblings, 1 reply; 8+ messages in thread
From: Paolo Bonzini @ 2015-02-10 14:25 UTC (permalink / raw)
  To: boddu pavan, qemu-devel



On 10/02/2015 15:02, boddu pavan wrote:
> 
> Does all the hw_peripherals has any root node kind of thing. Which makes
> all our nodes connected ?
> 

The common superclass of the devices is DeviceState.

The root object that connects the devices is the QEMUMachine.

Paolo

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] QEMU data passing between modules
  2015-02-10 14:25           ` Paolo Bonzini
@ 2015-02-10 18:20             ` boddu pavan
  2015-02-11  8:42               ` boddu pavan
  0 siblings, 1 reply; 8+ messages in thread
From: boddu pavan @ 2015-02-10 18:20 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 584 bytes --]

Ok fine.
I always think there should be basic doc for QOM model for the QEMU beginners as this point. Or if we already have some in-mails explanations or any blogs can any one point out here.
Thanks.Sai Pavan
     On Tuesday, February 10, 2015 7:57 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
   

 

On 10/02/2015 15:02, boddu pavan wrote:
> 
> Does all the hw_peripherals has any root node kind of thing. Which makes
> all our nodes connected ?
> 

The common superclass of the devices is DeviceState.

The root object that connects the devices is the QEMUMachine.

Paolo



    

[-- Attachment #2: Type: text/html, Size: 2475 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] QEMU data passing between modules
  2015-02-10 18:20             ` boddu pavan
@ 2015-02-11  8:42               ` boddu pavan
  0 siblings, 0 replies; 8+ messages in thread
From: boddu pavan @ 2015-02-11  8:42 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 809 bytes --]


 Ping again!
Are there any docs for QOM ?? or the historical parent of QOM , so that it is easy to relate.
Thanks,Sai Pavan

     On Tuesday, February 10, 2015 11:50 PM, boddu pavan <boddupavan@yahoo.com> wrote:
   

 Ok fine.
I always think there should be basic doc for QOM model for the QEMU beginners as this point. Or if we already have some in-mails explanations or any blogs can any one point out here.
Thanks.Sai Pavan
     On Tuesday, February 10, 2015 7:57 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
   

 

On 10/02/2015 15:02, boddu pavan wrote:
> 
> Does all the hw_peripherals has any root node kind of thing. Which makes
> all our nodes connected ?
> 

The common superclass of the devices is DeviceState.

The root object that connects the devices is the QEMUMachine.

Paolo



    

    

[-- Attachment #2: Type: text/html, Size: 4583 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Qemu-devel] QEMU data passing between modules
@ 2015-02-10 13:15 boddu pavan
  0 siblings, 0 replies; 8+ messages in thread
From: boddu pavan @ 2015-02-10 13:15 UTC (permalink / raw)
  To: QEMU Developers

[-- Attachment #1: Type: text/plain, Size: 203 bytes --]

I am trying to emulate a status reg in qemu, but the value is dependent of the value of the register in another module. How can I communicate between the two modules to update the status register.Thanks

[-- Attachment #2: Type: text/html, Size: 974 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-02-11  8:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <54DA05BA.4030106@redhat.com>
     [not found] ` <832065415.1546511.1423574820829.JavaMail.yahoo@mail.yahoo.com>
2015-02-10 13:30   ` [Qemu-devel] QEMU data passing between modules Paolo Bonzini
2015-02-10 13:34     ` boddu pavan
2015-02-10 13:39       ` Paolo Bonzini
2015-02-10 14:02         ` boddu pavan
2015-02-10 14:25           ` Paolo Bonzini
2015-02-10 18:20             ` boddu pavan
2015-02-11  8:42               ` boddu pavan
2015-02-10 13:15 boddu pavan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.