kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Jones <drjones@redhat.com>
To: David Matlack <dmatlack@google.com>
Cc: kvm@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>,
	Aaron Lewis <aaronlewis@google.com>
Subject: Re: [PATCH v4] KVM: selftests: Print a message if /dev/kvm is missing
Date: Wed, 12 May 2021 08:40:52 +0200	[thread overview]
Message-ID: <20210512064052.jgmyknopi3xcmwrl@gator> (raw)
In-Reply-To: <20210511202120.1371800-1-dmatlack@google.com>

On Tue, May 11, 2021 at 08:21:20PM +0000, David Matlack wrote:
> If a KVM selftest is run on a machine without /dev/kvm, it will exit
> silently. Make it easy to tell what's happening by printing an error
> message.
> 
> Opportunistically consolidate all codepaths that open /dev/kvm into a
> single function so they all print the same message.
> 
> This slightly changes the semantics of vm_is_unrestricted_guest() by
> changing a TEST_ASSERT() to exit(KSFT_SKIP). However
> vm_is_unrestricted_guest() is only called in one place
> (x86_64/mmio_warning_test.c) and that is to determine if the test should
> be skipped or not.
> 
> Signed-off-by: David Matlack <dmatlack@google.com>
> ---
>  .../testing/selftests/kvm/include/kvm_util.h  |  1 +
>  tools/testing/selftests/kvm/lib/kvm_util.c    | 45 +++++++++++++------
>  .../selftests/kvm/lib/x86_64/processor.c      | 16 ++-----
>  .../kvm/x86_64/get_msr_index_features.c       |  8 +---
>  4 files changed, 38 insertions(+), 32 deletions(-)
>

Hi David,

You could have grabbed my r-b from v3, but anyway here it is again

Reviewed-by: Andrew Jones <drjones@redhat.com>

Thanks,
drew


  reply	other threads:[~2021-05-12  6:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-11 20:21 [PATCH v4] KVM: selftests: Print a message if /dev/kvm is missing David Matlack
2021-05-12  6:40 ` Andrew Jones [this message]
2021-05-12 23:16   ` David Matlack
2021-05-24 14:07 ` Paolo Bonzini

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=20210512064052.jgmyknopi3xcmwrl@gator \
    --to=drjones@redhat.com \
    --cc=aaronlewis@google.com \
    --cc=dmatlack@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@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).