diff mbox series

[4/6] x86/domain: remove the 'oos_off' flag

Message ID 20190723160609.2177-5-paul.durrant@citrix.com (mailing list archive)
State Superseded
Headers show
Series stash domain create flags and then use them | expand

Commit Message

Paul Durrant July 23, 2019, 4:06 p.m. UTC
The flag is not needed since the domain 'createflags' can now be tested
directly.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
---
Cc: Tim Deegan <tim@xen.org>
Cc: George Dunlap <george.dunlap@eu.citrix.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Wei Liu <wl@xen.org>
Cc: "Roger Pau Monné" <roger.pau@citrix.com>
---
 xen/arch/x86/mm/shadow/common.c | 3 +--
 xen/include/asm-x86/domain.h    | 1 -
 2 files changed, 1 insertion(+), 3 deletions(-)

Comments

Tim Deegan July 24, 2019, 5:44 p.m. UTC | #1
At 17:06 +0100 on 23 Jul (1563901567), Paul Durrant wrote:
> The flag is not needed since the domain 'createflags' can now be tested
> directly.
> 
> Signed-off-by: Paul Durrant <paul.durrant@citrix.com>

Acked-by: Tim Deegan <tim@xen.org>

though some of this change seems to have got into patch 3, maybe they
were reordered at some point?

Cheers,

Tim.


