| 
    
 [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 09/16] x86: don't setup PV hypercall stubs and entries when !CONFIG_PV
 >>> On 19.10.18 at 16:28, <wei.liu2@xxxxxxxxxx> wrote:
> @@ -303,14 +305,17 @@ void cstar_enter(void);
>  
>  void subarch_percpu_traps_init(void)
>  {
> +#ifdef CONFIG_PV
>      unsigned long stack_bottom = get_stack_bottom();
>      unsigned long stub_va = this_cpu(stubs.addr);
>      unsigned char *stub_page;
>      unsigned int offset;
> +#endif
>  
>      /* IST_MAX IST pages + at least 1 guard page + primary stack. */
>      BUILD_BUG_ON((IST_MAX + 1) * PAGE_SIZE + PRIMARY_STACK_SIZE > 
> STACK_SIZE);
By moving this to the end of the function, one less #if/#endif
pair would be needed.
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  |