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] [day] [month] [year] [list]
Message-ID: <D49C0D9C-96F9-4D2A-974C-7B6E0CBFB235@oracle.com>
Date: Thu, 18 Dec 2025 12:20:45 +0000
From: Haakon Bugge <haakon.bugge@...cle.com>
To: "Rafael J. Wysocki" <rafael@...nel.org>, Len Brown <lenb@...nel.org>,
        Bjorn Helgaas <bhelgaas@...gle.com>, Sinan Kaya <okaya@...eaurora.org>,
        Casey
 Leedom <leedom@...lsio.com>, Ashok Raj <ashok.raj@...el.com>,
        "David S.
 Miller" <davem@...emloft.net>,
        dingtianhong <dingtianhong@...wei.com>,
        Alexander Duyck <alexander.h.duyck@...el.com>
CC: "linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
        "linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] PCI/ACPI: Do not fiddle with ExtTag and RO in
 program_hpx_type2



> On 5 Dec 2025, at 13:28, Håkon Bugge <Haakon.Bugge@...cle.com> wrote:
> 
> After commit 60db3a4d8cc9 ("PCI: Enable PCIe Extended Tags if
> supported"), the kernel controls enablement of extended tags
> (ExtTag). Similar, after commit a99b646afa8a ("PCI: Disable PCIe
> Relaxed Ordering if unsupported"), the kernel controls the relaxed
> ordering bit (RO), in the sense that the kernel keeps the bit set (if
> already set) unless the RC does not support it.
> 
> On some platforms, when program_hpx_type2() is called and the _HPX
> object's Type2 records are, let's say, dubious, we may end up
> resetting ExtTag and RO, although they were explicit set or kept set
> by the OSPM [1].
> 
> The Advanced Configuration and Power Interface (ACPI) Specification
> version 6.6 has a provision that gives the OSPM the ability to
> control these bits any way. In a note in section 6.2.9, it is stated:
> 
> "OSPM may override the settings provided by the _HPX object's Type2
> record (PCI Express Settings) or Type3 record (PCI Express Descriptor
> Settings) when OSPM has assumed native control of the corresponding
> feature."
> 
> So, in order to preserve the increased performance of ExtTag and RO on
> platforms that support any of these, we make sure program_hpx_type2()
> doesn't reset them.
> 
> [1] Operating System-directed configuration and Power Management
> 
> Fixes: 60db3a4d8cc9 ("PCI: Enable PCIe Extended Tags if supported")
> Fixes: a99b646afa8a ("PCI: Disable PCIe Relaxed Ordering if unsupported")
> Signed-off-by: Håkon Bugge <haakon.bugge@...cle.com>

A gentle ping on this one.

Thxs, Håkon

> ---
> drivers/pci/pci-acpi.c | 15 +++++++++------
> 1 file changed, 9 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
> index 9369377725fa0..6a2ae1b821732 100644
> --- a/drivers/pci/pci-acpi.c
> +++ b/drivers/pci/pci-acpi.c
> @@ -324,15 +324,18 @@ static void program_hpx_type2(struct pci_dev *dev, struct hpx_type2 *hpx)
> return;
> }
> 
> - /*
> - * Don't allow _HPX to change MPS or MRRS settings.  We manage
> - * those to make sure they're consistent with the rest of the
> - * platform.
> + /* Don't allow _HPX to change MPS, MRRS, ExtTag, or RO
> + * settings.  We manage those to make sure they're consistent
> + * with the rest of the platform.
> */
> hpx->pci_exp_devctl_and |= PCI_EXP_DEVCTL_PAYLOAD |
> -    PCI_EXP_DEVCTL_READRQ;
> +   PCI_EXP_DEVCTL_READRQ  |
> +   PCI_EXP_DEVCTL_EXT_TAG |
> +   PCI_EXP_DEVCTL_RELAX_EN;
> hpx->pci_exp_devctl_or &= ~(PCI_EXP_DEVCTL_PAYLOAD |
> -    PCI_EXP_DEVCTL_READRQ);
> +    PCI_EXP_DEVCTL_READRQ  |
> +    PCI_EXP_DEVCTL_EXT_TAG |
> +    PCI_EXP_DEVCTL_RELAX_EN);
> 
> /* Initialize Device Control Register */
> pcie_capability_clear_and_set_word(dev, PCI_EXP_DEVCTL,
> -- 
> 2.43.5
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