[Devel] [PATCH 4/6] Revert "kvm/x86: skip async_pf when in guest mode"
Denis Plotnikov
dplotnikov at virtuozzo.com
Wed Sep 20 17:31:03 MSK 2017
This reverts commit 5173f45a28cdf3d5808e236eab882273a760a363.
The commit will be replaced with the mainstream commit which does
the same:
9bc1f09f6f KVM: async_pf: avoid async pf injection when in guest mode
This is done to make vzkernel look similar to the mainstream kernel with
all the consequences like mitigation of patch backporting.
fix #PSBM-56498
Signed-off-by: Denis Plotnikov <dplotnikov at virtuozzo.com>
---
arch/x86/kvm/mmu.c | 2 +-
arch/x86/kvm/x86.c | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 83584eb..91bc5eb 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -3504,7 +3504,7 @@ static bool try_async_pf(struct kvm_vcpu *vcpu, bool prefault, gfn_t gfn,
if (!async)
return false; /* *pfn has correct page already */
- if (!prefault && !is_guest_mode(vcpu) && can_do_async_pf(vcpu)) {
+ if (!prefault && can_do_async_pf(vcpu)) {
trace_kvm_try_async_get_page(gva, gfn);
if (kvm_find_async_pf_gfn(vcpu, gfn)) {
trace_kvm_async_pf_doublefault(gva, gfn);
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 66cbb9f..34eccf9 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -6891,8 +6891,7 @@ static int vcpu_run(struct kvm_vcpu *vcpu)
break;
}
- if (!is_guest_mode(vcpu))
- kvm_check_async_pf_completion(vcpu);
+ kvm_check_async_pf_completion(vcpu);
if (signal_pending(current)) {
r = -EINTR;
--
2.7.4
More information about the Devel
mailing list