Re: [PATCH v3 1/2] KVM: kvm-io: support cookies

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

 



On Wed, 3 Jul 2013 16:56:42 +0300
Gleb Natapov <gleb@xxxxxxxxxx> 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@xxxxxxxxxx>
> > ---
> >  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.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux