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

2019-06-03 Thread George Dunlap
> On Jun 3, 2019, at 1:33 PM, Andrew Cooper 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, >

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

2019-06-03 Thread Andrew Cooper
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