Skip to contentSkip to conversation

x86/altp2m: don't consider "active" when enabling failed

PATCH In review Jan Beulich 3 participants 4 messages Aug 25, 2021 – Oct 19, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

xen/arch/x86/hvm/hvm.c +2 -0
@@ -4609,6 +4609,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;
#1 lore raw

Ping: [PATCH] x86/altp2m: don't consider "active" when enabling failed

Quoted 5 lines · Jan Beulich

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.

Because of their relationship, I'm also Cc-ing the vm-event maintainers /
reviewers: Maybe one of you would care to review this one?

Jan

Quoted 13 lines
xen/arch/x86/hvm/hvm.c +2 -0
@@ -4609,6 +4609,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;
Reviewed-by
#2 lore raw

Re: Ping: [PATCH] x86/altp2m: don't consider "active" when enabling failed

Quoted 21 lines · Jan Beulich
Quoted 5 lines · Jan Beulich

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.

Because of their relationship, I'm also Cc-ing the vm-event maintainers /
reviewers: Maybe one of you would care to review this one?

Jan

Quoted 9 lines
xen/arch/x86/hvm/hvm.c +2 -0
@@ -4609,6 +4609,8 @@ static int do_altp2m_op(
             if ( ostate )
                 p2m_flush_altp2m(d);
         }
+        else if ( rc )
+            d->arch.altp2m_active = false;
 
Quoted 2 lines

xen/arch/x86/hvm/hvm.c static int do_altp2m_op( · line 4616

Quoted 2 lines
xen/arch/x86/hvm/hvm.c +0 -0
         domain_unpause_except_self(d);
         break;
Reviewed-by
#3 lore raw

Re: Ping: [PATCH] x86/altp2m: don't consider "active" when enabling failed

Quoted 23 lines · Tamas K Lengyel
Quoted 21 lines · Jan Beulich
Quoted 5 lines · Jan Beulich

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.

Because of their relationship, I'm also Cc-ing the vm-event maintainers /
reviewers: Maybe one of you would care to review this one?

Jan

Quoted 9 lines
xen/arch/x86/hvm/hvm.c +2 -0
@@ -4609,6 +4609,8 @@ static int do_altp2m_op(
             if ( ostate )
                 p2m_flush_altp2m(d);
         }
+        else if ( rc )
+            d->arch.altp2m_active = false;
 
Quoted 5 lines
Quoted 2 lines

xen/arch/x86/hvm/hvm.c static int do_altp2m_op( · line 4616

Quoted 2 lines
xen/arch/x86/hvm/hvm.c +0 -0
         domain_unpause_except_self(d);
         break;

Thanks, Roger.