[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH RFC v1 23/74] x86/entry: Probe for Xen early during boot



>>> On 04.01.18 at 14:05, <wei.liu2@xxxxxxxxxx> wrote:
> --- /dev/null
> +++ b/xen/arch/x86/guest/xen.c
> @@ -0,0 +1,75 @@
> +/******************************************************************************
> + * arch/x86/guest/xen.c
> + *
> + * Support for detecting and running under Xen.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; If not, see <http://www.gnu.org/licenses/>.
> + *
> + * Copyright (c) 2017 Citrix Systems Ltd.
> + */
> +#include <xen/init.h>
> +#include <xen/types.h>
> +
> +#include <asm/guest.h>
> +#include <asm/processor.h>
> +
> +#include <public/arch-x86/cpuid.h>
> +
> +bool xen_guest;

__read_mostly?

> +static uint32_t xen_cpuid_base;

Depending on future use, __initdata or __read_mostly?

> --- a/xen/include/asm-x86/guest.h
> +++ b/xen/include/asm-x86/guest.h
> @@ -20,6 +20,7 @@
>  #define __X86_GUEST_H__
>  
>  #include <asm/guest/pvh-boot.h>
> +#include <asm/guest/xen.h>
>  
>  #endif /* __X86_GUEST_H__ */

I'm increasingly curious to understand what this header's purpose
is meant to be. It looks as if you mean source files to only ever
include this one, but why? Rather than exposing everything at
once, we should try (unrelated to this series) to limit what each
CU gets to see, speeding up builds (not the least incremental ones
by reducing the dependency trees).

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.