KVM: x86: Change parameter of kvm_mmu_slot_remove_write_access
This patch changes the second parameter of kvm_mmu_slot_remove_write_access from 'slot id' to 'struct kvm_memory_slot *' to align with kvm_x86_ops dirty logging hooks, which will be introduced in further patch. Better way is to change second parameter of kvm_arch_commit_memory_region from 'struct kvm_userspace_memory_region *' to 'struct kvm_memory_slot * new', but it requires changes on other non-x86 ARCH too, so avoid it now. Signed-off-by: Kai Huang <kai.huang@linux.intel.com> Reviewed-by: Xiao Guangrong <guangrong.xiao@linux.intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:

gecommit door
Paolo Bonzini

bovenliggende
9b51a63024
commit
1c91cad423
@@ -4408,14 +4408,13 @@ void kvm_mmu_setup(struct kvm_vcpu *vcpu)
|
||||
init_kvm_mmu(vcpu);
|
||||
}
|
||||
|
||||
void kvm_mmu_slot_remove_write_access(struct kvm *kvm, int slot)
|
||||
void kvm_mmu_slot_remove_write_access(struct kvm *kvm,
|
||||
struct kvm_memory_slot *memslot)
|
||||
{
|
||||
struct kvm_memory_slot *memslot;
|
||||
gfn_t last_gfn;
|
||||
int i;
|
||||
bool flush = false;
|
||||
|
||||
memslot = id_to_memslot(kvm->memslots, slot);
|
||||
last_gfn = memslot->base_gfn + memslot->npages - 1;
|
||||
|
||||
spin_lock(&kvm->mmu_lock);
|
||||
|
Verwijs in nieuw issue
Block a user