i386: Document when features can be added to kvm_default_props
authorEduardo Habkost <ehabkost@redhat.com>
Fri, 25 Sep 2020 21:10:21 +0000 (17:10 -0400)
committerEduardo Habkost <ehabkost@redhat.com>
Mon, 31 May 2021 19:53:02 +0000 (15:53 -0400)
It's very easy to mistakenly extend kvm_default_props to include
features that require a kernel version that's too recent.  Add a
comment warning about that, pointing to the documentation file
where the minimum kernel version for KVM is documented.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200925211021.4158567-1-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
target/i386/kvm/kvm-cpu.c

index c660ad42931ff103e19b6925bdb78e4b6ef33f40..5235bce8dc03e5dae364025b22d36a562ce6f5bc 100644 (file)
@@ -47,6 +47,11 @@ static bool kvm_cpu_realizefn(CPUState *cs, Error **errp)
 /*
  * KVM-specific features that are automatically added/removed
  * from all CPU models when KVM is enabled.
+ *
+ * NOTE: features can be enabled by default only if they were
+ *       already available in the oldest kernel version supported
+ *       by the KVM accelerator (see "OS requirements" section at
+ *       docs/system/target-i386.rst)
  */
 static PropValue kvm_default_props[] = {
     { "kvmclock", "on" },