diff options
author | Stuart Yoder <stuart.yoder@freescale.com> | 2013-01-03 12:37:02 +0000 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2013-01-07 17:37:11 +0100 |
commit | 1a61a9ae61cdf7b7d24c3eb711fe772c196c235e (patch) | |
tree | f0e3799722ceb0e7605b68b4c7b8d643f7589f9c /hw/ppc/e500.c | |
parent | d4834ff9b72d7b89181e88b1a481564cb750c1b5 (diff) |
PPC: KVM: set has-idle in guest device tree
On e500mc, the platform doesn't provide a way for the CPU to go idle.
To still not uselessly burn CPU time, expose an idle hypercall to the guest
if kvm supports it.
Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
[agraf: adjust for current code base, add patch description, fix non-kvm case]
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/ppc/e500.c')
-rw-r--r-- | hw/ppc/e500.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index b262f31e5a..5d70618f72 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -225,6 +225,10 @@ static int ppce500_load_device_tree(CPUPPCState *env, kvmppc_get_hypercall(env, hypercall, sizeof(hypercall)); qemu_devtree_setprop(fdt, "/hypervisor", "hcall-instructions", hypercall, sizeof(hypercall)); + /* if KVM supports the idle hcall, set property indicating this */ + if (kvmppc_get_hasidle(env)) { + qemu_devtree_setprop(fdt, "/hypervisor", "has-idle", NULL, 0); + } } /* Create CPU nodes */ |