Received: by 10.213.65.68 with SMTP id h4csp673243imn; Tue, 20 Mar 2018 12:22:12 -0700 (PDT) X-Google-Smtp-Source: AG47ELt+bE2lRuf5PPnjrcsDY2P/xF0VzLVnsH2ZRIv5qJrMpFdP1HHjfdAHu+TG8sP+3LKmwb6z X-Received: by 2002:a17:902:9a8b:: with SMTP id w11-v6mr11284511plp.136.1521573732488; Tue, 20 Mar 2018 12:22:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521573732; cv=none; d=google.com; s=arc-20160816; b=eCPR6OP8vSKuSwMvjaiU/30Qrah2If9OrD2f9KitkPnH7q2PVD41DrGnhzeCa32MlT 3DAFr4O+ujdz+pJ49zvkF1Iq7yQWVAAEGotA0xZE9gJPFNIa3MN5SOyy4RmFhLnIPbQW P1if233emPHY6+QD3dVAI4djtJd2JZucjKaaCo45atiaWc4ie6bwcdQPIV2EonjnFepE n48msFQodKkFzvXxoR4ZW6kYhHI3RD1wzlH7cwdV/L6Gh9R2iSSKyPcpV74HjpLoh7C6 l+iuekSdaUoACy3j7pz08P5tPDLqvLe3/GQT+WG/1MYz4noi3bMwLg+uPWs1EP3Yac8b v7Iw== 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=R18JE/c+C6WuSs8HOqzd3D8vR9zf4bzv9mqX+Fotr2A=; b=N0/LzgvrPwjSV3Fh3oBOiAOaD8HjbYwtFwQExZkVH4TuTlhcLkbzobKgevIY2YriWa zckigVomPS5GVe6+PswDvELS0eXKtBd/TZw5Jn5DgW9CdM95u7bkBaEYm0D4lAzMjf4p TDhIVVVuMQ3OCTGjItfIFxqVAmWxbsBvMySFY812MeuNWVSKAP/Mwr7fHV+MAnLTnpc4 jNMJXNXsc3NZohy96DfFWAUSZwtpu2qOO8z/su8OKmodSE7KdY65LUZufOIKQ9uNXcn9 XMl2624Nuf/Xb03jptVm4i8AWUjQgWT1cdRMy8ZPsnwx3WhtuRU2q97Skqeq1/EO5kGg +i+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=BQ8HaHQ7; 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 i3-v6si2199039pli.274.2018.03.20.12.21.57; Tue, 20 Mar 2018 12:22:12 -0700 (PDT) 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=BQ8HaHQ7; 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 S1751796AbeCTTUh (ORCPT + 99 others); Tue, 20 Mar 2018 15:20:37 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:59312 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751343AbeCTTUf (ORCPT ); Tue, 20 Mar 2018 15:20:35 -0400 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 w2KIwciL037321; Tue, 20 Mar 2018 19:20:10 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=R18JE/c+C6WuSs8HOqzd3D8vR9zf4bzv9mqX+Fotr2A=; b=BQ8HaHQ7eWpUMNqFhAdiM8HNRK58ayZ6bse+/Ve05Pc/xZ8Q7rq7zqbZ39UZOtJIEZ6Q CXDcZvHpnyF6eb00IH1uQeCpqlTwVWAyNO6TSGPc0i2fWKQaABAVeylTBDoyAIaioY6g BvG4ldbgwzRk6QE7T2jYH8TcyS8vZR8wuaQQnbyGZoLJHKHKd9rPyYTUZJLwiONC75Em ausyQ3BNY8U5s7ZI/jZJCgYb9B2dNp32eHZhuLfyl1STH3nUl3j97H3XT3+t2BX1uJLd 1KTgWHkeI3/nhkn3p/TbkCvGw4d2vYtRzFBbnAQNfF3NPRjV3oUROnM4hlMcqC0bOXJg 9A== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2130.oracle.com with ESMTP id 2gu824r3r5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 20 Mar 2018 19:20:10 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w2KJK9O1002906 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 20 Mar 2018 19:20:09 GMT Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w2KJK8pP027574; Tue, 20 Mar 2018 19:20:08 GMT Received: from marawils-linux.us.oracle.com (/10.141.197.9) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 20 Mar 2018 12:20:08 -0700 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 v5 3/7] xen/pvh: Create a new file for Xen specific PVH code Date: Tue, 20 Mar 2018 12:19:44 -0700 Message-Id: <1521573586-17463-1-git-send-email-maran.wilson@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1521573369-17216-1-git-send-email-maran.wilson@oracle.com> References: <1521573369-17216-1-git-send-email-maran.wilson@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8838 signatures=668695 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-1803200127 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/platform/pvh/enlighten.c | 5 ++--- arch/x86/xen/Makefile | 1 + arch/x86/xen/enlighten_pvh.c | 10 ++++++++++ 3 files changed, 13 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 436c4f003e17..74c0a711ebe7 100644 --- a/arch/x86/platform/pvh/enlighten.c +++ b/arch/x86/platform/pvh/enlighten.c @@ -16,10 +16,9 @@ /* * PVH variables. * - * xen_pvh and pvh_bootparams need to live in data segment since they - * are used after startup_{32|64}, which clear .bss, are invoked. + * pvh_bootparams needs to live in the data segment since it is + * 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 f1b850607212..ae5c6f1f0fe0 100644 --- a/arch/x86/xen/Makefile +++ b/arch/x86/xen/Makefile @@ -20,6 +20,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..c5409c1f259f --- /dev/null +++ b/arch/x86/xen/enlighten_pvh.c @@ -0,0 +1,10 @@ +#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