KVM: Unify kvm_mmu_pre_write() and kvm_mmu_post_write()
Instead of calling two functions and repeating expensive checks, call one function and provide it with before/after information. Signed-off-by: Avi Kivity <avi@qumranet.com>
This commit is contained in:
@@ -525,8 +525,8 @@ int kvm_write_guest(struct kvm_vcpu *vcpu,
|
||||
|
||||
unsigned long segment_base(u16 selector);
|
||||
|
||||
void kvm_mmu_pre_write(struct kvm_vcpu *vcpu, gpa_t gpa, int bytes);
|
||||
void kvm_mmu_post_write(struct kvm_vcpu *vcpu, gpa_t gpa, int bytes);
|
||||
void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa,
|
||||
const u8 *old, const u8 *new, int bytes);
|
||||
int kvm_mmu_unprotect_page_virt(struct kvm_vcpu *vcpu, gva_t gva);
|
||||
void kvm_mmu_free_some_pages(struct kvm_vcpu *vcpu);
|
||||
|
||||
|
Reference in New Issue
Block a user