All of lore.kernel.org
 help / color / mirror / Atom feed
From: Claudio Imbrenda <imbrenda@linux.ibm.com>
To: pbonzini@redhat.com
Cc: kvm@vger.kernel.org, thuth@redhat.com, frankja@linux.ibm.com,
	Nico Boehr <nrb@linux.ibm.com>
Subject: [kvm-unit-tests GIT PULL 06/28] lib: s390x: hardware: Add host_is_qemu() function
Date: Thu, 12 May 2022 11:35:01 +0200	[thread overview]
Message-ID: <20220512093523.36132-7-imbrenda@linux.ibm.com> (raw)
In-Reply-To: <20220512093523.36132-1-imbrenda@linux.ibm.com>

From: Janosch Frank <frankja@linux.ibm.com>

In the future we'll likely need to check if we're hosted on QEMU so
let's make this as easy as possible by providing a dedicated function.

Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Reviewed-by: Nico Boehr <nrb@linux.ibm.com>
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
---
 lib/s390x/hardware.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/s390x/hardware.h b/lib/s390x/hardware.h
index 01eeb261..86fe873c 100644
--- a/lib/s390x/hardware.h
+++ b/lib/s390x/hardware.h
@@ -45,6 +45,11 @@ static inline bool host_is_lpar(void)
 	return detect_host() == HOST_IS_LPAR;
 }
 
+static inline bool host_is_qemu(void)
+{
+	return host_is_tcg() || host_is_kvm();
+}
+
 static inline bool machine_is_z15(void)
 {
 	uint16_t machine = get_machine_id();
-- 
2.36.1


  parent reply	other threads:[~2022-05-12  9:36 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-12  9:34 [kvm-unit-tests GIT PULL 00/28] storage keys, attestation, migration tests Claudio Imbrenda
2022-05-12  9:34 ` [kvm-unit-tests GIT PULL 01/28] s390x: gs: move to new header file Claudio Imbrenda
2022-05-12  9:34 ` [kvm-unit-tests GIT PULL 02/28] s390x: add test for SIGP STORE_ADTL_STATUS order Claudio Imbrenda
2022-09-20 15:53   ` Thomas Huth
2022-10-05 13:18     ` Nico Boehr
2022-10-05 13:25       ` Thomas Huth
2022-10-05 14:00         ` Nico Boehr
2022-05-12  9:34 ` [kvm-unit-tests GIT PULL 03/28] s390x: epsw: fix report_pop_prefix() when running under non-QEMU Claudio Imbrenda
2022-05-12  9:34 ` [kvm-unit-tests GIT PULL 04/28] s390x: tprot: use lib include for mmu.h Claudio Imbrenda
2022-05-12  9:35 ` [kvm-unit-tests GIT PULL 05/28] s390x: smp: make stop stopped cpu look the same as the running case Claudio Imbrenda
2022-05-12  9:35 ` Claudio Imbrenda [this message]
2022-05-12  9:35 ` [kvm-unit-tests GIT PULL 07/28] s390x: css: Skip if we're not run by qemu Claudio Imbrenda
2022-05-12  9:35 ` [kvm-unit-tests GIT PULL 08/28] s390x: diag308: Only test subcode 2 under QEMU Claudio Imbrenda
2022-05-12  9:35 ` [kvm-unit-tests GIT PULL 09/28] s390x: pfmf: Initialize pfmf_r1 union on declaration Claudio Imbrenda
2022-05-12  9:35 ` [kvm-unit-tests GIT PULL 10/28] s390x: snippets: asm: Add license and copyright headers Claudio Imbrenda
2022-05-12  9:35 ` [kvm-unit-tests GIT PULL 11/28] s390x: pv-diags: Cleanup includes Claudio Imbrenda
2022-05-12  9:35 ` [kvm-unit-tests GIT PULL 12/28] s390x: css: " Claudio Imbrenda
2022-05-12  9:35 ` [kvm-unit-tests GIT PULL 13/28] s390x: iep: " Claudio Imbrenda
2022-05-12  9:35 ` [kvm-unit-tests GIT PULL 14/28] s390x: mvpg: " Claudio Imbrenda
2022-05-12  9:35 ` [kvm-unit-tests GIT PULL 15/28] s390x: uv-host: Fix pgm tests Claudio Imbrenda
2022-05-12  9:35 ` [kvm-unit-tests GIT PULL 16/28] lib: s390x: add support for SCLP console read Claudio Imbrenda
2022-05-12  9:35 ` [kvm-unit-tests GIT PULL 17/28] s390x: add support for migration tests Claudio Imbrenda
2022-05-12  9:35 ` [kvm-unit-tests GIT PULL 18/28] s390x: don't run migration tests under PV Claudio Imbrenda
2022-05-12  9:35 ` [kvm-unit-tests GIT PULL 19/28] s390x: add basic migration test Claudio Imbrenda
2022-05-12  9:35 ` [kvm-unit-tests GIT PULL 20/28] s390x: Give name to return value of tprot() Claudio Imbrenda
2022-05-12  9:35 ` [kvm-unit-tests GIT PULL 21/28] s390x: Test effect of storage keys on some instructions Claudio Imbrenda
2022-05-12  9:35 ` [kvm-unit-tests GIT PULL 22/28] Disable s390x skey test in GitLab CI Claudio Imbrenda
2022-05-12  9:35 ` [kvm-unit-tests GIT PULL 23/28] s390x: uv-host: Add invalid command attestation check Claudio Imbrenda
2022-05-12  9:35 ` [kvm-unit-tests GIT PULL 24/28] s390x: lib: Add QUI getter Claudio Imbrenda
2022-05-12  9:35 ` [kvm-unit-tests GIT PULL 25/28] s390x: uv-guest: remove duplicated checks Claudio Imbrenda
2022-05-12  9:35 ` [kvm-unit-tests GIT PULL 26/28] s390x: uv-guest: Remove double report_prefix_pop Claudio Imbrenda
2022-05-12  9:35 ` [kvm-unit-tests GIT PULL 27/28] s390x: uv-guest: add share bit test Claudio Imbrenda
2022-05-12  9:35 ` [kvm-unit-tests GIT PULL 28/28] s390x: Add attestation tests Claudio Imbrenda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220512093523.36132-7-imbrenda@linux.ibm.com \
    --to=imbrenda@linux.ibm.com \
    --cc=frankja@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=nrb@linux.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.