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]
Message-ID: <20211208155314.GX6385@nvidia.com>
Date:   Wed, 8 Dec 2021 11:53:14 -0400
From:   Jason Gunthorpe <jgg@...dia.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Bjorn Helgaas <helgaas@...nel.org>,
        Marc Zygnier <maz@...nel.org>,
        Alex Williamson <alex.williamson@...hat.com>,
        Kevin Tian <kevin.tian@...el.com>,
        Megha Dey <megha.dey@...el.com>,
        Ashok Raj <ashok.raj@...el.com>, linux-pci@...r.kernel.org,
        Cedric Le Goater <clg@...d.org>,
        xen-devel@...ts.xenproject.org, Juergen Gross <jgross@...e.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Will Deacon <will@...nel.org>,
        Santosh Shilimkar <ssantosh@...nel.org>,
        iommu@...ts.linux-foundation.org, dmaengine@...r.kernel.org,
        Stuart Yoder <stuyoder@...il.com>,
        Laurentiu Tudor <laurentiu.tudor@....com>,
        Nishanth Menon <nm@...com>, Tero Kristo <kristo@...nel.org>,
        linux-arm-kernel@...ts.infradead.org,
        Vinod Koul <vkoul@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Robin Murphy <robin.murphy@....com>,
        Sinan Kaya <okaya@...nel.org>
Subject: Re: [patch V2 20/36] x86/pci/XEN: Use device MSI properties

On Mon, Dec 06, 2021 at 11:39:28PM +0100, Thomas Gleixner wrote:
> instead of fiddling with MSI descriptors.
> 
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> Reviewed-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Reviewed-by: Jason Gunthorpe <jgg@...dia.com>
>  arch/x86/pci/xen.c |    6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> +++ b/arch/x86/pci/xen.c
> @@ -399,9 +399,7 @@ static void xen_teardown_msi_irqs(struct
>  
>  static void xen_pv_teardown_msi_irqs(struct pci_dev *dev)
>  {
> -	struct msi_desc *msidesc = first_pci_msi_entry(dev);
> -
> -	if (msidesc->pci.msi_attrib.is_msix)
> +	if (msi_device_has_property(&dev->dev, MSI_PROP_PCI_MSIX))
>  		xen_pci_frontend_disable_msix(dev);
>  	else
>  		xen_pci_frontend_disable_msi(dev);

Same remark as for power, we have a pci_dev, so can it be dev->msix_enabled?

> @@ -417,7 +415,7 @@ static int xen_msi_domain_alloc_irqs(str
>  	if (WARN_ON_ONCE(!dev_is_pci(dev)))
>  		return -EINVAL;
>  
> -	if (first_msi_entry(dev)->pci.msi_attrib.is_msix)
> +	if (msi_device_has_property(dev, MSI_PROP_PCI_MSIX))

And this WARNS if it is not a pci_dev, so same

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