On Tue, Jun 12, 2018 at 10:58:46 +0200, Kashyap Chamarthy wrote: > Eduardo Habkost has pointed out that the current documentation of > libvirt's CPU feature policy "require" vs. "force" does not match > QEMU's behaviour. > > Update the documentation by spelling out the QEMU version dependency and > explain in which scenarios the usage of "policy = 'force'" is applicable > or not. > > Signed-off-by: Kashyap Chamarthy <kchamart@xxxxxxxxxx> > --- > Wordsmithing / corrections welcome. > --- > docs/formatdomain.html.in | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > > diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in > index 6912762f28..4d6c3892ee 100644 > --- a/docs/formatdomain.html.in > +++ b/docs/formatdomain.html.in > @@ -1566,8 +1566,17 @@ > > <dl> > <dt><code>force</code></dt> > - <dd>The virtual CPU will claim the feature is supported regardless > - of it being supported by host CPU.</dd> The original content was indented. Also I don't think you're supposed to add two <dd> elements after single <dt>. > + <dd>The virtual CPU will claim the feature is supported > + regardless of it being supported by host CPU -- this is only > + true for QEMU version older than 2.9.0. I'd suggest Libvirt will ask the hypervisor to enable the feature regardless of it being supported by host CPU. The hypervisor will likely ignore this request if the feature is not supported by the host CPU or if it cannot be emulated. In other words, it is useful for features which do not exist in real hardware, such as 'virt-ssbd', or which can be emulated, such as 'x2apic'. > I.e. when using the > + CPU mode 'host-model', libvirt identifies which CPU features > + to use by looking at host CPUID. For that to take effect, it > + is mandatory to use <code>force</code> to tell libvirt that a > + said CPU feature must be used despite it not existing in the > + host -- this applicable only for a very limited set of CPU > + features, such as 'x2apic', virt-ssbd' (for AMD CPUs).</dd> > + <dd>However, when using QEMU 2.9.0 and above, there should > + never be any need to use <code>force</code>.</dd> What was the motivation behind this change? I find it quite confusing that this is supposed to describe 'force' policy and suddenly you're talking about host-model CPU mode. Jirka -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list