From nobody Tue Nov 11 08:49:10 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=1569233451; cv=none; d=zoho.com; s=zohoarc; b=GpI/x+38+ALgBRstpYJFXE6CsTH2t2pCNoEzsDORc3vLQB3QKZBPMDB/Dob3nWPSFd57iKm684fdYkmXPi479kPORaR4LXsRbphkur6Xnbx75rXr4mt9BTlPqYrSwRsnEG8xrNbnlpbhNyAGkw37RcDzbqz+yd0CkrVRjWziUY0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569233451; 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=c3ZNb5VhdiclJ5XeacxHfHIWPEvdIzEBfp7mjBbLIHI=; b=F/c6/nnLvOiNitfEKL7kAz2Z1ABtGjT8f4tk/albDc7SWCNL1mSflz86CNYgJ93qBztmWr2sMIS4kr9ljcM30CsZmPzch+VNu0JMRSNFOJjRMOf8BpfGP+mSGHzHbHDKg21nKNuIoScs7JLoR5AOPtfVkU+kBt2XIbLRYRRDDQA= 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 156923345166798.55780025926538; Mon, 23 Sep 2019 03:10:51 -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 1iCLHs-0006oO-Dx; Mon, 23 Sep 2019 10:09:44 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iCLHr-0006oG-9A for xen-devel@lists.xenproject.org; Mon, 23 Sep 2019 10:09:43 +0000 Received: from mail-wm1-x342.google.com (unknown [2a00:1450:4864:20::342]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 4006c716-ddea-11e9-b299-bc764e2007e4; Mon, 23 Sep 2019 10:09:38 +0000 (UTC) Received: by mail-wm1-x342.google.com with SMTP id 3so8597401wmi.3 for ; Mon, 23 Sep 2019 03:09:38 -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 s10sm18241662wmf.48.2019.09.23.03.09.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2019 03:09:36 -0700 (PDT) X-Inumbo-ID: 4006c716-ddea-11e9-b299-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=WfEwbooFHv5S4uohbQtKqFZG0alfSTL0zc81uOqCx5Q=; b=rfOY0YM/GS8B4DZaHL04QXqwE9/Z8EQHCCqC8SIXPOn6TzOvqts5fPPXBjFZeii78B YchAW+yyDMpTIv+oF5XnuIJ0Qn0VPYV37MXY/SyShIQTOJWQEBW3BY7Q81zPnsl2XHiZ kc+8C8sfwN5Ical+rvSFXKCo7+83YA9lHlJvC70Op3lnf2i3uEkcRx2nKM+Hb0C6vETj YCgyTvUCWiqNdXxSSIBKHfqg1DK7GzSHxzIIz+buO4a+4pImvvpsSzmc1yJr/3rTmBKd pA6WC6W1yxNYzjCSKdKvSma1XL8Ud/ygSVssgYxybWZBz0rhTvbbgf7rVWOjvTIxgNCw JDkg== 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=WfEwbooFHv5S4uohbQtKqFZG0alfSTL0zc81uOqCx5Q=; b=Ha4TfcemyaFHqiQU/DLC2AWRcqDGpL/Wc5pMhuACtK83qS/QrAc7+oqYsYIhpVKFIO /GVYu90L/YznILrt1gil0hLA/3uWfdDv7fx8RMA2oQUG/gcff1ZUHfBaWmaYIIbS7Cmi X0YYhaV4bmivfNRXjg81to8FTFE8T/HBt38epF7gx/c5ZMA+3V2ulKOnmYonZUupI71m 27eUzRzh466Zl9PUQcnGBdiqgkkLRL79+zxhyoj6vrcX9U9BgNN5W/IvvBSWLQ72qe0c zRT4G41zJH13paz3cWW2YyE22gMy+yJXN8uhYHhnKjt1pdSWP6xAZKVj5Em6Chd0oYfs L/sA== X-Gm-Message-State: APjAAAXq/7nBFyXJkmIDb6WuV2EAxUAPMJJ3ZPg4umeL9v4TulBGH5oF k7kD6SyzWNRWAy0wxDgvsAc6X9Ii X-Google-Smtp-Source: APXvYqymy6baXzi0Y9kq559ouYA+w9Oj465awni9IyfMroJ2t1VNktR9c4NPWiaqmCi7JJpFOX3i+w== X-Received: by 2002:a05:600c:118a:: with SMTP id i10mr12986650wmf.80.1569233377350; Mon, 23 Sep 2019 03:09:37 -0700 (PDT) From: Wei Liu X-Google-Original-From: Wei Liu To: Xen Development List Date: Mon, 23 Sep 2019 11:09:24 +0100 Message-Id: <20190923100931.29670-2-liuwe@microsoft.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190923100931.29670-1-liuwe@microsoft.com> References: <20190923100931.29670-1-liuwe@microsoft.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH for-next RFC 1/8] 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