From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: Jason Wang <jasowang@redhat.com>,
Alistair Francis <alistair@alistair23.me>,
qemu-arm@nongnu.org, qemu-ppc@nongnu.org,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
David Gibson <david@gibson.dropbear.id.au>
Subject: [PATCH 0/3] Convert ppc and microblaze devices to new ptimer API
Date: Thu, 17 Oct 2019 14:21:10 +0100 [thread overview]
Message-ID: <20191017132110.4343-1-peter.maydell@linaro.org> (raw)
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(-)
--
2.20.1
next reply other threads:[~2019-10-17 13:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-17 13:21 Peter Maydell [this message]
2019-10-17 13:31 ` [PATCH 0/3] Convert ppc and microblaze devices to new ptimer API Peter Maydell
-- strict thread matches above, loose matches on Subject: below --
2019-10-17 13:21 Peter Maydell
2019-10-24 12:16 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191017132110.4343-1-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=alistair@alistair23.me \
--cc=david@gibson.dropbear.id.au \
--cc=edgar.iglesias@gmail.com \
--cc=jasowang@redhat.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).