[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180910083806.65177-5-Tianyu.Lan@microsoft.com>
Date: Mon, 10 Sep 2018 08:38:47 +0000
From: Tianyu Lan <Tianyu.Lan@...rosoft.com>
To: unlisted-recipients:; (no To-header on input)
CC: Tianyu Lan <Tianyu.Lan@...rosoft.com>,
KY Srinivasan <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
Stephen Hemminger <sthemmin@...rosoft.com>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"mingo@...hat.com" <mingo@...hat.com>,
"hpa@...or.com" <hpa@...or.com>, "x86@...nel.org" <x86@...nel.org>,
"pbonzini@...hat.com" <pbonzini@...hat.com>,
"rkrcmar@...hat.com" <rkrcmar@...hat.com>,
"devel@...uxdriverproject.org" <devel@...uxdriverproject.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"Michael Kelley (EOSG)" <Michael.H.Kelley@...rosoft.com>,
vkuznets <vkuznets@...hat.com>,
Jork Loeser <Jork.Loeser@...rosoft.com>
Subject: [PATCH 4/13] KVM/MMU: Flush tlb directly in the
kvm_handle_hva_range()
This patch is to flush tlb directly in the kvm_handle_hva_range()
when range flush is available.
Signed-off-by: Lan Tianyu <Tianyu.Lan@...rosoft.com>
---
arch/x86/kvm/mmu.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 0ee310bad2c6..cadb6a0b5247 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -1888,6 +1888,12 @@ static int kvm_handle_hva_range(struct kvm *kvm,
&iterator)
ret |= handler(kvm, iterator.rmap, memslot,
iterator.gfn, iterator.level, data);
+
+ if (ret && kvm_available_flush_tlb_with_range()) {
+ kvm_flush_remote_tlbs_with_address(kvm,
+ gfn_start, gfn_end - 1);
+ ret = 0;
+ }
}
}
--
2.14.4
Powered by blists - more mailing lists