From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH 3/3] kvm: Fix obsolete comment about locking for kvm_io_bus_read/write Date: Thu, 2 May 2013 10:18:05 +0300 Message-ID: <20130502071805.GD22125@redhat.com> References: <1367024020-14204-1-git-send-email-scottwood@freescale.com> <1367024020-14204-3-git-send-email-scottwood@freescale.com> <0FF422D3-950C-4089-A964-CDF0B5CC6A24@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Scott Wood , kvm-ppc@vger.kernel.org, "kvm@vger.kernel.org mailing list" , Marcelo Tosatti To: Alexander Graf Return-path: Received: from mx1.redhat.com ([209.132.183.28]:55255 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751041Ab3EBHSK (ORCPT ); Thu, 2 May 2013 03:18:10 -0400 Content-Disposition: inline In-Reply-To: <0FF422D3-950C-4089-A964-CDF0B5CC6A24@suse.de> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, May 02, 2013 at 01:24:15AM +0200, Alexander Graf wrote: > > On 27.04.2013, at 02:53, Scott Wood wrote: > > > Nobody is actually calling these functions with slots_lock held. > > The srcu read lock, OTOH, is required. > > > > Signed-off-by: Scott Wood > > Marcelo, could you please ack? > Is something in the series depends on this patch? If not this should go directly into kvm.git, not via ppc tree. > > Alex > > > --- > > virt/kvm/kvm_main.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c > > index 5da9f02..54a14fa 100644 > > --- a/virt/kvm/kvm_main.c > > +++ b/virt/kvm/kvm_main.c > > @@ -2828,7 +2828,7 @@ static int kvm_io_bus_get_first_dev(struct kvm_io_bus *bus, > > return off; > > } > > > > -/* kvm_io_bus_write - called under kvm->slots_lock */ > > +/* kvm_io_bus_write - called under kvm->srcu read lock */ > > int kvm_io_bus_write(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr, > > int len, const void *val) > > { > > @@ -2856,7 +2856,7 @@ int kvm_io_bus_write(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr, > > return -EOPNOTSUPP; > > } > > > > -/* kvm_io_bus_read - called under kvm->slots_lock */ > > +/* kvm_io_bus_read - called under kvm->srcu read lock */ > > int kvm_io_bus_read(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr, > > int len, void *val) > > { > > -- > > 1.7.10.4 > > > > > > -- > > To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in > > the body of a message to majordomo@vger.kernel.org > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Gleb.