From: Laurent Vivier <lvivier@redhat.com>
To: Eric Blake <eblake@redhat.com>, Thomas Huth <thuth@redhat.com>,
Greg Kurz <groug@kaod.org>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
Andrea Arcangeli <aarcange@redhat.com>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] QEMU postcopy-test failing on ppc64
Date: Tue, 15 Nov 2016 21:44:19 +0100 [thread overview]
Message-ID: <d4f9bf2a-805f-a457-40e7-ebef9dbd36e6@redhat.com> (raw)
In-Reply-To: <18c4e391-f38a-e5fe-c957-571af9a24f80@redhat.com>
On 15/11/2016 21:39, Laurent Vivier wrote:
>
>
> On 15/11/2016 20:00, Eric Blake wrote:
>> 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?
>
> I think trying to open "/dev/kvm" would be enough to know if kvm is
> available or not.
OK, I've missed you want to check KVM HV only...
Laurent
next prev parent reply other threads:[~2016-11-15 20:44 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-14 20:52 [Qemu-devel] QEMU postcopy-test failing on ppc64 Stefan Hajnoczi
2016-11-15 9:43 ` Dr. David Alan Gilbert
2016-11-15 9:53 ` Laurent Vivier
2016-11-15 10:09 ` Greg Kurz
2016-11-15 11:14 ` Stefan Hajnoczi
2016-11-15 12:20 ` Dr. David Alan Gilbert
2016-11-15 12:58 ` Laurent Vivier
2016-11-15 14:48 ` Stefan Hajnoczi
2016-11-15 15:03 ` Greg Kurz
2016-11-15 15:07 ` Laurent Vivier
2016-11-15 15:08 ` Dr. David Alan Gilbert
2016-11-15 15:12 ` Laurent Vivier
2016-11-15 18:01 ` Greg Kurz
2016-11-15 18:24 ` Laurent Vivier
2016-11-15 20:02 ` Greg Kurz
2016-11-16 1:35 ` Thomas Huth
2016-11-15 14:56 ` Greg Kurz
2016-11-15 15:18 ` Stefan Hajnoczi
2016-11-15 17:26 ` Thomas Huth
2016-11-15 17:43 ` Dr. David Alan Gilbert
2016-11-15 18:13 ` Greg Kurz
2016-11-15 18:48 ` Thomas Huth
2016-11-15 19:00 ` Eric Blake
2016-11-15 20:39 ` Laurent Vivier
2016-11-15 20:44 ` Laurent Vivier [this message]
2016-11-15 20:45 ` Laurent Vivier
2016-11-15 20:26 ` Greg Kurz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d4f9bf2a-805f-a457-40e7-ebef9dbd36e6@redhat.com \
--to=lvivier@redhat.com \
--cc=aarcange@redhat.com \
--cc=dgilbert@redhat.com \
--cc=eblake@redhat.com \
--cc=groug@kaod.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).