Re: [PATCH 28/41] Show host model in domain capabilities

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 08/12/2016 09:33 AM, Jiri Denemark wrote:
> The domain capabilities XML is capable of showing whether each guest CPU
> mode is supported or not with a possibility to provide additional
> details. This patch enhances host-model capability to advertise the
> exact CPU model which will be used as a host-model:
> 
>     <cpu>
>         ...
>         <mode name='host-model' supported='yes'>
>             <model fallback='allow'>Broadwell</model>
>             <vendor>Intel</vendor>
>             <feature policy='disable' name='aes'/>
>             <feature policy='require' name='vmx'/>
>         </mode>
>         ...
>     </cpu>
> 
> Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
> ---
>  docs/formatdomaincaps.html.in                       | 21 +++++++++++++++++++--
>  docs/schemas/domaincaps.rng                         | 10 ++++++++++
>  src/conf/domain_capabilities.c                      | 16 +++++++++++++---
>  src/conf/domain_capabilities.h                      |  2 +-
>  src/qemu/qemu_capabilities.c                        |  4 +---
>  tests/domaincapsschemadata/full.xml                 |  5 ++++-
>  tests/domaincapsschemadata/qemu_1.7.0.x86_64.xml    |  4 +++-
>  .../qemu_2.6.0-gicv2-virt.aarch64.xml               |  2 +-
>  .../qemu_2.6.0-gicv3-virt.aarch64.xml               |  2 +-
>  tests/domaincapsschemadata/qemu_2.6.0.aarch64.xml   |  2 +-
>  tests/domaincapsschemadata/qemu_2.6.0.ppc64le.xml   |  4 +++-
>  tests/domaincapsschemadata/qemu_2.6.0.x86_64.xml    |  4 +++-
>  tests/domaincapstest.c                              | 10 ++++++++--
>  13 files changed, 68 insertions(+), 18 deletions(-)
> 

Hmmm... I guess we are displaying the cpuModel data - it just wasn't
"obvious" previously...

> diff --git a/docs/formatdomaincaps.html.in b/docs/formatdomaincaps.html.in
> index 49ccbfc..34eb777 100644
> --- a/docs/formatdomaincaps.html.in
> +++ b/docs/formatdomaincaps.html.in
> @@ -154,7 +154,12 @@
>    ...
>    &lt;cpu&gt;
>      &lt;mode name='host-passthrough' supported='yes'/&gt;
> -    &lt;mode name='host-model' supported='yes'/&gt;
> +    &lt;mode name='host-model' supported='yes'&gt;
> +      &lt;model fallback='allow'&gt;Broadwell&lt;/model&gt;
> +      &lt;vendor&gt;Intel&lt;/vendor&gt;
> +      &lt;feature policy='disable' name='aes'/&gt;
> +      &lt;feature policy='require' name='vmx'/&gt;
> +    &lt;/mode&gt;
>      &lt;mode name='custom' supported='yes'&gt;
>        &lt;model usable='no'&gt;Broadwell&lt;/model&gt;
>        &lt;model usable='yes'&gt;Broadwell-noTSX&lt;/model&gt;
> @@ -177,7 +182,19 @@
>        <dd>No mode specific details are provided.</dd>
>  
>        <dt><code>host-model</code></dt>
> -      <dd>No mode specific details are provided yet.</dd>
> +      <dd>
> +        If <code>host-model</code> is supported by the hypervisor, the
> +        <code>mode</code> describes the guest CPU which will be used when
> +        starting a domain with <code>host-model</code> CPU. The hypervisor
> +        specifics (such as unsupported CPU models or features, machine type,
> +        etc.) may be accounted for in this guest CPU specification and thus
> +        the CPU can be different from the one shown in host capabilities XML.
> +        This is indicated by the <code>fallback</code> attribute of the
> +        <code>model</code> sub element: <code>allow</code> means not all
> +        specifics were accounted for and thus the CPU a guest will see may
> +        be different; <code>forbid</code> says that the CPU a guest will see

s/says/indicates

> +        should match this CPU definition.
> +      </dd>

Should this make a reference to

   http://libvirt.org/formatdomain.html#elementsCPU

since that's the allow/forbid and 'host-model' for the domain description?

Too bad there weren't any easily crafted 'forbid' examples for test...

>  
>        <dt><code>custom</code></dt>
>        <dd>

[...]

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]