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.
target/ppc/spapr: Add workaround option to SPAPR_CAP_IBS
The spapr_cap SPAPR_CAP_IBS is used to indicate the level of capability
for mitigations for indirect branch speculation. Currently the available
values are broken (default), fixed-ibs (fixed by serialising indirect
branches) and fixed-ccd (fixed by diabling the count cache).
Introduce a new value for this capability denoted workaround, meaning that
software can work around the issue by flushing the count cache on
context switch. This option is available if the hypervisor sets the
H_CPU_BEHAV_FLUSH_COUNT_CACHE flag in the cpu behaviours returned from
the KVM_PPC_GET_CPU_CHAR ioctl.
ppc/spapr-caps: Change migration macro to take full spapr-cap name
Change the macro that generates the vmstate migration field and the needed
function for the spapr-caps to take the full spapr-cap name. This has
the benefit of meaning this instance will be picked up when greping
for the spapr-caps and making it more obvious what this macro is doing.
Patches only analysis (next commit will try to take care of understanding changes):
commit 8ff43ee404d3e29 5839d1fd4e9e657 1ca7a62a66 (v3.1.0- 2772-g8ff43ee40 4)
Author: Suraj Jitindar Singh <email address hidden>
Date: Fri Mar 1 00:19:12 2019
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 CHAR_BCCTR_ FLUSH_ASSIST flag being set in the characteristics GET_CPU_ CHAR ioctl.
H_CPU_
returned from the KVM_PPC_
Signed-off-by: Suraj Jitindar Singh <email address hidden>
Message-Id: <email address hidden>
[dwg: Small style fixes]
Signed-off-by: David Gibson <email address hidden>
Your comment:
"remove context dependencies on post-2.11 capabilities and migration state"
was made due to positional changes, right ?
Cause I can see only the enum index as diff from upstream.
Anyway, check my next comment (about capabilities) before answering this =o).
---- All other commits are just like upstream:
commit 399b2896d4948a1 ec0278d896ea3a5 61df768d64 (v3.1.0- 2771-g399b2896d 4)
Author: Suraj Jitindar Singh <email address hidden>
Date: Fri Mar 1 00:19:11 2019
target/ ppc/spapr: Add workaround option to SPAPR_CAP_IBS
The spapr_cap SPAPR_CAP_IBS is used to indicate the level of capability
for mitigations for indirect branch speculation. Currently the available
values are broken (default), fixed-ibs (fixed by serialising indirect
branches) and fixed-ccd (fixed by diabling the count cache).
Introduce a new value for this capability denoted workaround, meaning that BEHAV_FLUSH_ COUNT_CACHE flag in the cpu behaviours returned from GET_CPU_ CHAR ioctl.
software can work around the issue by flushing the count cache on
context switch. This option is available if the hypervisor sets the
H_CPU_
the KVM_PPC_
Signed-off-by: Suraj Jitindar Singh <email address hidden>
Message-Id: <email address hidden>
Signed-off-by: David Gibson <email address hidden>
commit 8fea70440eb0d09 5442de7e80d586a 285cf96be5 (v2.12. 0-1230- g8fea70440e)
Author: Suraj Jitindar Singh <email address hidden>
Date: Fri May 11 03:25:07 2018
target/ppc: Factor out the parsing in kvmppc_ get_cpu_ characteristics ()
Factor out the parsing of struct kvm_ppc_cpu_char in get_cpu_ characteristics () into a separate function for each cap
kvmppc_
for simplicity.
Signed-off-by: Suraj Jitindar Singh <email address hidden>
Signed-off-by: David Gibson <email address hidden>
commit 8c5909c41916f25 b47bfdc465059a9 26603c1319 (v2.11. 0-1603- g8c5909c419)
Author: Suraj Jitindar Singh <email address hidden>
Date: Wed Feb 14 22:44:41 2018
ppc/spapr-caps: Change migration macro to take full spapr-cap name
Change the macro that generates the vmstate migration field and the needed
function for the spapr-caps to take the full spapr-cap name. This has
the benefit of meaning this instance will be picked up when greping
for the spapr-caps and making it more obvious what this macro is doing.
Signed-off-by: Suraj Jitindar Singh <email address hidden>
Signed-off-by: David Gibson <email address hidden>