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: <alpine.DEB.2.22.394.2211141346200.4020@ubuntu-linux-20-04-desktop>
Date:   Mon, 14 Nov 2022 13:46:26 -0800 (PST)
From:   Stefano Stabellini <sstabellini@...nel.org>
To:     Juergen Gross <jgross@...e.com>
cc:     linux-kernel@...r.kernel.org,
        Stefano Stabellini <sstabellini@...nel.org>,
        Oleksandr Tyshchenko <oleksandr_tyshchenko@...m.com>,
        xen-devel@...ts.xenproject.org
Subject: Re: [PATCH] xen/platform-pci: use define instead of literal number

On Mon, 14 Nov 2022, Juergen Gross wrote:
> Instead of "0x01" use the HVM_PARAM_CALLBACK_TYPE_PCI_INTX define from
> the interface header in get_callback_via().
> 
> Signed-off-by: Juergen Gross <jgross@...e.com>

Acked-by: Stefano Stabellini <sstabellini@...nel.org>


> ---
>  drivers/xen/platform-pci.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/xen/platform-pci.c b/drivers/xen/platform-pci.c
> index 18f0ed8b1f93..24a3de1b7b03 100644
> --- a/drivers/xen/platform-pci.c
> +++ b/drivers/xen/platform-pci.c
> @@ -54,7 +54,8 @@ static uint64_t get_callback_via(struct pci_dev *pdev)
>  	pin = pdev->pin;
>  
>  	/* We don't know the GSI. Specify the PCI INTx line instead. */
> -	return ((uint64_t)0x01 << HVM_CALLBACK_VIA_TYPE_SHIFT) | /* PCI INTx identifier */
> +	return ((uint64_t)HVM_PARAM_CALLBACK_TYPE_PCI_INTX <<
> +			  HVM_CALLBACK_VIA_TYPE_SHIFT) |
>  		((uint64_t)pci_domain_nr(pdev->bus) << 32) |
>  		((uint64_t)pdev->bus->number << 16) |
>  		((uint64_t)(pdev->devfn & 0xff) << 8) |
> -- 
> 2.35.3
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