public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: Gleb Natapov <gleb@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.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 v3 1/2] KVM: kvm-io: support cookies
Date: Wed, 3 Jul 2013 16:14:39 +0200	[thread overview]
Message-ID: <20130703161439.579c3a0f@gondolin> (raw)
In-Reply-To: <20130703135642.GC32123@redhat.com>

On Wed, 3 Jul 2013 16:56:42 +0300
Gleb Natapov <gleb@redhat.com> wrote:

> On Wed, Jul 03, 2013 at 03:50:38PM +0200, Cornelia Huck wrote:
> > Add new functions kvm_io_bus_{read,write}_cookie() that allows users of
> > the kvm io infrastructure to use a cookie value to speed up lookup of a
> > device on an io bus.
> > 
> > kvm_io_bus_{read,write} now returns the index on the bus; existing callers
> > have been fixed up to accept return codes > 0.
> > 
> > Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
> > ---
> >  arch/ia64/kvm/kvm-ia64.c   |   2 +-
> >  arch/powerpc/kvm/powerpc.c |   4 +-
> >  arch/x86/kvm/x86.c         |   6 +--
> >  include/linux/kvm_host.h   |   4 ++
> >  virt/kvm/kvm_main.c        | 102 ++++++++++++++++++++++++++++++++++++++-------
> >  5 files changed, 97 insertions(+), 21 deletions(-)
> > 
> > diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c
> > index 5b2dc0d..465ab54 100644
> > --- a/arch/ia64/kvm/kvm-ia64.c
> > +++ b/arch/ia64/kvm/kvm-ia64.c
> > @@ -250,7 +250,7 @@ mmio:
> >  	else
> >  		r = kvm_io_bus_write(vcpu->kvm, KVM_MMIO_BUS, p->addr,
> >  				     p->size, &p->data);
> > -	if (r)
> > +	if (r < 0)
> No need to change kvm_io_bus_(read|write) return value now. Just do
> there:
> 
>   r = __kvm_io_bus_write(bus, &range, val);
>   return  r >=0 ? 0 : r;
> 

Well, if the index is not interesting for anything but the cookie code,
I can certainly drop it.


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

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-03 13:50 [PATCH v3 0/2] KVM: ioeventfd cookies Cornelia Huck
2013-07-03 13:50 ` [PATCH v3 1/2] KVM: kvm-io: support cookies Cornelia Huck
2013-07-03 13:56   ` Gleb Natapov
2013-07-03 14:14     ` Cornelia Huck [this message]
2013-07-03 14:26       ` Gleb Natapov
2013-07-03 13:50 ` [PATCH v3 2/2] KVM: s390: use cookies for ioeventfd Cornelia Huck

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=20130703161439.579c3a0f@gondolin \
    --to=cornelia.huck@de.ibm.com \
    --cc=borntraeger@de.ibm.com \
    --cc=gleb@redhat.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