From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH] KVM: x86: Avoid zapping mmio sptes twice for generation wraparound Date: Wed, 03 Jul 2013 11:08:18 +0200 Message-ID: <51D3EA02.2010008@redhat.com> References: <20130703171804.89d6cc2c.yoshikawa_takuya_b1@lab.ntt.co.jp> <51D3E093.3020408@redhat.com> <51D3E33D.1090704@linux.vnet.ibm.com> <51D3E5DC.5020902@linux.vnet.ibm.com> <51D3E69F.2050104@redhat.com> <20130703180500.4b78ecdf.yoshikawa_takuya_b1@lab.ntt.co.jp> <20130703090535.GF18508@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Takuya Yoshikawa , Xiao Guangrong , kvm@vger.kernel.org To: Gleb Natapov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:2075 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932065Ab3GCJI2 (ORCPT ); Wed, 3 Jul 2013 05:08:28 -0400 In-Reply-To: <20130703090535.GF18508@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Il 03/07/2013 11:05, Gleb Natapov ha scritto: >>> Yes, the actual operation would be the same as this patch. You can >>> rename kvm_mmu_invalidate_mmio_sptes to kvm_arch_memslots_installed, or >>> something like that. But it would have to touch all architectures. >> >> I tried to avoid introducing x86-centric code into the generic one. >> >> If another arch can gain something by such function, I'm willing to >> touch all arch code. >> > Please do. X86 is the most optimized one so it does things other arches > do not yet. Slot generation update hook sounds generic enough. Yes, makes sense. However, this patch is still an improvement because the current code is too easily mistaken for an off-by-one bug. Any improvements to the API can go on top. Paolo