summary refs log tree commit diff stats
path: root/hw/ppc/spapr_cpu_core.c
diff options
context:
space:
mode:
authorNikunj A Dadhania <nikunj@linux.ibm.com>2018-09-04 14:54:18 +0530
committerDavid Gibson <david@gibson.dropbear.id.au>2018-09-05 16:06:19 +1000
commita84f71793aab5d06b5798e78e1cee82cc3e4b3e2 (patch)
tree2041d6a0476488eede9d6e60ba813aac2b999961 /hw/ppc/spapr_cpu_core.c
parentb12a4efb76e81644e290d962d2eb6dbb0a5f214f (diff)
downloadfocaccia-qemu-a84f71793aab5d06b5798e78e1cee82cc3e4b3e2.tar.gz
focaccia-qemu-a84f71793aab5d06b5798e78e1cee82cc3e4b3e2.zip
target/ppc/kvm: set vcpu as online/offline
Set the newly added register(KVM_REG_PPC_ONLINE) to indicate if the vcpu is
online(1) or offline(0)

KVM will use this information to set the RWMR register, which controls the PURR
and SPURR accumulation.

CC: paulus@samba.org
Signed-off-by: Nikunj A Dadhania <nikunj@linux.ibm.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc/spapr_cpu_core.c')
-rw-r--r--hw/ppc/spapr_cpu_core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c
index a73b244a3f..2398ce62c0 100644
--- a/hw/ppc/spapr_cpu_core.c
+++ b/hw/ppc/spapr_cpu_core.c
@@ -90,6 +90,7 @@ void spapr_cpu_set_entry_state(PowerPCCPU *cpu, target_ulong nip, target_ulong r
 
     env->nip = nip;
     env->gpr[3] = r3;
+    kvmppc_set_reg_ppc_online(cpu, 1);
     CPU(cpu)->halted = 0;
     /* Enable Power-saving mode Exit Cause exceptions */
     ppc_store_lpcr(cpu, env->spr[SPR_LPCR] | pcc->lpcr_pm);