[PATCH 0/2] error-reporting for query-sev-capabilities

Paolo Bonzini posted 2 patches 1 week ago
Test FreeBSD passed
Test docker-quick@centos7 passed
Test checkpatch failed
Test docker-mingw@fedora passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200630154521.552874-1-pbonzini@redhat.com
Maintainers: Richard Henderson <rth@twiddle.net>, Eduardo Habkost <ehabkost@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>
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(-)

[PATCH 0/2] error-reporting for query-sev-capabilities

Posted by Paolo Bonzini 1 week ago
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


Re: [PATCH 0/2] error-reporting for query-sev-capabilities

Posted by no-reply@patchew.org 1 week ago
Patchew URL: https://patchew.org/QEMU/20200630154521.552874-1-pbonzini@redhat.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Subject: [PATCH 0/2] error-reporting for query-sev-capabilities
Type: series
Message-id: 20200630154521.552874-1-pbonzini@redhat.com

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

From https://github.com/patchew-project/qemu
 * [new tag]         patchew/20200630154521.552874-1-pbonzini@redhat.com -> patchew/20200630154521.552874-1-pbonzini@redhat.com
Switched to a new branch 'test'
a8be190 target-i386: sev: fail query-sev-capabilities if QEMU cannot use SEV
15c69ee target-i386: sev: provide proper error reporting for query-sev-capabilities

=== OUTPUT BEGIN ===
1/2 Checking commit 15c69ee08893 (target-i386: sev: provide proper error reporting for query-sev-capabilities)
2/2 Checking commit a8be190ec95d (target-i386: sev: fail query-sev-capabilities if QEMU cannot use SEV)
ERROR: Error messages should not contain newlines
#26: FILE: target/i386/sev.c:454:
+        error_setg(errp, "KVM not enabled\n");

ERROR: Error messages should not contain newlines
#30: FILE: target/i386/sev.c:458:
+        error_setg(errp, "SEV is not enabled\n");

total: 2 errors, 0 warnings, 15 lines checked

Patch 2/2 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20200630154521.552874-1-pbonzini@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com