> ---
> Cc: George Dunlap <george.dunlap@eu.citrix.com>
> Cc: Jan Beulich <jbeulich@suse.com>
> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> Cc: Wei Liu <wl@xen.org>
> Cc: "Roger Pau Monné" <roger.pau@citrix.com>
> ---
>  xen/arch/x86/mm/shadow/common.c | 3 +--
>  xen/include/asm-x86/domain.h    | 1 -
>  2 files changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/xen/arch/x86/mm/shadow/common.c b/xen/arch/x86/mm/shadow/common.c
> index 320ea0db21..2c7fafa4fb 100644
> --- a/xen/arch/x86/mm/shadow/common.c
> +++ b/xen/arch/x86/mm/shadow/common.c
> @@ -62,7 +62,6 @@ int shadow_domain_init(struct domain *d)
>  
>  #if (SHADOW_OPTIMIZATIONS & SHOPT_OUT_OF_SYNC)
>      d->arch.paging.shadow.oos_active = 0;
> -    d->arch.paging.shadow.oos_off = d->createflags & XEN_DOMCTL_CDF_oos_off;
>  #endif
>      d->arch.paging.shadow.pagetable_dying_op = 0;
>  
> @@ -2523,7 +2522,7 @@ static void sh_update_paging_modes(struct vcpu *v)
>  #if (SHADOW_OPTIMIZATIONS & SHOPT_OUT_OF_SYNC)
>      /* We need to check that all the vcpus have paging enabled to
>       * unsync PTs. */
> -    if ( is_hvm_domain(d) && !d->arch.paging.shadow.oos_off )
> +    if ( is_hvm_domain(d) && !(d->createflags & XEN_DOMCTL_CDF_oos_off) )
>      {
>          int pe = 1;
>          struct vcpu *vptr;
> diff --git a/xen/include/asm-x86/domain.h b/xen/include/asm-x86/domain.h
> index 933b85901f..5f9899469c 100644
> --- a/xen/include/asm-x86/domain.h
> +++ b/xen/include/asm-x86/domain.h
> @@ -115,7 +115,6 @@ struct shadow_domain {
>  
>      /* OOS */
>      bool_t oos_active;
> -    bool_t oos_off;
>  
>      /* Has this domain ever used HVMOP_pagetable_dying? */
>      bool_t pagetable_dying_op;
> -- 
> 2.20.1.2.gb21ebb671
>
Paul Durrant July 25, 2019, 10:16 a.m. UTC | #2
> -----Original Message-----
> From: Tim Deegan <tim@xen.org>
> Sent: 24 July 2019 18:45
> To: Paul Durrant <Paul.Durrant@citrix.com>
> Cc: xen-devel@lists.xenproject.org; George Dunlap <George.Dunlap@citrix.com>; Jan Beulich
> <jbeulich@suse.com>; Andrew Cooper <Andrew.Cooper3@citrix.com>; Wei Liu <wl@xen.org>; Roger Pau Monne
> <roger.pau@citrix.com>
> Subject: Re: [PATCH 4/6] x86/domain: remove the 'oos_off' flag
> 
> At 17:06 +0100 on 23 Jul (1563901567), Paul Durrant wrote:
> > The flag is not needed since the domain 'createflags' can now be tested
> > directly.
> >
> > Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
> 
> Acked-by: Tim Deegan <tim@xen.org>
> 
> though some of this change seems to have got into patch 3, maybe they
> were reordered at some point?
>

Oh, yes, they were actually combined when I originally made the change. The removal of domcr_flags for shadow_domain_init() would indeed be more logically placed in this patch. It's a pretty trivial change so I'll move it in v2 and assume your A-b still stands.

  Paul
 

> Cheers,
> 
> Tim.
> 
> 
> > ---
> > Cc: George Dunlap <george.dunlap@eu.citrix.com>
> > Cc: Jan Beulich <jbeulich@suse.com>
> > Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> > Cc: Wei Liu <wl@xen.org>
> > Cc: "Roger Pau Monné" <roger.pau@citrix.com>
> > ---
> >  xen/arch/x86/mm/shadow/common.c | 3 +--
> >  xen/include/asm-x86/domain.h    | 1 -
> >  2 files changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/xen/arch/x86/mm/shadow/common.c b/xen/arch/x86/mm/shadow/common.c
> > index 320ea0db21..2c7fafa4fb 100644
> > --- a/xen/arch/x86/mm/shadow/common.c
> > +++ b/xen/arch/x86/mm/shadow/common.c
> > @@ -62,7 +62,6 @@ int shadow_domain_init(struct domain *d)
> >
> >  #if (SHADOW_OPTIMIZATIONS & SHOPT_OUT_OF_SYNC)
> >      d->arch.paging.shadow.oos_active = 0;
> > -    d->arch.paging.shadow.oos_off = d->createflags & XEN_DOMCTL_CDF_oos_off;
> >  #endif
> >      d->arch.paging.shadow.pagetable_dying_op = 0;
> >
> > @@ -2523,7 +2522,7 @@ static void sh_update_paging_modes(struct vcpu *v)
> >  #if (SHADOW_OPTIMIZATIONS & SHOPT_OUT_OF_SYNC)
> >      /* We need to check that all the vcpus have paging enabled to
> >       * unsync PTs. */
> > -    if ( is_hvm_domain(d) && !d->arch.paging.shadow.oos_off )
> > +    if ( is_hvm_domain(d) && !(d->createflags & XEN_DOMCTL_CDF_oos_off) )
> >      {
> >          int pe = 1;
> >          struct vcpu *vptr;
> > diff --git a/xen/include/asm-x86/domain.h b/xen/include/asm-x86/domain.h
> > index 933b85901f..5f9899469c 100644
> > --- a/xen/include/asm-x86/domain.h
> > +++ b/xen/include/asm-x86/domain.h
> > @@ -115,7 +115,6 @@ struct shadow_domain {
> >
> >      /* OOS */
> >      bool_t oos_active;
> > -    bool_t oos_off;
> >
> >      /* Has this domain ever used HVMOP_pagetable_dying? */
> >      bool_t pagetable_dying_op;
> > --
> > 2.20.1.2.gb21ebb671
> >
diff mbox series

Patch

diff --git a/xen/arch/x86/mm/shadow/common.c b/xen/arch/x86/mm/shadow/common.c
index 320ea0db21..2c7fafa4fb 100644
--- a/xen/arch/x86/mm/shadow/common.c
+++ b/xen/arch/x86/mm/shadow/common.c
@@ -62,7 +62,6 @@  int shadow_domain_init(struct domain *d)
 
 #if (SHADOW_OPTIMIZATIONS & SHOPT_OUT_OF_SYNC)
     d->arch.paging.shadow.oos_active = 0;
-    d->arch.paging.shadow.oos_off = d->createflags & XEN_DOMCTL_CDF_oos_off;
 #endif
     d->arch.paging.shadow.pagetable_dying_op = 0;
 
@@ -2523,7 +2522,7 @@  static void sh_update_paging_modes(struct vcpu *v)
 #if (SHADOW_OPTIMIZATIONS & SHOPT_OUT_OF_SYNC)
     /* We need to check that all the vcpus have paging enabled to
      * unsync PTs. */
-    if ( is_hvm_domain(d) && !d->arch.paging.shadow.oos_off )
+    if ( is_hvm_domain(d) && !(d->createflags & XEN_DOMCTL_CDF_oos_off) )
     {
         int pe = 1;
         struct vcpu *vptr;
diff --git a/xen/include/asm-x86/domain.h b/xen/include/asm-x86/domain.h
index 933b85901f..5f9899469c 100644
--- a/xen/include/asm-x86/domain.h
+++ b/xen/include/asm-x86/domain.h
@@ -115,7 +115,6 @@  struct shadow_domain {
 
     /* OOS */
     bool_t oos_active;
-    bool_t oos_off;
 
     /* Has this domain ever used HVMOP_pagetable_dying? */
     bool_t pagetable_dying_op;