From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roman Kagan Subject: Re: [PATCH 1/5] kvm/x86: fix inversed check for async_pf MSR Date: Fri, 2 Dec 2016 15:05:45 +0300 Message-ID: <20161202120545.GC18706@rkaganb.sw.ru> References: <3f646c3d-5514-727c-4059-b417ff09886d@nextfour.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Cc: kvm To: Mika =?iso-8859-1?Q?Penttil=E4?= Return-path: Received: from mail-ve1eur02hn0224.outbound.protection.outlook.com ([104.47.6.224]:51904 "EHLO EUR02-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933623AbcLBNGS (ORCPT ); Fri, 2 Dec 2016 08:06:18 -0500 Content-Disposition: inline In-Reply-To: <3f646c3d-5514-727c-4059-b417ff09886d@nextfour.com> Sender: kvm-owner@vger.kernel.org List-ID: On Fri, Dec 02, 2016 at 12:45:28PM +0200, Mika Penttilä wrote: > > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > > index bf11fe4..14a46e9 100644 > > --- a/arch/x86/kvm/x86.c > > +++ b/arch/x86/kvm/x86.c > > @@ -8402,7 +8402,7 @@ void kvm_arch_async_page_present(struct kvm_vcpu *vcpu, > > bool kvm_arch_can_inject_async_page_present(struct kvm_vcpu *vcpu) > > { > > if (!(vcpu->arch.apf.msr_val & KVM_ASYNC_PF_ENABLED)) > > - return true; > > + return false; > > > > > Why do you make this change? Because the code does the opposite of what it's meant to do. > I think kvm_arch_async_page_present() is not > ever called now and neither kvm_del_async_pf_gfn(vcpu, work->arch.gfn); I wonder how you came to such a conclusion? I certainly see them called on my test machine (you need to have the guest memory swapped out for that, that can be forced e.g. using a memory cgroup). Roman.