qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: boddu pavan <boddupavan@yahoo.com>, qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] QEMU data passing between modules
Date: Tue, 10 Feb 2015 14:39:24 +0100	[thread overview]
Message-ID: <54DA0A0C.2080504@redhat.com> (raw)
In-Reply-To: <1082716497.1535621.1423575240072.JavaMail.yahoo@mail.yahoo.com>



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

  reply	other threads:[~2015-02-10 13:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54DA0A0C.2080504@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=boddupavan@yahoo.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).