[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181013145406.4911-2-Tianyu.Lan@microsoft.com>
Date: Sat, 13 Oct 2018 22:53:52 +0800
From: lantianyu1986@...il.com
To: unlisted-recipients:; (no To-header on input)
Cc: Lan Tianyu <Tianyu.Lan@...rosoft.com>, christoffer.dall@....com,
marc.zyngier@....com, linux@...linux.org, catalin.marinas@....com,
will.deacon@....com, jhogan@...nel.org, ralf@...ux-mips.org,
paul.burton@...s.com, paulus@...abs.org, benh@...nel.crashing.org,
mpe@...erman.id.au, kys@...rosoft.com, haiyangz@...rosoft.com,
sthemmin@...rosoft.com, tglx@...utronix.de, mingo@...hat.com,
hpa@...or.com, x86@...nel.org, pbonzini@...hat.com,
rkrcmar@...hat.com, linux-arm-kernel@...ts.infradead.org,
kvmarm@...ts.cs.columbia.edu, linux-kernel@...r.kernel.org,
linux-mips@...ux-mips.org, kvm-ppc@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org, devel@...uxdriverproject.org,
kvm@...r.kernel.org, michael.h.kelley@...rosoft.com,
vkuznets@...hat.com
Subject: [PATCH V4 1/15] KVM: Add tlb_remote_flush_with_range callback in kvm_x86_ops
From: Lan Tianyu <Tianyu.Lan@...rosoft.com>
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@...rosoft.com>
---
Change since v1:
Change "end_gfn" to "pages" to aviod confusion as to whether
"end_gfn" is inclusive or exlusive.
---
arch/x86/include/asm/kvm_host.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index 4b09d4aa9bf4..fea95aa77319 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -439,6 +439,12 @@ struct kvm_mmu {
u64 pdptrs[4]; /* pae */
};
+struct kvm_tlb_range {
+ u64 start_gfn;
+ u64 pages;
+ struct list_head *flush_list;
+};
+
enum pmc_type {
KVM_PMC_GP = 0,
KVM_PMC_FIXED,
@@ -1039,6 +1045,8 @@ struct kvm_x86_ops {
void (*tlb_flush)(struct kvm_vcpu *vcpu, bool invalidate_gpa);
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.
--
2.14.4
Powered by blists - more mailing lists