Erik Skultety 764491c9dd qemu: Fix probing of AMD SEV support
So the procedure to detect SEV support works like this:
1) we detect that sev-guest is among the QOM types and set the cap flag
2) we probe the monitor for SEV support
    - this is tricky, because QEMU with compiled SEV support will always
    report -object sev-guest and query-sev-capabilities command, that
    however doesn't mean SEV is supported
3) depending on what the monitor returned, we either keep or clear the
capability flag for SEV

Commit a349c6c21c6 added an explicit check for "GenericError" in the
monitor reply to prevent libvirtd to spam logs about missing
'query-sev-capabilities' command. At the same time though, it returned
success in this case which means that we didn't clear the capability
flag afterwards and happily formatted SEV into qemuCaps. Therefore,
adjust all the relevant callers to handle -1 on errors, 0 on SEV being
unsupported and 1 on SEV being supported.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Acked-by: Peter Krempa <pkrempa@redhat.com>
2018-08-20 07:18:11 +02:00
..
2017-11-20 13:22:48 +01:00
2018-08-13 15:50:01 +02:00
2017-04-27 14:13:19 +02:00
2017-04-11 13:23:01 +02:00
2017-11-03 13:24:12 +01:00
2018-04-10 15:16:23 +02:00
2018-03-12 20:04:08 +04:00
2017-11-03 13:24:12 +01:00
2017-07-26 15:33:45 +02:00
2017-04-27 14:13:19 +02:00
2017-11-24 11:47:26 -05:00
2017-11-03 13:24:12 +01:00
2018-01-25 17:16:08 +01:00
2016-09-14 13:18:07 +02:00
2016-08-24 17:43:29 +02:00
2018-07-27 15:47:45 +02:00
2018-08-15 10:16:16 +02:00
2017-10-05 09:09:50 +02:00