Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1675697

Re: [PATCH v5 4/4] KVM: async_pf: Let host know whether the guest support delivery async_pf as #PF vmexit

From Paolo Bonzini <pbonzini@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v5 4/4] KVM: async_pf: Let host know whether the guest support delivery async_pf as #PF vmexit
Date 2017-06-27 15:30 +0200
Message-ID <tWYJ4-14q-25@gated-at.bofh.it> (permalink)
References <tWNND-1Pa-7@gated-at.bofh.it> <tWNND-1Pa-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



On 27/06/2017 03:47, Wanpeng Li wrote:
> -		wrmsrl(MSR_KVM_ASYNC_PF_EN, pa | KVM_ASYNC_PF_ENABLED);
> +		pa |= KVM_ASYNC_PF_DELIVERY_AS_PF_VMEXIT | KVM_ASYNC_PF_ENABLED;
> +		wrmsr_safe(MSR_KVM_ASYNC_PF_EN, pa & 0xffffffff, pa >> 32);
>  		__this_cpu_write(apf_reason.enabled, 1);

Better:

	pa |= KVM_ASYNC_PF_ENABLED;

	/* Async page fault support for L1 hypervisor is optional.  */
	if (wrmsr_safe(MSR_KVM_ASYNC_PF_EN,
		       pa | KVM_ASYNC_PF_DELIVERY_AS_PF_VMEXIT) < 0)
		wrmsrl(MSR_KVM_ASYNC_PF_EN, pa);

Thanks,

Paolo

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v5 0/4] KVM: async_pf: Fix async pf exception injection Wanpeng Li <kernellwp@gmail.com> - 2017-06-27 03:50 +0200
  [PATCH v5 4/4] KVM: async_pf: Let host know whether the guest support delivery async_pf as #PF vmexit Wanpeng Li <kernellwp@gmail.com> - 2017-06-27 03:50 +0200
    Re: [PATCH v5 4/4] KVM: async_pf: Let host know whether the guest  support delivery async_pf as #PF vmexit Paolo Bonzini <pbonzini@redhat.com> - 2017-06-27 15:30 +0200
      Re: [PATCH v5 4/4] KVM: async_pf: Let host know whether the guest  support delivery async_pf as #PF vmexit Wanpeng Li <kernellwp@gmail.com> - 2017-06-28 00:50 +0200
  [PATCH v5 2/4] KVM: async_pf: Add L1 guest async_pf #PF vmexit handler Wanpeng Li <kernellwp@gmail.com> - 2017-06-27 03:50 +0200
    Re: [PATCH v5 2/4] KVM: async_pf: Add L1 guest async_pf #PF vmexit  handler Paolo Bonzini <pbonzini@redhat.com> - 2017-06-27 15:40 +0200
      Re: [PATCH v5 2/4] KVM: async_pf: Add L1 guest async_pf #PF vmexit handler Wanpeng Li <kernellwp@gmail.com> - 2017-06-28 00:50 +0200

csiph-web