Skip to content

pci-assign: Refactor for upstream merge

Jan Kiszka kvm 2 versions – Applied

Status from this message: Applied, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest20 patches 1 replyApplied
  2. v119 patches 10 repliesSuperseded

Changes in v2 from the cover letter

- rebased over qemu-kvm next
- consistently clear unused IOCTL fields via structure initialization

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/20pci-assign: Only clean up registered IO resourceshw/device-assignment.c+6 -40 replies
2/20pci-assign: Factor out kvm_device_pci_assign/deassignhw/device-assignment.c qemu-kvm.c qemu-kvm.h +2 more+53 -720 replies
3/20pci-assign: Rename assign_irq to assign_intxhw/device-assignment.c+7 -70 replies
4/20pci-assign: Refactor interrupt deassignmenthw/device-assignment.c qemu-kvm.c qemu-kvm.h +2 more+86 -450 replies
5/20pci-assign: Factor out kvm_device_intx_assignhw/device-assignment.c target-i386/kvm.c target-i386/kvm_i386.h+33 -100 replies
6/20qemu-kvm: Move kvm_device_intx_set_mask serviceqemu-kvm.c qemu-kvm.h target-i386/kvm.c +1 more+10 -110 replies
7/20qemu-kvm: Clear unused IOCTL fields in kvm_device_intx_set_masktarget-i386/kvm.c+5 -40 replies
8/20pci-assign: Rework MSI assignmenthw/device-assignment.c target-i386/kvm.c target-i386/kvm_i386.h+35 -240 replies
9/20pci-assign: Factor out kvm_device_msix_supportedhw/device-assignment.c target-i386/kvm.c target-i386/kvm_i386.h+9 -40 replies
10/20pci-assign: Replace kvm_assign_set_msix_nr with kvm_device_msix_init_vectorshw/device-assignment.c qemu-kvm.c qemu-kvm.h +2 more+15 -110 replies
11/20pci-assign: Replace kvm_assign_set_msix_entry with kvm_device_msix_set_vectorhw/device-assignment.c qemu-kvm.c qemu-kvm.h +2 more+16 -170 replies
12/20pci-assign: Rework MSI-X route setuphw/device-assignment.c kvm-all.c kvm-stub.c +3 more+71 -2150 replies
13/20pci-assign: Factor out kvm_device_msix_assignhw/device-assignment.c qemu-kvm.c qemu-kvm.h +2 more+8 -460 replies
14/20qemu-kvm: Kill qemu-kvm.[ch]hw/device-assignment.c kvm-all.c kvm.h +2 more+0 -850 replies
15/20pci-assign: Drop configure switchesconfigure hw/i386/Makefile.objs+1 -120 replies
16/20pci-assign: Move and rename source filehw/i386/Makefile.objs hw/kvm/Makefile.objs hw/kvm/pci-assign.c+6 -90 replies
17/20pci-assign: Fix coding style issueshw/kvm/pci-assign.c+105 -760 replies
18/20pci-assign: Replace exit() with hw_error()hw/kvm/pci-assign.c+2 -80 replies
19/20pci-assign: Drop unused or write-only variableshw/kvm/pci-assign.c+0 -90 replies
20/20pci-assign: Gracefully handle missing in-kernel irqchip supporthw/kvm/pci-assign.c+20 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 00/20] pci-assign: Refactor for upstream merge

With this series, we are getting very close to obsoleting qemu-kvm. It refactors hw/device-assignment.c and the associated KVM helper functions into a form that should allow merging them into QEMU. Once the series is acceptable for qemu-kvm, I will break out the necessary uq/master patches and push pci-assign to upstream.

The major step of this series is to define a regular set of kvm_device_* services that encapsulate classic (i.e. KVM-based, non-VFIO) device assignment features and export them to i386 targets only. There will never be another arch using them, therefore I pushed them into this corner. Moreover, the device assignment device now makes use of the new KVM IRQ/MSI routing API and no longer pokes into the internals of that layer. Finally, I moved the code into hw/kvm/pci-assign.c, dropped the superfluous configure option and did some basic code cleanups (mostly coding style) to bring things in shape.

Note that patch 1 is a simple bug fix that should likely be applied for qemu-kvm-1.2 independently.

Changes in v2:
- rebased over qemu-kvm next
- consistently clear unused IOCTL fields via structure initialization

Jan Kiszka (20):
pci-assign: Only clean up registered IO resources
pci-assign: Factor out kvm_device_pci_assign/deassign
pci-assign: Rename assign_irq to assign_intx
pci-assign: Refactor interrupt deassignment
pci-assign: Factor out kvm_device_intx_assign
qemu-kvm: Move kvm_device_intx_set_mask service
qemu-kvm: Clear unused IOCTL fields in kvm_device_intx_set_mask
pci-assign: Rework MSI assignment
pci-assign: Factor out kvm_device_msix_supported
pci-assign: Replace kvm_assign_set_msix_nr with
kvm_device_msix_init_vectors
pci-assign: Replace kvm_assign_set_msix_entry with
kvm_device_msix_set_vector
pci-assign: Rework MSI-X route setup
pci-assign: Factor out kvm_device_msix_assign
qemu-kvm: Kill qemu-kvm.[ch]
pci-assign: Drop configure switches
pci-assign: Move and rename source file
pci-assign: Fix coding style issues
pci-assign: Replace exit() with hw_error()
pci-assign: Drop unused or write-only variables
pci-assign: Gracefully handle missing in-kernel irqchip support

 configure                                    |   11 -
 hw/i386/Makefile.objs                        |    3 -
 hw/kvm/Makefile.objs                         |    2 +-
 hw/{device-assignment.c => kvm/pci-assign.c} |  502 +++++++++++++-------------
 kvm-all.c                                    |   54 +++-
 kvm-stub.c                                   |    9 -
 kvm.h                                        |   12 +-
 qemu-kvm.c                                   |  233 ------------
 qemu-kvm.h                                   |  112 ------
 target-i386/kvm.c                            |  141 +++++++
 target-i386/kvm_i386.h                       |   22 ++
 11 files changed, 460 insertions(+), 641 deletions(-)
 rename hw/{device-assignment.c => kvm/pci-assign.c} (84%)
 delete mode 100644 qemu-kvm.c
 delete mode 100644 qemu-kvm.h
Signature · 1 line
1.7.3.4