Skip to content

qemu-kvm: device assignment cleanups and upstream diff reductions

Jan Kiszka kvm 1 version Applied

Status from this message: Thanks, applied 1-6. The rest looks good as well, just need the few comments attended to.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest13 patches 34 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/13qemu-kvm: Reduce configure and Makefile.target diff to upstreamMakefile.target configure+1 -90 replies
2/13qemu-kvm: Drop some no longer needed #ifdefshw/device-assignment.c kvm-all.c qemu-kvm-x86.c +2 more+7 -940 replies
3/13qemu-kvm: Drop -enable-nesting command line switchqemu-kvm.h qemu-options.hx target-i386/cpuid.c +1 more+0 -163 replies
4/13qemu-kvm: Remove eventfd compat headercompat/sys/eventfd.h+0 -1313 replies
5/13qemu-kvm: Remove qemu_ram_unmapcpu-common.h exec.c hw/device-assignment.c+1 -150 replies
6/13qemu-kvm: Drop or replace useless device-assignment.h inclusionshw/pc.c hw/pci-hotplug.c vl.c+1 -30 replies
7/13pci-assign: Fix kvm_deassign_irq handling in assign_irqhw/device-assignment.c+3 -20 replies
8/13pci-assign: Update legacy interrupts only if usedhw/device-assignment.c+6 -30 replies
9/13pci-assign: Drop libpci header dependencyconfigure hw/device-assignment.c hw/pci_regs.h+6 -351 reply
10/13pci-assign: Refactor calc_assigned_dev_idhw/device-assignment.c hw/device-assignment.h+12 -190 replies
11/13pci-assign: Track MSI/MSI-X capability position, clean up related codehw/device-assignment.c+20 -170 replies
12/13pci-assign: Generic config space access managementhw/device-assignment.c hw/device-assignment.h+113 -21512 replies
13/13qemu-kvm: Resolve PCI upstream diffshw/pci.c hw/pci.h+21 -163 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 00/13] qemu-kvm: device assignment cleanups and upstream diff reductions

This series basically consists of two halves. The first one applies a few smaller cleanups to qemu-kvm to improve similarity with upstream. This includes the recently discussed removal of -enable-nesting.

The second half starts with two device assignment fixes and then applies some refactorings, specifically dropping the libpci dependency and enabling the revert of some qemu-kvm private PCI core changes. The latter is achieved by simplifying the access control management to the passed-through device's config space. That also saves 100 LOC.

Note that this series was tested with upstream commit af2be20777 ("Fix fallouts from Linux header inclusion") applied and probably depends on it also mechanically.

Please review/merge.

CC Joerg Roedel <[email protected]>

Jan Kiszka (13):
qemu-kvm: Reduce configure and Makefile.target diff to upstream
qemu-kvm: Drop some no longer needed #ifdefs
qemu-kvm: Drop -enable-nesting command line switch
qemu-kvm: Remove eventfd compat header
qemu-kvm: Remove qemu_ram_unmap
qemu-kvm: Drop or replace useless device-assignment.h inclusions
pci-assign: Fix kvm_deassign_irq handling in assign_irq
pci-assign: Update legacy interrupts only if used
pci-assign: Drop libpci header dependency
pci-assign: Refactor calc_assigned_dev_id
pci-assign: Track MSI/MSI-X capability position, clean up related
code
pci-assign: Generic config space access management
qemu-kvm: Resolve PCI upstream diffs

 Makefile.target        |    2 -
 compat/sys/eventfd.h   |   13 --
 configure              |   29 +---
 cpu-common.h           |    1 -
 exec.c                 |   13 --
 hw/device-assignment.c |  450 +++++++++++++++++-------------------------------
 hw/device-assignment.h |    9 +-
 hw/pc.c                |    1 -
 hw/pci-hotplug.c       |    1 -
 hw/pci.c               |   29 ++--
 hw/pci.h               |    8 +-
 hw/pci_regs.h          |    7 -
 kvm-all.c              |    4 -
 qemu-kvm-x86.c         |   20 --
 qemu-kvm.h             |   30 ----
 qemu-options.hx        |    2 -
 target-i386/cpuid.c    |    3 -
 target-i386/kvm.c      |    2 -
 vl.c                   |    6 +-
 19 files changed, 182 insertions(+), 448 deletions(-)
 delete mode 100644 compat/sys/eventfd.h