All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] AccelClass initialization order question
@ 2017-04-21  3:18 Chuck Tuffli
  2017-05-02 13:34 ` Stefan Hajnoczi
  0 siblings, 1 reply; 2+ messages in thread
From: Chuck Tuffli @ 2017-04-21  3:18 UTC (permalink / raw)
  To: qemu-devel

While debugging an issue, I ran across something in the initialization
sequence of hardware accelerators. Being a noobie qemu developer, it's
hard to tell if I simply don't understand how AccelClass works or if
this is a bug.

The init_machine function for hardware accelerators is passed a
MachineState pointer via configure_accelerator(), but several elements
of the structure (e.g. ram_size, maxram_size, etc.) are not
initialized until well after this call. Should hardware accelerator
modules not look at MachineState and instead grab the global versions
of variables like ram_size? TIA.

--chuck

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

* Re: [Qemu-devel] AccelClass initialization order question
  2017-04-21  3:18 [Qemu-devel] AccelClass initialization order question Chuck Tuffli
@ 2017-05-02 13:34 ` Stefan Hajnoczi
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2017-05-02 13:34 UTC (permalink / raw)
  To: Chuck Tuffli; +Cc: qemu-devel

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

On Thu, Apr 20, 2017 at 08:18:51PM -0700, Chuck Tuffli wrote:
> While debugging an issue, I ran across something in the initialization
> sequence of hardware accelerators. Being a noobie qemu developer, it's
> hard to tell if I simply don't understand how AccelClass works or if
> this is a bug.
> 
> The init_machine function for hardware accelerators is passed a
> MachineState pointer via configure_accelerator(), but several elements
> of the structure (e.g. ram_size, maxram_size, etc.) are not
> initialized until well after this call. Should hardware accelerator
> modules not look at MachineState and instead grab the global versions
> of variables like ram_size? TIA.

Machine init isn't finished when configure_accelerator() is executed.
Perhaps existing accelerators just don't need these variables at
configure_accelerator() time.

What exactly are you trying to do?

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

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

end of thread, other threads:[~2017-05-02 13:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-21  3:18 [Qemu-devel] AccelClass initialization order question Chuck Tuffli
2017-05-02 13:34 ` Stefan Hajnoczi

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.