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

Jan Beulich posted 1 patch 2 years, 8 months ago
Failed in applying to current master (apply log)
[PATCH] x86/altp2m: don't consider "active" when enabling failed
Posted by Jan Beulich 2 years, 8 months ago
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>

--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -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;


Ping: [PATCH] x86/altp2m: don't consider "active" when enabling failed
Posted by Jan Beulich 2 years, 6 months ago
On 25.08.2021 11:31, Jan Beulich wrote:
> 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>

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

> --- a/xen/arch/x86/hvm/hvm.c
> +++ b/xen/arch/x86/hvm/hvm.c
> @@ -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;
> 
> 


Re: Ping: [PATCH] x86/altp2m: don't consider "active" when enabling failed
Posted by Tamas K Lengyel 2 years, 6 months ago
On Mon, Oct 18, 2021 at 4:26 AM Jan Beulich <jbeulich@suse.com> wrote:

> On 25.08.2021 11:31, Jan Beulich wrote:
> > 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>
>
> 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
>
> > --- a/xen/arch/x86/hvm/hvm.c
> > +++ b/xen/arch/x86/hvm/hvm.c
> > @@ -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: Tamas K Lengyel <tamas@tklengyel.com>
Re: Ping: [PATCH] x86/altp2m: don't consider "active" when enabling failed
Posted by Roger Pau Monné 2 years, 6 months ago
On Mon, Oct 18, 2021 at 09:16:30AM -0400, Tamas K Lengyel wrote:
> On Mon, Oct 18, 2021 at 4:26 AM Jan Beulich <jbeulich@suse.com> wrote:
> 
> > On 25.08.2021 11:31, Jan Beulich wrote:
> > > 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>
> >
> > 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
> >
> > > --- a/xen/arch/x86/hvm/hvm.c
> > > +++ b/xen/arch/x86/hvm/hvm.c
> > > @@ -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: Tamas K Lengyel <tamas@tklengyel.com>

Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>

Thanks, Roger.