qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/4] target/ppc: Fix kvmppc_load_htab_chunk() error reporting


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 3/4] target/ppc: Fix kvmppc_load_htab_chunk() error reporting
Date: Mon, 26 Oct 2020 14:45:09 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1

On 10/26/20 1:40 PM, Greg Kurz wrote:
If kvmppc_load_htab_chunk() fails, its return value is propagated up
to vmstate_load(). It should thus be a negative errno, not -1 (which
maps to EPERM and would lure the user into thinking that the problem
is necessarily related to a lack of privilege).

Return the error reported by KVM or ENOSPC in case of short write.
While here, propagate the error message through an @errp argument
and have the caller to print it with error_report_err() instead
of relying on fprintf().

Signed-off-by: Greg Kurz <groug@kaod.org>
---
  hw/ppc/spapr.c       |    4 +++-
  target/ppc/kvm.c     |   11 +++++------
  target/ppc/kvm_ppc.h |    5 +++--
  3 files changed, 11 insertions(+), 9 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]