Re: [Qemu-devel] KVM call minutes 2013-01-29 - Port I/O

2013-01-30 Thread Alex Williamson
On Thu, 2013-01-31 at 10:02 +1100, Benjamin Herrenschmidt wrote: > On Thu, 2013-01-31 at 00:49 +0200, Michael S. Tsirkin wrote: > > > In practice they do (VGA at least) > > > > > > >From a SW modelling standpoint, I don't think it's worth > > differentiating > > > PCI and PCIE. > > > > > > Cheers

Re: [Qemu-devel] KVM call minutes 2013-01-29 - Port I/O

2013-01-31 Thread Alex Williamson
On Thu, 2013-01-31 at 12:49 +0200, Michael S. Tsirkin wrote: > On Wed, Jan 30, 2013 at 04:28:30PM -0700, Alex Williamson wrote: > > On Thu, 2013-01-31 at 10:02 +1100, Benjamin Herrenschmidt wrote: > > > On Thu, 2013-01-31 at 00:49 +0200, Michael S. Tsirkin wrote: > > &

Re: [Qemu-devel] KVM call minutes 2013-01-29 - Port I/O

2013-01-31 Thread Alex Williamson
On Thu, 2013-01-31 at 23:11 +0200, Michael S. Tsirkin wrote: > On Thu, Jan 31, 2013 at 09:34:03AM -0700, Alex Williamson wrote: > > > > On Thu, 2013-01-31 at 12:49 +0200, Michael S. Tsirkin wrote: > > > On Wed, Jan 30, 2013 at 04:28:30PM -0700, Alex Williamson wrote: >

Re: [Qemu-devel] KVM call minutes 2013-01-29 - Port I/O

2013-01-31 Thread Alex Williamson
On Fri, 2013-02-01 at 08:44 +1100, Benjamin Herrenschmidt wrote: > On Thu, 2013-01-31 at 09:34 -0700, Alex Williamson wrote: > > > Luckily guests do not seem to be worried as long as we use ACPI. > > > > Yes, in fact I just figured out last night that Windows is unhap

Re: [Qemu-devel] [PATCH v3 3/3] QEMU-AER: Qemu changes to support AER for VFIO-PCI devices

2013-02-04 Thread Alex Williamson
On Sun, 2013-02-03 at 14:10 +, Pandarathil, Vijaymohan R wrote: > - Create eventfd per vfio device assigned to a guest and register an > event handler > > - This fd is passed to the vfio_pci driver through the SET_IRQ ioctl > > - When the device encounters an error

Re: [Qemu-devel] [PATCH v3 2/3] VFIO-AER: Vfio-pci driver changes for supporting AER

2013-02-04 Thread Alex Williamson
On Sun, 2013-02-03 at 14:10 +, Pandarathil, Vijaymohan R wrote: > - New VFIO_SET_IRQ ioctl option to pass the eventfd that is signaled > when > an error occurs in the vfio_pci_device > > - Register pci_error_handler for the vfio_pci driver > > - When the device en

Re: [Qemu-devel] [PATCH v3 0/3] AER-KVM: Error containment of VFIO devices assigned to KVM guests

2013-02-04 Thread Alex Williamson
On Sun, 2013-02-03 at 14:10 +, Pandarathil, Vijaymohan R wrote: > Add support for error containment when a VFIO device assigned to a KVM > guest encounters an error. This is for PCIe devices/drivers that support AER > functionality. When the host OS is notified of an error in a device either >

Re: [Qemu-devel] [PATCH v3 1/3] VFIO: Wrapper for getting reference to vfio_device from device

2013-02-04 Thread Alex Williamson
On Sun, 2013-02-03 at 14:10 +, Pandarathil, Vijaymohan R wrote: > - Added vfio_device_get_from_dev() as wrapper to get > reference to vfio_device from struct device. > > - Added vfio_device_data() as a wrapper to get device_data from > vfio_device. > > Signed-o

Re: [Qemu-devel] [PATCH v3 3/3] QEMU-AER: Qemu changes to support AER for VFIO-PCI devices

2013-02-05 Thread Alex Williamson
gt; To: Pandarathil, Vijaymohan R > > Cc: Blue Swirl; Alex Williamson; Bjorn Helgaas; Ortiz, Lance E; > > k...@vger.kernel.org; qemu-devel@nongnu.org; linux-...@vger.kernel.org; > > linux-ker...@vger.kernel.org > > Subject: Re: [PATCH v3 3/3] QEMU-AER: Qemu changes to support AE

Re: [Qemu-devel] [PATCH v3 3/3] QEMU-AER: Qemu changes to support AER for VFIO-PCI devices

2013-02-05 Thread Alex Williamson
On Tue, 2013-02-05 at 15:42 +0200, Gleb Natapov wrote: > On Tue, Feb 05, 2013 at 06:37:35AM -0700, Alex Williamson wrote: > > On Tue, 2013-02-05 at 12:05 +, Pandarathil, Vijaymohan R wrote: > > > > > > > -Original Message- > > > > From: lin

Re: [Qemu-devel] q35 machine type and libvirt.

2013-02-06 Thread Alex Williamson
On Wed, 2013-02-06 at 14:13 -0500, Laine Stump wrote: > Now that qemu is getting the q35 machine type, libvirt needs to > support it. > > As far as I understand, from libvirt's point of view, q35 is just > another x86_64 system, but with a different set of implicit devices, > and possibly some ext

Re: [Qemu-devel] [libvirt] q35 machine type and libvirt.

