From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [patch 3/3] KVM: MMU: prepopulate the shadow on invlpg Date: Sun, 02 Nov 2008 18:14:14 +0200 Message-ID: <490DD1D6.8010602@redhat.com> References: <20081025223111.498934405@localhost.localdomain> <20081025223243.946600413@localhost.localdomain> <49045906.7070305@redhat.com> <20081031194727.GD21772@dmt.cnet> <490B6359.7000307@redhat.com> <20081031223311.GA31882@dmt.cnet> <490D672E.80906@redhat.com> <20081102160808.GA24376@dmt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Marcelo Tosatti Return-path: Received: from mx2.redhat.com ([66.187.237.31]:51639 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753653AbYKBQOR (ORCPT ); Sun, 2 Nov 2008 11:14:17 -0500 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id mA2GEHVa013092 for ; Sun, 2 Nov 2008 11:14:17 -0500 In-Reply-To: <20081102160808.GA24376@dmt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: Marcelo Tosatti wrote: >> Okay, so Linux won't win on this. But is there any downside, apart from >> fetching the pte and reestablishing the spte? >> > > No, the downside is fetching the pte without being able to establish a > valid spte. > That doesn't seem so expensive. Just a kvm_read_guest_atomic() with a couple of bit tests for present/accessed. (we do need to optimize copy_from_user_inatomic() to use a single mov insn) -- error compiling committee.c: too many arguments to function