Skip to contentSkip to conversation

pci,virtio

GIT PULL Michael S. Tsirkin 3 participants 5 messages Jan 13, 2013 – Jan 15, 2013

lore
Share & tools
lore
#0 lore raw

The following changes since commit 8e4a424b305e29dc0e454f52df3b35577f342975:

Revert "virtio-pci: replace byte swap hack" (2013-01-06 18:30:17 +0000)

are available in the git repository at:

git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_anthony

for you to fetch changes up to feb9a2ab4b0260d8d680a7ffd25063dafc7ec628:

pci-assign: Enable MSIX on device to match guest (2013-01-09 12:11:16 +0200)

----------------------------------------------------------------
pci,virtio

This further optimizes MSIX handling in virtio-pci. Also included is pci cleanup by Paolo, and pci device assignment fix by Alex.

----------------------------------------------------------------
Alex Williamson (1):
pci-assign: Enable MSIX on device to match guest

Michael S. Tsirkin (8):
virtio: don't waste irqfds on control vqs
msix: add api to access msix message
kvm: add stub for update msi route
virtio-pci: cache msix messages
virtio: backend virtqueue notifier masking
virtio-net: set/clear vhost_started in reverse order
vhost: set started flag while start is in progress
vhost: backend masking support

Paolo Bonzini (5):
docs: move pci-ids.txt to docs/specs/
reorganize pci-ids.txt
virtio-9p: use symbolic constant, add to pci-ids.txt
ivshmem: use symbolic constant for PCI ID, add to pci-ids.txt
pci: use constants for devices under the 1B36 device ID, document them

 docs/specs/pci-ids.txt     |  50 +++++++++++
 hw/9pfs/virtio-9p-device.c |   2 +-
 hw/ivshmem.c               |   7 +-
 hw/kvm/pci-assign.c        |  17 +++-
 hw/pci/msix.c              |   2 +-
 hw/pci/msix.h              |   1 +
 hw/pci/pci.h               |   8 ++
 hw/pci_bridge_dev.c        |   8 +-
 hw/serial-pci.c            |  12 +--
 hw/vhost.c                 | 112 +++++++++++++++++++++----
 hw/vhost.h                 |  10 +++
 hw/vhost_net.c             |  27 +++++-
 hw/vhost_net.h             |   3 +
 hw/virtio-net.c            |  22 ++++-
 hw/virtio-pci.c            | 203 +++++++++++++++++++++++++++++++++++++++------
 hw/virtio-pci.h            |   2 +
 hw/virtio.h                |  15 +++-
 kvm-stub.c                 |   5 ++
 pci-ids.txt                |  31 -------
 19 files changed, 437 insertions(+), 100 deletions(-)
 create mode 100644 docs/specs/pci-ids.txt
 delete mode 100644 pci-ids.txt
#2 lore raw
In reply to Michael S. Tsirkin

Am 13.01.2013 11:47, schrieb Michael S. Tsirkin:

Quoted 25 lines

The following changes since commit 8e4a424b305e29dc0e454f52df3b35577f342975:

Revert "virtio-pci: replace byte swap hack" (2013-01-06 18:30:17 +0000)

are available in the git repository at:

git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_anthony

for you to fetch changes up to feb9a2ab4b0260d8d680a7ffd25063dafc7ec628:

pci-assign: Enable MSIX on device to match guest (2013-01-09 12:11:16 +0200)

----------------------------------------------------------------
pci,virtio

This further optimizes MSIX handling in virtio-pci. Also included is pci cleanup by Paolo, and pci device assignment fix by Alex.

----------------------------------------------------------------
Alex Williamson (1):
pci-assign: Enable MSIX on device to match guest

Quoted 5 lines

Michael S. Tsirkin (8):
virtio: don't waste irqfds on control vqs
msix: add api to access msix message
kvm: add stub for update msi route
virtio-pci: cache msix messages

This broke the build with PowerKVM:

LINK ppc64-softmmu/qemu-system-ppc64
../hw/virtio-pci.o: In function `kvm_virtio_pci_vq_vector_unmask':
/home/andreas/QEMU/qemu/hw/virtio-pci.c:622: undefined reference to `kvm_irqchip_update_msi_route'
collect2: error: ld returned 1 exit status
make[1]: *** [qemu-system-ppc64] Fehler 1
make: *** [subdir-ppc64-softmmu] Fehler 2

Can you supply a fix? It's not obvious to me how.

Thanks,
Andreas

Quoted 35 lines

virtio: backend virtqueue notifier masking
virtio-net: set/clear vhost_started in reverse order
vhost: set started flag while start is in progress
vhost: backend masking support

