From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Jones Subject: Re: [kvm-unit-tests PATCH 4/7] run/arm: introduce usingkvm var and use it Date: Mon, 6 Jul 2015 15:02:17 +0200 Message-ID: <20150706130217.GF17217@hawk.localdomain> References: <1435931327-8073-1-git-send-email-alex.bennee@linaro.org> <1435931327-8073-5-git-send-email-alex.bennee@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm@vger.kernel.org To: Alex =?iso-8859-1?Q?Benn=E9e?= Return-path: Received: from mx1.redhat.com ([209.132.183.28]:38412 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751427AbbGFNCV (ORCPT ); Mon, 6 Jul 2015 09:02:21 -0400 Content-Disposition: inline In-Reply-To: <1435931327-8073-5-git-send-email-alex.bennee@linaro.org> Sender: kvm-owner@vger.kernel.org List-ID: On Fri, Jul 03, 2015 at 02:48:44PM +0100, Alex Benn=E9e wrote: > This makes it easier to force KVM off in later patches. >=20 > Signed-off-by: Alex Benn=E9e > --- > arm/run | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) >=20 > diff --git a/arm/run b/arm/run > index 6b42a2e..493ce0d 100755 > --- a/arm/run > +++ b/arm/run > @@ -8,6 +8,16 @@ fi > source config.mak > processor=3D"$PROCESSOR" > =20 > +# Default to using KVM if available and on the right ARM host > +usingkvm=3D0 > +if [ -c /dev/kvm ]; then > + if [ "$HOST" =3D "arm" ] && [ "$ARCH" =3D "arm" ]; then > + usingkvm=3D1 > + elif [ "$HOST" =3D "aarch64" ]; then > + usingkvm=3D1 > + fi > +fi > + > qemu=3D"${QEMU:-qemu-system-$ARCH_NAME}" > qpath=3D$(which $qemu 2>/dev/null) > =20 > @@ -39,7 +49,7 @@ chr_testdev=3D'-device virtio-serial-device' > chr_testdev+=3D' -device virtconsole,chardev=3Dctd -chardev testdev,= id=3Dctd' > =20 > # arm64 must use '-cpu host' with kvm > -if [ "$(arch)" =3D "aarch64" ] && [ "$ARCH" =3D "arm64" ] && [ -c /d= ev/kvm ]; then > +if [ $usingkvm =3D 1 ] && [ "$ARCH" =3D "arm64" ]; then > processor=3D"host" > fi Looks good. > =20 > --=20 > 2.4.5 >=20 > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html