Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp560425pxb; Fri, 22 Apr 2022 06:54:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDfjWt68OFM05NOfZPi3qwMawUpk0p28O5t9PPagvE6E2x7lRWdNawSXpSC1MMNu6DM9Kl X-Received: by 2002:a05:6a00:248a:b0:50a:b853:4e5a with SMTP id c10-20020a056a00248a00b0050ab8534e5amr5138118pfv.21.1650635680329; Fri, 22 Apr 2022 06:54:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650635680; cv=none; d=google.com; s=arc-20160816; b=iT5uI1A+/f/Xb5eDDQXtXYHPeaISqHUAl0d6uYQ6Mxu1kz63gATLoLstEdh/7KdCy8 n08+vuFJ3BL2RqV2s1ZCGLDNuTgCV9WLt6BXkz+Tn8EOqTzNr+/rmWGcc86lVJKcNdaT NXqbVvln/RutdCJyE0j3oWf0LKFB5mDF7eLCyG4MEqpeytHQ6Aakj92cLnDhOnduxIqM yGhhdzDdPTBguWiPQyPJhjJIwM6ruclGZV+KIj0cueg/mWiwnGi6upcSPE4ANg+wr0zE CxxMVh4/U8EiYHNAYdKm52M9dpSUzZLBPt3yd4MyNFC3FbqT/TOiuRDD61H5FW9U3HOi eJAQ== 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=/tYmDPvB7cOff+NTWHwXAfy91qng1z+BQ/j1QNPFkgw=; b=Jmr/3WJcOCRTz+2U2fCrgWrQD6MpaQh3ZV3p0Iv2KzNW8yH7uYuTVd3vc4eXyVRL2n IplNMlOQ5k9ZJZiKC1YwuHHb9tWilWDEgMTtvhHBmEyeeJsHZe2IJguxv63tFQm3FefS OdskSAaVaOlfxL3pcC553klv6YcCEkKQy9IJUcPOJsyNID6GGCIdYbTkqpTuw9ziAH/C isRbTDZ4KoihbtYV6I11vZE8r1GCDa+ZF+anEWy27+M0vQytzAavZjp/vTPRg3yOHmA6 4DKNmSn3FFbVmTHTLlUDTKqVvwsL+9bgkjeRaPwKwiGCNNpNGzgi0Py+kTKQtA693uQG PGAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=NCSID5qn; 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 n20-20020a63f814000000b003aaac06ee1esi3605185pgh.605.2022.04.22.06.54.24; Fri, 22 Apr 2022 06:54:40 -0700 (PDT) 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=NCSID5qn; 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 S1377139AbiDTJUo (ORCPT + 99 others); Wed, 20 Apr 2022 05:20:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239291AbiDTJUm (ORCPT ); Wed, 20 Apr 2022 05:20:42 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54A643D1FF; Wed, 20 Apr 2022 02:17:56 -0700 (PDT) Received: from zn.tnic (p200300ea971b5839329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:971b:5839:329c:23ff:fea6:a903]) (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 7CD321EC032C; Wed, 20 Apr 2022 11:17:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1650446270; 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=/tYmDPvB7cOff+NTWHwXAfy91qng1z+BQ/j1QNPFkgw=; b=NCSID5qnDZhGpu1KHyDDZIzFvUoMviIomwOZ//5jO+DxYlSNcGMg+kVdXqBNZs+LMKndze RBqaQLORPqvmQZPDEkCwHc3mdljkuua4BkI5vjhRpYHtJJJmAzBMOUytd4cDoA1KMPYzZR HIMtFKPhOVpWmIbZIRaUYhrqnW7sx54= Date: Wed, 20 Apr 2022 11:17:46 +0200 From: Borislav Petkov To: Smita Koralahalli Cc: x86@kernel.org, linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org, Tony Luck , "H . Peter Anvin" , Yazen Ghannam Subject: Re: [PATCH v4 1/2] x86/mce: Check for writes ignored in MCA_STATUS register Message-ID: References: <20220214233640.70510-1-Smita.KoralahalliChannabasappa@amd.com> <20220214233640.70510-2-Smita.KoralahalliChannabasappa@amd.com> <6cda2827-af75-589d-3e43-a287d6683e7a@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <6cda2827-af75-589d-3e43-a287d6683e7a@amd.com> 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 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 Mon, Apr 18, 2022 at 08:24:35PM -0700, Smita Koralahalli wrote: > Why are we checking this here? This flag (hw_injection_possible) > is set to false inside prepare_msrs() called from > smp_call_function_single(). > Should this check be done after the call to smp_call_function_single()? Why would you do that then? Is any of the code after if (inj_type == SW_INJ) { mce_log(m); return 0; } worth running if hardware injection is not possible? > Also, we already have inj_desc.err which returns error code to userspace > when WRIG in status registers. Why is this flag needed? To not do unnecessary work when you *know* hardware injection won't work. :-) Btw, please trim your mails when you reply, just like I did. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette