mirror of
https://github.com/torvalds/linux.git
synced 2024-12-24 20:01:55 +00:00
3d0c27ad6e
The page fault caused by write access on the write tracked page can not be fixed, it always need to be emulated. page_fault_handle_page_track() is the fast path we introduce here to skip holding mmu-lock and shadow page table walking However, if the page table is not present, it is worth making the page table entry present and readonly to make the read access happy mmu_need_write_protect() need to be cooked to avoid page becoming writable when making page table present or sync/prefetch shadow page table entries Signed-off-by: Xiao Guangrong <guangrong.xiao@linux.intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
23 lines
730 B
C
23 lines
730 B
C
#ifndef _ASM_X86_KVM_PAGE_TRACK_H
|
|
#define _ASM_X86_KVM_PAGE_TRACK_H
|
|
|
|
enum kvm_page_track_mode {
|
|
KVM_PAGE_TRACK_WRITE,
|
|
KVM_PAGE_TRACK_MAX,
|
|
};
|
|
|
|
void kvm_page_track_free_memslot(struct kvm_memory_slot *free,
|
|
struct kvm_memory_slot *dont);
|
|
int kvm_page_track_create_memslot(struct kvm_memory_slot *slot,
|
|
unsigned long npages);
|
|
|
|
void kvm_slot_page_track_add_page(struct kvm *kvm,
|
|
struct kvm_memory_slot *slot, gfn_t gfn,
|
|
enum kvm_page_track_mode mode);
|
|
void kvm_slot_page_track_remove_page(struct kvm *kvm,
|
|
struct kvm_memory_slot *slot, gfn_t gfn,
|
|
enum kvm_page_track_mode mode);
|
|
bool kvm_page_track_is_active(struct kvm_vcpu *vcpu, gfn_t gfn,
|
|
enum kvm_page_track_mode mode);
|
|
#endif
|