-
Notifications
You must be signed in to change notification settings - Fork 4
/
linux-4.14.240.patch
46 lines (42 loc) · 1.74 KB
/
linux-4.14.240.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
From 770b549d3f9c844bea6e107ffac7e776a3362b5b Mon Sep 17 00:00:00 2001
From: Dongli Zhang <[email protected]>
Date: Mon, 27 Feb 2023 08:23:30 -0800
Subject: [PATCH 1/1] linux-4.14.240
Signed-off-by: Dongli Zhang <[email protected]>
---
arch/x86/kvm/mmu.c | 5 +++++
arch/x86/kvm/page_track.c | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index e4b48ca2..6b6a73ac 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -3893,6 +3893,11 @@ static bool page_fault_handle_page_track(struct kvm_vcpu *vcpu,
* guest is writing the page which is write tracked which can
* not be fixed by page fault handler.
*/
+ /*
+ * called by:
+ * - arch/x86/kvm/mmu.c|2830| <<mmu_need_write_protect>> if (kvm_page_track_is_active(vcpu, gfn, KVM_PAGE_TRACK_WRITE))
+ * - arch/x86/kvm/mmu.c|3896| <<page_fault_handle_page_track>> if (kvm_page_track_is_active(vcpu, gfn, KVM_PAGE_TRACK_WRITE))
+ */
if (kvm_page_track_is_active(vcpu, gfn, KVM_PAGE_TRACK_WRITE))
return true;
diff --git a/arch/x86/kvm/page_track.c b/arch/x86/kvm/page_track.c
index ea67dc87..104de6bb 100644
--- a/arch/x86/kvm/page_track.c
+++ b/arch/x86/kvm/page_track.c
@@ -143,6 +143,11 @@ EXPORT_SYMBOL_GPL(kvm_slot_page_track_remove_page);
/*
* check if the corresponding access on the specified guest page is tracked.
*/
+/*
+ * called by:
+ * - arch/x86/kvm/mmu.c|2830| <<mmu_need_write_protect>> if (kvm_page_track_is_active(vcpu, gfn, KVM_PAGE_TRACK_WRITE))
+ * - arch/x86/kvm/mmu.c|3896| <<page_fault_handle_page_track>> if (kvm_page_track_is_active(vcpu, gfn, KVM_PAGE_TRACK_WRITE))
+ */
bool kvm_page_track_is_active(struct kvm_vcpu *vcpu, gfn_t gfn,
enum kvm_page_track_mode mode)
{
--
2.34.1