All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zhang, Xiantao" <xiantao.zhang@intel.com>
To: Avi Kivity <avi@redhat.com>, "tgingold@free.fr" <tgingold@free.fr>
Cc: "Zhang, Yang" <yang.zhang@intel.com>,
	"kvm-ia64@vger.kernel.org" <kvm-ia64@vger.kernel.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: RE: [PATCH] KVM: Qemu: Flush i-cache after ide-dma operation in IA64
Date: Fri, 3 Apr 2009 09:22:27 +0800	[thread overview]
Message-ID: <706158FABBBA044BAD4FE898A02E4BC2326A0CBA@pdsmsx503.ccr.corp.intel.com> (raw)
In-Reply-To: <49D4E0E4.90606@redhat.com>

Avi Kivity wrote:
> Avi Kivity wrote:
>>>> 
>>> 
>>> It doesn't had to do it.  The PCI transaction will automatically
>>> invalidate caches - but qemu doesn't emulate this (and doesn't need
>>> to do on x86). 
>>> 
>> 
>> So any DMA on ia64 will flush the instruction caches?!
>> 
> 
> Or maybe, the host kernel will do it after the transaction completes?

Host kernel doesn't do anything about cache flush after DMA, since it thinks platform guarantees that. 

> In our case the lack of zero-copy means the host is invalidating the
> wrong addresses (memcpy source) and leaving the real destination
> intact. 

We just need to sync the target address(destination address), because only its physical address belongs to guest, and likely to be the DMA target address of guest. 

Xiantao

WARNING: multiple messages have this Message-ID (diff)
From: "Zhang, Xiantao" <xiantao.zhang@intel.com>
To: kvm-ia64@vger.kernel.org
Subject: RE: [PATCH] KVM: Qemu: Flush i-cache after ide-dma operation in IA64
Date: Fri, 03 Apr 2009 01:22:27 +0000	[thread overview]
Message-ID: <706158FABBBA044BAD4FE898A02E4BC2326A0CBA@pdsmsx503.ccr.corp.intel.com> (raw)
In-Reply-To: <10C63FAD690C13458F0B32BCED571F140F98ED4B@pdsmsx502.ccr.corp.intel.com>

Avi Kivity wrote:
> Avi Kivity wrote:
>>>> 
>>> 
>>> It doesn't had to do it.  The PCI transaction will automatically
>>> invalidate caches - but qemu doesn't emulate this (and doesn't need
>>> to do on x86). 
>>> 
>> 
>> So any DMA on ia64 will flush the instruction caches?!
>> 
> 
> Or maybe, the host kernel will do it after the transaction completes?

Host kernel doesn't do anything about cache flush after DMA, since it thinks platform guarantees that. 

> In our case the lack of zero-copy means the host is invalidating the
> wrong addresses (memcpy source) and leaving the real destination
> intact. 

We just need to sync the target address(destination address), because only its physical address belongs to guest, and likely to be the DMA target address of guest. 

Xiantao

  reply	other threads:[~2009-04-03  1:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-02  2:01 [PATCH] KVM: Qemu: Flush i-cache after ide-dma operation in IA64 Zhang, Yang
2009-04-02  2:01 ` Zhang, Yang
2009-04-02  8:55 ` Avi Kivity
2009-04-02  8:55   ` Avi Kivity
2009-04-02 15:41   ` tgingold
2009-04-02 15:41     ` tgingold
2009-04-02 15:53     ` Avi Kivity
2009-04-02 15:53       ` Avi Kivity
2009-04-02 15:59       ` Avi Kivity
2009-04-02 15:59         ` Avi Kivity
2009-04-03  1:22         ` Zhang, Xiantao [this message]
2009-04-03  1:22           ` Zhang, Xiantao
2009-04-03  1:13       ` Zhang, Xiantao
2009-04-03  1:13         ` Zhang, Xiantao
2009-04-03  1:31   ` Zhang, Xiantao
2009-04-03  1:31     ` Zhang, Xiantao
2009-04-03 11:06     ` Avi Kivity
2009-04-03 11:06       ` Avi Kivity
2009-04-06 16:31 ` Hollis Blanchard
2009-04-06 16:31   ` [PATCH] KVM: Qemu: Flush i-cache after ide-dma operation in Hollis Blanchard

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=706158FABBBA044BAD4FE898A02E4BC2326A0CBA@pdsmsx503.ccr.corp.intel.com \
    --to=xiantao.zhang@intel.com \
    --cc=avi@redhat.com \
    --cc=kvm-ia64@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=tgingold@free.fr \
    --cc=yang.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 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.