diff options
author | Takuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp> | 2013-07-04 00:40:29 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2013-07-18 06:29:25 -0400 |
commit | e59dbe09f8e6fb8f6ee19dc79d1a2f14299e4cd2 (patch) | |
tree | 0de53b1ec2901fd34fdaca56770f0757d9e660e1 /virt | |
parent | 85dfe87e24326c472454cc92313ba8c3b4efe53b (diff) |
KVM: Introduce kvm_arch_memslots_updated()
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@lab.ntt.co.jp>
Acked-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'virt')
-rw-r--r-- | virt/kvm/kvm_main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 71960fb03c2a..a86735d80ee0 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
@@ -731,7 +731,10 @@ static struct kvm_memslots *install_new_memslots(struct kvm *kvm, | |||
731 | update_memslots(slots, new, kvm->memslots->generation); | 731 | update_memslots(slots, new, kvm->memslots->generation); |
732 | rcu_assign_pointer(kvm->memslots, slots); | 732 | rcu_assign_pointer(kvm->memslots, slots); |
733 | synchronize_srcu_expedited(&kvm->srcu); | 733 | synchronize_srcu_expedited(&kvm->srcu); |
734 | return old_memslots; | 734 | |
735 | kvm_arch_memslots_updated(kvm); | ||
736 | |||
737 | return old_memslots; | ||
735 | } | 738 | } |
736 | 739 | ||
737 | /* | 740 | /* |