summaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2020-09-30 21:20:33 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2020-11-15 09:49:12 -0500
commitff5a983cbb3746d371de2cc95ea7dcfd982b4084 (patch)
tree114f9e518a320cd5ccfae228f76b7defa87ecd92 /virt
parent8b460692fee46a47cebd66d70df88dc9aa6d6b8b (diff)
KVM: X86: Don't track dirty for KVM_SET_[TSS_ADDR|IDENTITY_MAP_ADDR]
Originally, we have three code paths that can dirty a page without vcpu context for X86: - init_rmode_identity_map - init_rmode_tss - kvmgt_rw_gpa init_rmode_identity_map and init_rmode_tss will be setup on destination VM no matter what (and the guest cannot even see them), so it does not make sense to track them at all. To do this, allow __x86_set_memory_region() to return the userspace address that just allocated to the caller. Then in both of the functions we directly write to the userspace address instead of calling kvm_write_*() APIs. Another trivial change is that we don't need to explicitly clear the identity page table root in init_rmode_identity_map() because no matter what we'll write to the whole page with 4M huge page entries. Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Sean Christopherson <sean.j.christopherson@intel.com> Signed-off-by: Peter Xu <peterx@redhat.com> Message-Id: <20201001012044.5151-4-peterx@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions