Commit a49b9635 authored by Lan Tianyu's avatar Lan Tianyu Committed by Paolo Bonzini

KVM: Add tlb_remote_flush_with_range callback in kvm_x86_ops

Add flush range call back in the kvm_x86_ops and platform can use it
to register its associated function. The parameter "kvm_tlb_range"
accepts a single range and flush list which contains a list of ranges.
Signed-off-by: default avatarLan Tianyu <Tianyu.Lan@microsoft.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent ee85dec2
...@@ -439,6 +439,11 @@ struct kvm_mmu { ...@@ -439,6 +439,11 @@ struct kvm_mmu {
u64 pdptrs[4]; /* pae */ u64 pdptrs[4]; /* pae */
}; };
struct kvm_tlb_range {
u64 start_gfn;
u64 pages;
};
enum pmc_type { enum pmc_type {
KVM_PMC_GP = 0, KVM_PMC_GP = 0,
KVM_PMC_FIXED, KVM_PMC_FIXED,
...@@ -1041,6 +1046,8 @@ struct kvm_x86_ops { ...@@ -1041,6 +1046,8 @@ struct kvm_x86_ops {
void (*tlb_flush)(struct kvm_vcpu *vcpu, bool invalidate_gpa); void (*tlb_flush)(struct kvm_vcpu *vcpu, bool invalidate_gpa);
int (*tlb_remote_flush)(struct kvm *kvm); int (*tlb_remote_flush)(struct kvm *kvm);
int (*tlb_remote_flush_with_range)(struct kvm *kvm,
struct kvm_tlb_range *range);
/* /*
* Flush any TLB entries associated with the given GVA. * Flush any TLB entries associated with the given GVA.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment