From 5e97b97bc254b0ee23f701a4d5a317853136d288 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Tue, 19 Oct 2021 10:05:10 +0200 Subject: [PATCH] x86/altp2m: don't consider "active" when enabling failed MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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é --- xen/arch/x86/hvm/hvm.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.30.2