From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Date: Thu, 02 May 2013 07:18:05 +0000 Subject: Re: [PATCH 3/3] kvm: Fix obsolete comment about locking for kvm_io_bus_read/write Message-Id: <20130502071805.GD22125@redhat.com> List-Id: 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> In-Reply-To: <0FF422D3-950C-4089-A964-CDF0B5CC6A24@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Alexander Graf Cc: Scott Wood , kvm-ppc@vger.kernel.org, "kvm@vger.kernel.org mailing list" , Marcelo Tosatti 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.