qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

tests: Silence various warnings with pseries

Some default features of the pseries machine are only available with
KVM. Warnings are printed when the pseries machine is used with another
accelerator:

qemu-system-ppc64: warning: TCG doesn't support requested feature,
cap-ccf-assist=on
qemu-system-ppc64: warning: Firmware Assisted Non-Maskable
Interrupts(FWNMI) not supported in TCG
qemu-system-ppc64: warning: TCG doesn't support requested feature,
cap-ccf-assist=on
qemu-system-ppc64: warning: Firmware Assisted Non-Maskable
Interrupts(FWNMI) not supported in TCG
qemu-system-ppc64: warning: TCG doesn't support requested feature,
cap-ccf-assist=on
qemu-system-ppc64: warning: Firmware Assisted Non-Maskable
Interrupts(FWNMI) not supported in TCG

This is annoying for CI since it usually runs without KVM. We already
disable features that emit similar warnings thanks to properties of
the pseries machine, but this is open-coded in various
places. Consolidate the set of properties in a single place. Extend it
to silence the above warnings. And use it in the various tests that
start pseries machines.

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <158059697130.1820292.7823434132030453110.stgit@bahia.lan>
Reviewed-by: Thomas Huth <thuth@redhat.com>
[dwg: Correct minor grammatical error]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>

authored by

Greg Kurz and committed by
David Gibson
63d57c8f 4dcf078f

+16 -5
+2 -1
tests/qtest/boot-serial-test.c
··· 15 15 16 16 #include "qemu/osdep.h" 17 17 #include "libqtest.h" 18 + #include "libqos/libqos-spapr.h" 18 19 19 20 static const uint8_t kernel_mcf5208[] = { 20 21 0x41, 0xf9, 0xfc, 0x06, 0x00, 0x00, /* lea 0xfc060000,%a0 */ ··· 112 113 { "ppc64", "40p", "-m 192", "Memory: 192M" }, 113 114 { "ppc64", "mac99", "", "PowerPC,970FX" }, 114 115 { "ppc64", "pseries", 115 - "-machine cap-cfpc=broken,cap-sbbc=broken,cap-ibs=broken", 116 + "-machine " PSERIES_DEFAULT_CAPABILITIES, 116 117 "Open Firmware" }, 117 118 { "ppc64", "powernv8", "", "OPAL" }, 118 119 { "ppc64", "powernv9", "", "OPAL" },
+8
tests/qtest/libqos/libqos-spapr.h
··· 7 7 QOSState *qtest_spapr_boot(const char *cmdline_fmt, ...); 8 8 void qtest_spapr_shutdown(QOSState *qs); 9 9 10 + /* List of capabilities needed to silence warnings with TCG */ 11 + #define PSERIES_DEFAULT_CAPABILITIES \ 12 + "cap-cfpc=broken," \ 13 + "cap-sbbc=broken," \ 14 + "cap-ibs=broken," \ 15 + "cap-ccf-assist=off," \ 16 + "cap-fwnmi-mce=off" 17 + 10 18 #endif
+2 -1
tests/qtest/prom-env-test.c
··· 21 21 22 22 #include "qemu/osdep.h" 23 23 #include "libqtest.h" 24 + #include "libqos/libqos-spapr.h" 24 25 25 26 #define MAGIC 0xcafec0de 26 27 #define ADDRESS 0x4000 ··· 54 55 */ 55 56 if (strcmp(machine, "pseries") == 0) { 56 57 extra_args = "-nodefaults" 57 - " -machine cap-cfpc=broken,cap-sbbc=broken,cap-ibs=broken"; 58 + " -machine " PSERIES_DEFAULT_CAPABILITIES; 58 59 } 59 60 60 61 qts = qtest_initf("-M %s -accel tcg %s -prom-env 'use-nvramrc?=true' "
+4 -3
tests/qtest/pxe-test.c
··· 17 17 #include "qemu-common.h" 18 18 #include "libqtest.h" 19 19 #include "boot-sector.h" 20 + #include "libqos/libqos-spapr.h" 20 21 21 22 #define NETNAME "net0" 22 23 ··· 46 47 47 48 static testdef_t ppc64_tests[] = { 48 49 { "pseries", "spapr-vlan", 49 - "-machine cap-cfpc=broken,cap-sbbc=broken,cap-ibs=broken,vsmt=8" }, 50 + "-machine vsmt=8," PSERIES_DEFAULT_CAPABILITIES }, 50 51 { "pseries", "virtio-net-pci", 51 - "-machine cap-cfpc=broken,cap-sbbc=broken,cap-ibs=broken,vsmt=8" }, 52 + "-machine vsmt=8," PSERIES_DEFAULT_CAPABILITIES }, 52 53 { NULL }, 53 54 }; 54 55 55 56 static testdef_t ppc64_tests_slow[] = { 56 57 { "pseries", "e1000", 57 - "-machine cap-cfpc=broken,cap-sbbc=broken,cap-ibs=broken,vsmt=8" }, 58 + "-machine vsmt=8," PSERIES_DEFAULT_CAPABILITIES }, 58 59 { NULL }, 59 60 }; 60 61