Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp3335245rdb; Tue, 6 Feb 2024 14:41:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IEbfh/Q6CpA6HGHyWR9shrS0K2UDBcwP37RAjHomCndSuVj3SmjShDeLJSlUMN+KP1yWsrp X-Received: by 2002:aa7:c41a:0:b0:560:4e74:9cf8 with SMTP id j26-20020aa7c41a000000b005604e749cf8mr2731536edq.34.1707259292090; Tue, 06 Feb 2024 14:41:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707259292; cv=pass; d=google.com; s=arc-20160816; b=ClNxF1th3E8Qhmbu10NHIYT1P4nBEeZG8ijLKNgJQjbt6ex3X7ISMsHrhfXdu74CNg wvUsmixEcfWhy51yPwpH44ugzTC9h0qDvpUHjMHvtqeUP2EeD3PSlJGnXJyEoACcLZpI 76FTq4V1A5vvCKYB8wZ8tLebgfOeTJjc1slz7AOOoep1CVUANnfL+MIypEKBcXN78Qe8 6ppeXHt/gjFstGrdXUdtiqTKu1dL3VyQ3OVlV7dP4IHB3VLhts7pAuV5iGbYxRvJWDxE 8LkrUfDmJjDuQoVPL4/duo9w0fkw3HLafKRs/EIujM//g0Rp5/Ab/755K3X1v3iJrFNF cY7w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=RDh+1Fw4UoajQnH6vguuuOQtg9tlLRPAF8WQNa+c7KE=; fh=YAJBy1pJ7BcYPi5jTIByx3o1DZVF3TPX5y0SdeMGCTw=; b=gPz1r7lwl+a5bQnNA43+971VV58em61CUbkUt/92hPqmvXYrOm0BWQOBtv271hObpa bW9E7ieWoS1whARFhFKxS+RqKiIUdxvvE5gsfP2iCNj4yUpU5AcV7g8OL5lVQ9hL+Twy Tigk3Q4HGWiRqRq08j2liBbXEboTg+gOCHOcb5Sgo6gk8VBT/Zv+em9TbRi0Hw6WGtyp fyOQ3hgEV4x+hH25M6Y6WlATmbuRIbnMKj12/ShZx5mle7D6D4vUP5tDhPIdmy/gyEbW Pqk1SoZuxRNtlHX+hGm45HfCI0JXss+5D1F3H0/eLpouc2TWT58QBMnGhem4lJbiJDwF 5Pdw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Qmzpn5pk; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-55329-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55329-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=2; AJvYcCV6cll2nVz5dfqvcYe2USBvU73of+fNZDKTzQBdK4AYTDWlYPWdOU8o393/gcnYB1P+kNgIRu/EcxXExL5CZA17CpYIW9jcOGZy1QE3oA== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a94-20020a509ee7000000b00560c3328bd6si7872edf.419.2024.02.06.14.41.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 14:41:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-55329-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Qmzpn5pk; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-55329-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55329-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 385FE1F240AC for ; Tue, 6 Feb 2024 16:42:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D3D384C6B; Tue, 6 Feb 2024 16:41:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Qmzpn5pk" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 52BCC6FA9; Tue, 6 Feb 2024 16:41:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.8 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707237719; cv=none; b=PLUn9qKw7xzewCmJWp9Jl8viebUXZqKo40i+YQocB0i2Whqxl9K2mQlGL1tkLt1YWBtYUgX5I6MGOmZOpaHqAvRmCIX+kxO5Y6lLhAQgg+8ZMhVx12IJn5ZshTnZGHDGtQ18kuW2WawO9aL0lYPL/L6d/S9iE/qh7WI6jSwOAq8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707237719; c=relaxed/simple; bh=rRNlDDubtypf416CZLetd6q9gBTbLbGyegrQgkQerDE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=XqcfC/MibPEAkftQqmPEj2mEcoRbpW1UIse+8OMTOqOMrsDOMTqKl759jcgr3+XrKP1CUi+FR6/difDhhcABWcpe9j8EDc04g9xg7VIJUU598ANeaiZ1VFFbyd+WRP1oTy6SbNcqo65TQ2Bf0DyT10umLDPoIRlcppnPJVPvXWs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Qmzpn5pk; arc=none smtp.client-ip=192.198.163.8 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707237718; x=1738773718; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=rRNlDDubtypf416CZLetd6q9gBTbLbGyegrQgkQerDE=; b=Qmzpn5pkmHrBxj1x8SRX+1gMJwP7cK3Erf6mFFDnKbXIKSjMluSoLojA LUejvNaaFirzqB2BHHT8On/4PZLe/EonVCd1gtqm/b/n5iwT0As137igm M7V/gaubYEg6AjM4mi+jOHMaWUohFuN1wbZfel+NdXCvw22P5l6q+AGAa OKWS0tG80PDE+/RWdOO4/bWAHIFuplNaK/luwLZGYjfwAtLwb+yf5h4UG y7Sx2B+QWVc7RbxkeH0TmYeDR8IZ35gOtfaSTsw6vBAtc+N6UT4Mi20HV VLG6pH+XkTJfLQcKFf5str5sTTnzeyJdcqsy+JzYPU84SYCiQhWszW9oT Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10976"; a="18304899" X-IronPort-AV: E=Sophos;i="6.05,247,1701158400"; d="scan'208";a="18304899" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Feb 2024 08:41:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,247,1701158400"; d="scan'208";a="1357592" Received: from jingjing-mobl1.ccr.corp.intel.com (HELO localhost) ([10.254.215.110]) by fmviesa006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Feb 2024 08:41:49 -0800 Date: Wed, 7 Feb 2024 00:41:41 +0800 From: "Wang, Qingshun" To: Bjorn Helgaas Cc: linux-pci@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-acpi@vger.kernel.org, chao.p.peng@linux.intel.com, erwin.tsaur@intel.com, feiting.wanyan@intel.com, qingshun.wang@intel.com, "Rafael J. Wysocki" , Len Brown , James Morse , Tony Luck , Borislav Petkov , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Bjorn Helgaas , Mahesh J Salgaonkar , Oliver O'Halloran , Miaohe Lin , Shiju Jose , Adam Preble , Li Yang , Lukas Wunner , Kuppuswamy Sathyanarayanan , Smita Koralahalli , Robert Richter , linux-kernel@vger.kernel.org, linux-cxl@vger.kernel.org, linux-edac@vger.kernel.org Subject: Re: [PATCH v2 1/4] PCI/AER: Store more information in aer_err_info Message-ID: <2rfnevhnhylik4r6smr56uunsxweo7s5elo65sjhiztvxnr6bq@5fcyv22zxyyp> References: <20240125062802.50819-2-qingshun.wang@linux.intel.com> <20240205231231.GA830643@bhelgaas> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240205231231.GA830643@bhelgaas> On Mon, Feb 05, 2024 at 05:12:31PM -0600, Bjorn Helgaas wrote: > On Thu, Jan 25, 2024 at 02:27:59PM +0800, Wang, Qingshun wrote: > > When Advisory Non-Fatal errors are raised, both correctable and > > uncorrectable error statuses will be set. The current kernel code cannot > > store both statuses at the same time, thus failing to handle ANFE properly. > > In addition, to avoid clearing UEs that are not ANFE by accident, UE > > severity and Device Status also need to be recorded: any fatal UE cannot > > be ANFE, and if Fatal/Non-Fatal Error Detected is set in Device Status, do > > not take any assumption and let UE handler to clear UE status. > > > > Store status and mask of both correctable and uncorrectable errors in > > aer_err_info. The severity of UEs and the values of the Device Status > > register are also recorded, which will be used to determine UEs that should > > be handled by the ANFE handler. Refactor the rest of the code to use > > cor/uncor_status and cor/uncor_mask fields instead of status and mask > > fields. > > There's a lot going on in this patch. Could it possibly be split up a > bit, e.g., first tease apart aer_err_info.status/.mask into > .cor_status/mask and .uncor_status/mask, then add .uncor_severity, > then add the device_status bit separately? If it could be split up, I > think the ANFE case would be easier to see. > > Thanks a lot for working on this area! > > Bjorn Thanks for the feedback! Will split it up into two pacthes in the next version. -- Best regards, Wang, Qingshun