2013-02-07 Thread Alex Williamson
On Thu, 2013-02-07 at 17:31 +, Daniel P. Berrange wrote: > On Wed, Feb 06, 2013 at 01:15:05PM -0700, Alex Williamson wrote: > > On Wed, 2013-02-06 at 14:13 -0500, Laine Stump wrote: > > > 2) Are there other issues aside from implicit controller devices I > > > ne

Re: [Qemu-devel] VFIO: Not require to make VFIO_IOMMU_MAP_DMA for MMAPED PCI bars

2013-02-14 Thread Alex Williamson
On Thu, 2013-02-14 at 08:22 +, Bhushan Bharat-R65777 wrote: > Hi Alex Williamson, > > I am able (with some hacks :)) to directly assign the e1000 PCI device > to KVM guest using VFIO on Freescale device. One of the problem I am > facing is about the DMA mapping in IOMMU for

Re: [Qemu-devel] [PATCH v4 2/3] VFIO-AER: Vfio-pci driver changes for supporting AER

2013-02-14 Thread Alex Williamson
On Thu, 2013-02-14 at 04:41 -0600, Vijay Mohan Pandarathil wrote: > - New VFIO_SET_IRQ ioctl option to pass the eventfd that is signaled > when > an error occurs in the vfio_pci_device > > - Register pci_error_handler for the vfio_pci driver > > - When the device enco

Re: [Qemu-devel] [PATCH v4 3/3] QEMU-AER: Qemu changes to support AER for VFIO-PCI devices

2013-02-14 Thread Alex Williamson
On Thu, 2013-02-14 at 04:41 -0600, Vijay Mohan Pandarathil wrote: > - Create eventfd per vfio device assigned to a guest and register an > event handler > > - This fd is passed to the vfio_pci driver through the SET_IRQ ioctl > > - When the device encounters an error,

[Qemu-devel] [RESEND PATCH v2 1/2] seabios q35: Enable all PIRQn IRQs at startup

2013-02-15 Thread Alex Williamson
limit where we support boot ROMs. The guest will later disable unused IRQs with the ACPI _DIS method. Signed-off-by: Alex Williamson --- src/pciinit.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/pciinit.c b/src/pciinit.c index 1d34653..05c0fe8 100644 ---

[Qemu-devel] [RESEND PATCH v2 2/2] seabios q35: Add new PCI slot to irq routing function

2013-02-15 Thread Alex Williamson
eally need to know the correct irqs. Signed-off-by: Alex Williamson --- src/pciinit.c | 33 - 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/src/pciinit.c b/src/pciinit.c index 05c0fe8..4cdc777 100644 --- a/src/pciinit.c +++ b/src/pciinit.c @@ -9

[Qemu-devel] [RESEND PATCH v2 0/2] seabios q35: Fix seabios IRQ mapping and setup

2013-02-15 Thread Alex Williamson
This enables interrupts to work pre-boot for assigned devices. I had self nak'd and resent a v2 patch for 2/2, but there were never any comments, so resending the whole series as v2. Thanks, Alex --- Alex Williamson (2): seabios q35: Enable all PIRQn IRQs at startup seabio

[Qemu-devel] [PATCH 0/2] qemu vfio-pci: PCIe and generic config space mangling

2013-02-18 Thread Alex Williamson
and appropriate for the bus. We don't have anything in place yet to tell what the bus is, so for now we rely on a temporary option that will eventually get replaced by something automatic. Thanks, Alex --- Alex Williamson (2): vfio-pci: Generalize PCI config mangling vfio-pci

[Qemu-devel] [PATCH 2/2] vfio-pci: Add PCIe capability mangling based on bus type

2013-02-18 Thread Alex Williamson
imit supported devices to Endpoints, Legacy Endpoints, and Root Complex Integrated Endpoints. We don't currently have support for other types and users often cause themselves problems by assigning them. Signed-off-by: Alex Williamson --- h

[Qemu-devel] [PATCH 1/2] vfio-pci: Generalize PCI config mangling

2013-02-18 Thread Alex Williamson
a bitmap of Qemu emulated bits. Signed-off-by: Alex Williamson --- hw/vfio_pci.c | 80 ++--- 1 file changed, 42 insertions(+), 38 deletions(-) diff --git a/hw/vfio_pci.c b/hw/vfio_pci.c index 66537b7..53b23f3 100644 --- a/hw/vfio_pci.c +++ b

Re: [Qemu-devel] [PATCH for-1.4 v3 3/6] error: Strip trailing '\n' from error string arguments (again)

