From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cornelia Huck Subject: Re: [PATCH v4 2/2] KVM: s390: use cookies for ioeventfd Date: Wed, 3 Jul 2013 18:33:25 +0200 Message-ID: <20130703183325.2d483df8@gondolin> References: <1372861854-23043-1-git-send-email-cornelia.huck@de.ibm.com> <1372861854-23043-3-git-send-email-cornelia.huck@de.ibm.com> <51D443A0.9040703@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Gleb Natapov , Christian Borntraeger , Heiko Carstens , Martin Schwidefsky , KVM , linux-s390 To: Paolo Bonzini Return-path: Received: from e06smtp10.uk.ibm.com ([195.75.94.106]:54881 "EHLO e06smtp10.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933037Ab3GCQdd (ORCPT ); Wed, 3 Jul 2013 12:33:33 -0400 Received: from /spool/local by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 3 Jul 2013 17:31:01 +0100 In-Reply-To: <51D443A0.9040703@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, 03 Jul 2013 17:30:40 +0200 Paolo Bonzini wrote: > Il 03/07/2013 16:30, Cornelia Huck ha scritto: > > + /* > > + * Return cookie in gpr 2, but don't overwrite the register if the > > + * diagnose will be handled by userspace. > > + */ > > + if (ret != -EOPNOTSUPP) > > + vcpu->run->s.regs.gprs[2] = ret; > > I think this should now be "if (ret >= 0)". Hm, we don't want to kill gpr 2's old contents if userspace will do something, which means -EOPNOTSUPP. > > > /* kvm_io_bus_write returns -EOPNOTSUPP if it found no match. */ > > The comment is now obsolete. s/kvm_io_bus_write/kvm_io_bus_write_cookie/ ? Otherwise, this is still true. > > > return ret < 0 ? ret : 0; > > Otherwise looks good, thanks! > > Paolo >