linux-s390.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	KVM <kvm@vger.kernel.org>,
	linux-s390 <linux-s390@vger.kernel.org>
Subject: Re: [PATCH v4 2/2] KVM: s390: use cookies for ioeventfd
Date: Sun, 14 Jul 2013 12:25:16 +0300	[thread overview]
Message-ID: <20130714092516.GC4063@redhat.com> (raw)
In-Reply-To: <51D51C28.7040306@redhat.com>

On Thu, Jul 04, 2013 at 08:54:32AM +0200, Paolo Bonzini wrote:
> Il 03/07/2013 18:33, Cornelia Huck ha scritto:
> > On Wed, 03 Jul 2013 17:30:40 +0200
> > Paolo Bonzini <pbonzini@redhat.com> 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.
> 
> In the end kvm_io_bus_write_cookie only returns -EOPNOTSUPP if there is
> an error, so it works.  But if this were to change, the code would
> break.  That's why I suggested testing "ret >= 0" rather than "ret !=
> -EOPNOTSUPP".  But in the end it is the same.
> 
> >>
> >>>  	/* 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.
> 
> True but somewhat misplaced, it is basically saying the same thing as
> the "Return cookie in gpr 2" comment just above.
> 
> Anyhow, these are very small details.  I changed kvm_io_bus_write to
> kvm_io_bus_write_cookie in the comment and applied the patches to kvm-queue.
> 
1/2 broke x86. QEMU prints "Invalid read from memory region kvm-pic" and
guest hangs. Looks like IO is forwarded to userspace instead of in kernel device
for some reason. Un-applying for now.

--
			Gleb.

  reply	other threads:[~2013-07-14  9:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-03 14:30 [PATCH v4 0/2] KVM: ioeventfd cookies Cornelia Huck
2013-07-03 14:30 ` [PATCH v4 1/2] KVM: kvm-io: support cookies Cornelia Huck
2013-07-03 15:05   ` Gleb Natapov
2013-07-03 14:30 ` [PATCH v4 2/2] KVM: s390: use cookies for ioeventfd Cornelia Huck
2013-07-03 15:30   ` Paolo Bonzini
2013-07-03 16:33     ` Cornelia Huck
2013-07-04  6:54       ` Paolo Bonzini
2013-07-14  9:25         ` Gleb Natapov [this message]
2013-07-14 10:19           ` Gleb Natapov
2013-07-15  7:56             ` Cornelia Huck
2013-07-15 12:03             ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130714092516.GC4063@redhat.com \
    --to=gleb@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=schwidefsky@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).