diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2015-02-06 14:55:53 +1100 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2015-03-09 15:00:00 +0100 |
commit | 74e5ae284b1c8ac36a77e57ab9a49178173c666f (patch) | |
tree | 74d6b60df603a5a86998f256c12eb2569fcd584c /hw/ppc/spapr.c | |
parent | 880ae7de5958a765699386777de0f3841d635e1d (diff) |
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>
Diffstat (limited to 'hw/ppc/spapr.c')
-rw-r--r-- | hw/ppc/spapr.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 6e8248d01e..b39073b3e0 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -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 */ |