Re: [kvm-unit-tests PATCH v2 1/9] lib: s390x: hardware: Add host_is_qemu() function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu,  7 Apr 2022 08:44:13 +0000
Janosch Frank <frankja@xxxxxxxxxxxxx> wrote:

> 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@xxxxxxxxxxxxx>

Reviewed-by: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx>

> ---
>  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();




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux