From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH v6 1/2] KVM: VMX: Execute WBINVD to keep data consistency with assigned devices Date: Wed, 30 Jun 2010 13:34:51 -0300 Message-ID: <20100630163451.GA1628@amt.cnet> References: <1277871916-8348-1-git-send-email-sheng@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Avi Kivity , Jan Kiszka , Joerg Roedel , kvm@vger.kernel.org, "Yaozu (Eddie) Dong" To: Sheng Yang Return-path: Received: from mx1.redhat.com ([209.132.183.28]:58077 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756928Ab0F3RDM (ORCPT ); Wed, 30 Jun 2010 13:03:12 -0400 Content-Disposition: inline In-Reply-To: <1277871916-8348-1-git-send-email-sheng@linux.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Jun 30, 2010 at 12:25:15PM +0800, 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. > > Signed-off-by: Yaozu (Eddie) Dong > Signed-off-by: Sheng Yang > --- > arch/x86/include/asm/kvm_host.h | 6 +++++ > arch/x86/kvm/emulate.c | 5 +++- > arch/x86/kvm/svm.c | 7 ++++++ > arch/x86/kvm/vmx.c | 10 ++++++++- > arch/x86/kvm/x86.c | 41 +++++++++++++++++++++++++++++++++++++++ > 5 files changed, 67 insertions(+), 2 deletions(-) Applied, thanks. .