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

Re: [Xen-devel] [PATCH for-next v3 1/9] x86: introduce CONFIG_GUEST and move code



On Mon, 21 Oct 2019 at 16:59, Wei Liu <wl@xxxxxxx> wrote:
>
> Xen is able to run as a guest on Xen. We plan to make it able to run
> on Hyper-V as well.
>
> Introduce CONFIG_GUEST which is set to true if either running on Xen
> or Hyper-V is desired. Restructure code hierarchy for new code to
> come.
>
> No functional change intended.
>
> Signed-off-by: Wei Liu <liuwe@xxxxxxxxxxxxx>
> Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> ---
>  xen/arch/x86/Kconfig                          | 4 ++++
>  xen/arch/x86/Makefile                         | 2 +-
>  xen/arch/x86/guest/Makefile                   | 5 +----
>  xen/arch/x86/guest/xen/Makefile               | 4 ++++
>  xen/arch/x86/guest/{ => xen}/hypercall_page.S | 0
>  xen/arch/x86/guest/{ => xen}/pvh-boot.c       | 0
>  xen/arch/x86/guest/{ => xen}/xen.c            | 0
>  7 files changed, 10 insertions(+), 5 deletions(-)
>  create mode 100644 xen/arch/x86/guest/xen/Makefile
>  rename xen/arch/x86/guest/{ => xen}/hypercall_page.S (100%)
>  rename xen/arch/x86/guest/{ => xen}/pvh-boot.c (100%)
>  rename xen/arch/x86/guest/{ => xen}/xen.c (100%)
>
> diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig
> index 28b3b4692a..867de857e8 100644
> --- a/xen/arch/x86/Kconfig
> +++ b/xen/arch/x86/Kconfig
> @@ -161,8 +161,12 @@ config XEN_ALIGN_2M
>
>  endchoice
>
> +config GUEST
> +       bool
> +
>  config XEN_GUEST
>         def_bool n
> +       select GUEST
>         prompt "Xen Guest"
>         ---help---
>           Support for Xen detecting when it is running under Xen.

This text needs to be modified. Perhaps just say 'when it is running
in a virtual machine'. That should be future-proof.

  Paul

> diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
> index 2443fd2cc5..99a12d0090 100644
> --- a/xen/arch/x86/Makefile
> +++ b/xen/arch/x86/Makefile
> @@ -1,7 +1,7 @@
>  subdir-y += acpi
>  subdir-y += cpu
>  subdir-y += genapic
> -subdir-$(CONFIG_XEN_GUEST) += guest
> +subdir-$(CONFIG_GUEST) += guest
>  subdir-$(CONFIG_HVM) += hvm
>  subdir-y += mm
>  subdir-$(CONFIG_XENOPROF) += oprofile
> diff --git a/xen/arch/x86/guest/Makefile b/xen/arch/x86/guest/Makefile
> index 26fb4b1007..6806f04947 100644
> --- a/xen/arch/x86/guest/Makefile
> +++ b/xen/arch/x86/guest/Makefile
> @@ -1,4 +1 @@
> -obj-y += hypercall_page.o
> -obj-y += xen.o
> -
> -obj-bin-$(CONFIG_PVH_GUEST) += pvh-boot.init.o
> +subdir-$(CONFIG_XEN_GUEST) += xen
> diff --git a/xen/arch/x86/guest/xen/Makefile b/xen/arch/x86/guest/xen/Makefile
> new file mode 100644
> index 0000000000..26fb4b1007
> --- /dev/null
> +++ b/xen/arch/x86/guest/xen/Makefile
> @@ -0,0 +1,4 @@
> +obj-y += hypercall_page.o
> +obj-y += xen.o
> +
> +obj-bin-$(CONFIG_PVH_GUEST) += pvh-boot.init.o
> diff --git a/xen/arch/x86/guest/hypercall_page.S 
> b/xen/arch/x86/guest/xen/hypercall_page.S
> similarity index 100%
> rename from xen/arch/x86/guest/hypercall_page.S
> rename to xen/arch/x86/guest/xen/hypercall_page.S
> diff --git a/xen/arch/x86/guest/pvh-boot.c b/xen/arch/x86/guest/xen/pvh-boot.c
> similarity index 100%
> rename from xen/arch/x86/guest/pvh-boot.c
> rename to xen/arch/x86/guest/xen/pvh-boot.c
> diff --git a/xen/arch/x86/guest/xen.c b/xen/arch/x86/guest/xen/xen.c
> similarity index 100%
> rename from xen/arch/x86/guest/xen.c
> rename to xen/arch/x86/guest/xen/xen.c
> --
> 2.20.1
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxxx
> https://lists.xenproject.org/mailman/listinfo/xen-devel

_______________________________________________
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®.