]> xenbits.xensource.com Git - xen.git/commitdiff
x86/altp2m: don't consider "active" when enabling failed
authorJan Beulich <jbeulich@suse.com>
Tue, 19 Oct 2021 08:05:10 +0000 (10:05 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 19 Oct 2021 08:05:10 +0000 (10:05 +0200)
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 <jbeulich@suse.com>
Reviewed-by: Tamas K Lengyel <tamas@tklengyel.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
xen/arch/x86/hvm/hvm.c

index 3a6fd865d98191b8a964f85884fa369a1d9d828d..eee365711d63abff85976b51ac26bf52ef85f2b6 100644 (file)
@@ -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;