[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2] x86/hvm: Make the altp2m locking in hvm_hap_nested_page_fault() easier to follow


  • To: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • From: George Dunlap <George.Dunlap@xxxxxxxxxx>
  • Date: Mon, 3 Jun 2019 12:40:16 +0000
  • Accept-language: en-GB, en-US
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=George.Dunlap@xxxxxxxxxx; spf=Pass smtp.mailfrom=George.Dunlap@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxxxxxxxxxxxxx
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Tamas K Lengyel <tamas@xxxxxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Delivery-date: Mon, 03 Jun 2019 12:40:32 +0000
  • Ironport-sdr: qRuZ/mbnVPkfZcxNvQPBJ43Y7TYUf5SznveZkqNGi79FnvS6RKgnGa+TTWsLMQf3bkCXx+ePXi z4jJlrSpYewGg9n0aWFVTrvGXs7V9WOIoYkUCStO2gNr4ef692ZAklUsbktvgAMaOdJwnoPBbe NkKhr68bfa7YYh1lFB6dejdE9qWkSYjxRXadNB4r8sXfZdr1px0NtuzWoehwMTAtD5Z7ey/nXQ a8c55X2PAEpYUj6JLHMfvyyQzklr/66sS46E8Jplc4VLvcNm/7SI3dwhpoPtAQGXeKPidBt1fk q3k=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVGgibqEhrspEGc0Wg9az1e0iW46aJvWUA
  • Thread-topic: [PATCH v2] x86/hvm: Make the altp2m locking in hvm_hap_nested_page_fault() easier to follow


> On Jun 3, 2019, at 1:33 PM, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote:
> 
> Drop the ap2m_active boolean, and consistently use the unlocking form:
> 
>  if ( p2m != hostp2m )
>       __put_gfn(p2m, gfn);
>  __put_gfn(hostp2m, gfn);
> 
> which makes it clear that we always unlock the altp2m's gfn if it is in use,
> and always unlock the hostp2m's gfn.  This also drops the ternary expression
> in the logdirty case.
> 
> Extend the logdirty comment to identify where the locking violation is liable
> to occur.
> 
> No (intended) overall change in behaviour.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Reviewed-by: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>
> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

Noticed this when reviewing Tamas’ patch — thanks:

Acked-by: George Dunlap <george.dunlap@xxxxxxxxxx>

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.