Re: [PATCH v4 11/19] x86/cpu: Print VMX flags in /proc/cpuinfo using VMX_FEATURES_*

From: Liran Alon
Date: Thu Dec 12 2019 - 10:54:22 EST




> On 12 Dec 2019, at 16:13, Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote:
>
> On 12/12/19 13:26, Borislav Petkov wrote:
>>
>> vmx flags : virtual_nmis preemption_timer invvpid ept_x_only ept_ad ept_1gb flexpriority tsc_offsetting virtual_tpr mtf virt_apic_accesses ept vpid unrestricted_guest ple shadow_vmcs pml mode_based_ept_exec
>>
>> virtual_nmis -> vnmis
>
> Even vnmi
>
>> preemption_timer -> preempt_tmr
>
> I would prefer the full one here.
>
>> flexpriority -> flexprio
>
> Full name?
>
>> tsc_offsetting -> tsc_ofs
>
> tsc_offset?
>
>> virtual_tpr -> vtpr
>
> Do we need this? It's usually included together with flexpriority.
>
>> virt_apic_accesses -> vapic
>
> apicv

Frankly, I dislike APICv terminology. I prefer to enumerate the various VMX features which are collectively called APICv by KVM.
APICv currently represents in KVM terminology the combination of APIC-register virtualization, virtual-interrupt-delivery and posted-interrupts (See cpu_has_vmx_apicv()).

In fact, the coupling of âenable_apicvâ module parameter have made me multiple times to need to disable entire APICv features when there for example was only a bug in posted-interrupts.

Even you got confused as virtualize-apic-access is not part of KVMâs APICv terminology but rather itâs enablement depend on flexpriority_enabled (See cpu_need_virtualize_apic_accesses()). i.e. It can be used for faster intercept handling of accesses to guest xAPIC MMIO page.

>
>> unrestricted_guest -> unres_guest
>
> Full? Or just unrestricted

I prefer unrestricted_guest.

>
> In general I would stick to the same names as kvm_intel module
> parameters (sans "enable_" if applicable) and not even bother publishing
> the others. Some features are either not used by KVM or available on
> all VMX processors.
>
> Paolo
>
>> and so on. Those are just my examples - I betcha the SDM is more
>> creative here with abbreviations. But you guys are going to grep for
>> them. If it were me, I'd save on typing. :-)
>