From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH v3] KVM: VMX: Execute WBINVD to keep data consistency with assigned devices Date: Mon, 28 Jun 2010 11:04:10 +0300 Message-ID: <4C28577A.4070003@redhat.com> References: <1277696187-3571-1-git-send-email-sheng@linux.intel.com> <4C281D58.9090202@redhat.com> <201006281442.35437.sheng@linux.intel.com> <4C2847A6.3040500@redhat.com> <1A42CE6F5F474C41B63392A5F80372B21F5DDEC6@shsmsx501.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Sheng Yang , Jan Kiszka , Marcelo Tosatti , Joerg Roedel , "kvm@vger.kernel.org" To: "Dong, Eddie" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:46692 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754602Ab0F1IET (ORCPT ); Mon, 28 Jun 2010 04:04:19 -0400 In-Reply-To: <1A42CE6F5F474C41B63392A5F80372B21F5DDEC6@shsmsx501.ccr.corp.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: On 06/28/2010 10:30 AM, Dong, Eddie wrote: >> >> Several milliseconds of non-responsiveness may not be acceptable for >> some applications. So I think queue_work_on() and a clflush loop is >> better than an IPI and wbinvd. >> >> > Probably we should make it configurable. For RT usage models, we do care about responsiveness more than performance, but for typical server useg model, we'd better focus on performance in this issue. WBINVD may perform much much better than CLFLUSH, and a mallicious guest repeatedly issuing wbinvd may greatly impact the system performance. > I'm not even sure clflush can work. I thought you could loop on just the cache size, but it appears you'll need to loop over the entire guest address space, which could take ages. So I guess we'll have to settle for wbinvd, just avoiding it when the hardware allows us to. -- error compiling committee.c: too many arguments to function