All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] when the device property is called?
@ 2017-06-12 10:23 Wang Dong
  0 siblings, 0 replies; only message in thread
From: Wang Dong @ 2017-06-12 10:23 UTC (permalink / raw)
  To: qemu-devel

Hi,

I am newbie to qemu. Recently, I am reading the code and found one question.

I can see some property function is added to the object. But I wonder 
when these

property functions are called or triggered. When I try to trace them, 
only the initialization

is found. I found some unclear lines in the doc, I can not figure out 
the details.

*"Device properties in QOM are bound to devices and are implemented by 
closures provided by the device.
***

*A Visitor is passed to the closure which effectively allows properties 
to be set/get through native C types.***

*Mapping to any other type of representation (string or otherwise) is 
done by a Visitor with no knowledge of the device or property.***

  "

I also found this property function has something to do with the 
*Visitor*, and I trace the function *x86_cpu_get_crash_info_qom* along with

Visitor. And I found that these crash information is finally read out to 
log file along with this visitor. *But **still I have no idea when this **
**x86_cpu_get_crash_info_qom is triggered.
*

But as I found that the cpu class is initialized with an another 
function *cc->get_crash_info = x86_cpu_get_crash_info*

And with this function, the crash information will also be put out to 
log file. And this function will return a crash information struct to 
*qemu_system_**guest**_panicked*, which will then print the crash info 
to log file too.

*I wonder what is the difference between them? And when the property 
function is called?
*

*
*

*Any clue will be very appreciated. Thanks in advance.
*

Thanks in advance.



-- 
Best regards.

Wang Dong

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-06-12 10:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-12 10:23 [Qemu-devel] when the device property is called? Wang Dong

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.