uq/master: Introduce basic irqchip support
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest16 patches 0 repliesNew
- v1 RFC16 patches 37 repliesSuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/16 | msi: Generalize msix_supported to msi_supportedhw/ hw/ hw/ +2 more | +16 | 0 replies | |
| 2/16 | kvm: Move kvmclock into hw/kvm folderMakefile.target configure hw/ +2 more | +6 | 0 replies | |
| 3/16 | apic: Stop timer on resethw/ | +2 | 0 replies | |
| 4/16 | apic: Factor out core for KVM reuseMakefile.target hw/ hw/ +2 more | +339 | 0 replies | |
| 5/16 | apic: Open-code timer save/restorehw/ hw/ hw/ | +64 | 0 replies | |
| 6/16 | i8259: Factor out core for KVM reuseMakefile.objs hw/ hw/ +1 more | +174 | 0 replies | |
| 7/16 | ioapic: Convert to memory APIhw/ | +11 | 0 replies | |
| 8/16 | ioapic: Reject non-dword accesses to IOWIN registerhw/ | +6 | 0 replies | |
| 9/16 | ioapic: Factor out core for KVM reuseMakefile.target hw/ hw/ +1 more | +192 | 0 replies | |
| 10/16 | memory: Introduce memory_region_init_reservationmemory.c memory.h | +52 | 0 replies | |
| 11/16 | kvm: Introduce core services for in-kernel irqchip supportkvm-all.c kvm.h target-i386/ | +168 | 0 replies | |
| 12/16 | kvm: x86: Establish IRQ0 override controlhw/ kvm-all.c kvm-stub.c +3 more | +14 | 0 replies | |
| 13/16 | kvm: x86: Add user space part for in-kernel APICMakefile.target hw/ hw/ +2 more | +169 | 0 replies | |
| 14/16 | kvm: x86: Add user space part for in-kernel i8259Makefile.target hw/ hw/ +1 more | +202 | 0 replies | |
| 15/16 | kvm: x86: Add user space part for in-kernel IOAPICMakefile.target hw/ hw/ +1 more | +136 | 0 replies | |
| 16/16 | kvm: Arm in-kernel irqchip supportqemu-config.c qemu-options.hx | +8 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 00/16] uq/master: Introduce basic irqchip support
This is v2, addressing the feedback comments provided so far, namely:
- dropped #include <> conversions
- do not abort() on reserved memory region accesses but only warn once
- use memory_region_init_io in memory_region_init_reservation
Patch 1 of this series has meanwhile been posted for direct upstream inclusion, see http://thread.gmane.org/gmane.comp.emulators.qemu/127308.
I'm keeping it to easy testing, but it should likely not go via uq/master. The same may apply to other patches too, e.g. 10.
--- original series description ---
Some weeks back I posted my MSI rework for qemu-kvm that shall once help integrating those bits into upstream. After that I wondered how a rewritten in-kernel irqchip model could look like and make use of this. But then I realized that there is actually no technical need to role out a first version of kvm irqchips that already support MSI. As the MSI thing will likely take a few more iterations, I now decided to rush forward with basic kvm irqchip for QEMU upstream. Here we go.
My idea was always to create proper alternatives to the existing user space device models while keeping the vmstates 100% compatible. I think I succeeded in this, tests worked fine so far. The kvm and the user space models now have a common core where they share logic and specific code modules where they differ. Also, I moved all kvm devices into hw/kvm.
The in-kernel irqchip support can be controlled via a machine property (-machine ...,kernel_irqchip=on), in contrast to qemu-kvm's dedicated command line switch. This series keeps the support off by default because we still lack the MSI bits as I explained. Also, in-kernel PIT is not yet implemented and TPR patching/VAPIC (for Windows guests).
The merge story would basically look similar to what we did before with the clean-room reimplementation of kvm for QEMU: Merge into upstream, merge back into qemu-kvm, disabling the new bits for now, then gradually switching over to the new services, specifically once they are feature-equivalent. Of course, I will support these steps as usual.
So, feedback and review welcome!
Jan Kiszka (16):
msi: Generalize msix_supported to msi_supported
kvm: Move kvmclock into hw/kvm folder
apic: Stop timer on reset
apic: Factor out core for KVM reuse
apic: Open-code timer save/restore
i8259: Factor out core for KVM reuse
ioapic: Convert to memory API
ioapic: Reject non-dword accesses to IOWIN register
ioapic: Factor out core for KVM reuse
memory: Introduce memory_region_init_reservation
kvm: Introduce core services for in-kernel irqchip support
kvm: x86: Establish IRQ0 override control
kvm: x86: Add user space part for in-kernel APIC
kvm: x86: Add user space part for in-kernel i8259
kvm: x86: Add user space part for in-kernel IOAPIC
kvm: Arm in-kernel irqchip support
Makefile.objs | 2 +-
Makefile.target | 6 +-
configure | 1 +
hw/apic.c | 288 ++++------------------------------------
hw/apic_common.c | 262 ++++++++++++++++++++++++++++++++++++
hw/apic_internal.h | 111 +++++++++++++++
hw/i8259.c | 78 +-----------
hw/i8259_common.c | 103 ++++++++++++++
hw/i8259_internal.h | 67 +++++++++
hw/ioapic.c | 136 +++----------------
hw/ioapic_common.c | 89 ++++++++++++
hw/ioapic_internal.h | 94 +++++++++++++
hw/kvm/apic.c | 147 ++++++++++++++++++++
hw/{kvmclock.c => kvm/clock.c} | 4 +-
hw/{kvmclock.h => kvm/clock.h} | 0
hw/kvm/i8259.c | 154 +++++++++++++++++++++
hw/kvm/ioapic.c | 120 +++++++++++++++++
hw/msi.c | 8 +
hw/msi.h | 2 +
hw/msix.c | 9 +-
hw/msix.h | 2 -
hw/pc.c | 20 ++-
hw/pc.h | 1 +
hw/pc_piix.c | 67 +++++++++-
kvm-all.c | 154 +++++++++++++++++++++
kvm-stub.c | 5 +
kvm.h | 13 ++
memory.c | 36 +++++
memory.h | 16 +++
qemu-config.c | 4 +
qemu-options.hx | 5 +-
sysemu.h | 1 -
target-i386/kvm.c | 19 +++
trace-events | 2 +-
vl.c | 1 -
35 files changed, 1547 insertions(+), 480 deletions(-)
create mode 100644 hw/apic_common.c
create mode 100644 hw/apic_internal.h
create mode 100644 hw/i8259_common.c
create mode 100644 hw/i8259_internal.h
create mode 100644 hw/ioapic_common.c
create mode 100644 hw/ioapic_internal.h
create mode 100644 hw/kvm/apic.c
rename hw/{kvmclock.c => kvm/clock.c} (98%)
rename hw/{kvmclock.h => kvm/clock.h} (100%)
create mode 100644 hw/kvm/i8259.c
create mode 100644 hw/kvm/ioapic.cSignature · 1 line
1.7.3.4