Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4045943imu; Mon, 10 Dec 2018 12:08:45 -0800 (PST) X-Google-Smtp-Source: AFSGD/XPleCXh7wazh7r1GW5n6I0wMJgyCPtrGcWwcomNXU5vT6IFYCCQ6oR/UbGncKHdDhWpoVM X-Received: by 2002:a63:7418:: with SMTP id p24mr12138050pgc.196.1544472525464; Mon, 10 Dec 2018 12:08:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544472525; cv=none; d=google.com; s=arc-20160816; b=Ac70FBvya9yG/aYpBvovL94dmd/kP+AC5sFL14tIOSldXEGr7z5A9Y/CBSfWxf4x4P 3dQCWc4KrOOP7upHYfOu5Z399ac8AHELWiGDUwONEV1wGiRf6MDLcjddpOqHgcN7gbc5 yAkHQL/18QM8Jg40WJevWKkwABUoQ7GCvdwMJEai1xEdoO5wLcDuDjkdNh0CCQ1rjaT/ CaYSG9/zbz3EKBqIFvVIcXMaLa7voZrFpZEd6aeEm1uLT9XRgwIgNLc/O1IgtTgo8uv8 fVsKHTEAJvawBJ6c8pjcOdmaoupWL7fPbSEftRcDKKlJAid4pUDyBlWQDAF8s/S/Ij/A oJzw== 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=qaajMDzEt9cK7vUaFWiaZbbOozn4auEvGHQzkbx95A3UqypsnCkKOaQR3AiC2eB+9A rJ7cqFvaCo6M//qV1Ll5s6ciq1tgbvMadlT3obXKIk90T9p0KI5N7fmdnzus1CZ+8lm/ 5k722ItL51BYWI2tEbZJfR/J0L9SDx7uXchaq63pGl5nSpnrwtvQ+Y3YyPzpf/ywVf16 lBncl3PmRzcjxcK865nW800prmDYWOIMcKJjrt2T12dLpnJG6g6/v6L6oTIthUrvSKJe uHNb3OgU9HtgycWZXprt+LguvbbadSLfU6t8YNozJuZnnhC2/x2ESbkzSMKYFLh+0tN4 LrFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=u+QSnPbG; 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 l184si9964016pgd.523.2018.12.10.12.08.30; Mon, 10 Dec 2018 12:08:45 -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=u+QSnPbG; 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 S1729187AbeLJTJL (ORCPT + 99 others); Mon, 10 Dec 2018 14:09:11 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:58026 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728060AbeLJTJK (ORCPT ); Mon, 10 Dec 2018 14:09:10 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wBAJ8mQ4115781; Mon, 10 Dec 2018 19:08:54 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=u+QSnPbGy6deX1wrTEW4l9lnD9Zzczd3E/mftArdy2BA62qC2e3DIOPh6O89DzMGYPzf SiA4LMl5EtfKWRVM8HH5VgxnwjnKoeiWk+ODvCYeZcKZGMFySXf5UeHKglkzQScCOdyJ 5KE52nvkoqO7JPdJb6lQz8srm/fNyPhjiiGHTUFMHDwxLYUGFpPa8uJMaUEbpX6/y/cE /N1TLd0nvmrKQ7tHxyeVRtqTpBzL1RoqXTeiXYGYX8FrjKeRNHJf10/Jc6ZpImbRceWc VyI73YhtVgS3QXheLT0IU+vw55MdZDiowG4TSJH9plCmdzcFsgvig/3wWMwfWGEZAxxA tQ== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2130.oracle.com with ESMTP id 2p83fe01d4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 10 Dec 2018 19:08:54 +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 wBAJ8rV2006370 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 10 Dec 2018 19:08:53 GMT Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id wBAJ8qTX018717; Mon, 10 Dec 2018 19:08:52 GMT Received: from marawils-linux.us.oracle.com (/10.141.196.37) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 10 Dec 2018 11:08:52 -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 v9 3/7] xen/pvh: Create a new file for Xen specific PVH code Date: Mon, 10 Dec 2018 11:08:44 -0800 Message-Id: <1544468926-737-1-git-send-email-maran.wilson@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1544468734-32763-1-git-send-email-maran.wilson@oracle.com> References: <1544468734-32763-1-git-send-email-maran.wilson@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9103 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-1812100170 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