[PATCH v6 2/2] kvm: KVM_EOIFD, an eventfd for EOIs

2012-07-20 Thread Alex Williamson
is serviced. Here we make use of the reference counting of the _irq_source object allowing us to share it with an irqfd and cleanup regardless of the release order. Signed-off-by: Alex Williamson --- Documentation/virtual/kvm/api.txt | 21 ++ arch/x86/kvm/x86.c|2

Re: [PATCH v6 0/2] kvm: level irqfd and new eoifd

2012-07-23 Thread Alex Williamson
On Fri, 2012-07-20 at 10:33 -0600, Alex Williamson wrote: > v6: > > So we're back to just the first two patches, unfortunately the > diffstat got bigger though. The reason for that is that I discovered > we don't do anything on release of an eoifd. We cleanup if the

[PATCH v7 0/2] kvm: level irqfd and new eoifd

2012-07-24 Thread Alex Williamson
Badness. To fix this we can move the poll call to before the lock because we only do anything on POLLHUP which won't occur as long as we have a reference to the file. Thanks, Alex --- Alex Williamson (2): kvm: KVM_EOIFD, an eventfd for EOIs kvm: Extend irqfd to support level inter

[PATCH v7 1/2] kvm: Extend irqfd to support level interrupts

2012-07-24 Thread Alex Williamson
excessive infrastructure around an object for storing this irq_source_id. However, notice that we only provide a way to assert the interrupt here. A follow-on interface will make use of the same irq_source_id to allow de-assert. Signed-off-by: Alex Williamson --- Documentation/virtual/kvm/api.txt

[PATCH v7 2/2] kvm: KVM_EOIFD, an eventfd for EOIs

2012-07-24 Thread Alex Williamson
is serviced. Here we make use of the reference counting of the _irq_source object allowing us to share it with an irqfd and cleanup regardless of the release order. Signed-off-by: Alex Williamson --- Documentation/virtual/kvm/api.txt | 21 ++ arch/x86/kvm/x86.c|2

[GIT PULL (PATCH 0/4)] VFIO driver for v3.6

2012-07-25 Thread Alex Williamson
xt for the last month. Thanks, Alex --- Alex Williamson (4): vfio: Add PCI device driver vfio: Type1 IOMMU implementation vfio: Add documentation vfio: VFIO core Documentation/ioctl/ioctl-number.txt |1 Documentation/vfio.txt | 314 +++ M

[PATCH 1/4] vfio: VFIO core

2012-07-25 Thread Alex Williamson
VFIO users are able to query and initialize the IOMMU model of their choice. Please see the follow-on Documentation commit for further description and usage example. Signed-off-by: Alex Williamson --- Documentation/ioctl/ioctl-number.txt |1 MAINTAINERS |8 dr

[PATCH 2/4] vfio: Add documentation

2012-07-25 Thread Alex Williamson
Signed-off-by: Alex Williamson --- Documentation/vfio.txt | 314 1 file changed, 314 insertions(+) create mode 100644 Documentation/vfio.txt diff --git a/Documentation/vfio.txt b/Documentation/vfio.txt new file mode 100644 index 000

[PATCH 3/4] vfio: Type1 IOMMU implementation

2012-07-25 Thread Alex Williamson
the user and is optimized for relatively static mappings. Mapped areas are pinned into system memory. Signed-off-by: Alex Williamson --- drivers/vfio/Kconfig|6 drivers/vfio/Makefile |2 drivers/vfio/vfio.c |7 drivers/vfio/vfio_iommu_type1.c

Re: [RFC PATCH] vfio: VFIO PCI driver for Qemu

2012-07-25 Thread Alex Williamson
On Wed, 2012-07-25 at 22:30 +0300, Avi Kivity wrote: > On 07/25/2012 08:03 PM, Alex Williamson wrote: > > This adds PCI based device assignment to Qemu using the Linux VFIO > > userspace driver interface. After setting up VFIO device access, > > devices can be added to Qemu

Re: [RFC PATCH] vfio: VFIO PCI driver for Qemu

2012-07-26 Thread Alex Williamson
On Thu, 2012-07-26 at 11:35 +0300, Avi Kivity wrote: > On 07/25/2012 10:53 PM, Alex Williamson wrote: > > On Wed, 2012-07-25 at 22:30 +0300, Avi Kivity wrote: > >> On 07/25/2012 08:03 PM, Alex Williamson wrote: > >> > This adds PCI based device assignmen

Re: [RFC PATCH] vfio: VFIO PCI driver for Qemu

2012-07-26 Thread Alex Williamson
On Wed, 2012-07-25 at 11:03 -0600, Alex Williamson wrote: > This adds PCI based device assignment to Qemu using the Linux VFIO > userspace driver interface. After setting up VFIO device access, > devices can be added to Qemu guests using the vfio-pci device > option: > > -devi

[GIT PULL (PATCH 0/4) v2] VFIO driver for v3.6

2012-07-26 Thread Alex Williamson
On Wed, 2012-07-25 at 08:53 -0600, Alex Williamson wrote: > Hi Linus, > > This series includes the VFIO userspace driver interface for the > 3.6 kernel merge window. This driver is intended to provide a > secure interface for device access using IOMMU protection for >

Re: [RFC PATCH] vfio: VFIO PCI driver for Qemu

2012-07-26 Thread Alex Williamson
On Thu, 2012-07-26 at 18:59 +0300, Avi Kivity wrote: > On 07/26/2012 05:56 PM, Alex Williamson wrote: > >> >> Let's use the same syntax as for kvm device assignment. Then we can > >> >> fall back on kvm when vfio is not available. We can also have an >

Re: [Qemu-devel] [RFC PATCH] vfio: VFIO PCI driver for Qemu

