[PATCH v2 3/6] x86/hyperv: use hv_do_hypercall for flush_virtual_address_space_ex

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The hypercall of HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE_EX is not
rep class. But simple class with variable header size.
The arguments to hypercall happen to same with
HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE_EX. It didn't matter so far.
But now hv_do_hypercall uses xmm fast hypercall when applicable.
Use hv_do_hypercall() instead of hv_do_rep_hypercall() for fast
xmm hypercall.

Signed-off-by: Isaku Yamahata <isaku.yamahata@xxxxxxxxx>
---
 arch/x86/hyperv/mmu.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/arch/x86/hyperv/mmu.c b/arch/x86/hyperv/mmu.c
index 41820372bb3d..e6654073a6ea 100644
--- a/arch/x86/hyperv/mmu.c
+++ b/arch/x86/hyperv/mmu.c
@@ -206,14 +206,16 @@ static u64 hyperv_flush_tlb_others_ex(const struct cpumask *cpus,
 
 	if (info->end == TLB_FLUSH_ALL) {
 		flush->flags |= HV_FLUSH_NON_GLOBAL_MAPPINGS_ONLY;
-		status = hv_do_rep_hypercall(
-			HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE_EX,
-			0, nr_bank, flush, NULL);
+		status = hv_do_hypercall(
+			HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE_EX |
+			(nr_bank << HV_HYPERCALL_VARHEAD_OFFSET),
+			flush, sizeof(*flush) + nr_bank * 8, NULL, 0);
 	} else if (info->end &&
 		   ((info->end - info->start)/HV_TLB_FLUSH_UNIT) > max_gvas) {
-		status = hv_do_rep_hypercall(
-			HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE_EX,
-			0, nr_bank, flush, NULL);
+		status = hv_do_hypercall(
+			HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE_EX |
+			(nr_bank << HV_HYPERCALL_VARHEAD_OFFSET),
+			flush, sizeof(*flush) + nr_bank * 8, NULL, 0);
 	} else {
 		gva_n = fill_gva_list(flush->gva_list, nr_bank,
 				      info->start, info->end);
-- 
2.14.1




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux