On Thu, 4 Jul 2013 12:53:15 +0300 Gleb Natapov <gleb@xxxxxxxxxx> wrote: > On Thu, Jul 04, 2013 at 01:40:29PM +0900, Takuya Yoshikawa wrote: > > This is called right after the memslots is updated, i.e. when the result > > of update_memslots() gets installed in install_new_memslots(). Since > > the memslots needs to be updated twice when we delete or move a memslot, > > kvm_arch_commit_memory_region() does not correspond to this exactly. > > > > In the following patch, x86 will use this new API to check if the mmio > > generation has reached its maximum value, in which case mmio sptes need > > to be flushed out. > > > > Signed-off-by: Takuya Yoshikawa <yoshikawa_takuya_b1@xxxxxxxxxxxxx> > > --- > > Removed the trailing space after "return old_memslots;" at this chance. > > > > arch/arm/kvm/arm.c | 4 ++++ > > arch/ia64/kvm/kvm-ia64.c | 4 ++++ > > arch/mips/kvm/kvm_mips.c | 4 ++++ > > arch/powerpc/kvm/powerpc.c | 4 ++++ > > arch/s390/kvm/kvm-s390.c | 4 ++++ > > arch/x86/kvm/x86.c | 4 ++++ > > include/linux/kvm_host.h | 1 + > > virt/kvm/kvm_main.c | 5 ++++- > > 8 files changed, 29 insertions(+), 1 deletion(-) > > diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h > > index e3aae6d..1c1e9de 100644 > > --- a/include/linux/kvm_host.h > > +++ b/include/linux/kvm_host.h > > @@ -498,6 +498,7 @@ int __kvm_set_memory_region(struct kvm *kvm, > > void kvm_arch_free_memslot(struct kvm_memory_slot *free, > > struct kvm_memory_slot *dont); > > int kvm_arch_create_memslot(struct kvm_memory_slot *slot, unsigned long npages); > > +void kvm_arch_memslots_updated(struct kvm *kvm); > We can define empty function here like this: > #ifdef __KVM_HAVE_MEMSLOT_UPDATE > void kvm_arch_memslots_updated(struct kvm *kvm); > #else > static void kvm_arch_memslots_updated(struct kvm *kvm) > { > } > #endif > > and make x86.c define __KVM_HAVE_MEMSLOT_UPDATE. > > But I am fine with your approach too. Do other arch maintainers have any > preferences here? I don't really have a strong preference either way, so Acked-by: Cornelia Huck <cornelia.huck@xxxxxxxxxx> for the current approach. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html