qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 09/15] s390x/kvm: Report warnings with warn_repo


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH 09/15] s390x/kvm: Report warnings with warn_report(), not error_printf()
Date: Mon, 08 Apr 2019 14:32:53 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Cornelia Huck <address@hidden> writes:

> On Mon, 8 Apr 2019 10:39:40 +0200
> Thomas Huth <address@hidden> wrote:
>
>> On 08/04/2019 10.36, Markus Armbruster wrote:
>> > kvm_s390_mem_op() can fail in two ways: when !cap_mem_op, it returns
>> > -ENOSYS, and when kvm_vcpu_ioctl() fails, it returns -errno set by
>> > ioctl().  Its caller s390_cpu_virt_mem_rw() recovers from both
>> > failures.
>> > 
>> > kvm_s390_mem_op() prints "KVM_S390_MEM_OP failed" with error_printf()
>> > in the latter failure mode.  Since this is obviously a warning, use
>> > warn_report().
>> > 
>> > Perhaps the reporting should be left to the caller.  It could warn on
>> > failure other than -ENOSYS.
>> > 
>> > Cc: Thomas Huth <address@hidden>
>> > Cc: address@hidden
>> > Signed-off-by: Markus Armbruster <address@hidden>
>> > ---
>> >  target/s390x/kvm.c | 2 +-
>> >  1 file changed, 1 insertion(+), 1 deletion(-)
>> > 
>> > diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
>> > index 19530fb94e..2c6e35b5aa 100644
>> > --- a/target/s390x/kvm.c
>> > +++ b/target/s390x/kvm.c
>> > @@ -782,7 +782,7 @@ int kvm_s390_mem_op(S390CPU *cpu, vaddr addr, uint8_t 
>> > ar, void *hostbuf,
>> >  
>> >      ret = kvm_vcpu_ioctl(CPU(cpu), KVM_S390_MEM_OP, &mem_op);
>> >      if (ret < 0) {
>> > -        error_printf("KVM_S390_MEM_OP failed: %s\n", strerror(-ret));
>> > +        warn_report("KVM_S390_MEM_OP failed: %s", strerror(-ret));
>> >      }
>> >      return ret;
>> >  }
>> >   
>> 
>> Reviewed-by: Thomas Huth <address@hidden>
>
> Reviewed-by: Cornelia Huck <address@hidden>
>
> (Markus, I think you wanted to take this?)

I intend to take the complete series through my tree if nobody objects.

Thanks!



reply via email to

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