From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49377) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c6iyH-0007W5-MX for qemu-devel@nongnu.org; Tue, 15 Nov 2016 14:00:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c6iyE-0002x2-Kt for qemu-devel@nongnu.org; Tue, 15 Nov 2016 14:00:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45754) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c6iyE-0002wq-BP for qemu-devel@nongnu.org; Tue, 15 Nov 2016 14:00:38 -0500 References: <20161115110956.5393749d@bahia> <20161115155642.345d1863@bahia> <44b410d5-907c-cff9-0366-a86718bb0352@redhat.com> <20161115174338.GI2038@work-vm> <20161115191306.216341b9@bahia> <81408cfa-c1a2-ce87-8a31-4ae94d49fbfe@redhat.com> From: Eric Blake Message-ID: <094a2d0a-41ab-c871-7862-1e04cef6fa45@redhat.com> Date: Tue, 15 Nov 2016 13:00:35 -0600 MIME-Version: 1.0 In-Reply-To: <81408cfa-c1a2-ce87-8a31-4ae94d49fbfe@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="9KcPriMMFHKbns7QQuXrwEa6F5wjiLiaG" Subject: Re: [Qemu-devel] QEMU postcopy-test failing on ppc64 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Huth , Greg Kurz , "Dr. David Alan Gilbert" Cc: Laurent Vivier , Stefan Hajnoczi , Andrea Arcangeli , qemu-devel This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --9KcPriMMFHKbns7QQuXrwEa6F5wjiLiaG From: Eric Blake To: Thomas Huth , Greg Kurz , "Dr. David Alan Gilbert" Cc: Laurent Vivier , Stefan Hajnoczi , Andrea Arcangeli , qemu-devel Message-ID: <094a2d0a-41ab-c871-7862-1e04cef6fa45@redhat.com> Subject: Re: [Qemu-devel] QEMU postcopy-test failing on ppc64 References: <20161115110956.5393749d@bahia> <20161115155642.345d1863@bahia> <44b410d5-907c-cff9-0366-a86718bb0352@redhat.com> <20161115174338.GI2038@work-vm> <20161115191306.216341b9@bahia> <81408cfa-c1a2-ce87-8a31-4ae94d49fbfe@redhat.com> In-Reply-To: <81408cfa-c1a2-ce87-8a31-4ae94d49fbfe@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/15/2016 12:48 PM, Thomas Huth wrote: >> Even for Power, I'd prefer to keep KVM since the problem only happens = with >> KVM PR which isn't the preferred way to do KVM on bare metal... until = this >> get fixed, I'd rather suggest people to run make check with KVM HV. >=20 > OK ... what do you think about a patch like this: >=20 > diff --git a/tests/postcopy-test.c b/tests/postcopy-test.c > --- a/tests/postcopy-test.c > +++ b/tests/postcopy-test.c > @@ -380,17 +380,19 @@ static void test_migrate(void) > " -incoming %s", > tmpfs, bootpath, uri); > } else if (strcmp(arch, "ppc64") =3D=3D 0) { > + const char *accel; > init_bootfile_ppc(bootpath); > - cmd_src =3D g_strdup_printf("-machine accel=3Dkvm:tcg -m 256M"= > + accel =3D system("/sbin/lsmod | grep -q kvm_hv") ? "tcg" : "kv= m:tcg"; Unsafe use of system() (all I have to do is stick a counterfeit 'grep' earlier on my PATH to mess you up). Is there a safer way to grab that information without having to call out to the shell? > That way, accel=3Dkvm:tcg is only used if the kvm_hv module is loaded, > otherwise it will use accel=3Dtcg instead. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --9KcPriMMFHKbns7QQuXrwEa6F5wjiLiaG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJYK1tTAAoJEKeha0olJ0NqBOEH/Ri0OgmcYB5yVpg6TQfHOBdz kFh4q5WaepfmPQ3GY9t/nl4H+MdETf6ps/5BwopTjdvvKC2YuB02qvmN6L3Il+1i BPYgUBpavRUkw/yKkoRnGcrck/kNU4rqDLKqgD9crzMywh0yhUEbTQMV+VWG6MS1 Un0NgXz9CsPAc1tJ1+8QxxZxT8/BNdfnZri/07DnoKvUSzCYp4DcQ1Z6IvVHltnK su/Z4FihMtpBug0ojJf3SwtfbX0AG82nigZelOqTIp6qOoBUbq+NdTCMiDRWR0vz PHfkXPrFWkxQEn0A2kWyYjqQgYCG2fjo3DH3a73hnkwVd1IxT9H2H/pvBpYKKTI= =DxGX -----END PGP SIGNATURE----- --9KcPriMMFHKbns7QQuXrwEa6F5wjiLiaG--