提交 95b0430d 编写于 作者: T Takuya Yoshikawa 提交者: Gleb Natapov

KVM: MMU: Mark sp mmio cached when creating mmio spte

This will be used not to zap unrelated mmu pages when creating/moving
a memory slot later.
Reviewed-by: NMarcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: NTakuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp>
Signed-off-by: NGleb Natapov <gleb@redhat.com>
上级 0238ea91
......@@ -230,6 +230,7 @@ struct kvm_mmu_page {
#endif
int write_flooding_count;
bool mmio_cached;
};
struct kvm_pio_request {
......
......@@ -199,8 +199,11 @@ EXPORT_SYMBOL_GPL(kvm_mmu_set_mmio_spte_mask);
static void mark_mmio_spte(u64 *sptep, u64 gfn, unsigned access)
{
struct kvm_mmu_page *sp = page_header(__pa(sptep));
access &= ACC_WRITE_MASK | ACC_USER_MASK;
sp->mmio_cached = true;
trace_mark_mmio_spte(sptep, gfn, access);
mmu_spte_set(sptep, shadow_mmio_mask | access | gfn << PAGE_SHIFT);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册