Skip to content

Convert ppc and microblaze devices to new ptimer API

Peter Maydell qemu-arm qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3hw/net/fsl_etsec/etsec.c: Switch to transaction-based ptimer APIhw/net/fsl_etsec/etsec.c hw/net/fsl_etsec/etsec.h+5 -53 replies
2/3hw/timer/xilinx_timer.c: Switch to transaction-based ptimer APIhw/timer/xilinx_timer.c+8 -55 replies
3/3hw/dma/xilinx_axidma.c: Switch to transaction-based ptimer APIhw/dma/xilinx_axidma.c+5 -45 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchRichard HendersonPhilippe Mathieu-DaudéAlistair Francis
1/3R-b R-b R-b
2/3R-b R-b R-b
3/3R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 0/3] Convert ppc and microblaze devices to new ptimer API

This patchset converts the devices used by ppc and microblaze machines to the new ptimer API. (xilinx_timer is used by both, hence putting both archs in the same patchset).

Currently the ptimer design uses a QEMU bottom-half as its mechanism for calling back into the device model using the ptimer when the timer has expired. Unfortunately this design is fatally flawed, because it means that there is a lag between the ptimer updating its own state and the device callback function updating device state, and guest accesses to device registers between the two can return inconsistent device state. This was reported as a bug in a specific timer device but it's a problem with the generic ptimer code:
https://bugs.launchpad.net/qemu/+bug/1777777

The updates to the individual ptimer devices are straightforward:
we need to add begin/commit calls around the various places that modify the ptimer state, and use the new ptimer_init() function to create the timer.

Testing has been 'make check' only, which obviously doesn't exercise the devices very much, so more specific testing would be appreciated. I'm happy for these patches to go in via the ppc tree if you want, or I can collect them up with the other ptimer-related changes I'm sending for other archs.

thanks
--PMM

Peter Maydell (3):
hw/net/fsl_etsec/etsec.c: Switch to transaction-based ptimer API hw/timer/xilinx_timer.c: Switch to transaction-based ptimer API hw/dma/xilinx_axidma.c: Switch to transaction-based ptimer API

 hw/net/fsl_etsec/etsec.h |  1 -
 hw/dma/xilinx_axidma.c   |  9 +++++----
 hw/net/fsl_etsec/etsec.c |  9 +++++----
 hw/timer/xilinx_timer.c  | 13 ++++++++-----
 4 files changed, 18 insertions(+), 14 deletions(-)
Signature · 1 line
2.20.1