Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp7484982rwi; Mon, 24 Oct 2022 15:35:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6eUrGIzni0oAsqG9HQwHid9gCCFroIk6fN8uOAZKBowi5bZ7jOsA33iQeIMPA/NYtrB+hh X-Received: by 2002:a17:906:cc0f:b0:7a1:6786:f55 with SMTP id ml15-20020a170906cc0f00b007a167860f55mr11479580ejb.359.1666650937291; Mon, 24 Oct 2022 15:35:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666650937; cv=none; d=google.com; s=arc-20160816; b=zdhrD+oVq7t4s42C9zIodbTTLTmOQ+3nFbmN1gIz+kuefCggih5hsvEcbC2EISh9ST iL6EmlALMeOO7lMb4VcJ80JyEEsRNUJsqzlP9MJVD+dFw8nGj6YBN/VjXd2b+m/m57yy pFheKw0+sKSFSgV3v5kyJnXjIOAOnXc9+C0zYV4gwngmPwhlgK7rMD1fYTFh+Xj+mNep Q2A9dm8wiQ3jqK4G6E8tf/tOJpydF5eUXyTb5m2/GWrxwwMkdg20opiA8EnPfDkNS0ij Mh9JGZvIMbvwYb3kBo1mVkS1YzaauwOndXzBfIk/c+mRlA+uUpWV0e9tBRU2E6/hsGVC A5aw== 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=eEJBB2pOfMf6Hy19YXgdsDPwAyP0Qr2tsBoSRTkUpSo=; b=Syd8jFgUVll/m2KmDm5UkdCjzdbT70W3n86wXXc/7PZUwXffcEfOyyEImIm+efSK/1 vBLZ8sqKHiqT3r5eqbDIeFSAdDLldnynLx6InmgaGlTATGnopuZIs/4lon2crAIaqZRG uufJiVJM6w4uXqznIpBwRZ0yEqdO9YmsbQrlHVx23VreHy66JIEJ9JN4zcRFZFo7eWlu /DN7GVNao5hsmt17nIV0JECDn3+NsUE2C9dCGZC4JLsVHz+KuIScevDhp7X3QdJxMPxo /Hy/RrFFAqXgriCIBBBi5mNKmr1e3irZZosMxK/gYNefUFNLhYSgRBJ++oT9BwihTrgb EUuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=aZz5Dmwq; 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 m7-20020a056402430700b004574154f09asi1051274edc.529.2022.10.24.15.35.12; Mon, 24 Oct 2022 15:35:37 -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=aZz5Dmwq; 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 S229835AbiJXW0J (ORCPT + 99 others); Mon, 24 Oct 2022 18:26:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231237AbiJXWZv (ORCPT ); Mon, 24 Oct 2022 18:25:51 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A35F131B82E; Mon, 24 Oct 2022 13:47:35 -0700 (PDT) Received: from zn.tnic (p200300ea9733e790329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9733:e790: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 52FF51EC06A9; Mon, 24 Oct 2022 22:30:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1666643435; 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=eEJBB2pOfMf6Hy19YXgdsDPwAyP0Qr2tsBoSRTkUpSo=; b=aZz5DmwqGGtpnxWDR3/HMWl0RE7XJ5Fv2OSZisZz+t73or0y7/xWNetABFf/COAFgtne3S fPmGb/FV/nVBO10IUN4oEF9PI4K4Gsf/QBSuX7w4Mfecqgm1vWdxRcdb5wH4KICxEkjcRH OweYocTHPhPMYE4+qAKe/cTS/HO8Mak= Date: Mon, 24 Oct 2022 22:30:30 +0200 From: Borislav Petkov To: Tony Luck Cc: Yazen Ghannam , linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, Smita.KoralahalliChannabasappa@amd.com Subject: Re: [PATCH 1/3] x86/MCE, EDAC/mce_amd: Add support for new MCA_SYND{1,2} registers Message-ID: References: <20220418174440.334336-1-yazen.ghannam@amd.com> <20220418174440.334336-2-yazen.ghannam@amd.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 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, Oct 24, 2022 at 09:38:44AM -0700, Tony Luck wrote: > There are still a fair number of users of mcelog, so I think it needs > to remain in its half-undead state a while longer. That's not the question - the question is how should vendor-specific info should be logged so that the struct mce record doesn't get blown up or ends up containing unused fields on the other vendor. I.e., how to keep it as small as possible and to share the space there in the most compact way. That vendor-specific "space" in there could be used by each vendor differently. As in this case, Intel doesn't have MCA_SYND{1,2} u64 values. So they could be part of a vendor_info which gets interpreted based on vendor. When Intel wants to carry more info through struct mce to userspace, it can reuse those 2 u64s which are vendor_info but interpret them differently. Which then begs the question, how should those get logged etc. I guess a u8 vendor_info[VENDOR_INFO_SIZE] or so which we can extend later if needed. Perhaps prepend it with its length too: error_record { struct mce; unsigned int vendor_info_len; u8 vendor_info[vendor_info_len]; }; For example. Not saying this is how it should be done - this is just what is swirling around in my head right now. Hmm. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette