[PATCH 0/9] pci-assign: 64bit MMIO + better MSI-X table support

2012-01-28 Thread Alex Williamson
Patch 1 & 2 here are independent of the rest, but I include them here to avoid conflicts. The first patch enables exposing MMIO BARs as their native width to the guest. I added a config option for this with the default to use the existing behavior as I suspect we may have some latent issues there

[PATCH 1/9] pci-assign: Optionally enable 64bit BARs in guest

2012-01-28 Thread Alex Williamson
To date we've only exposed BARs as 32bit even if the device physically supports 64bit BARs. Enable 64bit BARs to be exposed as such in the guest, which may free up MMIO below 4G should the guest choose to use it. This adds a new mem64= option to pci-assign, with the default being off for testing

[PATCH 3/9] pci-assign: Update MSI-X MMIO to Memory API

2012-01-28 Thread Alex Williamson
Stop using compatibility mode and at the same time fix available access sizes. The PCI spec indicates that the MSI-X table may only be accessed as DWORD or QWORD. Signed-off-by: Alex Williamson --- hw/device-assignment.c | 56 +--- 1 files changed,

[PATCH 4/9] pci-assign: Use struct for MSI-X table

2012-01-28 Thread Alex Williamson
This makes access much easier. Signed-off-by: Alex Williamson --- hw/device-assignment.c | 55 ++-- hw/device-assignment.h |9 +++- 2 files changed, 33 insertions(+), 31 deletions(-) diff --git a/hw/device-assignment.c b/hw/device-assignmen

[PATCH 2/9] pci-assign: Fix warnings with DEBUG enabled

2012-01-28 Thread Alex Williamson
Signed-off-by: Alex Williamson --- hw/device-assignment.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/device-assignment.c b/hw/device-assignment.c index 07ae0a0..b176375 100644 --- a/hw/device-assignment.c +++ b/hw/device-assignment.c @@ -75,7 +75,7 @@ stat

[PATCH 5/9] pci-assign: Only calculate maximum MSI-X vector entries once

2012-01-28 Thread Alex Williamson
Signed-off-by: Alex Williamson --- hw/device-assignment.c | 17 +++-- hw/device-assignment.h |1 + 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/hw/device-assignment.c b/hw/device-assignment.c index 422ee00..af614d3 100644 --- a/hw/device-assignment.c +++ b/hw

[PATCH 6/9] pci-assign: Proper initialization for MSI-X table

2012-01-28 Thread Alex Williamson
Per the PCI spec, all vectors should be masked at handoff. Signed-off-by: Alex Williamson --- hw/device-assignment.c | 20 +++- 1 files changed, 19 insertions(+), 1 deletions(-) diff --git a/hw/device-assignment.c b/hw/device-assignment.c index af614d3..6efa219 100644 --- a/h

[PATCH 7/9] pci-assign: Allocate entries for all MSI-X vectors

2012-01-28 Thread Alex Williamson
We still only initialize the number used. This lets us avoid address space translations if the guest were to sparsely initialize MSI-X vectors on the device. Signed-off-by: Alex Williamson --- hw/device-assignment.c | 44 ++-- 1 files changed, 22 inser

[PATCH 8/9] pci-assign: Use MSIX_PAGE_SIZE

2012-01-28 Thread Alex Williamson
We've already got it defined, use it. Signed-off-by: Alex Williamson --- hw/device-assignment.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/device-assignment.c b/hw/device-assignment.c index a6d3a5b..7e52615 100644 --- a/hw/device-assignment.c +++ b/hw/devic

[PATCH 9/9] pci-assign: Update MSI-X config based on table writes

2012-01-28 Thread Alex Williamson
We currently only update MSI-X configuration with the enable bit in PCI config space is toggled. This is pretty sketchy and part of the reason for the odd checks for vector data is to guess whether the guest is going to use the vector so we can pre-enable it. Two key things missed by doing this i

Re: Fritz!Card, MSIs and virtual machines

2012-01-28 Thread Binarus
> There are patches in the queue to enable legacy interrupt sharing for > PCI 2.3 compliant devices at least. But I bet the Fritz hardware > predates even this (just like my Fritz!Card DSL v2). Thank you very much for this hint. Do you know when these will be out? Does anybody know about a PCI IS

Re: Fritz!Card, MSIs and virtual machines

2012-01-28 Thread Binarus
On 08.01.2012 17:51, Andreas Färber wrote: > Am 07.01.2012 18:52, schrieb Binarus: >> - Is it possible to run a guest with a mixture of I/O virtualization >> technologies, i.e. run the most part of the guest by using KVM with VT-d >> and VT-x, but "emulate" the PCI device without using these tech