diff options
author | Vladimir Davydov <vdavydov@parallels.com> | 2015-08-25 14:21:10 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2015-08-25 14:21:10 +1000 |
commit | 176a37291c8c2f9f7749b255c4a0662aea15f185 (patch) | |
tree | 0e0f66a74236763da148d1bd4b3aaa76fe79b035 /virt | |
parent | 65b9d0c6871cc94b9fec3be6cbfbe9b301d39880 (diff) |
mmu-notifier-add-clear_young-callback-fix
Cc: Andres Lagar-Cavilla <andreslc@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'virt')
-rw-r--r-- | virt/kvm/kvm_main.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index ff4173ce6924..e69a5cb99571 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -397,6 +397,19 @@ static int kvm_mmu_notifier_clear_young(struct mmu_notifier *mn, idx = srcu_read_lock(&kvm->srcu); spin_lock(&kvm->mmu_lock); + /* + * Even though we do not flush TLB, this will still adversely + * affect performance on pre-Haswell Intel EPT, where there is + * no EPT Access Bit to clear so that we have to tear down EPT + * tables instead. If we find this unacceptable, we can always + * add a parameter to kvm_age_hva so that it effectively doesn't + * do anything on clear_young. + * + * Also note that currently we never issue secondary TLB flushes + * from clear_young, leaving this job up to the regular system + * cadence. If we find this inaccurate, we might come up with a + * more sophisticated heuristic later. + */ young = kvm_age_hva(kvm, start, end); spin_unlock(&kvm->mmu_lock); srcu_read_unlock(&kvm->srcu, idx); |