Received: by 10.213.65.68 with SMTP id h4csp1152515imn; Wed, 4 Apr 2018 13:35:25 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+4Jw5f0Ncpk8N53h28Bvr57wha/b1c3yGskyOqGPkVrfYhw4emYW1PCFLUhiA9U+m0LWS7 X-Received: by 10.99.123.86 with SMTP id k22mr12961753pgn.228.1522874125374; Wed, 04 Apr 2018 13:35:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522874125; cv=none; d=google.com; s=arc-20160816; b=WWRC5DhGXVSo17f5hrfBJiQ56m6pqce28kiC68hhLYCpKfM+c2HW5hEK9s+tmVyeVb 9AnHlxpCWgsy7TFfctIPT31lo9AcNJtP5/YgfIj1begfXWs4ftvB8GEJO7mebtRDOj3t FCYLVZcIhqnU2HH6UQy4cdgxJ9M7fX1QvlBsriWkPJEj2x30rlYsV8jNtSVclt1oOUhh 9zX2S8Gq1B4Oh4NLr5FErABJE7B4rk/RZMQhleCTujKW+aHmk91b10Y9e1HEpZH3yQQS OZzKU01EYrLmnS15rDJGO1zuB66J+6r5kshDym2lA4nKWijlggUC0HIkz/sZWelAMBmw Y1Hw== 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=+4XYCycHDrOC/JNakrlfpOXcTnYN8EuRxzHKB8Kotws=; b=TQrLCVG+uUzPa+XJidMuIi+ZP+EcL1xMEiSML85cxMZYEd0iUZYqaahXdqg6jjdEl+ DFwhJGBjheuhNneKss4znjGjyeaE1vSWCPPWakUQ2TbKzi9LL9kTdLE2AH10FMMO+5sq I6ySI1LSdV27mW9r0JZva594OCJQF8Tx5vcPfmbphstXUvfr+DAbK3eVII3TrbohkLnT IRJ1nIeaDqOagAzww5XsPZ/S8Q69cnfMrKusWZvrjuJmfxQ3fOYqvlPlRjPMZB7Fy1NR lKrkiVa7Bj5b5GeirKCIoVA7W6SS38cu0qqYhVGh5CP0nT6A6W0lzr3oVRffwqKWRFHt MmFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=M7WPzWrw; 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 l62si4191209pga.740.2018.04.04.13.35.11; Wed, 04 Apr 2018 13:35:25 -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=M7WPzWrw; 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 S1752322AbeDDUdG (ORCPT + 99 others); Wed, 4 Apr 2018 16:33:06 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:60396 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752224AbeDDUdD (ORCPT ); Wed, 4 Apr 2018 16:33:03 -0400 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 w34KGdxY172481; Wed, 4 Apr 2018 20:32:48 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=+4XYCycHDrOC/JNakrlfpOXcTnYN8EuRxzHKB8Kotws=; b=M7WPzWrwAn9HGzKbOKmWIa2hccHxqxQO5N7xjmqqmctmQfdrPWbLZsrujaX352qbi6rS kzwaVilXQGUXn8lzvPRVzoJevkMrg8136YCZErHSFl7jUW4UGAKu4u9jgiBsEXaihG1T t8q98D/0o04mSqxByyTjGvqm4DWJ/W3JmwUlUYCuEu3CNMG+j/WXpiRZw056VC3gyZ9A vz2h1gpaD6NZVKqPII9b3VX+taH0Qal/RmufFpgGVFid+TsaeBnYSRKht89skqJGVLrW QHERRFiylIBGx5Nct4XSr8WMOXa8LaQ7wze9C9XUdCn1aPgJb93ExNEXXPVarzu5zOdi ow== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2120.oracle.com with ESMTP id 2h55krr208-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 04 Apr 2018 20:32:47 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w34KWknD013220 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 4 Apr 2018 20:32:47 GMT Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w34KWkgY030472; Wed, 4 Apr 2018 20:32:46 GMT Received: from marawils-linux.us.oracle.com (/10.141.197.9) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 04 Apr 2018 13:32:46 -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 v6 3/7] xen/pvh: Create a new file for Xen specific PVH code Date: Wed, 4 Apr 2018 13:32:40 -0700 Message-Id: <1522873962-18156-1-git-send-email-maran.wilson@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1522873659-17572-1-git-send-email-maran.wilson@oracle.com> References: <1522873659-17572-1-git-send-email-maran.wilson@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8853 signatures=668697 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-1804040198 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 aa1c6a6831a9..74ff1c3d2789 100644 --- a/arch/x86/platform/pvh/enlighten.c +++ b/arch/x86/platform/pvh/enlighten.c @@ -17,10 +17,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 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