Skip to content

Commit a49b963

Browse files
Lan Tianyubonzini
authored andcommitted
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: Lan Tianyu <Tianyu.Lan@microsoft.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent ee85dec commit a49b963

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

arch/x86/include/asm/kvm_host.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,11 @@ struct kvm_mmu {
439439
u64 pdptrs[4]; /* pae */
440440
};
441441

442+
struct kvm_tlb_range {
443+
u64 start_gfn;
444+
u64 pages;
445+
};
446+
442447
enum pmc_type {
443448
KVM_PMC_GP = 0,
444449
KVM_PMC_FIXED,
@@ -1041,6 +1046,8 @@ struct kvm_x86_ops {
10411046

10421047
void (*tlb_flush)(struct kvm_vcpu *vcpu, bool invalidate_gpa);
10431048
int (*tlb_remote_flush)(struct kvm *kvm);
1049+
int (*tlb_remote_flush_with_range)(struct kvm *kvm,
1050+
struct kvm_tlb_range *range);
10441051

10451052
/*
10461053
* Flush any TLB entries associated with the given GVA.

0 commit comments

Comments
 (0)