From: Jan Beulich Date: Tue, 19 Oct 2021 08:05:10 +0000 (+0200) Subject: x86/altp2m: don't consider "active" when enabling failed X-Git-Tag: archive/raspbian/4.16.0+51-g0941d6cb-1+rpi1~2^2~42^2~63 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=5e97b97bc254b0ee23f701a4d5a317853136d288;p=xen.git x86/altp2m: don't consider "active" when enabling failed We should not rely on guests to not use altp2m after reporting failure of HVMOP_altp2m_set_domain_state to them. Set "active" back to false in this case. Signed-off-by: Jan Beulich Reviewed-by: Tamas K Lengyel Reviewed-by: Roger Pau Monné --- diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 3a6fd865d9..eee365711d 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -4622,6 +4622,8 @@ static int do_altp2m_op( if ( ostate ) p2m_flush_altp2m(d); } + else if ( rc ) + d->arch.altp2m_active = false; domain_unpause_except_self(d); break;