Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6378495yba; Wed, 1 May 2019 11:03:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqyoJhQjrDlp6Dkw4yTlts7GuoSIif5CR7EigiVhx7bYDKXHASYtfJRdTmxzh9DU5Ufcl3v3 X-Received: by 2002:a17:902:407:: with SMTP id 7mr78633017ple.62.1556733798679; Wed, 01 May 2019 11:03:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556733798; cv=none; d=google.com; s=arc-20160816; b=Jj82U2Q+h3DqkYnVmAJkAs6kDfwstOiNhO5AZTAVU/rYPcjMqtfYujGxpQW0P6q8yW hC0qVHSJNpM3hGhqiCS+PSJARbXPm69FEUZz+tdqFxWekkC/x9ZhCxneSDhkdSt0MgOY ktcJVtO94P1gdEozs77iLmslW1AKjPjmgo4BEis20YGuwXtZk9F8rz+SoEcV/TOxRn/x TbSOoeSQR0Uqlqcr+wdNOymZiRjiyhn9i4Oa1bslD4VpQfw/LJvyq0UL/Cl0wGwON2c8 q+Q9KeWgceL+HrmFeuIIa5QdK8drspg/TzKmX9iZccamkMzUlQTqfDGLBCJBcvtOTf0J 2sNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from; bh=WoCFv5eL9lRUdWjClm3frWvWl3Gwe3Jof7E2AAM8Z2c=; b=OFoAQvEIgrndLWWYleatLAzdrnOe3p0Qz9V6IvTbeMl5Z3t50sGzTVJIdojxp2i7qI lqURw4e590/SE+DQPEnnCu9/g9dEs3PuzbPpiwkqheobuwbBPDG6sXRGT3vV6kQvPFSE anpck4misL+rFyaYrxJo32PWo4cVLcxAYepazTzt+1EuFm5g6SMvScShQYqdjeji7IaO r1BhLV50G+/VHecrsLt8RZRzYywu1uYoU6pwzCGU1PXD5jBW7KsXWUct/XXYXVpgrqIV eRjczCqCPSfAzUS3FBUsMFvZR3xSUEsdxdmfw//bhgxCKSloDxmClRwfy9uwHoFI9Sep G0rQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u13si32701896pgp.146.2019.05.01.11.03.01; Wed, 01 May 2019 11:03:18 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726229AbfEASB1 (ORCPT + 99 others); Wed, 1 May 2019 14:01:27 -0400 Received: from mga04.intel.com ([192.55.52.120]:2382 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726069AbfEASB1 (ORCPT ); Wed, 1 May 2019 14:01:27 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 May 2019 11:01:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,418,1549958400"; d="scan'208";a="153925777" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by FMSMGA003.fm.intel.com with ESMTP; 01 May 2019 11:01:26 -0700 Received: from fmsmsx152.amr.corp.intel.com (10.18.125.5) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 1 May 2019 11:01:25 -0700 Received: from crsmsx103.amr.corp.intel.com (172.18.63.31) by FMSMSX152.amr.corp.intel.com (10.18.125.5) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 1 May 2019 11:01:25 -0700 Received: from crsmsx101.amr.corp.intel.com ([169.254.1.116]) by CRSMSX103.amr.corp.intel.com ([169.254.4.184]) with mapi id 14.03.0415.000; Wed, 1 May 2019 12:01:22 -0600 From: "Bae, Chang Seok" To: Andy Lutomirski CC: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , Andi Kleen , "Shankar, Ravi V" , LKML , "Dave Hansen" Subject: Re: [RESEND PATCH v6 08/12] x86/fsgsbase/64: Use the per-CPU base as GSBASE at the paranoid_entry Thread-Topic: [RESEND PATCH v6 08/12] x86/fsgsbase/64: Use the per-CPU base as GSBASE at the paranoid_entry Thread-Index: AQHU22qy2YcgqOSDVkqDsKh+C1SMYaYcjFAAgBE2kgCAAFfpAIAo3UsAgAA/sgCAAAW8AA== Date: Wed, 1 May 2019 18:01:22 +0000 Message-ID: <0816B012-44E8-40FB-8003-33C4841CD0E1@intel.com> References: <1552680405-5265-1-git-send-email-chang.seok.bae@intel.com> <1552680405-5265-9-git-send-email-chang.seok.bae@intel.com> <5DCF2089-98EC-42D3-96C3-6ECCDA0B18E2@amacapital.net> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.144.153.227] Content-Type: text/plain; charset="utf-8" Content-ID: Content-Transfer-Encoding: base64 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org DQo+IE9uIE1heSAxLCAyMDE5LCBhdCAxMDo0MCwgQW5keSBMdXRvbWlyc2tpIDxsdXRvQGtlcm5l bC5vcmc+IHdyb3RlOg0KPiANCj4gT24gV2VkLCB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