On Thu, Jan 7, 2021 at 8:55 AM Jan Beulich <[email protected]> wrote:
>
> On 07.01.2021 14:23, Tamas K Lengyel wrote:
> > Several lock-order violations have been encountered while attempting to fork
> > VMs with nestedhvm=1 set. This patch resolves the issues.
> >
> > The order violations stems from a call to p2m_flush_nestedp2m being 
> > performed
> > whenever the hostp2m changes. This functions always takes the p2m lock for 
> > the
> > nested_p2m. However, with sharing the p2m locks always have to be taken 
> > before
> > the sharing lock. To resolve this issue we avoid taking the sharing lock 
> > where
> > possible (and was actually unecessary to begin with). But we also make
> > p2m_flush_nestedp2m aware that the p2m lock may have already been taken and
> > preemptively take all nested_p2m locks before unsharing a page where taking 
> > the
> > sharing lock is necessary.
> >
> > Signed-off-by: Tamas K Lengyel <[email protected]>
>
> Acked-by: Jan Beulich <[email protected]>

Thanks,
Tamas

Reply via email to