summary refs log tree commit diff stats
path: root/hw/ppc/spapr_rtas.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_rtas.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_rtas.c')
-rw-r--r--hw/ppc/spapr_rtas.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c
index 4ac96bc94b..d6a0952154 100644
--- a/hw/ppc/spapr_rtas.c
+++ b/hw/ppc/spapr_rtas.c
@@ -33,6 +33,7 @@
 #include "sysemu/device_tree.h"
 #include "sysemu/cpus.h"
 #include "sysemu/hw_accel.h"
+#include "kvm_ppc.h"
 
 #include "hw/ppc/spapr.h"
 #include "hw/ppc/spapr_vio.h"
@@ -207,6 +208,7 @@ static void rtas_stop_self(PowerPCCPU *cpu, sPAPRMachineState *spapr,
      * guest */
     ppc_store_lpcr(cpu, env->spr[SPR_LPCR] & ~pcc->lpcr_pm);
     cs->halted = 1;
+    kvmppc_set_reg_ppc_online(cpu, 0);
     qemu_cpu_kick(cs);
 }