From nobody Tue Nov 11 08:50:49 2025 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1569855715; cv=none; d=zoho.com; s=zohoarc; b=liautjfMZisghUMmDjdH+IFaA2VyRMijl3QnlJtLUEPAPNwrVx1OxlNjshYeJHC496yPVrHd3RTm0PLPNG69YAx1zLRfmKX8DEVicsGUOcucFe0McQd4TyxqueikXa6zinv3DW0c9c6mMCuFnu1UT70ORf99NQSoHrUWjdbwOW8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569855715; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=kE1CbVs4JRnQf1d22HNQzCqbAElzv9eLAYt3UQrqQA8=; b=jZ+W1aGUZ2T72m2tCPvDuba6QxqxHrYUFqXFNnlXp252jDnK8ZkrzWjH/Lata/s/3H6yJi2tLgfVY9msqAbbn78xbExUVfRNnTohcacIEKDlfOeuebbBY4mtY5TdlFUHK8JJWgXdajkJRHxMf6Rh+IYQ0SqeLZVg4KF/KiqYaIo= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 156985571597665.59338400214972; Mon, 30 Sep 2019 08:01:55 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iExAW-00062I-4X; Mon, 30 Sep 2019 15:00:56 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iExAV-000629-91 for xen-devel@lists.xenproject.org; Mon, 30 Sep 2019 15:00:55 +0000 Received: from mail-wr1-x441.google.com (unknown [2a00:1450:4864:20::441]) by localhost (Halon) with ESMTPS id 1715d820-e393-11e9-bf31-bc764e2007e4; Mon, 30 Sep 2019 15:00:50 +0000 (UTC) Received: by mail-wr1-x441.google.com with SMTP id y19so11749083wrd.3 for ; Mon, 30 Sep 2019 08:00:50 -0700 (PDT) Received: from debian.mshome.net (207.148.159.143.dyn.plus.net. [143.159.148.207]) by smtp.gmail.com with ESMTPSA id f143sm32870852wme.40.2019.09.30.08.00.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 08:00:48 -0700 (PDT) X-Inumbo-ID: 1715d820-e393-11e9-bf31-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=020oWx84yVPrgbu515ga45qtsDGEDvxxJtudgjR7Qeg=; b=lqH62gJ9s/BOdQI6t3ZvAZm2DbGHQ9fEP8j3+yZs17t4GR5EUVbOlFutUJagPrBrky Lxh6urIOzHvv+/vVc6S0/llomI7k6nBgW3trB61H1G1PCzK57I6Mr5hrdhE01ucqjmEp DgoyMi0gyCqaSRDP/BRP6cUSgLJDTIZBF0tCCMIXiE6xfyuZzhx/Wz42zB7jYz6C+7Zx F9ZXr6QEL+8QLD0KGglBk65QL9I2cOCF8Dc4Sii5pvnjUbnaUHyfXaTBbYyYawxGytjg AMUSTFmBeE7EdGIWrotbNIUo2uDq4IVaTJV+2XR1OC22a+sqJkM58MSqjyG4LRGxHKHD wR8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=020oWx84yVPrgbu515ga45qtsDGEDvxxJtudgjR7Qeg=; b=EN/1+CGdTRKPMU+HHgTUh8CEEByOBRizX6vqcwFz6Axe+jk6W1mB2HBVGRTT3NczZc Z42vT5r8mTEq4317vA8rJnOyWUH4vETqkjf3F+5YvgM5y3Cf4fwfzbuFIU6UJ1qXMExS Vf+0/lVjGt6no/XNdx80KrqhbR0hJ5QfnVhLQEmkdC53UdEVFLZmMLk2GmRGnlyEyLR0 gzRc6bnF+gxaYCGo0uy4EAvcZy7KDe0I1BYkpY8X+DfPeR9hOoWeYUT/NHHUzqYNVWhD txH4BNe5hEN2AZfuWRIYmuYLw7ABbFk8uFKBbvuwGijItkxbJNgey+6sHoxn3DYrgPoR Zdpg== X-Gm-Message-State: APjAAAXrEWufrVycWzt2eq1PgNeSuyXq6qqW1CBhrUoowA5ubcfYe+6W uLtfMLk0tTOcak6w4qvCgeNWinCyJP8= X-Google-Smtp-Source: APXvYqz9hPL3zXmHb5pJI6+l+64sjLmKrXWGfQp0Z14uPyUWcB5PA1l/GVOvMFsyZxx5U7KBfP73/A== X-Received: by 2002:a05:6000:11cb:: with SMTP id i11mr14677491wrx.171.1569855649375; Mon, 30 Sep 2019 08:00:49 -0700 (PDT) From: Wei Liu X-Google-Original-From: Wei Liu To: Xen Development List Date: Mon, 30 Sep 2019 16:00:35 +0100 Message-Id: <20190930150044.5734-2-liuwe@microsoft.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190930150044.5734-1-liuwe@microsoft.com> References: <20190930150044.5734-1-liuwe@microsoft.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH for-next v2 1/9] x86: introduce CONFIG_GUEST and move code X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Wei Liu , Wei Liu , Andrew Cooper , Michael Kelley , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) 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 Reviewed-by: Roger Pau Monn=C3=A9 --- 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/{ =3D> xen}/hypercall_page.S | 0 xen/arch/x86/guest/{ =3D> xen}/pvh-boot.c | 0 xen/arch/x86/guest/{ =3D> 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/{ =3D> xen}/hypercall_page.S (100%) rename xen/arch/x86/guest/{ =3D> xen}/pvh-boot.c (100%) rename xen/arch/x86/guest/{ =3D> xen}/xen.c (100%) diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig index 288dc6c042..584bdc1bb8 100644 --- a/xen/arch/x86/Kconfig +++ b/xen/arch/x86/Kconfig @@ -160,8 +160,12 @@ config XEN_ALIGN_2M =20 endchoice =20 +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. 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 +=3D acpi subdir-y +=3D cpu subdir-y +=3D genapic -subdir-$(CONFIG_XEN_GUEST) +=3D guest +subdir-$(CONFIG_GUEST) +=3D guest subdir-$(CONFIG_HVM) +=3D hvm subdir-y +=3D mm subdir-$(CONFIG_XENOPROF) +=3D 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 +=3D hypercall_page.o -obj-y +=3D xen.o - -obj-bin-$(CONFIG_PVH_GUEST) +=3D pvh-boot.init.o +subdir-$(CONFIG_XEN_GUEST) +=3D xen diff --git a/xen/arch/x86/guest/xen/Makefile b/xen/arch/x86/guest/xen/Makef= ile new file mode 100644 index 0000000000..26fb4b1007 --- /dev/null +++ b/xen/arch/x86/guest/xen/Makefile @@ -0,0 +1,4 @@ +obj-y +=3D hypercall_page.o +obj-y +=3D xen.o + +obj-bin-$(CONFIG_PVH_GUEST) +=3D pvh-boot.init.o diff --git a/xen/arch/x86/guest/hypercall_page.S b/xen/arch/x86/guest/xen/h= ypercall_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-boo= t.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 --=20 2.20.1 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel