Received: by 10.223.176.46 with SMTP id f43csp2975744wra; Mon, 22 Jan 2018 06:33:21 -0800 (PST) X-Google-Smtp-Source: AH8x227su/YTtKV/Fvl6vmFGxrqvXRZj4gKODeT3x0qioqV7MjenYftPTw1n/So850Oh1fZWZ0n9 X-Received: by 10.101.97.209 with SMTP id j17mr5064874pgv.266.1516631601245; Mon, 22 Jan 2018 06:33:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516631601; cv=none; d=google.com; s=arc-20160816; b=M9ZX/3ah3ZfTos8LDBmpln8HsKoUQlIWRx+gaSYJSSf7pdIcEvXFutr6uwstnh5Q8y H8/ULYX+hiHdGGD8UgkpR+oYQ88XIDVzHwDh1RNkCzFg3g2NIll6MUXzDDFtivODGr8T j5ro5LXjKF80s8pZZNFfkyppwMfxNrCdifHET400WE5ekRnK8BVgNsxJMTx803tsdKhB Iql4V/Dv3/wBN0YrsFUEKhP1VgNTe61vl2a5uV/IrhDBkHyk1LaX8vRrc/ra1zDnsr36 JygfRHxgZZnppbtDA/gVPNnyVO0lCSPjgBXLMX71eaQyA8ElLacAjsDt/rZuEu2kyKxc mJ+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject:dkim-signature:arc-authentication-results; bh=1N9rNBWema7jvDFuhH2w0YAm9nItU8coK/NZJR/FtaQ=; b=guFJg8593k3GZ108e+BQ1N7gex9O48ST8l+vTv4cGrm/z0B2tNLsRGsz5FG1MS56zI 4zu2Gwk2t/tyxbBbE1HpoJFc9sYlKKXy10L/a9miZ/wfALnoogHUXPJorgHhNx3ZCZtM Eu8HUl4m1cZL4jTUyazzVpONCWFU1CLbgRYZyd1tjDCO+StkJhbMkObJ8upT659fGLPg E67WV4WEmBVn/J873CCdrESvYj3FlRK61dfJ8Qnw3KIaqxKgsCY5aW0P0+RknGHQdQ9V JhRUjpFS6jsnUcHuYVkdfAFSzyAIzE/KRgG0XNU7g9464ATiDOh87w3JoMqI6+3YnhjQ CEnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=oUyZw8aA; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o2si12968345pgs.580.2018.01.22.06.33.06; Mon, 22 Jan 2018 06:33:21 -0800 (PST) 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=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=oUyZw8aA; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751309AbeAVOcG (ORCPT + 99 others); Mon, 22 Jan 2018 09:32:06 -0500 Received: from mail-cys01nam02on0055.outbound.protection.outlook.com ([104.47.37.55]:59456 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751085AbeAVOcC (ORCPT ); Mon, 22 Jan 2018 09:32:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=1N9rNBWema7jvDFuhH2w0YAm9nItU8coK/NZJR/FtaQ=; b=oUyZw8aAlkomVsRa4c7J1Mpi99q1X7g8mLocwGJGXWC4urc49VSSOFyvet6i3tuarqj33ic0Zjs9FdSVLhwRNMCx3rZtQKj+ns/hxh2pLYKX3s7RkYl/jiEIoExU4Tmr2IxM0L28vRLtSLjIZWdPVzFVQTO5riAR3yZUeBPy+mQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Thomas.Lendacky@amd.com; Received: from [10.236.65.116] (165.204.78.1) by CY4PR12MB1141.namprd12.prod.outlook.com (10.168.163.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Mon, 22 Jan 2018 14:31:56 +0000 Subject: Re: [PATCH v2 2/8] x86/cpufeatures: Add AMD feature bits for Prediction Command To: Andrew Cooper , David Woodhouse , arjan@linux.intel.com, tglx@linutronix.de, karahmed@amazon.de, x86@kernel.org, linux-kernel@vger.kernel.org, tim.c.chen@linux.intel.com, bp@alien8.de, peterz@infradead.org, pbonzini@redhat.com, ak@linux.intel.com, torvalds@linux-foundation.org, gregkh@linux-foundation.org References: <1516528149-9370-1-git-send-email-dwmw@amazon.co.uk> <1516528149-9370-3-git-send-email-dwmw@amazon.co.uk> From: Tom Lendacky Message-ID: <568a0210-43a1-5580-c0f4-d6d8cc5e982a@amd.com> Date: Mon, 22 Jan 2018 08:31:52 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: MWHPR21CA0066.namprd21.prod.outlook.com (10.172.93.156) To CY4PR12MB1141.namprd12.prod.outlook.com (10.168.163.149) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9ac2c003-7e61-4369-040d-08d561a4e653 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4604075)(48565401081)(2017052603307)(7153060)(7193020);SRVR:C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H8+WtnEkSOiWmAH0bRBDL7HQCgI0jBzhu4pqboPLFOFWprTmkfYZDXehqxBuT/TNYjX38iNYwE7kFpV/pfCT1KORGh7b3BqOLIqnt0rQERLAnMKPrGNhNf60t8sT0McWxuTnf2HY2kqgOcZUOCL43vvNNkjaKwZ8yJJNwCLvAZBk6QZVO32OOJbnZhnhuwuO9J2qD5EHAYbGTsxE/8oTBZ4+BlmRKZ2+PSCC0L23hgm/4dHBSL/SjCLY3LROikFeMsIjyQac/ajzALWNE87NmMsLYNUEjxv7yYpOQn5wBjIwOGn9edAf9zJlcYnwKQlnwEndeMPoDYLQlSgywxDBJwwatWqX++wDOw9oECmVEADW7gkfC/IaYkX7gyXM2m4v3Hsdn/+vLzWdg8wu;4:Jq/av1LALBdMxbkevDptf6NQxpOJXxC/6Jzi+g+zk3juqNunvtXuaDuY9/oj1EqaCeM7j1yItTF4Y9cpX4hfX2pTy+YxZxzBwHCIRuAQntSEKjEaWIt0hS9mROSGP5yqpcUE02LjazoqxNSyQXHntSOpRLlgayHisWjywPbzN+8IT+kobfQIeOiSWprj+BNN1B/+A0zMHn0AeRJkn2HK5sB3W9usrbjIlYO7HX5tnOps17zHwoqlDenPPZA8kjCxK8F1onifssjTBBC+lTnfJ8JtyYWe79/sHoh7Q2IqgPTvlCYdPaXACT8EEZzAFhAn X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(146755900322472); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040501)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231023)(2400081)(944501161)(6055026)(6041288)(20161123564045)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(6072148)(201708071742011);SRVR:CY4PR12MB1141;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:CY4PR12MB1141; X-Forefront-PRVS: 0560A2214D X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6049001)(376002)(346002)(39380400002)(366004)(396003)(39860400002)(199004)(189003)(83506002)(25786009)(90366009)(386003)(53546011)(31686004)(3260700006)(6246003)(316002)(110136005)(58126008)(8666007)(16576012)(72206003)(478600001)(64126003)(53936002)(50466002)(36756003)(16526018)(47776003)(6486002)(229853002)(93886005)(2870700001)(2906002)(65956001)(65806001)(8676002)(6116002)(3846002)(81156014)(81166006)(8936002)(65826007)(68736007)(66066001)(105586002)(23676004)(2486003)(52146003)(106356001)(52116002)(76176011)(7416002)(2950100002)(6666003)(86362001)(31696002)(305945005)(7736002)(5660300001)(97736004)(77096007)(26005)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR12MB1141;H:[10.236.65.116];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTRQUjEyTUIxMTQxOzIzOm5iMjJjeTdoak1Qa2JadzFuRGRIcFI2aVMr?= =?utf-8?B?ZXNsYWRaVGU5ZWwyV1d4M0dOL2dkREoraXM3dmo5RWFDYktWdHZCZlg5U2c0?= =?utf-8?B?dlVHTnJ3RkxMQ201cFBkLzBRdUVGVEZOK3h4eFhtaXVOQVEyYnBUNG5KRmpM?= =?utf-8?B?K3czeHRuNEhoaUM5UlkvbUtyM0xhZ1lqQ1dWUFVHZHJadk56cnQxMGFPNHVw?= =?utf-8?B?dW03dVU2aWJURGhiVFVaUTd5UHc4Zy83Wnhqa2VVUGVPRDl2anJzOVRQb0M2?= =?utf-8?B?M0VQY3ZZNjJ4cmI1SzM5RmV4Wkd4RlFKY1NpWFRFamxwdXo0V3M3WmdVMHcz?= =?utf-8?B?T0xmUURCYW1kb2Z0bkNQWXdxT0d2cGhxOEx4a0ROcGNwdW8xaHNCMVBRc1RM?= =?utf-8?B?L1ZDUnppenR5VHFRSmhoaGNHNTJiTUNJU2VhRkhra0t5YzBaT3QwOF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PJ1NJ7z8EzFGG6UWXW/DWTzXyv8aq9RVHhaQlqiIicZ8CNB39CEnjlNG5OQISFMbQWH/1xrsWX/0Dsbrw0AdrQiVsOx+2EcHmHgvXnbeVjC0ME4WQi/Grr7ld8=;5:tFl6eTdoaLp+mDAH/bnVgyTRiKu30NrCDYHwknExhYbDjjCRtMZBmBonqP+9MSkW+btG6I90we41hEFG+XQygijvh0nFI1XMLGvnDSt4urPka7MSOcGLaHZJyHXoLQgXVPwIFvKkIrOlrXr1gjcIfqfq3s7A3m51/o6MEoEok9o=;24:vJvH9LVsLUygDviV9fvsHP+TcZe5JtnZdC/tgGzR2j0sF8OHCM2HAzBnJbbtqfTpRRh6l1SsX/f1Y7HQaFCk9wfcP7+2P287UrBm6/D2L6s=;7:2yNPtqYeOOY8O89O9IPjkwA6u0TgoSYyMzZ9/lX1LVRmY2uoufDuLG+WaK1ubIZPcG7I3ILPLz39kiHSDj2ZJvmq/iIJS+wNJWEU8SqodeSRC82Gk60PShL86P8faZNj8XkUKZbSGao1VqaS6kS6Z7cEqR9XSNdTwFQOxgE128vvOLoCH7WBif1RoOwfM+kvVJSZBCjRq3eV643MLlvsgaZZ8UhTnt45P4FA7kr0eHwnyozdXbk53z0WcGVrdH05 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CY4PR12MB1141;20:b6qdDYpsRuPDfsKQwBjLOGigzu4PaCfqSV4iuZuanzIMMfxhvG1hg9aWjeAqauZ/h7IMR4OLE4ca1x5BLU+JgLqc3XHdQVXa3AidwislZw/gIDgR5h+MXkzGJ8EJ0SdZUCoB1M/R7YD/R9Xddp6uR+X7KzNVKXE4qZbkZ6cYIGY6qQKC1/ZOFyLySdOsq+zXznqXmr8omBix1QsdCIISxqL0cShz9DYOFFewOVsLA6kLwxSkGl8MEZPraLlQqLKA X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jan 2018 14:31:56.4524 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9ac2c003-7e61-4369-040d-08d561a4e653 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1141 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/21/2018 12:01 PM, Andrew Cooper wrote: > On 21/01/18 17:50, Tom Lendacky wrote: >> On 1/21/2018 3:49 AM, David Woodhouse wrote: >>> AMD doesn't implement the Speculation Control MSR that Intel does, but >>> the Prediction Control MSR does exist and is advertised by a separate >>> CPUID bit. Add support for that. >>> >>> Signed-off-by: David Woodhouse >>> --- >>> arch/x86/include/asm/cpufeatures.h | 1 + >>> arch/x86/kernel/cpu/scattered.c | 1 + >>> 2 files changed, 2 insertions(+) >>> >>> diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h >>> index 2efb8d4..8c9e5c0 100644 >>> --- a/arch/x86/include/asm/cpufeatures.h >>> +++ b/arch/x86/include/asm/cpufeatures.h >>> @@ -207,6 +207,7 @@ >>> #define X86_FEATURE_RETPOLINE_AMD ( 7*32+13) /* AMD Retpoline mitigation for Spectre variant 2 */ >>> #define X86_FEATURE_INTEL_PPIN ( 7*32+14) /* Intel Processor Inventory Number */ >>> >>> +#define X86_FEATURE_AMD_PRED_CMD ( 7*32+17) /* Prediction Command MSR (AMD) */ >>> #define X86_FEATURE_MBA ( 7*32+18) /* Memory Bandwidth Allocation */ >>> #define X86_FEATURE_RSB_CTXSW ( 7*32+19) /* Fill RSB on context switches */ >>> >>> diff --git a/arch/x86/kernel/cpu/scattered.c b/arch/x86/kernel/cpu/scattered.c >>> index df11f5d..4eb90b2 100644 >>> --- a/arch/x86/kernel/cpu/scattered.c >>> +++ b/arch/x86/kernel/cpu/scattered.c >>> @@ -28,6 +28,7 @@ static const struct cpuid_bit cpuid_bits[] = { >>> { X86_FEATURE_HW_PSTATE, CPUID_EDX, 7, 0x80000007, 0 }, >>> { X86_FEATURE_CPB, CPUID_EDX, 9, 0x80000007, 0 }, >>> { X86_FEATURE_PROC_FEEDBACK, CPUID_EDX, 11, 0x80000007, 0 }, >>> + { X86_FEATURE_AMD_PRED_CMD, CPUID_EBX, 12, 0x80000008, 0 }, >> I replied to the previous version, but I'll add it here, too. >> >> This should be moved to the existing 0x80000008/EBX entry rather than have >> it in scattered. >> >> Also, there will be a total of three bits: >> IBPB: 0x80000008 EBX[12] >> IBRS: 0x80000008 EBX[14] >> STIBP: 0x80000008 EBX[15] >> >> Since IBRS and STIBP share the same MSR, if a processor only supports >> STIBP (MSR bit 1), for ease of software implementation the processor >> does not GP fault attempts to write bit 0. In a similar manner, if a >> processor only suppors IBRS (MSR bit 0), the processor does not GP >> fault attempts to write bit 1. > > Are you able to comment on the read behaviour after a write which is > ignored? > > If the behaviour is "read as written" then virt cases are fine.  If the > "ignore" causes a zero to be read back, then we're still going to need > to intercept and emulate all VM accesses. The behavior is "read as written", so the bit will be updated even though the support for the bit is not present. Thanks, Tom > > Thanks, > > ~Andrew >