On 4/1/24 11:48, Srikanth Aithal wrote:
Propogate error code using errp in sev_kvm_init.

Before fix:
qemu-system-x86_64: sev_kvm_init: guest policy requires SEV-ES,
but host SEV-ES support unavailable
27747 Segmentation fault      (core dumped)

After fix:
qemu-system-x86_64: sev_kvm_init: guest policy requires SEV-ES,
but host SEV-ES support unavailable
qemu-system-x86_64: failed to initialize kvm: Operation not permitted

While at it, also fix two more locations.

Reviewed-by: Nikunj A Dadhania <nik...@amd.com>
Signed-off-by: Srikanth Aithal <srikanth.ait...@amd.com>
---
  target/i386/sev.c | 9 +++++----
  1 file changed, 5 insertions(+), 4 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org>


Reply via email to