Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10333582imu; Wed, 5 Dec 2018 22:07:42 -0800 (PST) X-Google-Smtp-Source: AFSGD/Uba/FI9xOmeMTM/Gb3ZFtdfWJrzNFZp44wd5qjaoc3hGa4hPAj+ZrVBJiWpjT0CDl0dPyv X-Received: by 2002:a62:6ec8:: with SMTP id j191mr27302471pfc.198.1544076462528; Wed, 05 Dec 2018 22:07:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544076462; cv=none; d=google.com; s=arc-20160816; b=wBOve0vZdHGmTw5Tx1ijduMylPBrubbjCu4tB/nSeZUyuCdYXkCNfFP01cspZOPsi0 KTsSS0y4VdoIVKK2suAuCoXdS46Hmx3k3CR7duLemkORItKbngRbcHUxF0PFuuenS7A8 0Gmow3CYz2rpTXYsdM/3u0OlyKBh1dCIIar5KVhc5STOzgPbbLbE056/EvLWKeu7IpbV wSiJejfuGz83vf6gBNqsZcKW6dbuxhyL7GnGQpjOoCQwo0iSolbncOpLEk9Zg4WQrEG0 W12ZWdi7kH6w0zV8ipL5vdB3RlWYrTyFni0fI8aNKL9wmcjbHQeM/eya+c/jkPQFM50l IYMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=XBklHy8vSHYQYcjsPcyXmhV+Oh6uMBhDLfgsg3Z1Ag4=; b=O2Zk6gbgM1Hd5lN75nbXjpHasZg5psVz6D+c7XyuJAVSrUmOnMbOeB4uG1o2QRsa0a twGWqowqx8yJVbe2zFV7vWs/oUvsK//hhMyZsTL7XNpK6OcJ7ERkuLQKA9T5ogKD7jlo h0JQ3uey60wT22osOA4OMfV8YSnnPNzDEIEcWju4PZR4aFuhLbqTcbfJm14JN2ZVn+ou 0tYqsi8JG5/+v4X6JOnCy8b602nLhLjy4B0OzFR7QPG47a7FQMJvsX0B0AqZOSChE05o PihmnDz5rksJ4x8KcaFnHtSddDBOTlG1vy64tOauZkf8RK5dbVyy64mU3YZCjscTAkdq MNqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=4tvvh9lu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g12si19215311pgd.567.2018.12.05.22.07.26; Wed, 05 Dec 2018 22:07:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=4tvvh9lu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729192AbeLFGGM (ORCPT + 99 others); Thu, 6 Dec 2018 01:06:12 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:60690 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729131AbeLFGGD (ORCPT ); Thu, 6 Dec 2018 01:06:03 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wB65xNmI025094; Thu, 6 Dec 2018 06:05:39 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=corp-2018-07-02; bh=XBklHy8vSHYQYcjsPcyXmhV+Oh6uMBhDLfgsg3Z1Ag4=; b=4tvvh9lusuS8aFRGuH7zpUI5FQcXrN2HaC8BfDbUeHrtMTKYM6lARPCTMUpdrFRZSSV8 EnuBKazOWcDSc7jTWW+4z6he6wuPGAB7Z6zCiyT/v0Itzpl3oVKqUbUeeNHQ1C7NZhvk ps5OQiX/4nM3EXoExT3WuIfn6fxPyoF58MO67vsmCcvGHlPyi4qQbniG/FtaiRPxUmE2 e8/565bNTqvj19E587DFOTn2JmhRWLwiKyOuqrdPNONr1p0tk2bxn3F6LOTBd3S82Zf+ xme/FIP9HdUZqW7V+4DZNrYiFhbWDq5KOWjm0XIly3UCxHHrseQzQUHXPZfkZ1f4rrO7 4A== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2130.oracle.com with ESMTP id 2p3hqu6c4q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 06 Dec 2018 06:05:38 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id wB665bQD016888 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 6 Dec 2018 06:05:38 GMT Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id wB665bb3030245; Thu, 6 Dec 2018 06:05:37 GMT Received: from marawils-linux.us.oracle.com (/10.141.196.37) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 05 Dec 2018 22:05:37 -0800 From: Maran Wilson To: x86@kernel.org, xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, pbonzini@redhat.com, jgross@suse.com Cc: boris.ostrovsky@oracle.com, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, roger.pau@citrix.com, rkrcmar@redhat.com, maran.wilson@oracle.com Subject: [PATCH v8 3/7] xen/pvh: Create a new file for Xen specific PVH code Date: Wed, 5 Dec 2018 22:05:28 -0800 Message-Id: <1544076330-21992-1-git-send-email-maran.wilson@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1544076152-21637-1-git-send-email-maran.wilson@oracle.com> References: <1544076152-21637-1-git-send-email-maran.wilson@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9098 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1812060055 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We need to refactor PVH entry code so that support for other hypervisors like Qemu/KVM can be added more easily. The first step in that direction is to create a new file that will eventually hold the Xen specific routines. Signed-off-by: Maran Wilson Reviewed-by: Juergen Gross --- arch/x86/platform/pvh/enlighten.c | 5 ++--- arch/x86/xen/Makefile | 2 ++ arch/x86/xen/enlighten_pvh.c | 10 ++++++++++ 3 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 arch/x86/xen/enlighten_pvh.c diff --git a/arch/x86/platform/pvh/enlighten.c b/arch/x86/platform/pvh/enlighten.c index 02e3ab7ff242..491932991202 100644 --- a/arch/x86/platform/pvh/enlighten.c +++ b/arch/x86/platform/pvh/enlighten.c @@ -18,10 +18,9 @@ /* * PVH variables. * - * xen_pvh pvh_bootparams and pvh_start_info need to live in data segment - * since they are used after startup_{32|64}, which clear .bss, are invoked. + * pvh_bootparams and pvh_start_info need to live in the data segment since + * they are used after startup_{32|64}, which clear .bss, are invoked. */ -bool xen_pvh __attribute__((section(".data"))) = 0; struct boot_params pvh_bootparams __attribute__((section(".data"))); struct hvm_start_info pvh_start_info __attribute__((section(".data"))); diff --git a/arch/x86/xen/Makefile b/arch/x86/xen/Makefile index b239922f6c6c..084de77a109e 100644 --- a/arch/x86/xen/Makefile +++ b/arch/x86/xen/Makefile @@ -36,6 +36,8 @@ obj-$(CONFIG_XEN_PV) += multicalls.o obj-$(CONFIG_XEN_PV) += xen-asm.o obj-$(CONFIG_XEN_PV) += xen-asm_$(BITS).o +obj-$(CONFIG_XEN_PVH) += enlighten_pvh.o + obj-$(CONFIG_EVENT_TRACING) += trace.o obj-$(CONFIG_SMP) += smp.o diff --git a/arch/x86/xen/enlighten_pvh.c b/arch/x86/xen/enlighten_pvh.c new file mode 100644 index 000000000000..6be7bc719b38 --- /dev/null +++ b/arch/x86/xen/enlighten_pvh.c @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: GPL-2.0 +#include + +/* + * PVH variables. + * + * The variable xen_pvh needs to live in the data segment since it is used + * after startup_{32|64} is invoked, which will clear the .bss segment. + */ +bool xen_pvh __attribute__((section(".data"))) = 0; -- 2.16.1