Paolo Bonzini (5):
docs: move pci-ids.txt to docs/specs/
reorganize pci-ids.txt
virtio-9p: use symbolic constant, add to pci-ids.txt
ivshmem: use symbolic constant for PCI ID, add to pci-ids.txt
pci: use constants for devices under the 1B36 device ID, document them

 docs/specs/pci-ids.txt     |  50 +++++++++++
 hw/9pfs/virtio-9p-device.c |   2 +-
 hw/ivshmem.c               |   7 +-
 hw/kvm/pci-assign.c        |  17 +++-
 hw/pci/msix.c              |   2 +-
 hw/pci/msix.h              |   1 +
 hw/pci/pci.h               |   8 ++
 hw/pci_bridge_dev.c        |   8 +-
 hw/serial-pci.c            |  12 +--
 hw/vhost.c                 | 112 +++++++++++++++++++++----
 hw/vhost.h                 |  10 +++
 hw/vhost_net.c             |  27 +++++-
 hw/vhost_net.h             |   3 +
 hw/virtio-net.c            |  22 ++++-
 hw/virtio-pci.c            | 203 +++++++++++++++++++++++++++++++++++++++------
 hw/virtio-pci.h            |   2 +
 hw/virtio.h                |  15 +++-
 kvm-stub.c                 |   5 ++
 pci-ids.txt                |  31 -------
 19 files changed, 437 insertions(+), 100 deletions(-)
 create mode 100644 docs/specs/pci-ids.txt
 delete mode 100644 pci-ids.txt
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
#3 lore raw
Quoted 42 lines · Andreas Färber

Am 13.01.2013 11:47, schrieb Michael S. Tsirkin:

Quoted 25 lines

The following changes since commit 8e4a424b305e29dc0e454f52df3b35577f342975:

Revert "virtio-pci: replace byte swap hack" (2013-01-06 18:30:17 +0000)

are available in the git repository at:

git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_anthony

for you to fetch changes up to feb9a2ab4b0260d8d680a7ffd25063dafc7ec628:

pci-assign: Enable MSIX on device to match guest (2013-01-09 12:11:16 +0200)

----------------------------------------------------------------
pci,virtio

This further optimizes MSIX handling in virtio-pci. Also included is pci cleanup by Paolo, and pci device assignment fix by Alex.

----------------------------------------------------------------
Alex Williamson (1):
pci-assign: Enable MSIX on device to match guest

Quoted 5 lines

Michael S. Tsirkin (8):
virtio: don't waste irqfds on control vqs
msix: add api to access msix message
kvm: add stub for update msi route
virtio-pci: cache msix messages

This broke the build with PowerKVM:

LINK ppc64-softmmu/qemu-system-ppc64
../hw/virtio-pci.o: In function `kvm_virtio_pci_vq_vector_unmask':
/home/andreas/QEMU/qemu/hw/virtio-pci.c:622: undefined reference to `kvm_irqchip_update_msi_route'
collect2: error: ld returned 1 exit status
make[1]: *** [qemu-system-ppc64] Fehler 1
make: *** [subdir-ppc64-softmmu] Fehler 2

Quoted 4 lines

Can you supply a fix? It's not obvious to me how.

Thanks,
Andreas

I'm not sure how to build this. Can you tell me pls? Maybe the below helps?

kvm: add stub for kvm_irqchip_update_msi_route

kvm-all.c +5 -0
index fc0c6e7..bac67da 100644
@@ -1182,6 +1182,11 @@ static int kvm_irqchip_assign_irqfd(KVMState *s, int fd, int virq, bool assign)
 {
     abort();
 }
+
+int kvm_irqchip_update_msi_route(KVMState *s, int virq, MSIMessage msg)
+{
+    return -ENOSYS;
+}
 #endif /* !KVM_CAP_IRQ_ROUTING */
 
 int kvm_irqchip_add_irqfd_notifier(KVMState *s, EventNotifier *n, int virq)
Tested-by
#4 lore raw

Am 15.01.2013 17:32, schrieb Michael S. Tsirkin:

Quoted 14 lines · Andreas Färber
Quoted 13 lines

Am 13.01.2013 11:47, schrieb Michael S. Tsirkin:

Quoted 1 line

virtio-pci: cache msix messages

This broke the build with PowerKVM:

LINK ppc64-softmmu/qemu-system-ppc64
../hw/virtio-pci.o: In function `kvm_virtio_pci_vq_vector_unmask':
/home/andreas/QEMU/qemu/hw/virtio-pci.c:622: undefined reference to `kvm_irqchip_update_msi_route'
collect2: error: ld returned 1 exit status
make[1]: *** [qemu-system-ppc64] Fehler 1
make: *** [subdir-ppc64-softmmu] Fehler 2

Quoted 3 lines
Quoted 1 line

Can you supply a fix? It's not obvious to me how.

I'm not sure how to build this. Can you tell me pls?

Ideally Daniel would set up your pci branch to build on the revived ppc buildbot (and on s390, thinking of virtio).

When on a Linux/ppc host the KVM headers are detected, nothing special needs to be configured to build that code. Cross-compilation should work as well but obviously needs the right environment; same for a ppc chroot with linux-user+binfmt.

Quoted 5 lines

Maybe the below helps?

kvm: add stub for kvm_irqchip_update_msi_route

Great, together with Blue's bswap patch this fixes the build for me. Thanks for the quick response!

Regards,
Andreas

Quoted 16 lines
kvm-all.c +5 -0
index fc0c6e7..bac67da 100644
@@ -1182,6 +1182,11 @@ static int kvm_irqchip_assign_irqfd(KVMState *s, int fd, int virq, bool assign)
 {
     abort();
 }
+
+int kvm_irqchip_update_msi_route(KVMState *s, int virq, MSIMessage msg)
+{
+    return -ENOSYS;
+}
 #endif /* !KVM_CAP_IRQ_ROUTING */
 
 int kvm_irqchip_add_irqfd_notifier(KVMState *s, EventNotifier *n, int virq)
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg