Re: [PATCH] x86/kvm/hyper-v: Don't deactivate APICv unconditionally when Hyper-V SynIC enabled

From: Paolo Bonzini
Date: Fri Nov 06 2020 - 05:18:09 EST


On 05/11/20 16:53, Vitaly Kuznetsov wrote:
The current implementation of Hyper-V SynIC[1] request to deactivate
APICv when SynIC is enabled, since the AutoEOI feature of SynIC is not
compatible with APICv[2].

Actually, windows doesn't use AutoEOI if deprecating AutoEOI bit is set
(CPUID.40000004H:EAX[bit 9], HyperV-TLFS v6.0b section 2.4.5), we don't
need to disable APICv in this case.

Thank you for the patch, the fact that we disable APICv every time we
enable SynIC is nothing to be proud of. I'm, however, not sure we can
treat 'Recommend deprecating AutoEOI' as 'AutoEOI must not be
used.'. Could you please clarify which Windows versions you've tested
with with?


Indeed---older versions of Windows that predate the deprecation will continue using AutoEOI.

Paolo