Re: [PATCH 1/5] kvm/x86: fix inversed check for async_pf MSR

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

 



> 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.

It could have a better name but returning "true" is right. See below.

 > > 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).

if !KVM_ASYNC_PF_ENABLED then kvm_check_async_pf_completion(), it's only call site, never calls it.

Maybe you had KVM_ASYNC_PF_ENABLED?

> Roman.

--Mika

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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