From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Stabellini Subject: Re: [patch 2/2] xen/arm: Use p2m entry with lock protection Date: Tue, 30 Apr 2019 12:56:41 -0700 (PDT) Message-ID: References: <20190430053741.F1C0C2080C@mail.kernel.org> Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323329-1057078608-1556654202=:27577" Return-path: Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hLYrs-00021t-89 for xen-devel@lists.xenproject.org; Tue, 30 Apr 2019 19:56:44 +0000 In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" To: Stefano Stabellini Cc: "xen-devel@lists.xenproject.org" , Hillf Danton List-Id: xen-devel@lists.xenproject.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1057078608-1556654202=:27577 Content-Type: TEXT/PLAIN; charset=UTF-8 Content-Transfer-Encoding: 8BIT On Tue, 30 Apr 2019, Stefano Stabellini wrote: > On Tue, 30 Apr 2019, Hillf Danton wrote: > > A new local variable is introduced for accessing p2m entry with lock protection. > > > > Same comment about html and space damage. But the change looks correct. I fixed up the patches and committed both of them to the xentip tree. > > > > Cc: Stefano Stabellini > > > > Signed-off-by: Hillf Danton > > > > --- > > > >   > > > > --- a/arch/arm/xen/p2m.c 2019-04-30 12:32:05.363768200 +0800 > > > > +++ b/arch/arm/xen/p2m.c    2019-04-30 12:58:19.854334100 +0800 > > > > @@ -70,8 +70,9 @@ unsigned long __pfn_to_mfn(unsigned long > > > >              entry = rb_entry(n, struct xen_p2m_entry, rbnode_phys); > > > >              if (entry->pfn <= pfn && > > > >                            entry->pfn + entry->nr_pages > pfn) { > > > > +                  unsigned long mfn = entry->mfn + (pfn - entry->pfn); > > > >                     read_unlock_irqrestore(&p2m_lock, irqflags); > > > > -                  return entry->mfn + (pfn - entry->pfn); > > > > +                  return mfn; > > > >              } > > > >              if (pfn < entry->pfn) > > > >                     n = n->rb_left; > > > > -- > > > >   > > > > > > --8323329-1057078608-1556654202=:27577 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcKaHR0cHM6Ly9saXN0 cy54ZW5wcm9qZWN0Lm9yZy9tYWlsbWFuL2xpc3RpbmZvL3hlbi1kZXZlbA== --8323329-1057078608-1556654202=:27577-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9DF5DC43219 for ; Tue, 30 Apr 2019 19:57:05 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 64ED720675 for ; Tue, 30 Apr 2019 19:57:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="L1WMvuNr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 64ED720675 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hLYrt-00021y-L0; Tue, 30 Apr 2019 19:56:45 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hLYrs-00021t-89 for xen-devel@lists.xenproject.org; Tue, 30 Apr 2019 19:56:44 +0000 X-Inumbo-ID: 134cd52d-6b82-11e9-843c-bc764e045a96 Received: from mail.kernel.org (unknown [198.145.29.99]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 134cd52d-6b82-11e9-843c-bc764e045a96; Tue, 30 Apr 2019 19:56:42 +0000 (UTC) Received: from localhost (c-67-164-102-47.hsd1.ca.comcast.net [67.164.102.47]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2039720675; Tue, 30 Apr 2019 19:56:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556654202; bh=faE/OYFEfARt/88TnpLus7zBGAXHIk1A7oEjLpPmivA=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=L1WMvuNrT5K/GqzDkxAbLe32QmNIKTVtzAaegB2s+p25461LckE9MPXMckGhdoOL4 ZqkJx6g/iAYzfpwqDHp0qJQGjgYm9fRS2OkMUqmIoiTkwp5fAkKsR5HmLiWhAHjRJj DTPPA6gW73mjn5rkgSMcqlu42a6FYwgO7YeWYaCI= Date: Tue, 30 Apr 2019 12:56:41 -0700 (PDT) From: Stefano Stabellini X-X-Sender: sstabellini@sstabellini-ThinkPad-X260 To: Stefano Stabellini In-Reply-To: Message-ID: References: <20190430053741.F1C0C2080C@mail.kernel.org> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323329-1057078608-1556654202=:27577" Subject: Re: [Xen-devel] [patch 2/2] xen/arm: Use p2m entry with lock protection X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: "xen-devel@lists.xenproject.org" , Hillf Danton Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Message-ID: <20190430195641.sQw9c9lujHuYpQwPyU9Od35OyLAj7fC0bCNLtqrS9QM@z> This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1057078608-1556654202=:27577 Content-Type: TEXT/PLAIN; charset=UTF-8 Content-Transfer-Encoding: 8BIT On Tue, 30 Apr 2019, Stefano Stabellini wrote: > On Tue, 30 Apr 2019, Hillf Danton wrote: > > A new local variable is introduced for accessing p2m entry with lock protection. > > > > Same comment about html and space damage. But the change looks correct. I fixed up the patches and committed both of them to the xentip tree. > > > > Cc: Stefano Stabellini > > > > Signed-off-by: Hillf Danton > > > > --- > > > >   > > > > --- a/arch/arm/xen/p2m.c 2019-04-30 12:32:05.363768200 +0800 > > > > +++ b/arch/arm/xen/p2m.c    2019-04-30 12:58:19.854334100 +0800 > > > > @@ -70,8 +70,9 @@ unsigned long __pfn_to_mfn(unsigned long > > > >              entry = rb_entry(n, struct xen_p2m_entry, rbnode_phys); > > > >              if (entry->pfn <= pfn && > > > >                            entry->pfn + entry->nr_pages > pfn) { > > > > +                  unsigned long mfn = entry->mfn + (pfn - entry->pfn); > > > >                     read_unlock_irqrestore(&p2m_lock, irqflags); > > > > -                  return entry->mfn + (pfn - entry->pfn); > > > > +                  return mfn; > > > >              } > > > >              if (pfn < entry->pfn) > > > >                     n = n->rb_left; > > > > -- > > > >   > > > > > > --8323329-1057078608-1556654202=:27577 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcKaHR0cHM6Ly9saXN0 cy54ZW5wcm9qZWN0Lm9yZy9tYWlsbWFuL2xpc3RpbmZvL3hlbi1kZXZlbA== --8323329-1057078608-1556654202=:27577--