Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp5423540imm; Tue, 12 Jun 2018 07:39:44 -0700 (PDT) X-Google-Smtp-Source: ADUXVKITl98IS0vJncyauNuMevb78AcNa9Vm0TQmMjrTBzvY2q0Nrp2+qMjb1y5KfLoAXAPiDSG3 X-Received: by 2002:a65:4b04:: with SMTP id r4-v6mr587962pgq.26.1528814384547; Tue, 12 Jun 2018 07:39:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528814384; cv=none; d=google.com; s=arc-20160816; b=aNPFhDXfNKWPlAKvtLrNe6JNhcKs54tMJGX883kH0oYx4obQKNX7x5YiS3nMytfyBq b2ttN3k+KstMHxr7TpWDk9EC7m2lJCLihTT+BiBO9uargo+Qv00KNGQwf5GTu+PVon0F bMgjmFtH+8EJgx8PxpSBDNkpIkg21UN+BtQ20ML4pi6RGeuSgy2+QQ6E9n8ld+Ok85eK V0jyYzMksqRVmavc+2ZDMtGHf4tjflj/AuDMQxciWaEzlrJElGE7CN91vsnruUWWRTBL uxMgxq3bvd1rEEceD70xljXUBMpq2F0mpS39BI+LBp4Zwt3DDv5XZ0fGjDXrzpxprdht DMYQ== 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:autocrypt :openpgp:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=asPC7Ug+PW4taDCn8mVYzWwzKA0g1/F9KnyyhcwXNig=; b=tyFtbI4Z2GXh9+5E6EHQm6G1NWigeNTMhE3n9CIOgUFm1jpBZgTKWmrPAAdUdH1lvN KXV+DknTdSw4XBVS+8eCrD/OL+7V4MKyXkPOM8od+GGqbEs1IKW64x2zch7H9XLqqoVm oogh2tttzisVViz/osuiK6iF1gGLgmAd/yq4VZmJZL69Da0OXdmDFYRTfbzzkRILuKEf h9G5kIwpjao2QHU18rP4bYBv2QPleTxnX7omHTO/HXubV725D839oI2gQfABqxjXxRLF h4Typ4zNp/VXM6XqXUKqZfPGAVk3uzvTbMdyorFAQWqMpg8wVkwNGwjj/vK2hyxFdzhW zImQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=ez7yWQi0; 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 g15-v6si224607pgf.249.2018.06.12.07.39.29; Tue, 12 Jun 2018 07:39:44 -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=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=ez7yWQi0; 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 S934173AbeFLOic (ORCPT + 99 others); Tue, 12 Jun 2018 10:38:32 -0400 Received: from mail-eopbgr720089.outbound.protection.outlook.com ([40.107.72.89]:19376 "EHLO NAM05-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932905AbeFLOi2 (ORCPT ); Tue, 12 Jun 2018 10:38:28 -0400 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:X-MS-Exchange-SenderADCheck; bh=asPC7Ug+PW4taDCn8mVYzWwzKA0g1/F9KnyyhcwXNig=; b=ez7yWQi0TTzpYeNFzgfS5kOyG93spmVi5PLSEiuR4BDPkSxCqI4uV8Py3keKUcCqYjjWwXDLLwZo4r5jRuOQRyXyxupAoRj4c11CS4l+JnoI75cQS3TxN2pIjY7iHRtTP0ORt0K0jXoUiIhBU7nd3SzTmAzHeOZCUZ2gsIVVyiE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Thomas.Lendacky@amd.com; Received: from [10.236.64.67] (165.204.78.1) by DM2PR12MB0169.namprd12.prod.outlook.com (2a01:111:e400:50ce::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.841.18; Tue, 12 Jun 2018 14:38:23 +0000 Subject: Re: [PATCH v1 3/3] x86/bugs: Switch the selection of mitigation from CPU vendor to CPU features To: Konrad Rzeszutek Wilk Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, x86@kernel.org, tglx@linutronix.de, andrew.cooper3@citrix.com, Ingo Molnar , "H. Peter Anvin" , Borislav Petkov , David Woodhouse , Kees Cook , KarimAllah Ahmed References: <20180601145921.9500-1-konrad.wilk@oracle.com> <20180601145921.9500-4-konrad.wilk@oracle.com> <2a3e0323-7086-f764-1a3b-7ce4891e8784@amd.com> <20180611140116.GA26199@char.us.oracle.com> From: Tom Lendacky Openpgp: preference=signencrypt Autocrypt: addr=thomas.lendacky@amd.com; prefer-encrypt=mutual; keydata= xsFNBFaNZYkBEADxg5OW/ajpUG7zgnUQPsMqWPjeAxtu4YH3lCUjWWcbUgc2qDGAijsLTFv1 kEbaJdblwYs28z3chM7QkfCGMSM29JWR1fSwPH18WyAA84YtxfPD8bfb1Exwo0CRw1RLRScn 6aJhsZJFLKyVeaPO1eequEsFQurRhLyAfgaH9iazmOVZZmxsGiNRJkQv4YnM2rZYi+4vWnxN 1ebHf4S1puN0xzQsULhG3rUyV2uIsqBFtlxZ8/r9MwOJ2mvyTXHzHdJBViOalZAUo7VFt3Fb aNkR5OR65eTL0ViQiRgFfPDBgkFCSlaxZvc7qSOcrhol160b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Vv9bEIixe5ykSmG8UHJ6FJ6cI2myru6uwzbOu n8DkNLspmZppoTpwzPCY/6iljBLUBzDDRD8rzEavva2IhzINkrAvNSW6VpBMSpUBgsEIKxrp AFS1ax5uXmwYGyFzOWy034Zz5fWi260qiFplzKCij8t7sCgzOXwEbIt76L1basrRMY7urJm8 4VM6MeG2mfa92FfrMeL0pnD5ONg1FIuleGlvvKdQdFnE4AlwGcKid5GUD+vNNj/pbZyUpe4r zBFsc21/8jXSlR6zJS4mgkNDIIBGiPny3tvKINMZ8VK00mR6INpd+NErd2LxwZ/DQ5ejVyVL 080CbiD55mxxhqkbd5fHSfdhvvXIIYN+nM/RFLwaQGW9g62iFWlqeNRXezkERDV5ahFqZMP4 YDdodn0nRVZYu2kaXfOclKPcH58HlrRb8pKTE3t/TNKGY3SmKoznH0QtM27TWeZ9R9RgTYiV zSNqP+QUNp6BotWI Message-ID: <5090fe69-61fd-99cb-f9d0-908cd6250d25@amd.com> Date: Tue, 12 Jun 2018 09:38:20 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180611140116.GA26199@char.us.oracle.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: SN4PR0501CA0069.namprd05.prod.outlook.com (2603:10b6:803:41::46) To DM2PR12MB0169.namprd12.prod.outlook.com (2a01:111:e400:50ce::20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:DM2PR12MB0169; X-Microsoft-Exchange-Diagnostics: 1;DM2PR12MB0169;3:Y8Efyrt1+wLH5RozEgMov0uZUd8iRINWUipAgalQr5O8wbBh/+7kn7xcMBpBVN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ajDmQUAW+ULOQrMBipE8QrlMoaF8ENBSQpmAw/ORDAIjA5XbfxcY7+26wEli8LrJ71AAxYrP2Og2RleTW3sierTIr+7etoJaQAc4qK9nlqZrL/tVIhbwTbd+6zKVbHbJwLOMT6Eox4FQG2B4YNowCtPuNkdXNpuZ0YeDXNjjunf7PdS7M5uquEoTYSPIQ/6zu8St+rOxbQmGhxvHI7Hex47oAax+1M6REH8Dkg7DLbLeY3zTw3o37lYAIBGaM1fs+H/2fTt/1bVr1hiC+HZVRYGFwZZcH/Kgx3HRxVKUXL;4:JMgvzSvNSd6K2U2tqPrLYq2d1iMdb6zOjRWtKjR8TovnWEaE+N9X4rCtO95I6feYaj76wK/Mw+mDzeIa0ls+4ahEEmQ/2lZdh40QnU2QA0dzmjYg6Vy0OIvEG5I1F7A3owg8sHNgiGBddaq85qyvuREPYaQfYX1+sATgSAwOqY6j2FY9iGMIq/Ho6OZ3dLIyiM2ynDiagBqGhtJ2W8JcXeR+we/4kQPpf+Fm9w6T5OzBSTVr0x2NTwiJhbRV5h/wJjFiP3YCfUWJEfULviqkbbCaYRV7k4xSqEYEytJqJG6Nnw/5dBH9DgaClkHuTsPeZMK5DKGa6bMRB3FhESeNdsQxlWeE69TUmgZ/r/aKdcQ= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(146755900322472)(146099531331640); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231254)(944501410)(52105095)(10201501046)(93006095)(93001095)(3002001)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016);SRVR:DM2PR12MB0169;BCL:0;PCL:0;RULEID:;SRVR:DM2PR12MB0169; X-Forefront-PRVS: 07013D7479 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6049001)(396003)(346002)(366004)(376002)(39380400002)(39860400002)(199004)(189003)(8666007)(50466002)(64126003)(8936002)(6246003)(68736007)(36756003)(2616005)(106356001)(7416002)(5660300001)(956004)(65806001)(97736004)(47776003)(72206003)(65956001)(486006)(7736002)(2906002)(93886005)(446003)(65826007)(478600001)(305945005)(476003)(2486003)(23676004)(6486002)(81166006)(229853002)(16576012)(186003)(25786009)(16526019)(3846002)(4326008)(6116002)(3260700006)(52146003)(31686004)(31696002)(53936002)(105586002)(386003)(11346002)(76176011)(66066001)(316002)(77096007)(26005)(86362001)(575784001)(53546011)(52116002)(54906003)(6916009)(81156014)(58126008)(230700001)(8676002);DIR:OUT;SFP:1101;SCL:1;SRVR:DM2PR12MB0169;H:[10.236.64.67];FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:3; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTJQUjEyTUIwMTY5OzIzOmFyUlNiS1JEbllST3h3VEphWmxkTFBNYlJ4?= =?utf-8?B?d3ZqZzQ3dmVUdXBzUkxrWCtsS0pvRVo5bUVxM0xxb3NzbXR2cW5hbCswMjk5?= =?utf-8?B?YkViZmM1MHdzSXBFRUwrZVp2MmQ1ZHdGN3VVY2s5TE9UbkhTQzRrSjZERFZU?= =?utf-8?B?L3JacUZzNEJBaEZPYlUvS0ZWcmp0bmFGdXBvaUNkZ3RCWDNCZG01Y2ZBK2xt?= =?utf-8?B?Mkp5ZGVONjdkQ0c2L2RKbis5UkJZclNNdjBHUzVvSHExZUYxTW1rVFM1KzlT?= =?utf-8?B?ZEk3K01UbzVTaCtMVmlxeGoyTVZvSlFMRWdhMU5IVVdUSzRZaVNLUVF3Q2lG?= =?utf-8?B?MC9WQXJtOWJSSDZKSXY5VUg5VUptNzBaN0dFdXIzSHArNGZCK2lJblVzQ0ZY?= =?utf-8?B?Y2lTUWJiR0w1YXYzVU9hVnEvSlE3UnBKNlRK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vh5mrw2IEPbLoySFgbQzzQrRlh9m3XTUJmyUtdS3vD3VT1cUYbMldPHCPfnfPqLgblM4AsFB5x94m2FCQ X-Microsoft-Exchange-Diagnostics: 1;DM2PR12MB0169;6:W6/zS3sKhsrj60qkXp1Y1zBbuqvCzE+KG/c+I9IWP7RhPZpGBRkuoujN1/wumhvMJiayYNBv/L35d8Af3Cr6Zf9t48OF5r8nZT5xMHskEueStiMtmRAbIbPlyV9t7cC641Cfl0NT+WRHiBIvWHtX9fZY5mhKLk45yxr3Kv0GTBEO2Ff2Ei0kysJlStflhDqMODVCy4/8ycLU/2vHyLOxgowiHxqQfxHk/BuY44fq1Yss/Ul9NBSCMs58b2C3qgaU3o4Xvm1t+K/hrOD1g1uJGf/ITRJbGX++eZicqsI74PBKRXRaJ8k2t2wgayrLv+zng5rWV3ihP22G6lRBK6VjyR7btRFkZUPFFwLSUjdOPQ1DEqdqZrQDL7leegscQ5pyY5n2szo9GKo3MGOGywcmifRaGJoTud0T2V1fa3iPZQGSlE/Ci8X9Ffuj8gAaMQm0DPwMUT4imJ0BRJr2kxi+ug==;5:XWAjfyRMrpJJmQAhvkayCnL8N6HHPWYuBeVvsOF9Z+nSu0FmRKNhoxdwNuqPiFUXvEC2enkn37J8yKz1Cttdm3XByG/hrvAnNGfdPNpO1Kf3QByprCquQCTvAPvfoVHzs/9itX0th6bsPyLqjkY0j4Fpbg809/05EnItn04SUug=;24:FdyH/6lyTzGcJlwYaPAjBu8eTJeYx2VQrl/36Ug9XC7hHrfboo3empqQmuP+kKQnQRksByEFnCWImXWgluRw706N2Y3o28jBJ+0//y3odyk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DM2PR12MB0169;7:tBTU5ubk8hAIvBxOkZneaRYQrbAPV7Ut4jxJbH8lCtr6spiD3GI9Lx65iTiGZWARyng45LC+nBYSpbHN4ldpKhDTrdXZO8rUjXvWWnZS75IEKMx0sDkluWH5nvO/XzQ9X5kEk3sbtp7wOmuKQuhtTMu7Kq+zV27a7h/RIIiZYuiEH9KjZvAs0YgRVAiPzMujB8H4QCfVd8oRTVUQY9FC8syi+lcH/IgWe8hM882FcBw1Q8A6aK9BboZneGAhdkzi;20:Kpm+Ou1Vsyng7qttLhyBTYPaXWIJjhSIgap4qBFbqap07PInFFO8Jc5cTY2kRvB85zRZQPNFSJIX90Za5s+0iCABh1B0/eQi6vbRMZUO+PZt9SSAEqTyhHdM7mguBpGJ18IArMRdjy4e/Io+zLdl8iLJW+jvVvW1W6nPKPjtKx8ZxKy3xqSedAhlFN0MGs9upxowSdoqLTd3nMV7uvRTAD1dmfOWe2Rdtg8HsRD0ok+FcYvpg9sExvoIrj5nZARn X-MS-Office365-Filtering-Correlation-Id: d145fb70-590b-497f-c459-08d5d0722798 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jun 2018 14:38:23.9424 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d145fb70-590b-497f-c459-08d5d0722798 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR12MB0169 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/11/2018 9:01 AM, Konrad Rzeszutek Wilk wrote: > On Fri, Jun 08, 2018 at 04:30:15PM -0500, Tom Lendacky wrote: >> On 6/1/2018 9:59 AM, Konrad Rzeszutek Wilk wrote: >>> Both AMD and Intel can have SPEC CTRL MSR for SSBD. >>> >>> However AMD also has two more other ways of doing it - which >>> are !SPEC_CTRL MSR ways. >>> >>> Signed-off-by: Konrad Rzeszutek Wilk >>> >>> --- >>> Cc: Thomas Gleixner >>> Cc: Ingo Molnar >>> Cc: "H. Peter Anvin" >>> Cc: Konrad Rzeszutek Wilk >>> Cc: Borislav Petkov >>> Cc: David Woodhouse >>> Cc: Kees Cook >>> Cc: KarimAllah Ahmed >>> --- >>> arch/x86/kernel/cpu/bugs.c | 11 +++-------- >>> 1 file changed, 3 insertions(+), 8 deletions(-) >>> >>> diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c >>> index 6bea81855cdd..cd0fda1fff6d 100644 >>> --- a/arch/x86/kernel/cpu/bugs.c >>> +++ b/arch/x86/kernel/cpu/bugs.c >>> @@ -532,17 +532,12 @@ static enum ssb_mitigation __init __ssb_select_mitigation(void) >>> * Intel uses the SPEC CTRL MSR Bit(2) for this, while AMD may >>> * use a completely different MSR and bit dependent on family. >>> */ >>> - switch (boot_cpu_data.x86_vendor) { >>> - case X86_VENDOR_INTEL: >>> - case X86_VENDOR_AMD: >>> - if (!static_cpu_has(X86_FEATURE_MSR_SPEC_CTRL)) { >>> - x86_amd_ssb_disable(); >>> - break; >>> - } >>> + if (!static_cpu_has(X86_FEATURE_MSR_SPEC_CTRL)) >>> + x86_amd_ssb_disable(); >>> + else { >> >> As I think about this more, I don't think we can do this for AMD. The >> X86_FEATURE_SSBD could be true because of the LS_CFG support and not the >> AMD_SSBD CPUID bit. But if the IBRS CPUID bit was set, we would now try >> to use the SPEC_CTRL register for SSBD, which is not valid. > > I was reading the AMD docs and while the SPEC CTRL provides IBRS my understanding > (from reading between the lines) is that AMD would actually never implement this. > > That is it would have the 'Enhanced IBRS' bit exposed if at all, but nothing else. > > Granted this is tea-reading at its best so, .. >> >> I think you will have to keep the case statements and explicitly check for >> X86_FEATURE_AMD_SSBD before using SPEC_CTRL. > > .. we could or alternatively add an extra check for X86_FEATURE_AMD_SSBD ? Whichever you feel is best, so long as we only use SPEC_CTRL for SSBD on AMD when X86_FEATURE_AMD_SSBD is present. Thanks, Tom > > > I think Thomas already sent this out but it should be no problems to > add a fix as there is no hardware with this so it isn't like we are > breaking anything :-) >