From: Hollis Blanchard <hollisb@us.ibm.com>
To: "Zhang, Xiantao" <xiantao.zhang@intel.com>
Cc: Avi Kivity <avi@redhat.com>, "kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: RE: [PATCH] kvm: qemu: Sync idcache after emualted DMA operations for ia64
Date: Fri, 24 Apr 2009 10:15:26 -0500 [thread overview]
Message-ID: <1240586126.6036.11.camel@slate.austin.ibm.com> (raw)
In-Reply-To: <706158FABBBA044BAD4FE898A02E4BC236973F12@pdsmsx503.ccr.corp.intel.com>
On Fri, 2009-04-24 at 15:45 +0800, Zhang, Xiantao wrote:
>
> > As I said before, "synchronize instruction and data caches" is a
> > meaningful and important operation on architectures other than IA64.
> > *However*, that operation is not relevant on those architectures in
> > this particular location. As far as I know, on architectures with
> > non-coherent i/d caches, invalidating the icache during DMA writes
> is
> > unique to IA64.
>
> For ia64 in native system, processors depend on that platforms issue
> snoop cycles to invalidate the cachable memory pages that are touched
> by DMA to ensure the cache coherence from viewpoint of processors.
> But for virtual machine, the DMA is emulated by memcpy in userspace,
> so have to use explict instructions to emulate the snoop cycles to
> invalidate icache after virtual DMAs, otherwise, processor may see old
> icache and lead to disaster.
That is exactly the sort of background that should have been in the
commit message in the first place.
Commit message aside, without comments in the code, an outside developer
might very well wonder why other architectures (e.g. PowerPC) *don't*
implement qemu_sync_idcache().
Are you starting to understand my objections to this patch?
--
Hollis Blanchard
IBM Linux Technology Center
next prev parent reply other threads:[~2009-04-24 15:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20090421100852.8B1EE250AE4@cleopatra.tlv.redhat.com>
2009-04-21 16:19 ` [PATCH] kvm: qemu: Sync idcache after emualted DMA operations for ia64 Hollis Blanchard
2009-04-21 17:21 ` Avi Kivity
2009-04-21 19:28 ` Hollis Blanchard
2009-04-21 20:06 ` Avi Kivity
2009-05-01 20:18 ` [PATCH] Revert "Sync idcache after emualted DMA operations for ia64" Hollis Blanchard
2009-05-03 16:12 ` Avi Kivity
2009-05-04 1:39 ` Zhang, Xiantao
2009-05-04 16:52 ` [PATCH] Revert "Sync idcache after emualted DMA operations foria64" Hollis Blanchard
2009-04-22 1:59 ` [PATCH] kvm: qemu: Sync idcache after emualted DMA operations for ia64 Zhang, Xiantao
2009-04-22 15:58 ` Hollis Blanchard
2009-04-24 7:45 ` Zhang, Xiantao
2009-04-24 15:15 ` Hollis Blanchard [this message]
2009-04-24 15:37 ` Zhang, Xiantao
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=1240586126.6036.11.camel@slate.austin.ibm.com \
--to=hollisb@us.ibm.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=xiantao.zhang@intel.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