Skip to content

HPET cleanups, fixes, enhancements

Jan Kiszka qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest15 patches 106 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15hpet: Catch out-of-bounds timer accesshw/hpet.c+5 -13 replies
2/15hpet: Coding style cleanups and some refactoringshw/hpet.c hw/hpet_emul.h+226 -2181 reply
3/15hpet: Silence warning on write to running main counterhw/hpet.c+2 -20 replies
4/15hpet: Move static timer field initializationhw/hpet.c+2 -20 replies
5/15hpet: Convert to qdevhw/hpet.c hw/hpet_emul.h hw/pc.c+38 -152 replies
6/15hpet: Start/stop timer when HPET_TN_ENABLE is modifiedhw/hpet.c+5 -00 replies
7/15qemu_irq: Add IRQ handlers with delivery feedbackhw/irq.c hw/irq.h+44 -1691 replies
8/15x86: Refactor RTC IRQ coalescing workaroundhw/apic.c hw/apic.h hw/i8259.c +5 more+94 -740 replies
9/15hpet/rtc: Rework RTC IRQ replacement by HPEThw/hpet.c hw/hpet_emul.h hw/mc146818rtc.c +6 more+53 -578 replies
10/15hpet: Drop static statehw/hpet.c+17 -210 replies
11/15hpet: Add support for level-triggered interruptshw/hpet.c+22 -100 replies
12/15vmstate: Add VMSTATE_STRUCT_VARRAY_UINT8hw/hw.h+10 -00 replies
13/15hpet: Make number of timers configurablehw/hpet.c hw/hpet_emul.h+45 -140 replies
14/15hpet: Add MSI supporthw/apic.c hw/apic.h hw/hpet.c +1 more+40 -60 replies
15/15monitor/QMP: Drop info hpet / query-hpetQMP/vm-info monitor.c+1 -340 replies

Reviews trailers per patch

1 of 15 patches has a Reviewed-by or Acked-by.

PatchJuan Quintela
1/15
2/15R-b
3/15
4/15
5/15
6/15
7/15
8/15
9/15
10/15
11/15
12/15
13/15
14/15
15/15

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [Qemu-devel] [RFT][PATCH 00/15] HPET cleanups, fixes, enhancements

Not yet for merge (unless I happened to forgot adding bugs), just a Request For Testing (and for review, of course). This series grew beyond my initial plans and my current testing capabilities, Linux and Win7 are apparently still fine, but that's all I can say so far.

To summarize contributions to the HPET model:
- fixed host memory corruptions by guest (patch 1, likely stable stuff)
- coding style cleanup
- qdev conversion
- detangling of RTC from HPET dependencies, specifically via providing "feedback" IRQ handlers to easy IRQ coalescing workaround implementations
- support for level-triggered HPET IRQs (untested - does anyone know of a user?)
- up to 32 comparators (configurable via qdev prop)
- MSI support (configurable via qdev prop)
- dropped obsolete "info hpet" and "query-hpet"

Yet missing:
- IRQ coalescing workaround
- maybe some refactoring to easy compile-time disabling (Juan?)
- build once (I leave this to Blue Swirl :) )
- multiple HPET blocks (no urgent need yet)

Please give this hell.

Jan Kiszka (15):
hpet: Catch out-of-bounds timer access
hpet: Coding style cleanups and some refactorings
hpet: Silence warning on write to running main counter
hpet: Move static timer field initialization
hpet: Convert to qdev
hpet: Start/stop timer when HPET_TN_ENABLE is modified
qemu_irq: Add IRQ handlers with delivery feedback
x86: Refactor RTC IRQ coalescing workaround hpet/rtc: Rework RTC IRQ replacement by HPET
hpet: Drop static state
hpet: Add support for level-triggered interrupts
vmstate: Add VMSTATE_STRUCT_VARRAY_UINT8
hpet: Make number of timers configurable
hpet: Add MSI support
monitor/QMP: Drop info hpet / query-hpet

 QMP/vm-info      |    2 +-
 hw/apic.c        |   63 +++---
 hw/apic.h        |   11 +-
 hw/hpet.c        |  582 +++++++++++++++++++++++++++++++++--------------------
 hw/hpet_emul.h   |   46 +----
 hw/hw.h          |   10 +
 hw/i8259.c       |   20 ++-
 hw/ioapic.c      |   34 ++--
 hw/irq.c         |   38 +++-
 hw/irq.h         |   22 ++-
 hw/mc146818rtc.c |   60 ++----
 hw/mc146818rtc.h |    4 +-
 hw/mips_jazz.c   |    2 +-
 hw/mips_malta.c  |    2 +-
 hw/mips_r4k.c    |    2 +-
 hw/pc.c          |   33 +++-
 hw/pc.h          |    2 +-
 hw/pc_piix.c     |    2 +-
 hw/ppc_prep.c    |    2 +-
 monitor.c        |   33 ---
 20 files changed, 552 insertions(+), 418 deletions(-)