qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Subject: [PATCH 0/2] error-reporting for query-sev-capabilities
Date: Tue, 30 Jun 2020 11:45:19 -0400	[thread overview]
Message-ID: <20200630154521.552874-1-pbonzini@redhat.com> (raw)

In some cases, such as if the kvm-amd "sev" module parameter is set
to 0, SEV will be unavailable but query-sev-capabilities will still
return all the information.  This tricks libvirt into erroneously
reporting that SEV is available.  This series checks for the actual
usability of the feature and returns the appropriate error if QEMU
cannot use KVM or KVM cannot use SEV.

Because query-sev-capabilities's error reporting was abysmal, we
first have to fix it up (patch 1).  Curiously that removes more
code than it adds.

Paolo


Paolo Bonzini (2):
  target-i386: sev: provide proper error reporting for query-sev-capabilities
  target-i386: sev: fail query-sev-capabilities if QEMU cannot use SEV

 target/i386/monitor.c  | 10 +---------
 target/i386/sev-stub.c |  3 ++-
 target/i386/sev.c      | 27 ++++++++++++++++++---------
 target/i386/sev_i386.h |  2 +-
 4 files changed, 22 insertions(+), 20 deletions(-)

-- 
2.26.2



             reply	other threads:[~2020-06-30 15:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-30 15:45 Paolo Bonzini [this message]
2020-06-30 15:45 ` [PATCH 1/2] target-i386: sev: provide proper error reporting for query-sev-capabilities Paolo Bonzini
2020-07-01 14:11   ` Eric Blake
2020-06-30 15:45 ` [PATCH 2/2] target-i386: sev: fail query-sev-capabilities if QEMU cannot use SEV Paolo Bonzini
2020-07-01 14:12   ` Eric Blake
2020-07-03 16:08   ` Dr. David Alan Gilbert
2020-07-03 16:10     ` Paolo Bonzini
2020-06-30 16:09 ` [PATCH 0/2] error-reporting for query-sev-capabilities no-reply

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=20200630154521.552874-1-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).