public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Sheng Yang <sheng@linux.intel.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Avi Kivity <avi@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	kvm@vger.kernel.org, "Yaozu (Eddie) Dong" <eddie.dong@intel.com>
Subject: Re: [PATCH] KVM: VMX: Execute WBINVD to keep data consistency with assigned devices
Date: Fri, 25 Jun 2010 18:20:00 +0800	[thread overview]
Message-ID: <201006251820.00783.sheng@linux.intel.com> (raw)
In-Reply-To: <4C246EBB.1020909@siemens.com>

On Friday 25 June 2010 16:54:19 Jan Kiszka wrote:
> Sheng Yang wrote:
> > Some guest device driver may leverage the "Non-Snoop" I/O, and explicitly
> > WBINVD or CLFLUSH to a RAM space. Since migration may occur before WBINVD
> > or CLFLUSH, we need to maintain data consistency either by:
> > 1: flushing cache (wbinvd) when the guest is scheduled out if there is no
> > wbinvd exit, or
> > 2: execute wbinvd on all dirty physical CPUs when guest wbinvd exits.
> > 
> > For wbinvd VMExit capable processors, we issue IPIs to all physical CPUs
> > to do wbinvd, for we can't easily tell which physical CPUs are "dirty".
> 
> wbinvd is a heavy weapon in the hands of a guest. Even if it is limited
> to pass-through scenarios, do we really need to bother all physical host
> CPUs with potential multi-millisecond stalls? Think of VMs only running
> on a subset of CPUs (e.g. to isolate latency sources). I would suggest
> to track the physical CPU usage of VCPUs between two wbinvd requests and
> only send the wbinvd IPI to that set.

OK, would try to make it more specific(and complex)...
> 
> Also, I think the code is still too much vmx-focused. Only the trapping
> should be vendor specific, the rest generic.

OK, would consider it.

--
regards
Yang, Sheng

> 
> Jan

      reply	other threads:[~2010-06-25 10:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-25  7:57 [PATCH] KVM: VMX: Execute WBINVD to keep data consistency with assigned devices Sheng Yang
2010-06-25  8:54 ` Jan Kiszka
2010-06-25 10:20   ` Sheng Yang [this message]

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=201006251820.00783.sheng@linux.intel.com \
    --to=sheng@linux.intel.com \
    --cc=avi@redhat.com \
    --cc=eddie.dong@intel.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@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