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. > > OK ... what do you think about a patch like this: > > 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") == 0) { > + const char *accel; > init_bootfile_ppc(bootpath); > - cmd_src = g_strdup_printf("-machine accel=kvm:tcg -m 256M" > + accel = system("/sbin/lsmod | grep -q kvm_hv") ? "tcg" : "kvm: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=kvm:tcg is only used if the kvm_hv module is loaded, > otherwise it will use accel=tcg instead. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature