Several tests are in need of a way to check on which hypervisor and virtualization level they are running on to be able to fence certain tests. This patch adds functions that return true if a vm is running under KVM, LPAR or generally as a level 2 guest. To check if we're running under KVM we use the STSI 3.2.2 instruction, let's define it's response structure in a central header. Pierre Morel (1): s390x: stsi: Define vm_is_kvm to be used in different tests lib/s390x/stsi.h | 32 ++++++++++++++++++++++++++++ lib/s390x/vm.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++-- lib/s390x/vm.h | 3 +++ s390x/stsi.c | 23 ++------------------ 4 files changed, 90 insertions(+), 23 deletions(-) create mode 100644 lib/s390x/stsi.h -- 2.27.0