Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1860249rwr; Fri, 28 Apr 2023 02:54:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7bDqICEQDmq21rS2dBtiF0/1VxvHeJGhl3sHf8XiHCQi/Rz9+hCFltfed1paf4msgJPrDU X-Received: by 2002:a17:903:22cd:b0:1a6:e6b6:7d79 with SMTP id y13-20020a17090322cd00b001a6e6b67d79mr5544709plg.49.1682675684583; Fri, 28 Apr 2023 02:54:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682675684; cv=none; d=google.com; s=arc-20160816; b=bdepq5uSApmC/lGX2t+IuUt8pCqm9RkcDnw6JVSxhdEPGprH6eeBWwwIaVVMhNdGdy 3t6RkmPzSmD+tBhctdmKatl4cWlM4p69tRAmeFPL/zEw6Lt0NtQ+HevHB3UMOUoBphir lVgCymlsw5S/h+tpcLgz7CVuf8S8g2rAZYHZ37AO21PFM1m5xyIdr51GWoc6UYyt8X/n htHlmvoMFJJIV6ggxF+CPZ9GnKbfHMfP9cxAKSkDJ7I6vB/7GOyiOt7WuW/lrYlmeYVg dzdCstP/I1SfeDNgt54i8JjGzqwZehATHgzxLpiSe2KdmrWHHeNUGCXdovCVjJgZ+uYX eStQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=yYc0n90JYFI54S7MPf98HJFG7zj7m02alVcdXoyA3Nw=; b=cKY9aW3E6n+r+l4X2QIB9OGw4NJeg63TiDEn3Pf2mpIFMeQoyGb8nmyhIbXWFfgNP5 x9TirxA+Cj7pFGMHT26+hvyl/oDNju1NQ6+TWAvbaxhBJZ8dyj9xA3jnKOHW3G/yH8rm ZcqGPNjdIRJk1DXel7AxA+z+kYmkxK9wuty8QVe1eZ8NWAc6FwbndZ4T3S5bHgW+DyiW gvJaaKs4NEJ65QTCZWGolO7a5GPkiUKwFcmb3g2LKlrWd5wyIUa4q+c5DboDetqmZvnW R9lVfBUiRVdSzT+0E7QShawfH2Yg7XF+fRJhiIX9xvjB1YXDyhVeUvxdaEx8YRB3KHmc cn8w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=antgroup.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r11-20020a1709028bcb00b001a961300697si14267632plo.589.2023.04.28.02.54.33; Fri, 28 Apr 2023 02:54:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=antgroup.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345578AbjD1Jxq (ORCPT + 99 others); Fri, 28 Apr 2023 05:53:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345782AbjD1JxY (ORCPT ); Fri, 28 Apr 2023 05:53:24 -0400 Received: from out0-219.mail.aliyun.com (out0-219.mail.aliyun.com [140.205.0.219]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC24959F9; Fri, 28 Apr 2023 02:53:02 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R181e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047198;MF=houwenlong.hwl@antgroup.com;NM=1;PH=DS;RN=17;SR=0;TI=SMTPD_---.STCEPV9_1682675548; Received: from localhost(mailfrom:houwenlong.hwl@antgroup.com fp:SMTPD_---.STCEPV9_1682675548) by smtp.aliyun-inc.com; Fri, 28 Apr 2023 17:52:29 +0800 From: "Hou Wenlong" To: linux-kernel@vger.kernel.org Cc: "Thomas Garnier" , "Lai Jiangshan" , "Kees Cook" , "Hou Wenlong" , "Juergen Gross" , "Boris Ostrovsky" , "Darren Hart" , "Andy Shevchenko" , "Thomas Gleixner" , "Ingo Molnar" , "Borislav Petkov" , "Dave Hansen" , , "H. Peter Anvin" , , Subject: [PATCH RFC 15/43] x86/PVH: Use fixed_percpu_data to set up GS base Date: Fri, 28 Apr 2023 17:50:55 +0800 Message-Id: <4fdb800ce6f1a2315918cb02eec3efbec1032cb8.1682673543.git.houwenlong.hwl@antgroup.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org startup_64() and startup_xen() both use fixed_percpu_data to set up GS base. So for consitency, use it too in PVH entry. Signed-off-by: Hou Wenlong Cc: Thomas Garnier Cc: Lai Jiangshan Cc: Kees Cook --- arch/x86/platform/pvh/head.S | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/x86/platform/pvh/head.S b/arch/x86/platform/pvh/head.S index c4365a05ab83..b093996b7e19 100644 --- a/arch/x86/platform/pvh/head.S +++ b/arch/x86/platform/pvh/head.S @@ -96,7 +96,7 @@ SYM_CODE_START_LOCAL(pvh_start_xen) 1: /* Set base address in stack canary descriptor. */ mov $MSR_GS_BASE,%ecx - mov $_pa(canary), %eax + mov $_pa(INIT_PER_CPU_VAR(fixed_percpu_data)), %eax xor %edx, %edx wrmsr @@ -156,8 +156,6 @@ SYM_DATA_START_LOCAL(gdt_start) SYM_DATA_END_LABEL(gdt_start, SYM_L_LOCAL, gdt_end) .balign 16 -SYM_DATA_LOCAL(canary, .fill 48, 1, 0) - SYM_DATA_START_LOCAL(early_stack) .fill BOOT_STACK_SIZE, 1, 0 SYM_DATA_END_LABEL(early_stack, SYM_L_LOCAL, early_stack_end) -- 2.31.1