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

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

 



2017-06-27 21:19 GMT+08:00 Paolo Bonzini <pbonzini@xxxxxxxxxx>:
>
>
> 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);

Good point. :)

Regards,
Wanpeng Li



[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