On 04/05/2024 14.28, Nicholas Piggin wrote:
Use device tree properties to determine whether KVM or TCG is in use. Logically these are not the inverse of one another, because KVM can be used on top of a TCG processor (if TCG is emulating HV mode, or if it provides a nested hypervisor interface with spapr). This can be a problem because some issues relate to TCG CPU emulation, and some to the spapr hypervisor implementation. At the moment there is no way to determine TCG is running a KVM host that is running the tests, but the two independent variables are added in case that is able to be determined in future. For now that case is just incorrectly considered to be kvm && !tcg. Use this facility to restrict some of the known test failures to TCG. Signed-off-by: Nicholas Piggin <npiggin@xxxxxxxxx> --- lib/powerpc/asm/processor.h | 3 +++ lib/powerpc/setup.c | 25 +++++++++++++++++++++++++ powerpc/atomics.c | 2 +- powerpc/interrupts.c | 6 ++++-- powerpc/mmu.c | 2 +- powerpc/pmu.c | 6 +++--- powerpc/sprs.c | 2 +- powerpc/timebase.c | 4 ++-- powerpc/tm.c | 2 +- 9 files changed, 41 insertions(+), 11 deletions(-)
As mentioned elsewhere, it would be nice to have this earlier in the series so you could use the conditions in the earlier patches already (but if it is too cumbersome to rework, I don't insist on that).
Reviewed-by: Thomas Huth <thuth@xxxxxxxxxx>