Re: [PATCH 2/3] KVM: Add capability to not exit on HLT

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

 



On 11/27/2017 12:56 PM, Paolo Bonzini wrote:
> On 27/11/2017 02:32, Wanpeng Li wrote:
>> 2017-11-25 21:09 GMT+08:00 Jan H. Schönherr <jschoenh@xxxxxxxxx>:
>>> If host CPUs are dedicated to a VM, we can avoid VM exits on HLT,
>>> reducing the wake-up latency on posted interrupts.
>>>
>>> This reintroduces a feature that has been there at some point --
>>> see Linux 3.4 commit 10166744b80a ("KVM: VMX: remove yield_on_hlt")
>>> for the removal -- but with the additional ability to enable it only
>>> for selected VMs (and supporting SVM as well).
>>>
>>> Signed-off-by: Jan H. Schönherr <jschoenh@xxxxxxxxx>
>>
>> This patch results in guest hang during boot. Just the same when I
>> tried to avoid VM exits on HLT several months ago.
>> http://www.spinics.net/lists/kvm/msg152397.html

I missed that thread. Thanks for the pointer. The extra to take away
from that conversation is the errata Paolo pointed out below as well,
and Radim's comment about cancel_injection().

Do we have to handle the cancel_injection() case in some way?

> There is also errata #415 in family 0x10.
> 
> Can you change kvm_mwait_in_guest() to a kvm_x86_ops hook
> kvm_x86_can_disable_exits, so that Intel can use it to force mwait and
> AMD can use it to force hlt?
> 
> From http://support.amd.com/TechDocs/41322_10h_Rev_Gd.pdf,
> bit 2 of MSR_AMD64_OSVW_STATUS tells you that you have erratum #415.

I'll have a look at this for v2.

Regards
Jan




[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