Re: [kvm-unit-tests RFC 1/2] scripts: Check kvm availability by asking qemu

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

 



On Thu, Mar 18, 2021 at 12:44:59PM +0000, Janosch Frank wrote:
> diff --git a/scripts/arch-run.bash b/scripts/arch-run.bash
> index 5997e384..8cc9a61e 100644
> --- a/scripts/arch-run.bash
> +++ b/scripts/arch-run.bash
> @@ -342,8 +342,11 @@ trap_exit_push ()
>  
>  kvm_available ()
>  {
> -	[ -c /dev/kvm ] ||
> -		return 1
> +	if $($qemu -accel kvm 2> /dev/null); then
> +		return 0;
> +	else
> +		return 1;
> +	fi
>

Hi Janosch,

Are we sure that even old QEMU supports this type of probing? If not,
then we should probably keep the /dev/kvm test as a fallback.

Thanks,
drew




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux