From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH v2] KVM: Avoid zapping unrelated shadows in __kvm_set_memory_region() Date: Mon, 16 Apr 2012 15:35:19 +0300 Message-ID: <4F8C1207.4040808@redhat.com> References: <20120410220503.36efa6bfb776e741ba076115@gmail.com> <20120413213339.GB4190@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Takuya Yoshikawa , kvm@vger.kernel.org, yoshikawa.takuya@oss.ntt.co.jp To: Marcelo Tosatti Return-path: Received: from mx1.redhat.com ([209.132.183.28]:4510 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753343Ab2DPMfY (ORCPT ); Mon, 16 Apr 2012 08:35:24 -0400 In-Reply-To: <20120413213339.GB4190@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: On 04/14/2012 12:33 AM, Marcelo Tosatti wrote: > mmio sptes are not related to any particular slot (by definition), > i think you misunderstood the purpose of this flush. It handles > > 1) [start, end] gpa range unmapped. > 2) mmio sptes are created that map this range. > 3) a new slot is created. mmio sptes that map [start, end] range, > which is now backed by new memslot should be removed. > > Perhaps there is an efficient way to clear all mmio sptes, or all > mmio sptes pointing to [start, end] (instead of all sptes), here. It shouldn't be too hard for direct maps. For indirect maps, there is now way to reach the spte, since we can't rmap mmio sptes. -- error compiling committee.c: too many arguments to function