qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] Convert misc-arch devices to new ptimer API
@ 2019-10-17 13:28 Peter Maydell
  2019-10-17 13:28 ` [PATCH 1/8] hw/timer/puv3_ost.c: Switch to transaction-based " Peter Maydell
                   ` (7 more replies)
  0 siblings, 8 replies; 30+ messages in thread
From: Peter Maydell @ 2019-10-17 13:28 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Edgar E. Iglesias, Michael Walle, Guan Xuetao,
	Magnus Damm

This patchset converts the devices used by the miscellaneous minor
architecture machines to the new ptimer API. More specifically:

cris:
 hw/timer/etraxfs_timer.c

lm32:
 hw/timer/lm32_timer.c
 hw/timer/milkymist-sysctl.c

nios2:
 hw/timer/altera_timer.c

sh4:
 hw/timer/sh_timer.c

unicore32:
 hw/timer/puv3_ost.c

m68k:
 hw/m68k/mcf5206.c
 hw/m68k/mcf5208.c

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 I have done:
 * 'make check'
 * running a milkymist system image I had lying around
 * running an sh4 system image

This doesn't exercise the devices very much, so more specific testing
would be appreciated. I plan to collect these patches up and
get them into the tree with other ptimer-related changes (probably
via target-arm just for convenience) unless anybody would specifically
like to take a patch via some other tree.

thanks
--PMM


Peter Maydell (8):
  hw/timer/puv3_ost.c: Switch to transaction-based ptimer API
  hw/timer/sh_timer: Switch to transaction-based ptimer API
  hw/timer/lm32_timer: Switch to transaction-based ptimer API
  hw/watchdog/milkymist-sysctl.c: Switch to transaction-based ptimer API
  hw/timer/altera_timer.c: Switch to transaction-based ptimer API
  hw/watchdog/etraxfs_timer.c: Switch to transaction-based ptimer API
  hw/m68k/mcf5206.c: Switch to transaction-based ptimer API
  hw/m68k/mcf5208.c: Switch to transaction-based ptimer API

 hw/m68k/mcf5206.c           |  9 +++++----
 hw/m68k/mcf5208.c           |  9 +++++----
 hw/timer/altera_timer.c     | 13 +++++++++----
 hw/timer/etraxfs_timer.c    | 23 +++++++++++++----------
 hw/timer/lm32_timer.c       | 13 +++++++++----
 hw/timer/milkymist-sysctl.c | 25 ++++++++++++++++++-------
 hw/timer/puv3_ost.c         |  9 +++++----
 hw/timer/sh_timer.c         | 13 +++++++++----
 8 files changed, 73 insertions(+), 41 deletions(-)

-- 
2.20.1



^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2019-10-19 11:39 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-17 13:28 [PATCH 0/8] Convert misc-arch devices to new ptimer API Peter Maydell
2019-10-17 13:28 ` [PATCH 1/8] hw/timer/puv3_ost.c: Switch to transaction-based " Peter Maydell
2019-10-17 14:26   ` Richard Henderson
2019-10-17 15:59   ` Philippe Mathieu-Daudé
2019-10-17 13:28 ` [PATCH 2/8] hw/timer/sh_timer: " Peter Maydell
2019-10-17 14:49   ` Richard Henderson
2019-10-17 16:01   ` Philippe Mathieu-Daudé
2019-10-17 13:29 ` [PATCH 3/8] hw/timer/lm32_timer: " Peter Maydell
2019-10-17 14:51   ` Richard Henderson
2019-10-17 16:10   ` Philippe Mathieu-Daudé
2019-10-17 13:29 ` [PATCH 4/8] hw/watchdog/milkymist-sysctl.c: " Peter Maydell
2019-10-17 14:52   ` Richard Henderson
2019-10-17 15:42   ` Philippe Mathieu-Daudé
2019-10-17 13:29 ` [PATCH 5/8] hw/timer/altera_timer.c: " Peter Maydell
2019-10-17 15:02   ` Richard Henderson
2019-10-17 16:09   ` Philippe Mathieu-Daudé
2019-10-17 16:10     ` Peter Maydell
2019-10-17 13:29 ` [PATCH 6/8] hw/watchdog/etraxfs_timer.c: " Peter Maydell
2019-10-17 15:06   ` Richard Henderson
2019-10-17 15:47   ` Philippe Mathieu-Daudé
2019-10-17 13:29 ` [PATCH 7/8] hw/m68k/mcf5206.c: " Peter Maydell
2019-10-17 15:07   ` Richard Henderson
2019-10-17 15:48   ` Philippe Mathieu-Daudé
2019-10-19 10:48   ` Thomas Huth
2019-10-19 11:10     ` Thomas Huth
2019-10-19 11:38       ` Thomas Huth
2019-10-17 13:29 ` [PATCH 8/8] hw/m68k/mcf5208.c: " Peter Maydell
2019-10-17 15:08   ` Richard Henderson
2019-10-17 15:49   ` Philippe Mathieu-Daudé
2019-10-19 10:52   ` Thomas Huth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).