2013-02-18 Thread Alex Williamson
On Fri, 2013-02-08 at 21:22 +0100, Markus Armbruster wrote: > Commit 6daf194d and be62a2eb got rid of a bunch, but they keep coming > back. Tracked down with this Coccinelle semantic patch: > > @r@ > expression err, eno, cls, fmt; > position p; > @@ > ( > error_repor

[Qemu-devel] [PATCH v2 0/2] qemu vfio-pci: PCIe and generic config space mangling

2013-02-18 Thread Alex Williamson
will fail to load if not set to something valid and appropriate for the bus. We don't have anything in place yet to tell what the bus is, so for now we rely on a temporary option that will eventually get replaced by something automatic. Thanks, Alex --- Alex Williamson (2): vfi

[Qemu-devel] [PATCH v2 1/2] vfio-pci: Generalize PCI config mangling

2013-02-18 Thread Alex Williamson
a bitmap of Qemu emulated bits. Signed-off-by: Alex Williamson --- hw/vfio_pci.c | 80 ++--- 1 file changed, 42 insertions(+), 38 deletions(-) diff --git a/hw/vfio_pci.c b/hw/vfio_pci.c index ad9ae36..2106b87 100644 --- a/hw/vfio_pci.c +++ b

[Qemu-devel] [PATCH v2 2/2] vfio-pci: Add PCIe capability mangling based on bus type

2013-02-18 Thread Alex Williamson
imit supported devices to Endpoints, Legacy Endpoints, and Root Complex Integrated Endpoints. We don't currently have support for other types and users often cause themselves problems by assigning them. Signed-off-by: Alex Williamson --- h

[Qemu-devel] [PATCH] qemu vfio-pci: Move devices to D0 on reset

2013-02-18 Thread Alex Williamson
Guests may leave devices in a low power state at reboot, but we expect devices to be woken up for the next boot. Make this happen. Signed-off-by: Alex Williamson --- hw/vfio_pci.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/hw/vfio_pci.c b/hw/vfio_pci.c index

[Qemu-devel] [PATCH 2/2] qemu vfio-pci: Graphics device quirks

2013-02-18 Thread Alex Williamson
or partial address matching the unassigned access. Then follow these examples for creating quirks to trap that access and return the emulated BAR address. None of these would be necessary if we could identity map devices. Signed-off-by: Alex Williamson --- hw/vfio_pc

[Qemu-devel] [PATCH] qemu vfio-pci: Add extra debugging

2013-02-18 Thread Alex Williamson
o had redundant "vfio:" prefixes. Signed-off-by: Alex Williamson --- hw/vfio_pci.c | 40 ++-- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/hw/vfio_pci.c b/hw/vfio_pci.c index 769ab05..7aa3d88 100644 --- a/hw/vfio_pci.c +++ b/hw/vfio

[Qemu-devel] [PATCH 1/2] qemu vfio-pci: Add support for VGA MMIO and I/O port access

2013-02-18 Thread Alex Williamson
S for your device, passing it to vfio-pci using the romfile= option. Signed-off-by: Alex Williamson --- hw/vfio_pci.c | 173 + 1 file changed, 173 insertions(+) diff --git a/hw/vfio_pci.c b/hw/vfio_pci.c index 330a687..307cbc1 100644 --- a/hw/

[Qemu-devel] [PATCH 0/2] qemu vfio-pci: VGA passthrough support

2013-02-18 Thread Alex Williamson
#x27;ll send patches for once the kernel patches are upstream. Thanks, Alex --- Alex Williamson (2): qemu vfio-pci: Add support for VGA MMIO and I/O port access qemu vfio-pci: Graphics device quirks hw/vfio_pci.c | 651 +++

Re: [Qemu-devel] VFIO: Not require to make VFIO_IOMMU_MAP_DMA for MMAPED PCI bars

2013-02-18 Thread Alex Williamson
On Tue, 2013-02-19 at 04:05 +, Bhushan Bharat-R65777 wrote: > > > -Original Message- > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Thursday, February 14, 2013 11:57 PM > > To: Bhushan Bharat-R65777 > > Cc: Yoder Stuar

Re: [Qemu-devel] VFIO: Not require to make VFIO_IOMMU_MAP_DMA for MMAPED PCI bars

2013-02-18 Thread Alex Williamson
On Tue, 2013-02-19 at 04:56 +, Bhushan Bharat-R65777 wrote: > > > -Original Message- > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Tuesday, February 19, 2013 9:55 AM > > To: Bhushan Bharat-R65777 > > Cc: Yoder Stuart-B08248;

Re: [Qemu-devel] [PATCH 2/3] spapr vfio: added support

2013-02-19 Thread Alex Williamson
On Tue, 2013-02-19 at 18:43 +1100, Alexey Kardashevskiy wrote: > The patch adds the following functionality: > > 1. Implements VFIO-IOMMU host kernel driver support; > > 2. Implements interface between SPAPR TCE and VFIO via > sPAPRVFIOData's map/unmap hooks; > > 3. Implements PHB scan for devic

Re: [Qemu-devel] [RESEND PATCH v2 2/2] seabios q35: Add new PCI slot to irq routing function

2013-02-20 Thread Alex Williamson
On Wed, 2013-02-20 at 23:29 -0500, Kevin O'Connor wrote: > On Fri, Feb 15, 2013 at 02:11:41PM -0700, Alex Williamson wrote: > > q35/ich9 doesn't use the same interrupt mapping function as > > i440fx/piix. PIRQA:D and PIRQE:H are programmed identically, but we > >

[Qemu-devel] [PATCH] seabios: Add a dummy PCI slot to irq mapping function

2013-02-21 Thread Alex Williamson
This should never get called, but if we somehow get a new chipset that fails to implement their own pci_slot_get_irq function, fail gracefully and add a debug log message. Signed-off-by: Alex Williamson --- src/pciinit.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff

Re: [Qemu-devel] [PATCH v5 1/3] VFIO: Wrapper for getting reference to vfio_device from device

2013-02-25 Thread Alex Williamson
On Sat, 2013-02-23 at 23:25 -0600, Vijay Mohan Pandarathil wrote: > - Added vfio_device_get_from_dev() as wrapper to get > reference to vfio_device from struct device. > > - Added vfio_device_data() as a wrapper to get device_data from > vfio_device. > > Signed-off

[Qemu-devel] RFC: Primary VGA

2013-02-27 Thread Alex Williamson
When we start adding root ports and bridges to systems we need some concept of a primary VGA device.The differentiation of the primary device is that it's the default one that responds to the Legacy VGA address ranges. PCs often have a BIOS selection for this. Seabios already seems to have som

Re: [Qemu-devel] q35 machine type and libvirt.

2013-02-27 Thread Alex Williamson
On Wed, 2013-02-27 at 13:20 -0500, Laine Stump wrote: > On 02/06/2013 02:13 PM, Laine Stump wrote: > > Now that qemu is getting the q35 machine type, libvirt needs to support it. > > In an attempt to make sure that libvirt actually does something useful > with qemu's new machine type, I'm revisiti

Re: [Qemu-devel] [SeaBIOS] RFC: Primary VGA

2013-02-27 Thread Alex Williamson
On Wed, 2013-02-27 at 20:11 -0500, Kevin O'Connor wrote: > On Wed, Feb 27, 2013 at 02:16:23PM -0700, Alex Williamson wrote: > > > > When we start adding root ports and bridges to systems we need some > > concept of a primary VGA device.The differentiation of the prima

Re: [Qemu-devel] [PATCH v5 0/4] VFIO-based PCI device assignment

2012-09-21 Thread Alex Williamson
Ping. There don't seem to be any objections to this. Thanks, Alex On Fri, 2012-09-14 at 17:04 -0600, Alex Williamson wrote: > On Fri, 2012-09-14 at 17:01 -0600, Alex Williamson wrote: > > Same goodness as v4, plus: > > > > - Addressed comments by Blue Sw

[Qemu-devel] [PATCH] CODING_STYLE: Define how to handle acronyms in CamelCase

2012-09-24 Thread Alex Williamson
For example, is PCIIntxRoutingNotifier sufficiently more clear? Mixing case, such as VFIOintx isn't truly CamelCase. Therefore let's abandon all-caps acronyms in CamelCase, resulting in PciIntxRoutingNotifier, QemuSgList, VfioIntx. Cc: Michael Tsirkin Signed-off-by: Alex Williamson --- Thi

Re: [Qemu-devel] [PATCH] CODING_STYLE: Define how to handle acronyms in CamelCase

2012-09-24 Thread Alex Williamson
On Mon, 2012-09-24 at 22:01 +0200, Michael S. Tsirkin wrote: > On Mon, Sep 24, 2012 at 12:08:16PM -0600, Alex Williamson wrote: > > When creating structure names in CamelCase, it's easy to have > > back-to-back capitals when using acronyms (ex. PCIINTxRoutingNotifier, >

Re: [Qemu-devel] [PATCH] Align PCI capabilities in pci_find_space

2012-09-25 Thread Alex Williamson
On Tue, 2012-09-25 at 15:59 -0500, m...@cs.wisc.edu wrote: > From: Matt Renzelmann > > The current implementation of pci_find_space does not properly align > PCI capabilities in the PCI configuration space. This patch fixes > this issue. > > Signed-off-by: Matt Renzelmann > --- > > This is my

Re: [Qemu-devel] [PATCH v2] Align PCI capabilities in pci_find_space

2012-09-25 Thread Alex Williamson
On Tue, 2012-09-25 at 20:01 -0500, m...@cs.wisc.edu wrote: > From: Matt Renzelmann > > The current implementation of pci_find_space does not correctly align > PCI capabilities in the PCI configuration space. This patch fixes > this issue. > > Signed-off-by: Matt Renzel

[Qemu-devel] [RESEND PATCH v5 0/4] VFIO-based PCI device assignment

2012-09-25 Thread Alex Williamson
Only change is adding Michael's ack. Thanks, Alex --- Alex Williamson (4): vfio: Enable vfio-pci and mark supported vfio: vfio-pci device assignment driver Update Linux kernel headers Update kernel header script to include vfio MAINTAINERS |

[Qemu-devel] [RESEND PATCH v5 1/4] Update kernel header script to include vfio

2012-09-25 Thread Alex Williamson
Signed-off-by: Alex Williamson Acked-by: Michael S. Tsirkin --- scripts/update-linux-headers.sh |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh index 53a6f87..67be2ef 100755 --- a/scripts/update-linux

[Qemu-devel] [RESEND PATCH v5 4/4] vfio: Enable vfio-pci and mark supported

2012-09-25 Thread Alex Williamson
Enabled for all softmmu guests supporting PCI on Linux hosts. Note that currently only x86 hosts have the kernel side VFIO IOMMU support for this. PPC (g3beige) is the only non-x86 guest known to work. ARM (veratile) hangs in firmware, others untested. Signed-off-by: Alex Williamson Acked-by

[Qemu-devel] [RESEND PATCH v5 2/4] Update Linux kernel headers

2012-09-25 Thread Alex Williamson
Based on Linux as of 1a95620. Signed-off-by: Alex Williamson Acked-by: Michael S. Tsirkin --- linux-headers/linux/vfio.h | 368 1 file changed, 368 insertions(+) create mode 100644 linux-headers/linux/vfio.h diff --git a/linux-headers/linux

Re: [Qemu-devel] [PATCH v2] Align PCI capabilities in pci_find_space

2012-09-26 Thread Alex Williamson
On Tue, 2012-09-25 at 21:08 -0600, Alex Williamson wrote: > On Tue, 2012-09-25 at 20:01 -0500, m...@cs.wisc.edu wrote: > > From: Matt Renzelmann > > > > The current implementation of pci_find_space does not correctly align > > PCI capabilities in the PCI configurati

Re: [Qemu-devel] [RESEND PATCH v5 4/4] vfio: Enable vfio-pci and mark supported

2012-09-26 Thread Alex Williamson
On Wed, 2012-09-26 at 08:50 -0500, Anthony Liguori wrote: > Alex Williamson writes: > > > Enabled for all softmmu guests supporting PCI on Linux hosts. Note > > that currently only x86 hosts have the kernel side VFIO IOMMU support > > for this. PPC (g3beige) is the onl

Re: [Qemu-devel] [PATCH v3] Align PCI capabilities in pci_find_space

2012-09-26 Thread Alex Williamson
tch fixes these > issues. > > Thanks to Alex Williamson for continuing feedback. > > Signed-off-by: Matt Renzelmann > --- > > In this patch, I've revised the pci_find_space function as suggested > (more-or-less). I searched for calls to pci_add_capability, and at &

Re: [Qemu-devel] [RESEND PATCH v5 4/4] vfio: Enable vfio-pci and mark supported

2012-09-26 Thread Alex Williamson
On Wed, 2012-09-26 at 11:41 -0500, Anthony Liguori wrote: > Alex Williamson writes: > > > On Wed, 2012-09-26 at 08:50 -0500, Anthony Liguori wrote: > >> Alex Williamson writes: > >> > >> > Enabled for all softmmu guests supporting PCI on Linux hosts.

Re: [Qemu-devel] [PATCH v3] Align PCI capabilities in pci_find_space

2012-09-26 Thread Alex Williamson
On Wed, 2012-09-26 at 11:50 -0500, Matt Renzelmann wrote: > > > > > > hw/pci.c | 28 +--- > > > 1 files changed, 21 insertions(+), 7 deletions(-) > > > > > > diff --git a/hw/pci.c b/hw/pci.c > > > index f855cf3..2217dda 100644 > > > --- a/hw/pci.c > > > +++ b/hw/pci.c > >

[Qemu-devel] [PATCH v6 4/4] vfio: Enable vfio-pci and mark supported

2012-09-26 Thread Alex Williamson
Enabled for all softmmu guests supporting PCI on Linux hosts. Note that currently only x86 hosts have the kernel side VFIO IOMMU support for this. PPC (g3beige) is the only non-x86 guest known to work. ARM (veratile) hangs in firmware, others untested. Signed-off-by: Alex Williamson

Re: [Qemu-devel] [PATCH v3] Align PCI capabilities in pci_find_space

2012-09-26 Thread Alex Williamson
On Wed, 2012-09-26 at 12:49 -0500, Matt Renzelmann wrote: > > > static int pci_find_space(PCIDevice *pdev, uint8_t size, bool pcie_space) > > > { > > > int config_base; > > > int config_size; > > > int offset = PCI_CONFIG_HEADER_SIZE; > > > int i; > > > uint32_t *dword_used = &p

[Qemu-devel] [PATCH v6 1/4] Update kernel header script to include vfio

2012-09-26 Thread Alex Williamson
Signed-off-by: Alex Williamson Acked-by: Michael S. Tsirkin --- scripts/update-linux-headers.sh |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh index 53a6f87..67be2ef 100755 --- a/scripts/update-linux

[Qemu-devel] [PATCH v6 0/4] VFIO-based PCI device assignment

2012-09-26 Thread Alex Williamson
v6: Update patch 4/4 so Makefile just uses CONFIG_LINUX and avoids all the noise in configure. Also available in git here: git://github.com/awilliam/qemu-vfio.git branch: vfio-for-qemu tag: vfio-pci-for-qemu-v6 --- Alex Williamson (4): vfio: Enable vfio-pci and mark supported

[Qemu-devel] [PATCH v6 2/4] Update Linux kernel headers

2012-09-26 Thread Alex Williamson
Based on Linux as of 1a95620. Signed-off-by: Alex Williamson Acked-by: Michael S. Tsirkin --- linux-headers/linux/vfio.h | 368 1 file changed, 368 insertions(+) create mode 100644 linux-headers/linux/vfio.h diff --git a/linux-headers/linux

Re: [Qemu-devel] [PATCH v3] Align PCI capabilities in pci_find_space

2012-09-26 Thread Alex Williamson
On Wed, 2012-09-26 at 13:05 -0500, Matt Renzelmann wrote: > > > > Mismatched uses of "size" here. We need both the end of the range to > > search and the size of the sub-range we're looking for. Maybe start, > > end, and size. Thanks, > > > > Ah of course, how's this: > > static int pci_find

Re: [Qemu-devel] [PATCH v4] Align PCI capabilities in pci_find_space

2012-09-26 Thread Alex Williamson
On Wed, 2012-09-26 at 13:51 -0500, Matt Renzelmann wrote: > The current implementation of pci_find_space does not correctly align > PCI capabilities in the PCI configuration space. It also does not > support PCI-Express devices. This patch fixes these issues. > > Thanks to Alex

Re: [Qemu-devel] [PATCH] CODING_STYLE: Define how to handle acronyms in CamelCase

2012-09-27 Thread Alex Williamson
On Wed, 2012-09-26 at 16:59 -0500, Anthony Liguori wrote: > Alex Williamson writes: > > > When creating structure names in CamelCase, it's easy to have > > back-to-back capitals when using acronyms (ex. PCIINTxRoutingNotifier, > > QEMUSGList, VFIOINTx). In the w

Re: [Qemu-devel] a user here - pci-assign

2012-09-28 Thread Alex Williamson
On Fri, 2012-09-28 at 10:54 +0100, lejeczek wrote: > hi everybody, > > I've decided to bother you guys for user list seems.. quiet, > no, really. > > so, novice type of question, where/how do I get hold of the > values for below options? > I don't read the code, ain't no programmer, I can't fig

Re: [Qemu-devel] a user here - pci-assign

2012-09-28 Thread Alex Williamson
On Fri, 2012-09-28 at 19:46 +0100, lejeczek wrote: > thanks Alex for your patience, appreciate it I do > > what would be the droids I need? > I'm experiencing guests' "puzzling" behavior and was > suggested that command line arguments were wrong/incomplete. > > same box/hardware and radeon 5450

Re: [Qemu-devel] a user here - pci-assign

2012-10-01 Thread Alex Williamson
hen > may this happen? This is not going to help you. It's a matter of finding a free slot, which qemu can do fine on it's own if you don't want to specify. Thanks, Alex > On 28/09/12 20:48, Alex Williamson wrote: > > On Fri, 2012-09-28 at 19:46 +0100, lejeczek wrot

Re: [Qemu-devel] [PATCH] vfio_pci: fix build on 32-bit systems

2012-10-01 Thread Alex Williamson
On Mon, 2012-10-01 at 13:41 -0500, Anthony Liguori wrote: > We cannot cast directly from pointer to uint64. > > Cc: Alex Williamson > Cc: Alex Barcelo > Reported-by: Alex Barcelo > Signed-off-by: Anthony Liguori > --- > hw/vfio_pci.c |2 +- > 1 files changed, 1

Re: [Qemu-devel] [PATCH] vfio_pci: fix build on 32-bit systems

2012-10-02 Thread Alex Williamson
On Tue, 2012-10-02 at 08:11 +0200, Paolo Bonzini wrote: > Il 01/10/2012 20:49, Alex Williamson ha scritto: > >> > @@ -768,7 +768,7 @@ static int vfio_dma_map(VFIOContainer *container, > >> > target_phys_addr_t iova, > >> > struct vfio_iommu_type1

[Qemu-devel] [PATCH 0/6] Misc PCI cleanups

2012-10-02 Thread Alex Williamson
pci-assign test whether INTx routing has changed using similar functions. Make this common. Finally, expose a way to get the MSI message for an MSI vector. Again, both pci-assign and vfio-pci need to do this to program the vector for KVM injection. Thanks, Alex --- Alex Williamson (6):

[Qemu-devel] [PATCH 1/6] pci: Add INTx no-route option

2012-10-02 Thread Alex Williamson
pci_device_route_intx_to_irq() has no probe capability. vfio-pci can make use of KVM acceleration if this information is available, but can still operate without it. Make it non-fatal to call this on a platform or chipset where it hasn't been implemented yet. Signed-off-by: Alex Willi

[Qemu-devel] [PATCH 5/6] msi: Add msi_get_message()

2012-10-02 Thread Alex Williamson
vfio-pci and pci-assign both do this on their own for setting up direct MSI injection through KVM. Provide a helper function for this in MSI code. Signed-off-by: Alex Williamson --- hw/msi.c | 45 + hw/msi.h |1 + 2 files changed, 30

[Qemu-devel] [PATCH 2/6] pci-assign: Add support for no-route

2012-10-02 Thread Alex Williamson
In the event that a pci-assign device is added to a chipset that hasn't yet implemented the INTx routing interface, exit gracefully instead of killing the VM. I'm sure we'll implement this for q35, but there's no reason for such a harsh response. Signed-off-by: Alex Williams

[Qemu-devel] [PATCH 6/6] pci-assign: Use msi_get_message()

2012-10-02 Thread Alex Williamson
pci-assign only uses a subset of the flexibility msi_get_message() provides, but it's still worthwhile to use it. Signed-off-by: Alex Williamson --- hw/kvm/pci-assign.c |5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hw/kvm/pci-assign.c b/hw/kvm/pci-assign.c

[Qemu-devel] [PATCH 3/6] pci: Helper function for testing if an INTx route changed

2012-10-02 Thread Alex Williamson
Signed-off-by: Alex Williamson --- hw/pci.c |5 + hw/pci.h |1 + 2 files changed, 6 insertions(+) diff --git a/hw/pci.c b/hw/pci.c index 9cb0ad4..6adb3b7 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -1102,6 +1102,11 @@ PCIINTxRoute pci_device_route_intx_to_irq(PCIDevice *dev, int pin

[Qemu-devel] [PATCH 4/6] pci-assign: Use pci_intx_route_changed()

2012-10-02 Thread Alex Williamson
Replace open coded version Signed-off-by: Alex Williamson --- hw/kvm/pci-assign.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/kvm/pci-assign.c b/hw/kvm/pci-assign.c index 7ce0f37..ddde573 100644 --- a/hw/kvm/pci-assign.c +++ b/hw/kvm/pci-assign.c @@ -894,8

Re: [Qemu-devel] [PATCH 2/6] pci-assign: Add support for no-route

2012-10-02 Thread Alex Williamson
On Tue, 2012-10-02 at 14:55 -0500, Anthony Liguori wrote: > Alex Williamson writes: > > > In the event that a pci-assign device is added to a chipset that > > hasn't yet implemented the INTx routing interface, exit gracefully > > instead of killing the VM. I'm

Re: [Qemu-devel] a user here - pci-assign

2012-10-03 Thread Alex Williamson
On Wed, 2012-10-03 at 15:30 +0100, lejeczek wrote: > I cannot tell anything about upsteam, I'm going to try it > out now, but in general I tend to stay as close to > distro/yum version as possible, > so for 6.3 rhel it is tedious way of grabbing and compiling > everything that is needed > where

Re: [Qemu-devel] [RFC v1 10/22] vfio: use new MEMORY_LISTENER_DEFAULT_OPS

2012-10-04 Thread Alex Williamson
tener_dummy2, > -.log_start = vfio_listener_dummy2, > -.log_stop = vfio_listener_dummy2, > -.log_sync = vfio_listener_dummy2, > -.log_global_start = vfio_listener_dummy1, > -.log_global_stop = vfio_listener_dummy1, > -.eventfd_add = vfio_listener_dummy3, > -.eventfd_del = vfio_listener_dummy3, > }; > > static void vfio_listener_release(VFIOContainer *container) I'm happy to see this cleanup. Thanks Acked-by: Alex Williamson

[Qemu-devel] [PATCH 00/11] vfio-pci cleanup and fixes

2012-10-04 Thread Alex Williamson
ted during initial review. Comments welcome. If there are no changes or objections I'll send a pull request for this next week. Thanks, Alex --- Alex Williamson (11): vfio-pci: Cleanup on INTx setup failure vfio-pci: Extend reset vfio-pci: Remove setting of MSI qsize

[Qemu-devel] [PATCH 01/11] vfio-pci: Update slow path INTx algorithm

2012-10-04 Thread Alex Williamson
e can bypass through KVM. Signed-off-by: Alex Williamson --- hw/vfio_pci.c | 65 ++--- hw/vfio_pci_int.h |4 ++- 2 files changed, 44 insertions(+), 25 deletions(-) diff --git a/hw/vfio_pci.c b/hw/vfio_pci.c index a1eeced..7ec9c30 100644

[Qemu-devel] [PATCH 06/11] vfio-pci: Roll the header into the .c file

2012-10-04 Thread Alex Williamson
It's only ~100 lines and nobody else should be using this. Suggested by Michael Tsirkin. Signed-off-by: Alex Williamson --- hw/vfio_pci.c | 97 + hw/vfio_pci_int.h | 114 - 2 files ch

[Qemu-devel] [PATCH 07/11] vfio-pci: Don't peak at msi_supported

2012-10-04 Thread Alex Williamson
Let the init function fail, just don't warn for -ENOTSUP. Signed-off-by: Alex Williamson --- hw/vfio_pci.c | 22 ++ 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/hw/vfio_pci.c b/hw/vfio_pci.c index 4d01707..d62ddd1 100644 --- a/hw/vfio_pci.c +++

[Qemu-devel] [PATCH 11/11] vfio-pci: Cleanup on INTx setup failure

2012-10-04 Thread Alex Williamson
Missing some unwind code. Signed-off-by: Alex Williamson --- hw/vfio_pci.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/vfio_pci.c b/hw/vfio_pci.c index b2383c4..2325272 100644 --- a/hw/vfio_pci.c +++ b/hw/vfio_pci.c @@ -285,6 +285,8 @@ static int vfio_enable_intx(VFIODevice

[Qemu-devel] [PATCH 05/11] vfio-pci: No spurious MSIs

2012-10-04 Thread Alex Williamson
FreeBSD doesn't like these spurious MSIs, remove them as they're mostly paranoia anyway. Signed-off-by: Alex Williamson --- hw/vfio_pci.c | 15 --- 1 file changed, 15 deletions(-) diff --git a/hw/vfio_pci.c b/hw/vfio_pci.c index 89e00ba..bca4083 100644 --- a/hw/vfio_p

[Qemu-devel] [PATCH 08/11] vfio-pci: Use uintptr_t for void* cast

2012-10-04 Thread Alex Williamson
We don't seem to run into any sign extension problems, but unsigned looks more correct. Signed-off-by: Alex williamson --- hw/vfio_pci.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/vfio_pci.c b/hw/vfio_pci.c index d62ddd1..0ca77cf 100644 --- a/hw/vfio_pci.c

[Qemu-devel] [PATCH 10/11] vfio-pci: Extend reset

2012-10-04 Thread Alex Williamson
Take what we've learned from pci-assign and apply it to vfio-pci. On reset, disable previous interrupt config, perform a device reset if available, re-enable INTx, and disable memory regions on the device to prevent continuing DMA. Signed-off-by: Alex Williamson --- hw/vfio_pci.c |

[Qemu-devel] [PATCH 02/11] vfio-pci: Re-order map/unmap

2012-10-04 Thread Alex Williamson
This cleans up the next patch that calls unmap from map. Signed-off-by: Alex Williamson --- hw/vfio_pci.c | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/hw/vfio_pci.c b/hw/vfio_pci.c index 7ec9c30..2d89d17 100644 --- a/hw/vfio_pci.c

[Qemu-devel] [PATCH 03/11] vfio-pci: Unmap and retry DMA mapping

2012-10-04 Thread Alex Williamson
original request. Signed-off-by: Alex Williamson --- hw/vfio_pci.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/hw/vfio_pci.c b/hw/vfio_pci.c index 2d89d17..7413f2d 100644 --- a/hw/vfio_pci.c +++ b/hw/vfio_pci.c @@ -819,12 +819,19 @@ static int vfio_dma_map

[Qemu-devel] [PATCH 04/11] vfio-pci: Rework MSIX setup/teardown

2012-10-04 Thread Alex Williamson
to expand our reset function to tear down interrupts as we can then get vector release notifications after we've released data structures. By making explicit initialization and teardown we can avoid both of these problems and behave more similar to bare metal. Signed-off-by: Alex Willi

[Qemu-devel] [PATCH 09/11] vfio-pci: Remove setting of MSI qsize

2012-10-04 Thread Alex Williamson
This was a misinterpretation of the spec, hardware doesn't get to specify how many were actually enabled through this field. Signed-off-by: Alex Williamson --- hw/vfio_pci.c | 18 -- 1 file changed, 18 deletions(-) diff --git a/hw/vfio_pci.c b/hw/vfio_pci.c index 0c

Re: [Qemu-devel] [PATCH v6 3/4] vfio: vfio-pci device assignment driver

2012-10-05 Thread Alex Williamson
On Fri, 2012-10-05 at 16:54 +, Blue Swirl wrote: > On Wed, Sep 26, 2012 at 5:19 PM, Alex Williamson > wrote: > > + > > +typedef struct QEMU_PACKED VFIOIRQSetFD { > > +struct vfio_irq_set irq_set; > > +int32_t fd; > > +} VFIOIRQSetFD; >

Re: [Qemu-devel] [PATCH v6 3/4] vfio: vfio-pci device assignment driver

2012-10-05 Thread Alex Williamson
On Fri, 2012-10-05 at 17:22 +, Blue Swirl wrote: > On Fri, Oct 5, 2012 at 5:11 PM, Alex Williamson > wrote: > > On Fri, 2012-10-05 at 16:54 +, Blue Swirl wrote: > >> On Wed, Sep 26, 2012 at 5:19 PM, Alex Williamson > >> wrote: > >> > + >

Re: [Qemu-devel] [PATCH v6 3/4] vfio: vfio-pci device assignment driver

2012-10-05 Thread Alex Williamson
On Fri, 2012-10-05 at 18:05 +, Blue Swirl wrote: > On Fri, Oct 5, 2012 at 5:33 PM, Alex Williamson > wrote: > > On Fri, 2012-10-05 at 17:22 +, Blue Swirl wrote: > >> On Fri, Oct 5, 2012 at 5:11 PM, Alex Williamson > >> wrote: > >> > On Fri, 2

[Qemu-devel] [PATCH] vfio-pci: Clang cleanup

2012-10-05 Thread Alex Williamson
ly done on interrupt setup changes. Cc: Blue Swirl Signed-off-by: Alex Williamson --- This is queued in my tree and will be included in my next pull request. The tree is available here: git://github.com/awilliam/qemu-vfio.git vfio-for-qemu hw/vfio_pc

Re: [Qemu-devel] [PATCH] vfio: Fix BAR->VFIODevice translation in vfio_bar_read/write

2012-10-08 Thread Alex Williamson
On Mon, 2012-10-08 at 12:45 +0200, Jan Kiszka wrote: > DO_UPCAST is supposed to translate from the first member of a struct to > that struct, not from arbitrary ones. And it (usually) breaks the build > when neglecting this rule. Use container_of to fix the build breakage > and likely also the runt

[Qemu-devel] [PULL] vfio-pci tree 20121008

2012-10-08 Thread Alex Williamson
request. Thanks, Alex -------- Alex Williamson (12): vfio-pci: Update slow path INTx algorithm vfio-pci: Re-order map/unmap vfio-pci: Unmap and retry DMA mapping vfio-pci: Rework MSIX setup/teardown vfio-pci: No spurious MSIs vfio-pci: Roll

Re: [Qemu-devel] [PATCH 0/6] Misc PCI cleanups

2012-10-08 Thread Alex Williamson
s in my tree if you prefer. Thanks, Alex On Tue, 2012-10-02 at 13:21 -0600, Alex Williamson wrote: > A few cleanups that I'll also apply to vfio-pci. First make intx > route checking non-fatal. vfio-pci has a fallback INTx mechanism > that doesn't rely on this, so we can a

Re: [Qemu-devel] [PATCH 0/6] Misc PCI cleanups

2012-10-08 Thread Alex Williamson
On Mon, 2012-10-08 at 22:15 +0200, Michael S. Tsirkin wrote: > On Mon, Oct 08, 2012 at 09:58:32AM -0600, Alex Williamson wrote: > > Michael, Jan, > > > > Any comments on these? I'd like to make the PCI changes before I update > > vfio-pci to make use of the new re

Re: [Qemu-devel] [PATCH 0/6] Misc PCI cleanups

2012-10-08 Thread Alex Williamson
On Mon, 2012-10-08 at 23:40 +0200, Michael S. Tsirkin wrote: > On Mon, Oct 08, 2012 at 01:27:33PM -0600, Alex Williamson wrote: > > On Mon, 2012-10-08 at 22:15 +0200, Michael S. Tsirkin wrote: > > > On Mon, Oct 08, 2012 at 09:58:32AM -0600, Alex Williamson wrote: &g

Re: [Qemu-devel] [PATCH 0/6] Misc PCI cleanups

2012-10-08 Thread Alex Williamson
On Mon, 2012-10-08 at 23:50 +0200, Michael S. Tsirkin wrote: > On Mon, Oct 08, 2012 at 03:11:37PM -0600, Alex Williamson wrote: > > On Mon, 2012-10-08 at 23:40 +0200, Michael S. Tsirkin wrote: > > > On Mon, Oct 08, 2012 at 01:27:33PM -0600, Alex Williamson wrote: > > >

Re: [Qemu-devel] [PATCH 0/6] Misc PCI cleanups

2012-10-08 Thread Alex Williamson
On Tue, 2012-10-09 at 00:44 +0200, Michael S. Tsirkin wrote: > On Mon, Oct 08, 2012 at 04:09:48PM -0600, Alex Williamson wrote: > > On Mon, 2012-10-08 at 23:50 +0200, Michael S. Tsirkin wrote: > > > On Mon, Oct 08, 2012 at 03:11:37PM -0600, Alex Williamson wrote: > > >

Re: [Qemu-devel] Isuue assiging devices using VFIO on x86

2012-08-28 Thread Alex Williamson
On Tue, 2012-08-28 at 17:10 +, Bhushan Bharat-R65777 wrote: > > > -Original Message- > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Tuesday, August 28, 2012 9:27 PM > > To: Bhushan Bharat-R65777 > > Cc: k...@vger.kernel.org;

<    1   2   3   4   5   6   7   8   9   10   >