lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 27 Jul 2022 07:23:39 -0700
From:   Sathyanarayanan Kuppuswamy 
        <sathyanarayanan.kuppuswamy@...ux.intel.com>
To:     Xiaochun Lee <lixiaochun.2888@....com>, linux-pci@...r.kernel.org
Cc:     bhelgaas@...gle.com, linux-kernel@...r.kernel.org,
        Xiaochun Lee <lixc17@...ovo.com>
Subject: Re: [PATCH v1] PCI/DPC: Skip EDR init when BIOS disable OS native DPC

Hi,

On 7/27/22 4:05 AM, Xiaochun Lee wrote:
> From: Xiaochun Lee <lixc17@...ovo.com>
> 
> ACPI BIOS may disable OS native AER and DPC support to notify OS
> that our platform doesn't support AER and DPC via the _OSC method.
> BIOS also might leave the containment be accomplished purely in HW.
> When firmware is set to non-aware OS DPC, we skip to install
> EDR handler to an ACPI device.

No, EDR is used when firmware controls the DPC.

When the Firmware owns Downstream Port Containment, it is expected to use
the new “Error Disconnect Recover” notification to alert OSPM of a
Downstream Port Containment event.

> 
> Signed-off-by: Xiaochun Lee <lixc17@...ovo.com>
> ---
>  drivers/pci/pcie/edr.c | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/drivers/pci/pcie/edr.c b/drivers/pci/pcie/edr.c
> index a6b9b47..97a680b 100644
> --- a/drivers/pci/pcie/edr.c
> +++ b/drivers/pci/pcie/edr.c
> @@ -19,6 +19,17 @@
>  #define EDR_OST_SUCCESS			0x80
>  #define EDR_OST_FAILED			0x81
>  
> +static int pcie_dpc_is_native(struct pci_dev *dev)
> +{
> +	struct pci_host_bridge *host = pci_find_host_bridge(dev->bus);
> +
> +	if (!dev->dpc_cap)
> +		return 0;
> +
> +	return pcie_ports_dpc_native || host->native_dpc;
> +}
> +
> +
>  /*
>   * _DSM wrapper function to enable/disable DPC
>   * @pdev   : PCI device structure
> @@ -212,6 +223,11 @@ void pci_acpi_add_edr_notifier(struct pci_dev *pdev)
>  		return;
>  	}
>  
> +	if (!pcie_dpc_is_native(pdev) && !pcie_aer_is_native(pdev)) {
> +		pci_dbg(pdev, "OS doesn't control DPC, skipping EDR init\n");
> +		return;
> +	}
> +
>  	status = acpi_install_notify_handler(adev->handle, ACPI_SYSTEM_NOTIFY,
>  					     edr_handle_event, pdev);
>  	if (ACPI_FAILURE(status)) {

-- 
Sathyanarayanan Kuppuswamy
Linux Kernel Developer

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