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:	Thu, 8 Jan 2015 09:15:21 -0700
From:	Bjorn Helgaas <bhelgaas@...gle.com>
To:	Alex Williamson <alex.williamson@...hat.com>
Cc:	linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
	x86@...nel.org, tglx@...utronix.de, mingo@...hat.com,
	hpa@...or.com, joro@...tes.org, iommu@...ts.linux-foundation.org
Subject: Re: [PATCH 0/3] PCI/x86: Interface for testing multivector MSI
 support

On Fri, Nov 21, 2014 at 03:08:27PM -0700, Alex Williamson wrote:
> I'd like to make vfio-pci capable of manipulating the device exposed
> to the user such that if the host can only support a single MSI
> vector then we hide the fact that the device itself may actually be
> able to support more.  When we virtualize PCI config space and
> interrupt setup there's no PCI protocol for the device failing to
> allocate the number of vectors that it said were available.  If the
> userspace driver is a guest operating system, it certainly doesn't
> expect this to fail.  I don't think we can ever guarantee that a
> multi-vector request will succeed, but we can certainly guarantee
> that it will fail if the platform doesn't support it.
> 
> An example device is the Atheros AR93xxx running in a Windows 7 VM.
> Both the device and the guest OS support multiple MSI vectors.  With
> interrupt remapping, such that the host supports multivector, the
> device works well in the guest.  With interrupt remapping disabled,
> the device is far less reliable because of the mismatch in MSI
> programming vs driver configuration and often fails.  If vfio-pci
> can test whether multiple vectors are supported, then we can make it
> work reliably in both cases by adjusting the exposed MSI capability,
> like in this patch that would follow this series:
> 
> https://github.com/awilliam/linux-vfio/commit/9ace67515680
> 
> With this series, only x86 w/ interrupt remapping will advertise
> support for multiple MSI vectors.  In surveying the code, I couldn't
> find any other archs that allowed it, but I'll take corrections if
> that's untrue.  Thanks,

Per Thomas' comments and your possible workaround if we don't have
pci_msi_supported(), I'm going to ignore these for now.  Let me know if
you disagree.

Bjorn

> ---
> 
> Alex Williamson (3):
>       PCI: Extend and export pci_msi_supported() for multivector MSI
>       PCI/x86: Add arch_supports_multivector_msi() hook
>       PCI/MSI: Initial hook for archs to declare multivector MSI support
> 
> 
>  arch/x86/include/asm/x86_init.h |    1 +
>  arch/x86/kernel/x86_init.c      |    6 ++++++
>  drivers/iommu/irq_remapping.c   |    6 ++++++
>  drivers/pci/msi.c               |   20 +++++++++++++++++---
>  include/linux/msi.h             |    1 +
>  include/linux/pci.h             |    3 +++
>  6 files changed, 34 insertions(+), 3 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