WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] ept: Put locks around ept_get_entry

To: Christoph Egger <Christoph.Egger@xxxxxxx>
Subject: Re: [Xen-devel] [PATCH] ept: Put locks around ept_get_entry
From: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
Date: Fri, 27 Aug 2010 12:58:44 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 27 Aug 2010 05:00:42 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=74hEOkbhQpAhi4Hu1xP4BBooiK5SpW5mED607pH+pac=; b=UqfqY0RBd46X6FhMc/dcNQbRE8uUOnn3/EiJjZUiFubyo/Hl54v4yXNXdpa7OddsVR X6+mplFJDFwA7bSVnzpDxtpekQdLRy+9R6KcNkde+LpBDY1V0S2Nn+r7O34P9JofEEBR XMSVH/a7siN0coO0/KdEr8KAKFEXqPd+PIi9Q=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=dAZWkbtvVTRyGghK9bcFhXXE4eJgPqfVESaWeY9LpX1ZuplgR2cttoZzz6FdsKfr3W NsIrWtMlujtRbVUfzjXf9xbSkaTn0QsyAOo5rgLcYYTSLYfdqiszyaswBJ7zC1mnAAVJ C8q9TvvIEiB7b8j7V96Tbjj9U+joWV5sW61GI=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <201008271338.31094.Christoph.Egger@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <e17c8f37a2c2bce9cef6.1282908237@gdunlap-desktop> <201008271338.31094.Christoph.Egger@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Fri, Aug 27, 2010 at 12:38 PM, Christoph Egger
<Christoph.Egger@xxxxxxx> wrote:
> Please use p2m_get_hostp2m(d) instead of d->arch.p2m.

...or, just use the p2m variable which was passed as a parameter to
the function. :-)

Sorry, I wrote this patch for XenServer (using 3.4), and didn't take a
close look.  New patch on the way...
 -George


>
> Christoph
>
>
>> diff -r 3c4c3d48a835 -r e17c8f37a2c2 xen/arch/x86/mm/hap/p2m-ept.c
>> --- a/xen/arch/x86/mm/hap/p2m-ept.c   Thu Aug 26 11:16:56 2010 +0100
>> +++ b/xen/arch/x86/mm/hap/p2m-ept.c   Fri Aug 27 12:23:27 2010 +0100
>> @@ -431,6 +431,10 @@
>>      int i;
>>      int ret = 0;
>>      mfn_t mfn = _mfn(INVALID_MFN);
>> +    int do_locking = !p2m_locked_by_me(d->arch.p2m);
>> +
>> +    if ( do_locking )
>> +        p2m_lock(d->arch.p2m);
>>
>>      *t = p2m_mmio_dm;
>>
>> @@ -507,6 +511,8 @@
>>      }
>>
>>  out:
>> +    if ( do_locking )
>> +        p2m_unlock(d->arch.p2m);
>>      unmap_domain_page(table);
>>      return mfn;
>>  }
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@xxxxxxxxxxxxxxxxxxx
>> http://lists.xensource.com/xen-devel
>
>
>
> --
> ---to satisfy European Law for business letters:
> Advanced Micro Devices GmbH
> Einsteinring 24, 85609 Dornach b. Muenchen
> Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
> Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
> Registergericht Muenchen, HRB Nr. 43632
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
>

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>