From patchwork Mon Oct 23 09:09:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hou Wenlong X-Patchwork-Id: 156765 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp1166059vqx; Mon, 23 Oct 2023 02:10:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGwriYAoDFvcykXkup1L29fwsFI8zsZcO1uewzGYFBhHpExd3yqFyWRhtwhNj77Lt4BuZVq X-Received: by 2002:a05:6870:3d9b:b0:1e9:919d:83ec with SMTP id lm27-20020a0568703d9b00b001e9919d83ecmr11624872oab.28.1698052253618; Mon, 23 Oct 2023 02:10:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698052253; cv=none; d=google.com; s=arc-20160816; b=RhdWGNfbFm0/vJdaxH8bAkG0cXoac+X7UGsBy7CHBX7ECwNO14S++jhje2gO8RK/qr IvlGQ6sA1sJOnfEAroJxlzknJlpX9ST4wl17bGs8urEOto+nubOoXzWAvSjttxUCnA19 5habm0gdtADvSYUbdTkklIFHoQGhQK5rIiIGDu6WFjZfAqUCp8Sz/nOM1XBTEWENiBxp jBmN5vGjoEpr8DtOJOrvKU94558hOvvg5ePZvelJjKgWopM04usgc9itRi0yOls7R1mN CttoAqevyEE9ve8q05PzC0bO4zZ+Glbh1NFzWot7Fjvdy6jq4hn1LDMLsJ8CNcbmT39l UdeA== 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=VhQHPkmomM7uXQpIyFBq8bzG066HY+xqPqnmLDE3XZY=; fh=hKzLdgK4HR+tiTg9dLSK89ALadeChc5zAyrWEZxRg98=; b=j2ESK0G5BdIBNP7eiA9iLaFB5yoSAnYMB77ePI5sJvXnwLcuGAJCdog1RP0MsL8CGZ uiuu+vcX38avBT5P1YT0Gz21pBXIg3kgcOdWy7T2qa97zfQKLih36rfpT5Y8MGjUfwU+ uF/oAOUPoHT219KRtwYXoxbO2c8OwcMymN5UG/NYqq74yg1g3POTajEgIoPydFhl5am8 4/dqS2A4u7bdezz2Oe9ZFAG7Gqn0CE/2i4CdWNcrf/utcWXoIIRj3mshIE2kdF/bPVTX wg+iA3/0WB/vBzp4GS5uGgS4eY988UO/2DP+AeDbHh05PZWQocFc+RibsfkvtqcWh8N/ 4fIA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=antgroup.com Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id 145-20020a630097000000b005b7e6ff6c01si5994710pga.677.2023.10.23.02.10.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 02:10:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=antgroup.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 775298075DC0; Mon, 23 Oct 2023 02:10:40 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232424AbjJWJKO (ORCPT + 27 others); Mon, 23 Oct 2023 05:10:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232440AbjJWJKH (ORCPT ); Mon, 23 Oct 2023 05:10:07 -0400 Received: from out0-197.mail.aliyun.com (out0-197.mail.aliyun.com [140.205.0.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B5E2FC; Mon, 23 Oct 2023 02:10:02 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R621e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047194;MF=houwenlong.hwl@antgroup.com;NM=1;PH=DS;RN=14;SR=0;TI=SMTPD_---.V5qfj3u_1698052197; Received: from localhost(mailfrom:houwenlong.hwl@antgroup.com fp:SMTPD_---.V5qfj3u_1698052197) by smtp.aliyun-inc.com; Mon, 23 Oct 2023 17:09:58 +0800 From: "Hou Wenlong" To: linux-kernel@vger.kernel.org Cc: "Hou Wenlong" , "Juergen Gross" , "Boris Ostrovsky" , "Darren Hart" , "Andy Shevchenko" , "Thomas Gleixner" , "Ingo Molnar" , "Borislav Petkov" , "Dave Hansen" , " =?utf-8?q?maintainer=3AX86_A?= =?utf-8?q?RCHITECTURE_32-BIT_AND_64-BIT?= " , "H. Peter Anvin" , " =?utf-8?q?moderated_list=3AXEN_HYPERVIS?= =?utf-8?q?OR_X86?= " , " =?utf-8?q?open_lis?= =?utf-8?q?t=3AX86_PLATFORM_DRIVERS_-_ARCH?= " Subject: [PATCH 2/2] x86/xen/pvh: Use fixed_percpu_data to set up GS base Date: Mon, 23 Oct 2023 17:09:39 +0800 Message-Id: X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-0.7 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Mon, 23 Oct 2023 02:10:40 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780536839790632655 X-GMAIL-MSGID: 1780536839790632655 startup_64() and startup_xen() both use "fixed_percpu_data" to set up GS base. So for consitency, use it too in PVH entry and remove the temporary variable "canary". Signed-off-by: Hou Wenlong --- 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 cee4dadf5344..591ba165215f 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 @@ -160,8 +160,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)