From: Fam Zheng <famz@redhat.com>
To: "Huaicheng Li (coperd)" <lhcwhu@gmail.com>
Cc: qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] about correctness of IDE emulation
Date: Mon, 14 Mar 2016 09:42:48 +0800 [thread overview]
Message-ID: <20160314014248.GA2112@ad.usersys.redhat.com> (raw)
In-Reply-To: <AC10DBE9-1971-4863-9156-546D47FF9F2B@gmail.com>
On Sun, 03/13 14:37, Huaicheng Li (coperd) wrote:
> Hi all,
>
> What I’m confused about is that:
>
> If one I/O is too large and may need several rounds (say 2) of DMA transfers,
> it seems the second round transfer begins only after the completion of the
> first part, by reading data from **IDEState**. But the IDEState info may have
> been changed by VCPU threads (by writing new I/Os to it) when the first
> transfer finishes. From the code, I see that IDE r/w call back function will
> continue the second transfer by referencing IDEState’s information. Wouldn’t
> this be problematic? Am I missing anything here?
Can you give an concrete example? I/O in VCPU threads that changes IDEState
must also take care of the DMA transfers, for example ide_reset() has
blk_aio_cancel and clears s->nsectors. If an I/O handler fails to do so, it is
a bug.
Fam
next prev parent reply other threads:[~2016-03-14 1:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-13 19:37 [Qemu-devel] about correctness of IDE emulation Huaicheng Li (coperd)
2016-03-14 1:42 ` Fam Zheng [this message]
2016-03-15 3:09 ` Huaicheng Li
2016-03-15 12:59 ` Stefan Hajnoczi
2016-04-13 7:25 ` Huaicheng Li (coperd)
2016-04-13 18:07 ` John Snow
2016-04-13 21:12 ` Huaicheng Li
2016-03-14 10:15 ` Stefan Hajnoczi
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=20160314014248.GA2112@ad.usersys.redhat.com \
--to=famz@redhat.com \
--cc=lhcwhu@gmail.com \
--cc=qemu-devel@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 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).