Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp1828302pxb; Fri, 18 Feb 2022 16:54:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJzfElCpve4bY5wdZ2ZCRK3Ff7cJrevxwPN2lKa9wXrcxyslIHvecG1lbezCAHnIfEtnvuh+ X-Received: by 2002:a50:9f4d:0:b0:40b:ea:9da2 with SMTP id b71-20020a509f4d000000b0040b00ea9da2mr10886571edf.102.1645232068070; Fri, 18 Feb 2022 16:54:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645232068; cv=none; d=google.com; s=arc-20160816; b=dce8Okt6OqblcujpkfzEaLig95UOnYifYaoPnDLwWkj7bk5j/+GaRRT2WsleNQfQTg o0svKzv0ZnBh5HmQPqjJjFV/1leBuqneTYXzORz+UOBrSjpTPnDgMYG4x4PyY7VJuK9m gNVyS6gi3p6M1T6GHZs17Zw5HLbLkot02Z5GHmF7YtsN2fVR8lYgT/YUzlMgh5fk2EUs khwZm4XgGeRzkoZOl4cafDWqh2btUtFqCHKbo1yoyHs+SBQsUFGD4+SFssw6O6k3iTKF L6y47FdYS3Bi3YFXHcw3KB8NVJL6i30TYtrF1GKFL+kpJduIeI2p8SBK01dAwOkhVCcB HqDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=7gXNi5HTe8UERuhg/odXJCtnt+1lAhAWiuip8GObiLA=; b=cQ9QJhM0xf6gyXKUycq/j1mThEEc7lSvwmdWnVljrkTduKSrADtLy5PNXi6qne6kv8 DvoVn7rpReltf1fGCVDOZQCGolQnAUT+e/h6wuCwk1V1CnXfcRZQtPsqCc96pcRDDF/I SVisHqvJ8mTYKJT/uMrTHNa8sEqf/nkq1Tp/sbQYmO8/u/WNaQwMD4V7sevxaLQCgIHq ZOxkh/rKbNIthOK/BHsG7+LiLX09EOCETr2/Xcl2RvtD9ehklCW3vgO+mGX/Dxbgb530 wKRUEHV8PJx4I3dNR8xjZhjpy/y+KPvza3WsNisCguJsJXxLOl0GwXeRBxFDrHlngMYW k0Bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=gNpyF+EL; 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=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gh18si369720ejb.155.2022.02.18.16.54.04; Fri, 18 Feb 2022 16:54:28 -0800 (PST) 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; dkim=pass header.i=@alien8.de header.s=dkim header.b=gNpyF+EL; 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=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236763AbiBRQOZ (ORCPT + 99 others); Fri, 18 Feb 2022 11:14:25 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:59892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231910AbiBRQOV (ORCPT ); Fri, 18 Feb 2022 11:14:21 -0500 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8EFD16C4D5 for ; Fri, 18 Feb 2022 08:14:04 -0800 (PST) Received: from zn.tnic (dslb-088-067-221-104.088.067.pools.vodafone-ip.de [88.67.221.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 7F2E21EC01FC; Fri, 18 Feb 2022 17:13:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1645200839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=7gXNi5HTe8UERuhg/odXJCtnt+1lAhAWiuip8GObiLA=; b=gNpyF+ELnVweX+WqHTBHsiOTlGuZnB1D8F/iMq7IY6wBZmyU0DgeE+le/cmrjroX5JwV4h mB0/1enDZpwTG91lkFwKGeVMEuJXKQp/AUPD53uVKuUDnVBRe1YRopY99zvRTt/a0W1CCV Vt2XteGzVQcFVGxFJ+WH63ur0HUzwZU= Date: Fri, 18 Feb 2022 17:14:02 +0100 From: Borislav Petkov To: Jue Wang Cc: Tony Luck , x86@kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev Subject: Re: [PATCH v2] x86/mce: work around an erratum on fast string copy instructions. Message-ID: References: <20220218013209.2436006-1-juew@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 On Fri, Feb 18, 2022 at 08:03:24AM -0800, Jue Wang wrote: > Since MSR_IA32_MISC_ENABLE is not a MCA register, I wonder if we want > to mix its read/write with the injected MCE code. > > I was a bit concerned about potential race with mce-inject and the > read/write to MSR_IA32_MISC_ENABLE. It won't inject anything: offset = msr_to_offset(msr); if (offset < 0) ret = 0; Besides, you need to use those routines due to EX_TYPE_{RD,WR}MSR_IN_MCE -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette