Received: by 10.223.185.116 with SMTP id b49csp6505569wrg; Wed, 28 Feb 2018 10:30:58 -0800 (PST) X-Google-Smtp-Source: AH8x225Ow0KHCXrimksvWOTbGXUHFnooOAHmJ+OVQBxGd8EnC7zIZY8tJIPoJV8hGBYwhghyxs1F X-Received: by 2002:a17:902:710e:: with SMTP id a14-v6mr18315142pll.291.1519842657921; Wed, 28 Feb 2018 10:30:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519842657; cv=none; d=google.com; s=arc-20160816; b=v8ivUBBcquVJoww9NihifNIIXKVPnLtg7vvq+WI6+dEMi2GhcGA/135CIVwN96yTrW km4silBM5c5bAmF8JwRuT6JgFMAnX296KDOFE5vXnoKEjqeLCQC409YcnuMVA7D3bkhf Dv6fVzD2p+5XM+aP+rFpWRPpqiK4FsbS7ZYVrLZFLqzUBHd7FEnnk/JrDylXRHqMXQIx 0KRjT1V3NcldLoYd7RzTshZ3vn9rzfqL53HW59tkae5KYlryAWTvB/ioJ8Ns3+u90f/G xspOmDeOFhxvBEMpIkuMMgpydFVPmzNqqCnr0kD1KEUG/pQWDgqx5EmO2DZfyaPRgSMh CatA== 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:arc-authentication-results; bh=MqyeKfwxHfDnazrWSZDdHT5l1qtnl35qPidVCAkacdE=; b=paGX2m5xnuIG3jOBylJNzdLAs2QhhrpQvr3VeTCkYxUmIUY5dSIIN2TSGK2VISp6A9 nca+Zvx53HZVkJuJ9OX9SmdjDFKR9n2kNNN16g9i/g+CQlIu2G/l4sHco0F2jnD8rZvb qWIg7viCPDn/tiSnjbukp0rZY+de7Nxhsov5U9BsoGv3U6PY1bdf4alfn+KM3HIzN7b0 fsmJehrL+rPd5HnwlmuNwfHX6s32JNwROxFcUxBW5Uw86bAdIgpVU/W09afGLJKbDyRf UAaFniJ9oNIR/v72oho3IGleuJJSGuAJQK70esGbp6upK5YU42SNqyKVYZnhnAmwmkZ1 1nzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=iqsxo4FE; 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 d8-v6si1635710plo.17.2018.02.28.10.30.41; Wed, 28 Feb 2018 10:30:57 -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-2017-10-26 header.b=iqsxo4FE; 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 S932854AbeB1S3e (ORCPT + 99 others); Wed, 28 Feb 2018 13:29:34 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:33156 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932126AbeB1S33 (ORCPT ); Wed, 28 Feb 2018 13:29:29 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w1SIQltb138846; Wed, 28 Feb 2018 18:28:47 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-2017-10-26; bh=MqyeKfwxHfDnazrWSZDdHT5l1qtnl35qPidVCAkacdE=; b=iqsxo4FEGFCSb6mP47POU3GsM7EGPYS5bTzZnZuWW6euJ6U6FM71G7ckQsvuIOddRqU2 S9hKZ1za8a1RDFz3Y8uO8h3kQbJ4UMWDhyuWZroR8xc6/XvvCkDbi/tujMWH+7Dl2JRz NgvwSKUliCIE6U+IEF/IKiYMpR0USurM5ausMC9mUf5E5+hVdiySRH3wyQ8/R/7z4uNB hNtUEi96SVHAfftU8GbXuLTQxR3I+KGW50AO2hhtBbaxg1ugFpvQSZ4OGoL9h3YFOe7b NilqKacxbWegdF1FM4Ki3ufqe0F7wk5cSaMUNHv9UFy4ANYCwyjY+MYUsDYpodecsRnC 6Q== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp2120.oracle.com with ESMTP id 2gdyjqrtag-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 28 Feb 2018 18:28:46 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w1SISjVs004798 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 28 Feb 2018 18:28:46 GMT Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w1SISikV027602; Wed, 28 Feb 2018 18:28:44 GMT Received: from marawils-linux.us.oracle.com (/10.141.197.9) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 28 Feb 2018 10:28:43 -0800 From: Maran Wilson To: pbonzini@redhat.com, jgross@suse.com, boris.ostrovsky@oracle.com, roger.pau@citrix.com, andrew.cooper3@citrix.com, hch@infradead.org, JBeulich@suse.com, x86@kernel.org, xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, rkrcmar@redhat.com, jpoimboe@redhat.com, bp@suse.de, kirill.shutemov@linux.intel.com, thomas.lendacky@amd.com, luto@kernel.org, maran.wilson@oracle.com, dave.hansen@linux.intel.com, davem@davemloft.net, gregkh@linuxfoundation.org, mchehab@kernel.org, linus.walleij@linaro.org, rdunlap@infradead.org Subject: [RFC PATCH v4 3/7] xen/pvh: Create a new file for Xen specific PVH code Date: Wed, 28 Feb 2018 10:27:59 -0800 Message-Id: <1519842483-8887-4-git-send-email-maran.wilson@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1519842483-8887-1-git-send-email-maran.wilson@oracle.com> References: <1519842483-8887-1-git-send-email-maran.wilson@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8818 signatures=668682 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-1711220000 definitions=main-1802280224 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 --- arch/x86/pvh.c | 1 - arch/x86/xen/Makefile | 1 + arch/x86/xen/enlighten_pvh.c | 11 +++++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 arch/x86/xen/enlighten_pvh.c diff --git a/arch/x86/pvh.c b/arch/x86/pvh.c index 436c4f003e17..b56cb5e7d6ac 100644 --- a/arch/x86/pvh.c +++ b/arch/x86/pvh.c @@ -19,7 +19,6 @@ * xen_pvh and pvh_bootparams need to live in 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; diff --git a/arch/x86/xen/Makefile b/arch/x86/xen/Makefile index 7e8145b33997..ef6481a83768 100644 --- a/arch/x86/xen/Makefile +++ b/arch/x86/xen/Makefile @@ -21,6 +21,7 @@ obj-y := enlighten.o multicalls.o mmu.o irq.o \ obj-$(CONFIG_XEN_PVHVM) += enlighten_hvm.o mmu_hvm.o suspend_hvm.o obj-$(CONFIG_XEN_PV) += setup.o apic.o pmu.o suspend_pv.o \ p2m.o enlighten_pv.o mmu_pv.o +obj-$(CONFIG_XEN_PVH) += enlighten_pvh.o obj-$(CONFIG_EVENT_TRACING) += trace.o diff --git a/arch/x86/xen/enlighten_pvh.c b/arch/x86/xen/enlighten_pvh.c new file mode 100644 index 000000000000..4b4e9cc78b8a --- /dev/null +++ b/arch/x86/xen/enlighten_pvh.c @@ -0,0 +1,11 @@ +#include + +/* + * PVH variables. + * + * The variables xen_pvh and pvh_bootparams need to live in the data segment + * since they are used after startup_{32|64} is invoked, which will clear the + * .bss segment. + */ +bool xen_pvh __attribute__((section(".data"))) = 0; + -- 2.16.1