Re: [PATCH] kvm: add capability for halt polling

From: Paolo Bonzini
Date: Mon Apr 20 2020 - 17:07:34 EST


On 20/04/20 20:47, Jon Cargille wrote:
> Great question, Vitaly. We actually implemented this as a per-VCPU property
> initially; however, our user-space implementation was only using it to apply
> the same value to all VCPUs, so we later simplified it on the advice of
> Jim Mattson. If there is a consensus for this to go in as per-VCPU rather
> than per-VM, I'm happy to submit that way instead. The per-VM version did
> end up looking simpler, IMO.

Yeah, I am not sure what the usecase would be for per-vCPU halt polling.

You could perhaps disable halt polling for vCPUs that are not placed on
isolated physical CPUs (devoting those vCPUs to housekeeping), but it
seems to me that this would be quite hard to get right. But in that
case you would probably prefer to disable HLT vmexits completely, rather
than use halt polling.

Paolo