From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Daney Subject: Re: Q: What is the struct kvm srcu protecting? Date: Fri, 03 May 2013 10:21:09 -0700 Message-ID: <5183F205.40006@gmail.com> References: <5182AEFC.9070703@gmail.com> <20130503014836.GB8741@amt.cnet> <20130503105101.GE17141@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org, Sanjay Lal To: Gleb Natapov Return-path: Received: from mail-pd0-f178.google.com ([209.85.192.178]:42972 "EHLO mail-pd0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759095Ab3ECRVM (ORCPT ); Fri, 3 May 2013 13:21:12 -0400 Received: by mail-pd0-f178.google.com with SMTP id w11so1006675pde.23 for ; Fri, 03 May 2013 10:21:12 -0700 (PDT) In-Reply-To: <20130503105101.GE17141@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 05/03/2013 03:51 AM, Gleb Natapov wrote: > Hi David, > > On Thu, May 02, 2013 at 10:48:36PM -0300, Marcelo Tosatti wrote: >> On Thu, May 02, 2013 at 11:22:52AM -0700, David Daney wrote: >>> Hi, >>> >>> I am working on the MIPS KVM port, and am trying to figure out under >>> which circumstances do I need to srcu_read_lock()/srcu_read_unlock() >>> the kvm->srcu. >> > Is your work somehow related to the work of Sanjay Lal that can be found > here: https://git.linux-mips.org/?p=ralf/upstream-sfr.git;a=summary? > It is related in that a single asm/uaip/kvm.h must be shared between the implementations. It differs in that it is based on the MIPS-VZ hardware virtualization feature, where as Sanjay's code is a pure software solution. If possible some code might be shared between the two, but it may end up looking somewhat like the x86 implementation where there are separate VMX and SVM implementations. > Some clarification/addition to what Marcelo said below. . . . Thanks to all for setting me straight here. David Daney