diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2020-06-30 11:35:46 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-07-10 18:02:22 -0400 |
commit | e4f6278557148151e77260b872b41bcd7ceb4737 (patch) | |
tree | b48dc66a8b91ccb5b01d509a82f40cffdd75e6ec /target/i386/monitor.c | |
parent | e1e43813e7908b063938a3d01f172f88f6190c80 (diff) |
target/i386: sev: provide proper error reporting for query-sev-capabilities
The query-sev-capabilities was reporting errors through error_report;
change it to use Error** so that the cause of the failure is clearer.
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target/i386/monitor.c')
-rw-r--r-- | target/i386/monitor.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/target/i386/monitor.c b/target/i386/monitor.c index 27ebfa3ad2..7abae3c8df 100644 --- a/target/i386/monitor.c +++ b/target/i386/monitor.c @@ -726,13 +726,5 @@ SevLaunchMeasureInfo *qmp_query_sev_launch_measure(Error **errp) SevCapability *qmp_query_sev_capabilities(Error **errp) { - SevCapability *data; - - data = sev_get_capabilities(); - if (!data) { - error_setg(errp, "SEV feature is not available"); - return NULL; - } - - return data; + return sev_get_capabilities(errp); } |