aboutsummaryrefslogtreecommitdiff
path: root/target/ppc/kvm_ppc.h
diff options
context:
space:
mode:
authorSuraj Jitindar Singh <sjitindarsingh@gmail.com>2019-03-01 14:19:12 +1100
committerDavid Gibson <david@gibson.dropbear.id.au>2019-03-12 12:07:49 +1100
commit8ff43ee404d3e295839d1fd4e9e6571ca7a62a66 (patch)
treef3a77de59523fe38cc5479afdc3087e8c7f7b53f /target/ppc/kvm_ppc.h
parent399b2896d4948a1ec0278d896ea3a561df768d64 (diff)
downloadqemu-8ff43ee404d3e295839d1fd4e9e6571ca7a62a66.zip
qemu-8ff43ee404d3e295839d1fd4e9e6571ca7a62a66.tar.gz
qemu-8ff43ee404d3e295839d1fd4e9e6571ca7a62a66.tar.bz2
target/ppc/spapr: Add SPAPR_CAP_CCF_ASSIST
Introduce a new spapr_cap SPAPR_CAP_CCF_ASSIST to be used to indicate the requirement for a hw-assisted version of the count cache flush workaround. The count cache flush workaround is a software workaround which can be used to flush the count cache on context switch. Some revisions of hardware may have a hardware accelerated flush, in which case the software flush can be shortened. This cap is used to set the availability of such hardware acceleration for the count cache flush routine. The availability of such hardware acceleration is indicated by the H_CPU_CHAR_BCCTR_FLUSH_ASSIST flag being set in the characteristics returned from the KVM_PPC_GET_CPU_CHAR ioctl. Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com> Message-Id: <20190301031912.28809-2-sjitindarsingh@gmail.com> [dwg: Small style fixes] Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'target/ppc/kvm_ppc.h')
-rw-r--r--target/ppc/kvm_ppc.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/target/ppc/kvm_ppc.h b/target/ppc/kvm_ppc.h
index a79835b..2937b36 100644
--- a/target/ppc/kvm_ppc.h
+++ b/target/ppc/kvm_ppc.h
@@ -62,6 +62,7 @@ bool kvmppc_has_cap_mmu_hash_v3(void);
int kvmppc_get_cap_safe_cache(void);
int kvmppc_get_cap_safe_bounds_check(void);
int kvmppc_get_cap_safe_indirect_branch(void);
+int kvmppc_get_cap_count_cache_flush_assist(void);
bool kvmppc_has_cap_nested_kvm_hv(void);
int kvmppc_set_cap_nested_kvm_hv(int enable);
int kvmppc_get_cap_large_decr(void);
@@ -324,6 +325,11 @@ static inline int kvmppc_get_cap_safe_indirect_branch(void)
return 0;
}
+static inline int kvmppc_get_cap_count_cache_flush_assist(void)
+{
+ return 0;
+}
+
static inline bool kvmppc_has_cap_nested_kvm_hv(void)
{
return false;