Received: by 10.192.165.148 with SMTP id m20csp3967733imm; Mon, 30 Apr 2018 09:22:39 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoz5E+dAEes29ZpxPP+mLftHBQ0sCpGBCHPV0FkWdXKOpJyLxUya4p+OD5i9Qg4+gKkBFf6 X-Received: by 2002:a65:4d49:: with SMTP id j9-v6mr10710264pgt.210.1525105359305; Mon, 30 Apr 2018 09:22:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525105359; cv=none; d=google.com; s=arc-20160816; b=iUWMcMT3qtrexmhQhdwW0gimUp+iD7dGlSnuRHVbZzMb8Jv9nq1DZUx0s+jRtiWnif 7rhfzgPOoIu0RVYY6jK62dvURvW+BVz7aTc2DJY6TInTwheGEnvoRFXCPbSm5qdNW8fa KdaLNnMcm4MlV9iixc4WeVAAWQhM2zNccqxlhtXiXCRNx03X1yoTCnKPFShWp3//s1kM d8gmCuD2KOyYJlOzFU/WlMhVF/nPVi2RaaAQAjmmPWI+lPvdqp8H7sl+BAMcHWhiyMEs vH3h9p+SpJQHhbLYNE0zFniSZCa5K0yojq+hVv1w0o1pHDjyrpeueHAhAEyr3Cw0miCL mkKA== 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=k9QcZKFChTd9hJYXrnF5e3VI2aI9jyUMvFY7btI7qz0=; b=UGYJZvGK/CAQK4LsUqPY2QeF8TF9hTeZPYOkdeQiPVXuA4IUIvnSYFcNKzxRyiLGwI M9K3ZflOZIBfi2OX0hJ8OotEwLOXQBPW2X7Yk9XyB012bQnd4V3bsQdLr++IUChP5mnZ 8C7AyguLlA/n9ncU1/h9dEA1EQx+WWUIDkZDK0SMfOlwGezui5eC1qTPHcO1hE7uoYrE GoHoL2Bc6JGusJfRMZrXdhhPjQvA+DGgoPTO1EV4v/RkUCgzKcKdHx62MC3LTHn4VCOL WuOI5M1bO1sS4RauKRfq1oz983EscxtBinElLL6Irs7+SxQYi9AE/6tFHDkCHoY1KbFR wXZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=q7hJZTOD; 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 d12si1079053pfn.84.2018.04.30.09.22.24; Mon, 30 Apr 2018 09:22:39 -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=q7hJZTOD; 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 S1754967AbeD3QV5 (ORCPT + 99 others); Mon, 30 Apr 2018 12:21:57 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:42302 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754909AbeD3QVm (ORCPT ); Mon, 30 Apr 2018 12:21:42 -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 w3UGKhpt088976; Mon, 30 Apr 2018 16:21:37 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=k9QcZKFChTd9hJYXrnF5e3VI2aI9jyUMvFY7btI7qz0=; b=q7hJZTODgXuMfzud3ljf4A7jcgBC6T1uJ+CCZ6ULvlqBCR0KY3N0kBy/R37S1qiix10j jwErEmT6ftSMP4tS8/m91/hVXPGfgXf532OVtVCMr4oHqgvlnf6KOqbjZJUVmPpnmC7K R2Qj2AFiP5HE8swhlN7sUQFC4p6B0BOFrxrmnYuS5i5FfmRwI6xkXSLpGtGEOZc2S+MJ mt6y8MwRzYSHoNZOUo71hZiOALWVgHUMeVyA06dVPJVgvoTPjhB0ZvRm2qAYsbia+LCx 7AOUCeS0Wnc8d1f0FpZWyEef+86LuG7DJIzWwqdChucNXFraIfqTWvvZ0KccHVnOTss+ xw== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp2130.oracle.com with ESMTP id 2hmeg5mx7v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 30 Apr 2018 16:21:37 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w3UGLaGx008514 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 30 Apr 2018 16:21:37 GMT Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w3UGLa1p026060; Mon, 30 Apr 2018 16:21:36 GMT Received: from dhcp-burlington7-2nd-B-east-10-152-55-162.usdhcp.oraclecorp.com.com (/10.152.32.65) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 30 Apr 2018 09:21:36 -0700 From: Boris Ostrovsky To: linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org Cc: jgross@suse.com, Boris Ostrovsky Subject: [PATCH 4/4] xen/PVH: Remove reserved entry in PVH GDT Date: Mon, 30 Apr 2018 12:23:39 -0400 Message-Id: <20180430162339.17143-5-boris.ostrovsky@oracle.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180430162339.17143-1-boris.ostrovsky@oracle.com> References: <20180430162339.17143-1-boris.ostrovsky@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8879 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=668 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1804300156 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org And without it we can't use _BOOT_XX macros any longer so define new ones. Signed-off-by: Boris Ostrovsky --- arch/x86/xen/xen-pvh.S | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/arch/x86/xen/xen-pvh.S b/arch/x86/xen/xen-pvh.S index 4eed586..30dd067 100644 --- a/arch/x86/xen/xen-pvh.S +++ b/arch/x86/xen/xen-pvh.S @@ -54,7 +54,11 @@ * charge of setting up it's own stack, GDT and IDT. */ -#define PVH_GDT_ENTRY_CANARY 4 +#define PVH_GDT_ENTRY_CS 1 +#define PVH_GDT_ENTRY_DS 2 +#define PVH_GDT_ENTRY_CANARY 3 +#define PVH_CS_SEL (PVH_GDT_ENTRY_CS * 8) +#define PVH_DS_SEL (PVH_GDT_ENTRY_DS * 8) #define PVH_CANARY_SEL (PVH_GDT_ENTRY_CANARY * 8) ENTRY(pvh_start_xen) @@ -62,7 +66,7 @@ ENTRY(pvh_start_xen) lgdt (_pa(gdt)) - mov $(__BOOT_DS),%eax + mov $(PVH_DS_SEL),%eax mov %eax,%ds mov %eax,%es mov %eax,%ss @@ -99,7 +103,7 @@ ENTRY(pvh_start_xen) mov %eax, %cr0 /* Jump to 64-bit mode. */ - ljmp $__BOOT_CS, $_pa(1f) + ljmp $PVH_CS_SEL, $_pa(1f) /* 64-bit entry point. */ .code64 @@ -122,13 +126,13 @@ ENTRY(pvh_start_xen) or $(X86_CR0_PG | X86_CR0_PE), %eax mov %eax, %cr0 - ljmp $__BOOT_CS, $1f + ljmp $PVH_CS_SEL, $1f 1: call xen_prepare_pvh mov $_pa(pvh_bootparams), %esi /* startup_32 doesn't expect paging and PAE to be on. */ - ljmp $__BOOT_CS, $_pa(2f) + ljmp $PVH_CS_SEL, $_pa(2f) 2: mov %cr0, %eax and $~X86_CR0_PG, %eax @@ -137,7 +141,7 @@ ENTRY(pvh_start_xen) and $~X86_CR4_PAE, %eax mov %eax, %cr4 - ljmp $__BOOT_CS, $_pa(startup_32) + ljmp $PVH_CS_SEL, $_pa(startup_32) #endif END(pvh_start_xen) @@ -149,13 +153,12 @@ gdt: .word 0 gdt_start: .quad 0x0000000000000000 /* NULL descriptor */ - .quad 0x0000000000000000 /* reserved */ #ifdef CONFIG_X86_64 - .quad 0x00af9a000000ffff /* __BOOT_CS */ + .quad 0x00af9a000000ffff /* PVH_CS_SEL */ #else - .quad 0x00cf9a000000ffff /* __BOOT_CS */ + .quad 0x00cf9a000000ffff /* PVH_CS_SEL */ #endif - .quad 0x00cf92000000ffff /* __BOOT_DS */ + .quad 0x00cf92000000ffff /* PVH_DS_SEL */ .quad 0x0040900000000018 /* PVH_CANARY_SEL */ gdt_end: -- 2.9.3