aboutsummaryrefslogtreecommitdiff
path: root/target/ppc/kvm.c
diff options
context:
space:
mode:
authorAravinda Prasad <arawinda.p@gmail.com>2020-01-31 00:14:18 +0530
committerDavid Gibson <david@gibson.dropbear.id.au>2020-02-03 11:33:10 +1100
commit9d953ce44722eeb10d99c814478065bebbf7e1f6 (patch)
treea912af78dfe87187c0646bae53b752e142d39120 /target/ppc/kvm.c
parent19e067e032232b098a999dab15c6f0c8039114bd (diff)
downloadqemu-9d953ce44722eeb10d99c814478065bebbf7e1f6.zip
qemu-9d953ce44722eeb10d99c814478065bebbf7e1f6.tar.gz
qemu-9d953ce44722eeb10d99c814478065bebbf7e1f6.tar.bz2
ppc: spapr: Introduce FWNMI capability
Introduce fwnmi an spapr capability and add a helper function which tries to enable it, which would be used by following patch of the series. This patch by itself does not change the existing behavior. Signed-off-by: Aravinda Prasad <arawinda.p@gmail.com> [eliminate cap_ppc_fwnmi, add fwnmi cap to migration state and reprhase the commit message] Signed-off-by: Ganesh Goudar <ganeshgr@linux.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <20200130184423.20519-3-ganeshgr@linux.ibm.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'target/ppc/kvm.c')
-rw-r--r--target/ppc/kvm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c
index c05dde5..4438d0c 100644
--- a/target/ppc/kvm.c
+++ b/target/ppc/kvm.c
@@ -2057,6 +2057,14 @@ void kvmppc_set_mpic_proxy(PowerPCCPU *cpu, int mpic_proxy)
}
}
+int kvmppc_set_fwnmi(void)
+{
+ PowerPCCPU *cpu = POWERPC_CPU(first_cpu);
+ CPUState *cs = CPU(cpu);
+
+ return kvm_vcpu_enable_cap(cs, KVM_CAP_PPC_FWNMI, 0);
+}
+
int kvmppc_smt_threads(void)
{
return cap_ppc_smt ? cap_ppc_smt : 1;