From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
To: John Snow <jsnow@redhat.com>,
qemu-devel@nongnu.org, qemu-ppc@nongnu.org, kwolf@redhat.com,
stefanha@redhat.com, agraf@suse.de
Subject: Re: [Qemu-devel] [RFC 0/2] macio: split out unaligned DMA access into separate functions
Date: Sun, 31 May 2015 20:54:26 +0100 [thread overview]
Message-ID: <556B66F2.1070607@ilande.co.uk> (raw)
In-Reply-To: <555F7367.5080103@redhat.com>
On 22/05/15 19:20, John Snow wrote:
> As a post-script, can Darwin/PPC use a different mechanism for ATA at
> all, or is macio the sole ATA interface we support here?
>
> I want to see if I can pinpoint when a "good" bath and when a bad path
> diverges with respect to the disk contents ...
>
> Or if you have other ideas on how to identify the transfer that causes
> the issue, I'm all ears.
After a fairly involved weekend, I've managed to track this one down. It
was an actually an issue with the chaining of write requests with
unaligned accesses, whereby alternating patterns of head, head/tail and
tail would end up overwriting the common remainder section and so copy
the wrong sector back to the disk.
The bad news is that this has definitely been broken since QEMU 2.1+ so
anyone using a Darwin/OS X PPC image is very likely to have an
installation that won't boot, or corruption in an image if it was
originally installed on an older QEMU version :(
Note that as I figured out what was happening my code was morphing into
a very similar pattern to that of
bdrv_co_do_preadv()/bdrv_co_do_pwritev() (except mine still calculated
with sectors) and so I bit the bullet and moved them over to match the
existing style. This has the advantage that the algorithm is similar to
an existing one, plus if unaligned block APIs become available in the
future then switching them over should be fairly trivial.
I'll post an updated patchset shortly. John, if you could confirm it
fixes the issue on your side that would be great.
ATB,
Mark.
next prev parent reply other threads:[~2015-05-31 19:54 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-09 22:24 [Qemu-devel] [RFC 0/2] macio: split out unaligned DMA access into separate functions Mark Cave-Ayland
2015-03-09 22:24 ` [Qemu-devel] [RFC 1/2] macio: move unaligned DMA read code into separate pmac_dma_read() function Mark Cave-Ayland
2015-03-09 22:24 ` [Qemu-devel] [RFC 2/2] macio: move unaligned DMA write code into separate pmac_dma_write() function Mark Cave-Ayland
2015-03-17 7:23 ` [Qemu-devel] [RFC 0/2] macio: split out unaligned DMA access into separate functions Alexander Graf
2015-04-28 20:57 ` Mark Cave-Ayland
2015-04-28 21:07 ` John Snow
2015-04-28 21:13 ` Mark Cave-Ayland
2015-03-17 15:23 ` Stefan Hajnoczi
2015-05-18 19:54 ` John Snow
2015-05-19 20:50 ` Mark Cave-Ayland
2015-05-19 21:01 ` John Snow
2015-05-19 21:17 ` Mark Cave-Ayland
2015-05-22 17:55 ` John Snow
2015-05-22 18:16 ` Mark Cave-Ayland
2015-05-22 18:20 ` John Snow
2015-05-22 19:52 ` Mark Cave-Ayland
2015-05-31 19:54 ` Mark Cave-Ayland [this message]
2015-06-01 15:57 ` John Snow
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=556B66F2.1070607@ilande.co.uk \
--to=mark.cave-ayland@ilande.co.uk \
--cc=agraf@suse.de \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=stefanha@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.