target/ppc/spapr: Add SPAPR_CAP_CCF_ASSIST
commit8ff43ee404d3e295839d1fd4e9e6571ca7a62a66
authorSuraj Jitindar Singh <sjitindarsingh@gmail.com>
Fri, 1 Mar 2019 03:19:12 +0000 (1 14:19 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Tue, 12 Mar 2019 01:07:49 +0000 (12 12:07 +1100)
treef3a77de59523fe38cc5479afdc3087e8c7f7b53f
parent399b2896d4948a1ec0278d896ea3a561df768d64
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>
hw/ppc/spapr.c
hw/ppc/spapr_caps.c
hw/ppc/spapr_hcall.c
include/hw/ppc/spapr.h
target/ppc/kvm.c
target/ppc/kvm_ppc.h