Received: by 10.192.165.156 with SMTP id m28csp1203719imm; Mon, 16 Apr 2018 16:15:32 -0700 (PDT) X-Google-Smtp-Source: AIpwx48EUizOGHuEsgTqiAdxbMukw3B0XN2kimEDSKApNbG6apYbmFmV5/fwj/jU637b1Wz49MnT X-Received: by 10.99.127.89 with SMTP id p25mr4318445pgn.440.1523920532434; Mon, 16 Apr 2018 16:15:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523920532; cv=none; d=google.com; s=arc-20160816; b=foCEng4nitI8ZUfmjebpxD8GEra6YDVxrEqY9JiBarIRGNwB3yd6KwMUqYIdrN04WT yJsEbJnX9LTsKn3KM9AExWyJ/g4cL8Pt9AQg6myfIWQdLqAmUgqV3KJ5JMcd/Vwi6nwk GRp3kTnw/AqEBRQTn4QkGghTEVRLEyhhm/1SYrOBalS1Wy0klL9Wv1ijygtHBNKObhH5 smXsFUwqHxzdkjh9D/bHupKAxVwvg3ZoKjikNtNm7XUyNDo3Xai8TcKlri5k4W3z0AXx FUNrSxGjAJeP2+KH+cxlQWp2LdjCRA6lxi/8gvIAL/OMTYZdAB1HhYvKZ7M9rzDFBHFm remA== 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=thda0GNEXHhi3XZ8bX4OaBxvZzYqSseRB8cfC2kkb9c=; b=HPnYvaiMbx8lBOZOOlX6XlzceONPO9w0nWRkOyehJ1CJgkSXvu5T8N97WXcKadmnyW LGJK5oi3MlZwLNheBlFGvc8d4d7CKfYxfU/ggOBkr4hr62J5uMwxqIId6O4MJclJ+1zm WrZzyhX7p5V7T2t+uOeY6M3ewy7eOUQhWACgGxrdEZjjdYHme6oESWjQBmUacRDIDfBr 2FbNOnz6z9PczHm6ZIGoxD4lXTDbZnriLe9j885H0l6+k/4ZwFJLiR7xpzjIcf6oKaec Iik+y/fE5EERcnwp0zIrHZlu1x2rgZGUzxm+ki4A2boYJET02PTnIOvmcVtVZZawccav cczQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=vq8Xsqzm; 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 u75si11691654pfd.183.2018.04.16.16.15.18; Mon, 16 Apr 2018 16:15:32 -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=vq8Xsqzm; 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 S1753149AbeDPXNp (ORCPT + 99 others); Mon, 16 Apr 2018 19:13:45 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:43424 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753080AbeDPXNa (ORCPT ); Mon, 16 Apr 2018 19:13:30 -0400 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 w3GNArRu009364; Mon, 16 Apr 2018 23:12: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=thda0GNEXHhi3XZ8bX4OaBxvZzYqSseRB8cfC2kkb9c=; b=vq8XsqzmaP0qgleh51Ee3kCbNSO/EcVKYRfNd1HVf3j/Dh2doxpRxpQ6kDL4PLY8/GcF Napml9/vdyMjnNJmevjSUlL0iUE1TcovqttbvG4wcCqEWZHmXW1ELNXP36GE6ROPutF9 VwSK7P/swpLw9XOTjXhGFJMl9xZPMrkLEO2lPIhD1Kt83UdDjQCw8qawXPN5xP+XrjUz SGxuHIwvHgZeVTN2r4a4zS0/9Sdn2ne5OzyAIJXZgj+PaLHx7nmDDgTOfAW7VqSl35Fy MhNrqHbGwovRMKCYx82cPlbU1WMruwiocdmj+MIer9tdqmJbJEBwo5EzSetsldUY1D+P Fw== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2130.oracle.com with ESMTP id 2hbameybdb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 16 Apr 2018 23:12:47 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w3GNCkiw022529 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 16 Apr 2018 23:12:47 GMT Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w3GNCjCV024780; Mon, 16 Apr 2018 23:12:45 GMT Received: from marawils-linux.us.oracle.com (/10.141.196.252) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 16 Apr 2018 16:12:45 -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 v7 3/7] xen/pvh: Create a new file for Xen specific PVH code Date: Mon, 16 Apr 2018 16:12:38 -0700 Message-Id: <1523920360-27743-1-git-send-email-maran.wilson@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1523920175-27287-1-git-send-email-maran.wilson@oracle.com> References: <1523920175-27287-1-git-send-email-maran.wilson@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8865 signatures=668698 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-1804160192 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 | 9 +++++++++ 3 files changed, 12 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..313fe499065e --- /dev/null +++ b/arch/x86/xen/enlighten_pvh.c @@ -0,0 +1,9 @@ +#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