qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 09/10] s390x/mmu: Use ioctl for reading and writ


From: Cornelia Huck
Subject: Re: [Qemu-devel] [PATCH 09/10] s390x/mmu: Use ioctl for reading and writing from/to guest memory
Date: Wed, 22 Apr 2015 10:37:43 +0200

On Tue, 21 Apr 2015 21:48:02 +0200
Christian Borntraeger <address@hidden> wrote:

> Am 21.04.2015 um 21:36 schrieb Alexander Graf:
> > On 04/21/2015 09:34 PM, Christian Borntraeger wrote:
> >> Am 21.04.2015 um 21:12 schrieb Alexander Graf:
> >>> On 04/20/2015 04:55 PM, Christian Borntraeger wrote:
> >>>> Am 09.04.2015 um 10:51 schrieb Cornelia Huck:
> >>>>> From: Thomas Huth <address@hidden>
> >>>>>
> >>>>> Add code to make use of the new ioctl for reading from / writing to
> >>>>> virtual guest memory. By using the ioctl, the memory accesses are now
> >>>>> protected with the so-called ipte-lock in the kernel.
> >>>>>
> >>>>> Signed-off-by: Thomas Huth <address@hidden>
> >>>>> Signed-off-by: Cornelia Huck <address@hidden>
> >>>> Acked-by: Christian Borntraeger <address@hidden>

> >>>>> @@ -450,6 +450,15 @@ int s390_cpu_virt_mem_rw(S390CPU *cpu, vaddr 
> >>>>> laddr, void *hostbuf,
> >>>>>        target_ulong *pages;
> >>>>>        int ret;
> >>>>>
> >>>>> +    if (kvm_enabled()) {
> >>>>> +        ret = kvm_s390_mem_op(cpu, laddr, hostbuf, len, is_write);
> >>>>> +        if (ret >= 0) {
> >>>>> +            return ret;
> >>>>> +        } else if (ret != -ENOSYS) {
> >>>>> +            error_printf("kvm_s390_mem_op() failed: %s\n", 
> >>>>> strerror(-ret));
> >>> Won't this spill the logs like crazy when running new qemu on old kernels?
> >> kvm_s390_mem_op will return -ENOSYS if cap_mem_op is not set.
> > 
> > Oh, I see the logic now. Can you think of any way to make it more obvious 
> > to a reader what's going on?
> > 
> We could move the error_printf into kvm_s390_mem_op.
> Well Conny has to do it as Thomas has left IBM.

I can certainly do that, if that makes the code easier to follow.




reply via email to

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