diff --git a/include/qemu/target-info.h b/include/qemu/target-info.h index e328733430..23c997de54 100644 --- a/include/qemu/target-info.h +++ b/include/qemu/target-info.h @@ -92,4 +92,11 @@ bool target_ppc(void); */ bool target_ppc64(void); +/** + * target_s390x: + * + * Returns whether the target architecture is S390x. + */ +bool target_s390x(void); + #endif diff --git a/target-info.c b/target-info.c index a26532f660..28c458fc7a 100644 --- a/target-info.c +++ b/target-info.c @@ -88,3 +88,8 @@ bool target_ppc64(void) { return target_arch() == SYS_EMU_TARGET_PPC64; } + +bool target_s390x(void) +{ + return target_arch() == SYS_EMU_TARGET_S390X; +}