2012-07-26 Thread Alex Williamson
On Thu, 2012-07-26 at 19:34 +0300, Avi Kivity wrote: > On 07/25/2012 08:03 PM, Alex Williamson wrote: > > > +/* > > + * Resource setup > > + */ > > +static void vfio_unmap_bar(VFIODevice *vdev, int nr) > > +{ > > +VFIOBAR *bar = &vdev->ba

Re: [RFC PATCH] vfio: VFIO PCI driver for Qemu

2012-07-26 Thread Alex Williamson
On Thu, 2012-07-26 at 19:06 +0300, Avi Kivity wrote: > On 07/26/2012 05:56 PM, Alex Williamson wrote: > > > > Both KVM and VFIO do strive to make the device in the guest look as much > > like it does on bare metal as possible, but we don't guarantee they're > >

Re: [Qemu-devel] [RFC PATCH] vfio: VFIO PCI driver for Qemu

2012-07-26 Thread Alex Williamson
On Thu, 2012-07-26 at 19:40 +0300, Avi Kivity wrote: > On 07/26/2012 07:33 PM, Alex Williamson wrote: > >> > >> In the common case, on x86 (but I'm repeating myself), the iommu group > >> includes just one device, yes? Could we make pci-stub an alias fo

Re: [Qemu-devel] [RFC PATCH] vfio: VFIO PCI driver for Qemu

2012-07-26 Thread Alex Williamson
On Thu, 2012-07-26 at 23:23 +0200, Andreas Hartmann wrote: > Alex Williamson wrote: > > [I removed qemu-devel because I'm not registered there] > > > On Thu, 2012-07-26 at 19:40 +0300, Avi Kivity wrote: > >> On 07/26/2012 07:33 PM, Alex Williamson wrote: > >

Re: [Qemu-devel] [RFC PATCH] vfio: VFIO PCI driver for Qemu

2012-07-27 Thread Alex Williamson
On Fri, 2012-07-27 at 19:22 +, Blue Swirl wrote: > On Wed, Jul 25, 2012 at 5:03 PM, Alex Williamson > > diff --git a/hw/vfio_pci.c b/hw/vfio_pci.c > > new file mode 100644 > > index 000..e9ae421 > > --- /dev/null > > +++ b/hw/vfio_pci.c > > @@ -0,

Re: more interrupts (lower performance) in bare-metal compared with running VM

2012-07-27 Thread Alex Williamson
On Fri, 2012-07-27 at 22:09 -0500, sheng qiu wrote: > Hi all, > > i am comparing network throughput performance under bare-metal case > with that running VM with assigned-device (assigned NIC). i have two > physical machines (each has a 10Gbit NIC), one is used as remote > server (run netserver) a

Re: [PATCH v7 1/2] kvm: Extend irqfd to support level interrupts

2012-07-30 Thread Alex Williamson
On Sun, 2012-07-29 at 18:01 +0300, Michael S. Tsirkin wrote: > On Tue, Jul 24, 2012 at 02:43:14PM -0600, Alex Williamson wrote: > > In order to inject a level interrupt from an external source using an > > irqfd, we need to allocate a new irq_source_id. This allows us to > >

Re: [PATCH v7 2/2] kvm: KVM_EOIFD, an eventfd for EOIs

2012-07-30 Thread Alex Williamson
On Sun, 2012-07-29 at 17:54 +0300, Michael S. Tsirkin wrote: > On Tue, Jul 24, 2012 at 02:43:22PM -0600, Alex Williamson wrote: > > This new ioctl enables an eventfd to be triggered when an EOI is > > written for a specified irqchip pin. The first user of this will > &g

Re: [Qemu-devel] [RFC PATCH] vfio: VFIO PCI driver for Qemu

2012-07-30 Thread Alex Williamson
On Sun, 2012-07-29 at 16:47 +0300, Avi Kivity wrote: > On 07/26/2012 08:40 PM, Alex Williamson wrote: > > On Thu, 2012-07-26 at 19:34 +0300, Avi Kivity wrote: > >> On 07/25/2012 08:03 PM, Alex Williamson wrote: > >> > >> > +/* > >> >

Re: [GIT PULL (PATCH 0/4)] VFIO driver for v3.6

2012-07-30 Thread Alex Williamson
On Fri, 2012-07-27 at 15:32 +1000, Paul Mackerras wrote: > On Wed, Jul 25, 2012 at 08:53:06AM -0600, Alex Williamson wrote: > > Hi Linus, > > > > This series includes the VFIO userspace driver interface for the > > 3.6 kernel merge window. This driver is inten

Re: [PATCH v7 2/2] kvm: KVM_EOIFD, an eventfd for EOIs

2012-07-30 Thread Alex Williamson
On Tue, 2012-07-31 at 03:01 +0300, Michael S. Tsirkin wrote: > On Mon, Jul 30, 2012 at 10:22:10AM -0600, Alex Williamson wrote: > > On Sun, 2012-07-29 at 17:54 +0300, Michael S. Tsirkin wrote: > > > On Tue, Jul 24, 2012 at 02:43:22PM -0600, Alex Williamson wrote: > > >

Re: [PATCH v7 2/2] kvm: KVM_EOIFD, an eventfd for EOIs

2012-07-30 Thread Alex Williamson
On Tue, 2012-07-31 at 03:36 +0300, Michael S. Tsirkin wrote: > On Mon, Jul 30, 2012 at 06:26:31PM -0600, Alex Williamson wrote: > > On Tue, 2012-07-31 at 03:01 +0300, Michael S. Tsirkin wrote: > > > On Mon, Jul 30, 2012 at 10:22:10AM -0600, Alex Williamson wrote: > > >

Re: [GIT PULL (PATCH 0/4)] VFIO driver for v3.6

2012-07-31 Thread Alex Williamson
On Mon, 2012-07-30 at 22:11 -0700, Linus Torvalds wrote: > On Mon, Jul 30, 2012 at 4:17 PM, Alex Williamson > wrote: > > > > I'm pretty anxious to find out as well. Linus, ping, any thoughts on > > including this in 3.6? Thanks, > > I just pulled it, but th

Re: [Qemu-devel] [RFC PATCH] vfio: VFIO PCI driver for Qemu

2012-07-31 Thread Alex Williamson
On Tue, 2012-07-31 at 15:34 +0300, Avi Kivity wrote: > On 07/31/2012 01:29 AM, Alex Williamson wrote: > >> > >> If the region size is zero, then both memory_region_del_subregion() > >> (assuming the region is parented) and munmap() do nothing. So you could

Re: [GIT PULL (PATCH 0/4)] VFIO driver for v3.6

2012-07-31 Thread Alex Williamson
On Tue, 2012-07-31 at 08:53 -0600, Alex Williamson wrote: > On Mon, 2012-07-30 at 22:11 -0700, Linus Torvalds wrote: > > On Mon, Jul 30, 2012 at 4:17 PM, Alex Williamson > > wrote: > > > > > > I'm pretty anxious to find out as well. Linus, ping, any t

[PATCH 0/3] VFIO-based PCI device assignment for QEMU 1.2

2012-07-31 Thread Alex Williamson
ue Swirl and Avi are already incorporated, including Avi's requests to simplify both the PCI BAR mapping and unmapping paths. This series is also available at: git://github.com/awilliam/qemu-vfio.git tags/vfio-pci-for-qemu-1.2 Thanks, Alex --- Alex Williamson (3): vfio: Enable vf

[PATCH 1/3] vfio: Import vfio kernel header

2012-07-31 Thread Alex Williamson
Signed-off-by: Alex Williamson --- 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/vfio.h b/linux-headers/linux/vfio.h new file mode 100644 index

[PATCH 3/3] vfio: Enable vfio-pci and mark supported

2012-07-31 Thread Alex Williamson
Signed-off-by: Alex Williamson --- MAINTAINERS |5 + configure | 12 hw/i386/Makefile.objs |1 + 3 files changed, 18 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 2d219d2..9680d69 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -460,6

Re: [PATCH 1/3] vfio: Import vfio kernel header

2012-08-01 Thread Alex Williamson
On Wed, 2012-08-01 at 09:13 +0200, Jan Kiszka wrote: > On 2012-08-01 07:18, Alex Williamson wrote: > > +#define VFIO_IOMMU_UNMAP_DMA _IO(VFIO_TYPE, VFIO_BASE + 14) > > + > > +#endif /* VFIO_H */ > > > > Please patch update-linux-headers.sh and let it do its

Re: [PATCH 3/3] vfio: Enable vfio-pci and mark supported

2012-08-01 Thread Alex Williamson
On Wed, 2012-08-01 at 09:15 +0200, Jan Kiszka wrote: > On 2012-08-01 07:18, Alex Williamson wrote: > > Signed-off-by: Alex Williamson > > --- > > > > MAINTAINERS |5 + > > configure | 12 > > hw/i386/Makefile

Re: [PATCH v7 2/2] kvm: KVM_EOIFD, an eventfd for EOIs

2012-08-01 Thread Alex Williamson
On Mon, 2012-07-30 at 19:12 -0600, Alex Williamson wrote: > On Tue, 2012-07-31 at 03:36 +0300, Michael S. Tsirkin wrote: > > On Mon, Jul 30, 2012 at 06:26:31PM -0600, Alex Williamson wrote: > > > On Tue, 2012-07-31 at 03:01 +0300, Michael S. Tsirkin wrote: > > > >

Re: [PATCH 3/3] vfio: Enable vfio-pci and mark supported

2012-08-01 Thread Alex Williamson
On Wed, 2012-08-01 at 12:14 -0600, Alex Williamson wrote: > On Wed, 2012-08-01 at 09:15 +0200, Jan Kiszka wrote: > > On 2012-08-01 07:18, Alex Williamson wrote: > > > Signed-off-by: Alex Williamson > > > --- > > > > > > MAINTAINERS |

Re: [PATCH 1/3] vfio: Import vfio kernel header

2012-08-02 Thread Alex Williamson
On Thu, 2012-08-02 at 11:02 +0200, Jan Kiszka wrote: > On 2012-08-01 20:09, Alex Williamson wrote: > > On Wed, 2012-08-01 at 09:13 +0200, Jan Kiszka wrote: > >> On 2012-08-01 07:18, Alex Williamson wrote: > > > >>> +#define VFIO_IOMMU_UNMAP_DMA _IO(VFIO_TYPE, V

[PATCH v2 0/4] VFIO-based PCI device assignment for QEMU 1.2

2012-08-02 Thread Alex Williamson
vi's requests to simplify both the PCI BAR mapping and unmapping paths. This series is also available at: git://github.com/awilliam/qemu-vfio.git tags/vfio-pci-for-qemu-1.2-v2 Thanks, Alex --- Alex Williamson (4): vfio: Enable vfio-pci and mark supported vfio: vfio-pci device

[PATCH v2 1/4] Update kernel header script to include vfio

2012-08-02 Thread Alex Williamson
Signed-off-by: Alex Williamson --- 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 9d2a4bc..270d32b 100755 --- a/scripts/update-linux-headers.sh +++ b/scripts/update

[PATCH v2 4/4] vfio: Enable vfio-pci and mark supported

2012-08-02 Thread Alex Williamson
Signed-off-by: Alex Williamson --- MAINTAINERS |5 + configure | 12 hw/i386/Makefile.objs |1 + 3 files changed, 18 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 2d219d2..9680d69 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -460,6

[PATCH v2 2/4] Update Linux kernel headers

2012-08-02 Thread Alex Williamson
Based on Linux as of 1a9b4993. Note that vfio.h isn't yet an installed header at this commit, but will be fixed soon. Signed-off-by: Alex Williamson --- linux-headers/asm-s390/kvm.h |2 linux-headers/asm-s390/kvm_para.h |2 linux-headers/asm-x86/kvm.h |1

Re: [PATCH 1/2] pci-assign: Switch to pci_device_route_intx_to_irq interface

2012-08-03 Thread Alex Williamson
On Fri, 2012-08-03 at 12:51 +0200, Jan Kiszka wrote: > From: Jan Kiszka > > Drop pci_map_irq/piix_get_irq in favor of upstream's new interface. This > should also properly model disabling of the line at PCI host controller > level. > > Signed-off-by: Jan Kiszka > --- > hw/device-assignment.c |

Re: [PATCH 2/2] pci-assign: Use pci_device_set_intx_routing_notifier

2012-08-03 Thread Alex Williamson
IX_CONFIG_IRQ_ROUTE + 4) > -assigned_dev_update_irqs(); > -#endif /* CONFIG_KVM_DEVICE_ASSIGNMENT */ > - > if (ranges_overlap(addr, l, PCI_BASE_ADDRESS_0, 24) || > ranges_overlap(addr, l, PCI_ROM_ADDRESS, 4) || > ranges_overlap(addr, l, PCI_ROM

Re: [PATCH v2 1/2] pci-assign: Switch to pci_device_route_intx_to_irq interface

2012-08-03 Thread Alex Williamson
3d 100644 > --- a/hw/pci.h > +++ b/hw/pci.h > @@ -274,8 +274,6 @@ void pci_register_bar(PCIDevice *pci_dev, int region_num, >uint8_t attr, MemoryRegion *memory); > pcibus_t pci_get_bar_addr(PCIDevice *pci_dev, int region_num); > > -int pci_map_irq(PCIDevice *pci_de

[GIT PULL] VFIO update for 3.6-rc1

2012-08-07 Thread Alex Williamson
for v3.6-rc1 Just a trivial patch to include vfio.h in the installed headers so we can complete userspace integration into QEMU. Thanks! ---- Alex Williamson (1): vfio: Include vfio.h in installed headers include/linux/Kbuild | 1

Re: hang on reboot with 3.6-rc1

2012-08-09 Thread Alex Williamson
On Thu, 2012-08-09 at 11:10 -0600, David Ahern wrote: > On 8/9/12 3:42 AM, Avi Kivity wrote: > > On 08/08/2012 07:27 PM, David Ahern wrote: > >> Not sure if KVM is the culprit, but it is the last line shown on the > >> console. I have to power cycle the server to reboot. > > > > Have you tried rmmo

Re: hang on reboot with 3.6-rc1

2012-08-09 Thread Alex Williamson
On Thu, 2012-08-09 at 12:17 -0600, David Ahern wrote: > On 8/9/12 11:26 AM, Alex Williamson wrote: > > On Thu, 2012-08-09 at 11:10 -0600, David Ahern wrote: > >> On 8/9/12 3:42 AM, Avi Kivity wrote: > >>> On 08/08/2012 07:27 PM, David Ahern wrote: > >>>&

Re: [PATCH v7 2/2] kvm: KVM_EOIFD, an eventfd for EOIs

2012-08-09 Thread Alex Williamson
On Mon, 2012-08-06 at 13:40 +0300, Avi Kivity wrote: > On 08/06/2012 01:38 PM, Avi Kivity wrote: > > > Regarding the implementation, instead of a linked list, would an array > > of counters parallel to the bitmap make it simpler? > > Or even, replace the bitmap with an array of counters. I'm not

Re: hang on reboot with 3.6-rc1

2012-08-09 Thread Alex Williamson
On Thu, 2012-08-09 at 13:35 -0600, David Ahern wrote: > On 8/9/12 1:03 PM, Alex Williamson wrote: > > > I think you should be ok with just what is in Linus' tree now. The > > change in pci_acs_path_enabled is the same kind of bug, but I don't > > think you&#

[PATCH v8 1/6] kvm: Allow filtering of acked irqs

2012-08-10 Thread Alex Williamson
27;s irq source id, so it's notifier would never get called otherwise. KVM device assignment gets filtering as it de-asserts the GSI in it's notifier. Signed-off-by: Alex Williamson --- arch/x86/kvm/i8254.c |1 + arch/x86/kvm/i8259.c |8 +++- include/linux/kvm_host.h

[PATCH v8 6/6] kvm: Add de-assert option to KVM_IRQ_ACKFD

2012-08-10 Thread Alex Williamson
It's likely (vfio) that one of the reasons to watch for an IRQ ACK is to de-assert and re-enable an interrupt. As the IRQ ACK notfier is already watching a GSI for an IRQ source ID we can easily couple these together. Signed-off-by: Alex Williamson --- Documentation/virtual/kvm/api.txt |

[PATCH v8 5/6] kvm: KVM_IRQ_ACKFD

2012-08-10 Thread Alex Williamson
Enable a mechanism for IRQ ACKs to be exposed through an eventfd. The user can specify the GSI and optionally an IRQ source ID and have the provided eventfd trigger whenever the irqchip resamples it's inputs, for instance on EOI. Signed-off-by: Alex Williamson --- Documentation/virtua

[PATCH v8 0/6] kvm: level irqfd support

2012-08-10 Thread Alex Williamson
Thanks, Alex --- Alex Williamson (6): kvm: Add de-assert option to KVM_IRQ_ACKFD kvm: KVM_IRQ_ACKFD kvm: Add assert-only option to KVM_IRQFD kvm: Add IRQ source ID option to KVM_IRQFD kvm: Expose IRQ source IDs to userspace kvm: Allow filtering of acked irqs

[PATCH v8 2/6] kvm: Expose IRQ source IDs to userspace

2012-08-10 Thread Alex Williamson
Introduce KVM_IRQ_SOURCE_ID and KVM_CAP_NR_IRQ_SOURCE_ID to allow user allocation of IRQ source IDs and querying both the capability and the total count of IRQ source IDs. These will later be used by interfaces for setting up level IRQs. Signed-off-by: Alex Williamson --- Documentation

[PATCH v8 3/6] kvm: Add IRQ source ID option to KVM_IRQFD

2012-08-10 Thread Alex Williamson
This allows specifying an IRQ source ID to be used when injecting an interrupt. When not specified KVM_USERSPACE_IRQ_SOURCE_ID is used. Signed-off-by: Alex Williamson --- Documentation/virtual/kvm/api.txt |5 + arch/x86/kvm/x86.c|1 + include/linux/kvm.h

[PATCH v8 4/6] kvm: Add assert-only option to KVM_IRQFD

2012-08-10 Thread Alex Williamson
This allows specifying that an irqfd is used only to assert the specified gsi, whereas standard behavior is to follow the assertion with a deassertion. This will later allow a level interrupt to be asserted via eventfd and later de-asserted by other means. Signed-off-by: Alex Williamson

Re: [PATCH 0/3] VFIO-based PCI device assignment for QEMU 1.2

2012-08-13 Thread Alex Williamson
On Mon, 2012-08-13 at 08:27 -0500, Anthony Liguori wrote: > Alex Williamson writes: > > > VFIO kernel support was just merged into Linux, so I'd like to > > formally propose inclusion of the QEMU vfio-pci driver for > > QEMU 1.2. Included here is support for x86 P

Re: [PATCH 0/3] VFIO-based PCI device assignment for QEMU 1.2

2012-08-13 Thread Alex Williamson
On Mon, 2012-08-13 at 17:48 +0200, Andreas Hartmann wrote: > Alex Williamson wrote: > > On Mon, 2012-08-13 at 08:27 -0500, Anthony Liguori wrote: > >> Alex Williamson writes: > >> > >>> VFIO kernel support was just merged into Linux, so I'd like to

Re: [PATCH v7 2/2] kvm: KVM_EOIFD, an eventfd for EOIs

2012-08-13 Thread Alex Williamson
On Sun, 2012-08-12 at 10:49 +0300, Michael S. Tsirkin wrote: > On Wed, Aug 01, 2012 at 01:06:42PM -0600, Alex Williamson wrote: > > On Mon, 2012-07-30 at 19:12 -0600, Alex Williamson wrote: > > > On Tue, 2012-07-31 at 03:36 +0300, Michael S. Tsirkin wrote: > > > >

Re: [PATCH 0/3] VFIO-based PCI device assignment for QEMU 1.2

2012-08-13 Thread Alex Williamson
On Mon, 2012-08-13 at 18:36 +0200, Andreas Hartmann wrote: > Alex Williamson schrieb: > > On Mon, 2012-08-13 at 17:48 +0200, Andreas Hartmann wrote: > >> Alex Williamson wrote: > >>> On Mon, 2012-08-13 at 08:27 -0500, Anthony Liguori wrote: > >>>>

Re: [PATCH v7 2/2] kvm: KVM_EOIFD, an eventfd for EOIs

2012-08-13 Thread Alex Williamson
On Mon, 2012-08-13 at 19:59 +0300, Michael S. Tsirkin wrote: > On Mon, Aug 13, 2012 at 10:48:15AM -0600, Alex Williamson wrote: > > On Sun, 2012-08-12 at 10:49 +0300, Michael S. Tsirkin wrote: > > > On Wed, Aug 01, 2012 at 01:06:42PM -0600, Alex Williamson wrote: > > >

Re: [PATCH v7 2/2] kvm: KVM_EOIFD, an eventfd for EOIs

2012-08-13 Thread Alex Williamson
On Mon, 2012-08-13 at 22:50 +0300, Michael S. Tsirkin wrote: > On Mon, Aug 13, 2012 at 12:17:25PM -0600, Alex Williamson wrote: > > On Mon, 2012-08-13 at 19:59 +0300, Michael S. Tsirkin wrote: > > > On Mon, Aug 13, 2012 at 10:48:15AM -0600, Alex Williamson wrote: > > >

VFIO: Call for reviewers (was Re: [PATCH 0/3] VFIO-based PCI device assignment for QEMU 1.2)

2012-08-13 Thread Alex Williamson
On Mon, 2012-08-13 at 14:33 -0500, Anthony Liguori wrote: > Alex Williamson writes: > > > On Mon, 2012-08-13 at 08:27 -0500, Anthony Liguori wrote: > >> Alex Williamson writes: > >> > >> > VFIO kernel support was just merged into Linux, so I'd l

Re: [PATCH 0/3] VFIO-based PCI device assignment for QEMU 1.2

2012-08-13 Thread Alex Williamson
On Mon, 2012-08-13 at 20:48 +, Blue Swirl wrote: > On Mon, Aug 13, 2012 at 7:33 PM, Anthony Liguori wrote: > > Alex Williamson writes: > > > >> On Mon, 2012-08-13 at 08:27 -0500, Anthony Liguori wrote: > >>> Alex Williamson writes: > >>>

Re: [PATCH v7 2/2] kvm: KVM_EOIFD, an eventfd for EOIs

2012-08-13 Thread Alex Williamson
On Sun, 2012-08-12 at 12:33 +0300, Michael S. Tsirkin wrote: > On Thu, Aug 09, 2012 at 01:26:15PM -0600, Alex Williamson wrote: > > On Mon, 2012-08-06 at 13:40 +0300, Avi Kivity wrote: > > > On 08/06/2012 01:38 PM, Avi Kivity wrote: > > > > > > > Regarding

Re: [PATCH v7 2/2] kvm: KVM_EOIFD, an eventfd for EOIs

2012-08-13 Thread Alex Williamson
On Sun, 2012-08-12 at 11:36 +0300, Avi Kivity wrote: > On 08/09/2012 10:26 PM, Alex Williamson wrote: > > On Mon, 2012-08-06 at 13:40 +0300, Avi Kivity wrote: > >> On 08/06/2012 01:38 PM, Avi Kivity wrote: > >> > >> > Regarding the implementation, i

Re: [PATCH v7 2/2] kvm: KVM_EOIFD, an eventfd for EOIs

2012-08-13 Thread Alex Williamson
On Tue, 2012-08-14 at 00:50 +0300, Michael S. Tsirkin wrote: > On Mon, Aug 13, 2012 at 02:48:25PM -0600, Alex Williamson wrote: > > On Mon, 2012-08-13 at 22:50 +0300, Michael S. Tsirkin wrote: > > > On Mon, Aug 13, 2012 at 12:17:25PM -0600, Alex Williamson wrote: > > >

Re: [PATCH v7 2/2] kvm: KVM_EOIFD, an eventfd for EOIs

2012-08-13 Thread Alex Williamson
On Tue, 2012-08-14 at 01:06 +0300, Michael S. Tsirkin wrote: > On Mon, Aug 13, 2012 at 03:34:01PM -0600, Alex Williamson wrote: > > On Sun, 2012-08-12 at 11:36 +0300, Avi Kivity wrote: > > > On 08/09/2012 10:26 PM, Alex Williamson wrote: > > > > On Mon, 2012-08-06 at

Re: [PATCH v7 2/2] kvm: KVM_EOIFD, an eventfd for EOIs

2012-08-13 Thread Alex Williamson
On Tue, 2012-08-14 at 02:00 +0300, Michael S. Tsirkin wrote: > On Mon, Aug 13, 2012 at 04:41:05PM -0600, Alex Williamson wrote: > > On Tue, 2012-08-14 at 01:06 +0300, Michael S. Tsirkin wrote: > > > On Mon, Aug 13, 2012 at 03:34:01PM -0600, Alex Williamson wrote: > > >

Re: [PATCH 2/3] vfio: vfio-pci device assignment driver

2012-08-13 Thread Alex Williamson
On Mon, 2012-08-13 at 17:18 -0500, Anthony Liguori wrote: > Alex Williamson writes: > > +static int vfio_load_rom(VFIODevice *vdev) > > +{ > > +uint64_t size = vdev->rom_size; > > +const VMStateDescription *vmsd; > > +char name[32]; > > +

Re: [PATCH 3/3] vfio: Enable vfio-pci and mark supported

2012-08-13 Thread Alex Williamson
On Mon, 2012-08-13 at 17:19 -0500, Anthony Liguori wrote: > Jan Kiszka writes: > > > On 2012-08-01 07:18, Alex Williamson wrote: > >> Signed-off-by: Alex Williamson > >> --- > >> > >> MAINTAINERS |5 + > >>

Re: [PATCH 2/3] vfio: vfio-pci device assignment driver

2012-08-14 Thread Alex Williamson
On Tue, 2012-08-14 at 08:12 +0100, Stefan Hajnoczi wrote: > On Tue, Jul 31, 2012 at 11:18:15PM -0600, Alex Williamson wrote: > > This adds the core of the QEMU VFIO-based PCI device assignment driver. > > To make use of this driver, enable CONFIG_VFIO, CONFIG_VFIO_IOMMU

Re: kvm device assignment and MSI-X masking

2012-08-14 Thread Alex Williamson
On Tue, 2012-08-14 at 15:48 +0200, Jan Kiszka wrote: > Hi Alex, > > you once wrote this comment in device-assignment.c, msix_mmio_write: > > if (!msix_masked(&orig) && msix_masked(entry)) { > /* > * Vector masked, disable it > * > * XXX It's not clear if we

Re: kvm device assignment and MSI-X masking

2012-08-14 Thread Alex Williamson
On Tue, 2012-08-14 at 16:10 +0200, Jan Kiszka wrote: > On 2012-08-14 16:05, Alex Williamson wrote: > > On Tue, 2012-08-14 at 15:48 +0200, Jan Kiszka wrote: > >> Hi Alex, > >> > >> you once wrote this comment in device-assignment.c, msix_mmio_write:

Re: kvm device assignment and MSI-X masking

2012-08-14 Thread Alex Williamson
On Tue, 2012-08-14 at 17:15 +0200, Jan Kiszka wrote: > On 2012-08-14 16:31, Alex Williamson wrote: > > On Tue, 2012-08-14 at 16:10 +0200, Jan Kiszka wrote: > >> On 2012-08-14 16:05, Alex Williamson wrote: > >>> On Tue, 2012-08-14 at 15:48 +0200, Jan Kiszka wrote: >

Re: [PATCH 2/3] vfio: vfio-pci device assignment driver

2012-08-14 Thread Alex Williamson
On Tue, 2012-08-14 at 18:53 +0300, Avi Kivity wrote: > On 08/01/2012 08:18 AM, Alex Williamson wrote: > > This adds the core of the QEMU VFIO-based PCI device assignment driver. > > To make use of this driver, enable CONFIG_VFIO, CONFIG_VFIO_IOMMU_TYPE1, > > and CONFIG_VFIO_P

Re: [PATCH v2 3/4] vfio: vfio-pci device assignment driver

2012-08-14 Thread Alex Williamson
> On 2012-08-02 21:17, Alex Williamson wrote: > > + > > +static int vfio_msix_vector_use(PCIDevice *pdev, > > +unsigned int vector, MSIMessage msg) > > +{ > > +VFIODevice *vdev = DO_UPCAST(VFIODevice, pdev, pdev); > > +

Re: [GIT PULL] VFIO update for 3.6-rc1

2012-08-14 Thread Alex Williamson
On Tue, 2012-08-07 at 13:05 -0600, Alex Williamson wrote: > Hi Linus, > > The following changes since commit 42a579a0f960081cd16fc945036e4780c3ad3202: > > Merge branches 'timers-urgent-for-linus' and 'perf-urgent-for-linus' of > git://git.kernel.org/pub

[PATCH v3 0/4] VFIO-based PCI device assignment for QEMU 1.2

2012-08-14 Thread Alex Williamson
y both the PCI BAR mapping and unmapping paths. This series is also available at: git://github.com/awilliam/qemu-vfio.git tags/vfio-pci-for-qemu-1.2-v3 Thanks, Alex --- Alex Williamson (4): vfio: Enable vfio-pci and mark supported vfio: vfio-pci device assignment driver Update

[PATCH v3 1/4] Update kernel header script to include vfio

2012-08-14 Thread Alex Williamson
Signed-off-by: Alex Williamson --- 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 9d2a4bc..270d32b 100755 --- a/scripts/update-linux-headers.sh +++ b/scripts/update

[PATCH v3 2/4] Update Linux kernel headers

2012-08-14 Thread Alex Williamson
Based on Linux as of ddf343f6. Note that vfio.h isn't yet an installed header at this commit, but is fixed by trivial update to include/linux/Kbuild. Signed-off-by: Alex Williamson --- linux-headers/asm-s390/kvm.h |2 linux-headers/asm-s390/kvm_para.h |2 linux-headers/as

[PATCH v3 4/4] vfio: Enable vfio-pci and mark supported

2012-08-14 Thread Alex Williamson
Signed-off-by: Alex Williamson --- MAINTAINERS |5 + configure |6 ++ hw/i386/Makefile.objs |1 + 3 files changed, 12 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 708ad54..327b219 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -468,6

Re: [PATCH v7 2/2] kvm: KVM_EOIFD, an eventfd for EOIs

2012-08-14 Thread Alex Williamson
On Tue, 2012-08-14 at 11:35 +0300, Michael S. Tsirkin wrote: > On Mon, Aug 13, 2012 at 09:09:43PM -0600, Alex Williamson wrote: > > On Tue, 2012-08-14 at 02:00 +0300, Michael S. Tsirkin wrote: > > > On Mon, Aug 13, 2012 at 04:41:05PM -0600, Alex Williamson wrote: > > >

Re: [PATCH v7 2/2] kvm: KVM_EOIFD, an eventfd for EOIs

2012-08-14 Thread Alex Williamson
On Tue, 2012-08-14 at 15:35 +0300, Avi Kivity wrote: > On 08/12/2012 12:33 PM, Michael S. Tsirkin wrote: > >> > >> Michael, would the interface be more acceptable to you if we added > >> separate ioctls to allocate and free some representation of an irq > >> source ID, gsi pair? For instance, an

Re: [PATCH v7 2/2] kvm: KVM_EOIFD, an eventfd for EOIs

2012-08-14 Thread Alex Williamson
On Wed, 2012-08-15 at 02:04 +0300, Michael S. Tsirkin wrote: > On Tue, Aug 14, 2012 at 04:01:15PM -0600, Alex Williamson wrote: > > On Tue, 2012-08-14 at 15:35 +0300, Avi Kivity wrote: > > > On 08/12/2012 12:33 PM, Michael S. Tsirkin wrote: > > > >> > > &g

Re: [PATCH v8 1/6] kvm: Allow filtering of acked irqs

2012-08-15 Thread Alex Williamson
On Wed, 2012-08-15 at 15:27 +0300, Michael S. Tsirkin wrote: > On Fri, Aug 10, 2012 at 04:37:17PM -0600, Alex Williamson wrote: > > Registering an kvm_irq_ack_notifier with kian.irq_source_id < 0 > > retains existing behavior, filling in the actual irq_source_id results > &

Re: [PATCH v8 2/6] kvm: Expose IRQ source IDs to userspace

2012-08-15 Thread Alex Williamson
On Wed, 2012-08-15 at 15:59 +0300, Michael S. Tsirkin wrote: > On Fri, Aug 10, 2012 at 04:37:25PM -0600, Alex Williamson wrote: > > Introduce KVM_IRQ_SOURCE_ID and KVM_CAP_NR_IRQ_SOURCE_ID to allow > > user allocation of IRQ source IDs and querying both the capability > > a

Re: [PATCH v8 3/6] kvm: Add IRQ source ID option to KVM_IRQFD

2012-08-15 Thread Alex Williamson
On Wed, 2012-08-15 at 16:49 +0300, Michael S. Tsirkin wrote: > On Fri, Aug 10, 2012 at 04:37:33PM -0600, Alex Williamson wrote: > > This allows specifying an IRQ source ID to be used when injecting an > > interrupt. When not specified KVM_USERSPACE_IRQ_SOURCE_ID is used. > &g

Re: [PATCH v8 5/6] kvm: KVM_IRQ_ACKFD

2012-08-15 Thread Alex Williamson
On Wed, 2012-08-15 at 17:05 +0300, Michael S. Tsirkin wrote: > On Fri, Aug 10, 2012 at 04:37:48PM -0600, Alex Williamson wrote: > > Enable a mechanism for IRQ ACKs to be exposed through an eventfd. The > > user can specify the GSI and optionally an IRQ source ID and have the >

Re: [PATCH v8 6/6] kvm: Add de-assert option to KVM_IRQ_ACKFD

2012-08-15 Thread Alex Williamson
On Wed, 2012-08-15 at 17:11 +0300, Michael S. Tsirkin wrote: > On Fri, Aug 10, 2012 at 04:37:56PM -0600, Alex Williamson wrote: > > It's likely (vfio) that one of the reasons to watch for an IRQ ACK > > is to de-assert and re-enable an interrupt. As the IRQ ACK notfier >

Re: [PATCH v8 0/6] kvm: level irqfd support

2012-08-15 Thread Alex Williamson
On Wed, 2012-08-15 at 17:28 +0300, Michael S. Tsirkin wrote: > On Fri, Aug 10, 2012 at 04:37:08PM -0600, Alex Williamson wrote: > > v8: > > > > Trying a new approach. Nobody seems to like the internal IRQ > > source ID object and the interactions it implies between ir

Re: [PATCH v8 0/6] kvm: level irqfd support

2012-08-15 Thread Alex Williamson
On Wed, 2012-08-15 at 22:22 +0300, Michael S. Tsirkin wrote: > On Wed, Aug 15, 2012 at 11:36:31AM -0600, Alex Williamson wrote: > > On Wed, 2012-08-15 at 17:28 +0300, Michael S. Tsirkin wrote: > > > On Fri, Aug 10, 2012 at 04:37:08PM -0600, Alex Williamson

Re: [PATCH v8 0/6] kvm: level irqfd support

2012-08-16 Thread Alex Williamson
On Wed, 2012-08-15 at 13:59 -0600, Alex Williamson wrote: > On Wed, 2012-08-15 at 22:22 +0300, Michael S. Tsirkin wrote: > > On Wed, Aug 15, 2012 at 11:36:31AM -0600, Alex Williamson wrote: > > > On Wed, 2012-08-15 at 17:28 +0300, Michael S. Tsirkin wrote: > > > >

Re: [PATCH 10/19] pci-assign: Replace kvm_assign_set_msix_entry with kvm_device_msix_set_vector

2012-08-16 Thread Alex Williamson
On Thu, 2012-08-16 at 15:54 +0200, Jan Kiszka wrote: > The refactored version cleanly hides the KVM IOCTL structure from the > users and also zeros out the padding field. > > Signed-off-by: Jan Kiszka > --- > hw/device-assignment.c |7 ++- > qemu-kvm.c |8 > qemu

Re: [PATCH v8 0/6] kvm: level irqfd support

2012-08-16 Thread Alex Williamson
On Thu, 2012-08-16 at 19:32 +0300, Avi Kivity wrote: > On 08/11/2012 01:37 AM, Alex Williamson wrote: > > v8: > > > > Trying a new approach. Nobody seems to like the internal IRQ > > source ID object and the interactions it implies between irqfd > > and eoifd,

Re: [PATCH v8 0/6] kvm: level irqfd support

2012-08-16 Thread Alex Williamson
On Thu, 2012-08-16 at 19:29 +0300, Avi Kivity wrote: > On 08/15/2012 10:22 PM, Michael S. Tsirkin wrote: > > On Wed, Aug 15, 2012 at 11:36:31AM -0600, Alex Williamson wrote: > >> On Wed, 2012-08-15 at 17:28 +0300, Michael S. Tsirkin wrote: > >> > On Fri, Aug 10,

Re: [PATCH 00/19] pci-assign: Refactor for upstream merge

2012-08-16 Thread Alex Williamson
| 12 +- > qemu-kvm.c | 233 > qemu-kvm.h | 112 -- > target-i386/kvm.c| 142 > target-i386/kvm_i386.h | 22 ++ > 11 files changed, 461 ins

Re: [PATCH 10/19] pci-assign: Replace kvm_assign_set_msix_entry with kvm_device_msix_set_vector

2012-08-16 Thread Alex Williamson
On Thu, 2012-08-16 at 19:34 +0300, Avi Kivity wrote: > On 08/16/2012 07:21 PM, Alex Williamson wrote: > >> > >> +int kvm_device_msix_set_vector(KVMState *s, uint32_t dev_id, uint32_t > >> vector, > >> + int virq) > >

Re: [PATCH 10/19] pci-assign: Replace kvm_assign_set_msix_entry with kvm_device_msix_set_vector

2012-08-16 Thread Alex Williamson
On Thu, 2012-08-16 at 19:30 +0200, Jan Kiszka wrote: > On 2012-08-16 18:30, Jan Kiszka wrote: > > On 2012-08-16 18:21, Alex Williamson wrote: > >> On Thu, 2012-08-16 at 15:54 +0200, Jan Kiszka wrote: > >>> The refactored version cleanly hides the KVM IOCTL structure

Re: [RFC PATCH] vfio: add fixup for broken PCI devices

2012-08-20 Thread Alex Williamson
On Sat, 2012-08-18 at 00:28 +1000, Alexey Kardashevskiy wrote: > On Fri, Jun 22, 2012 at 6:16 PM, Alexey Kardashevskiy wrote: > > > On 07/06/12 09:17, Alex Williamson wrote: > > > On Fri, 2012-05-25 at 17:35 +1000, Alexey Kardashevskiy wrote: > > >> Some adapters

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