mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 10:34:58 -06:00
pseries: Export RTC time via QOM
On x86, the guest's RTC can be read with QMP, either from the RTC device's "date" property or via the "rtc-time" property on the machine (which is an alias to the former). This is set up in the mc146818rtc driver, and doesn't work on other targets. This patch adds a similar "date" property to the pseries machine's RTAS RTC and adds a compatible alias to the machine. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
880ae7de59
commit
74e5ae284b
2 changed files with 10 additions and 0 deletions
|
@ -1000,6 +1000,9 @@ static void spapr_rtc_create(sPAPREnvironment *spapr)
|
|||
|
||||
qdev_init_nofail(dev);
|
||||
spapr->rtc = dev;
|
||||
|
||||
object_property_add_alias(qdev_get_machine(), "rtc-time",
|
||||
OBJECT(spapr->rtc), "date", NULL);
|
||||
}
|
||||
|
||||
/* Returns whether we want to use VGA or not */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue