| 
    
 [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 3/7] xen/x86: support per-domain flag for xpti
 >>> On 21.03.18 at 13:51, <jgross@xxxxxxxx> wrote:
> +void xpti_domain_init(struct domain *d)
> +{
> +    if ( !is_pv_domain(d) || is_pv_32bit_domain(d) )
> +        return;
As you rely on the zero-initialization of the field here, ...
> +    switch ( opt_xpti )
> +    {
> +    case XPTI_OFF:
> +        d->arch.pv_domain.xpti = false;
... this could go away as well.
> @@ -1050,8 +1050,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
>          panic("Error %d setting up PV root page table\n", rc);
>      if ( per_cpu(root_pgt, 0) )
>      {
> -        get_cpu_info()->pv_cr3 = __pa(per_cpu(root_pgt, 0));
> -
> +        get_cpu_info()->pv_cr3 = 0;
>          /*
>           * All entry points which may need to switch page tables have to 
> start
>           * with interrupts off. Re-write what pv_trap_init() has put there.
Please don't drop the blank line.
> @@ -36,7 +38,8 @@ static inline void pv_vcpu_destroy(struct vcpu *v) {}
>  static inline int pv_vcpu_initialise(struct vcpu *v) { return -EOPNOTSUPP; }
>  static inline void pv_domain_destroy(struct domain *d) {}
>  static inline int pv_domain_initialise(struct domain *d) { return 
> -EOPNOTSUPP; }
> -
> +static inline void xpti_init(void) {}
> +static inline void xpti_domain_init(struct domain *d) {}
>  #endif       /* CONFIG_PV */
Same here. With that
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
 
  | 
  
![]()  | 
            
         Lists.xenproject.org is hosted with RackSpace, monitoring our  |