[libvirt] [PATCH] docs: formatdomain: Clarify CPU feature policy option "require"

Kashyap Chamarthy posted 1 patch 6 years ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20180326105312.8594-1-kchamart@redhat.com
Test syntax-check passed
docs/formatdomain.html.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[libvirt] [PATCH] docs: formatdomain: Clarify CPU feature policy option "require"
Posted by Kashyap Chamarthy 6 years ago
(Thanks: Jiri Denemark, for clarifying this on IRC.)

Signed-off-by: Kashyap Chamarthy <kchamart@redhat.com>
---
 docs/formatdomain.html.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 6fd2189cd..2410c92af 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -1532,7 +1532,7 @@
             of it being supported by host CPU.</dd>
           <dt><code>require</code></dt>
           <dd>Guest creation will fail unless the feature is supported by host
-            CPU.</dd>
+            CPU or the hypervisor is able to emulate it".</dd>
           <dt><code>optional</code></dt>
           <dd>The feature will be supported by virtual CPU if and only if it
             is supported by host CPU.</dd>
-- 
2.13.6

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] docs: formatdomain: Clarify CPU feature policy option "require"
Posted by John Ferlan 6 years ago

On 03/26/2018 06:53 AM, Kashyap Chamarthy wrote:
> (Thanks: Jiri Denemark, for clarifying this on IRC.)

Lost context here!  That should have gone under the --- cause it'll look
awfully strange in git history.

Is there "more" or "extra" text you'd like to see added?  Or is the
commit message good enough?  I can add before pushing so you don't need
to spin another version...

> 
> Signed-off-by: Kashyap Chamarthy <kchamart@redhat.com>
> ---
>  docs/formatdomain.html.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
> index 6fd2189cd..2410c92af 100644
> --- a/docs/formatdomain.html.in
> +++ b/docs/formatdomain.html.in
> @@ -1532,7 +1532,7 @@
>              of it being supported by host CPU.</dd>
>            <dt><code>require</code></dt>
>            <dd>Guest creation will fail unless the feature is supported by host
> -            CPU.</dd>
> +            CPU or the hypervisor is able to emulate it".</dd>
                                                          ^
I'll also remove the random "

Reviewed-by: John Ferlan <jferlan@redhat.com>

John

(should be safe for freeze too, but I won't push until my commit message
question is answered).

>            <dt><code>optional</code></dt>
>            <dd>The feature will be supported by virtual CPU if and only if it
>              is supported by host CPU.</dd>
> 

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] docs: formatdomain: Clarify CPU feature policy option "require"
Posted by Kashyap Chamarthy 6 years ago
On Thu, Mar 29, 2018 at 12:22:18PM -0400, John Ferlan wrote:
> 
> 
> On 03/26/2018 06:53 AM, Kashyap Chamarthy wrote:
> > (Thanks: Jiri Denemark, for clarifying this on IRC.)
> 
> Lost context here!  That should have gone under the --- cause it'll look
> awfully strange in git history.

Yeah, indeed.  Sorry, it should've gone under the "---".

So the clarification that Jiri gave was about the 'require' value for
'policy' attribute for a CPU feature.  In this context, 'require'
actually means that the guest CPU will have the said feature so that the
host CPU does not need to support it -- if QEMU can emulate it.

E.g. 'x2apic' is emulated by QEMU even if the host does not support it:

    <feature policy='require' name='x2apic'/>

> Is there "more" or "extra" text you'd like to see added?  Or is the
> commit message good enough?  

I wanted to add more clarification, like above.  Can Jiri or anyone
cross-verify what I said above is correct?

> I can add before pushing so you don't need
> to spin another version...

Thanks a lot!

> > 
> > Signed-off-by: Kashyap Chamarthy <kchamart@redhat.com>
> > ---
> >  docs/formatdomain.html.in | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
> > index 6fd2189cd..2410c92af 100644
> > --- a/docs/formatdomain.html.in
> > +++ b/docs/formatdomain.html.in
> > @@ -1532,7 +1532,7 @@
> >              of it being supported by host CPU.</dd>
> >            <dt><code>require</code></dt>
> >            <dd>Guest creation will fail unless the feature is supported by host
> > -            CPU.</dd>
> > +            CPU or the hypervisor is able to emulate it".</dd>
>                                                           ^
> I'll also remove the random "

Oops.  Thanks!

> Reviewed-by: John Ferlan <jferlan@redhat.com>
> 
> John
> 
> (should be safe for freeze too, but I won't push until my commit message
> question is answered).
> 
> >            <dt><code>optional</code></dt>
> >            <dd>The feature will be supported by virtual CPU if and only if it
> >              is supported by host CPU.</dd>
> > 

-- 
/kashyap

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] docs: formatdomain: Clarify CPU feature policy option "require"
Posted by John Ferlan 6 years ago

On 03/30/2018 06:21 AM, Kashyap Chamarthy wrote:
> On Thu, Mar 29, 2018 at 12:22:18PM -0400, John Ferlan wrote:
>>
>>
>> On 03/26/2018 06:53 AM, Kashyap Chamarthy wrote:
>>> (Thanks: Jiri Denemark, for clarifying this on IRC.)
>>
>> Lost context here!  That should have gone under the --- cause it'll look
>> awfully strange in git history.
> 
> Yeah, indeed.  Sorry, it should've gone under the "---".
> 
> So the clarification that Jiri gave was about the 'require' value for
> 'policy' attribute for a CPU feature.  In this context, 'require'
> actually means that the guest CPU will have the said feature so that the
> host CPU does not need to support it -- if QEMU can emulate it.
> 
> E.g. 'x2apic' is emulated by QEMU even if the host does not support it:
> 
>     <feature policy='require' name='x2apic'/>
> 
>> Is there "more" or "extra" text you'd like to see added?  Or is the
>> commit message good enough?  
> 
> I wanted to add more clarification, like above.  Can Jiri or anyone
> cross-verify what I said above is correct?
> 

So if I change to:

Using the 'require' value for the 'policy' attribute indicates
that the guest will have the feature so the host CPU does not need
to support it if the hypervisor can emulate it.

E.g. 'x2apic' is emulated by QEMU even if the host does not support it:

    <feature policy='require' name='x2apic'/>


I think that covers it.

John

>> I can add before pushing so you don't need
>> to spin another version...
> 
> Thanks a lot!
> 
>>>
>>> Signed-off-by: Kashyap Chamarthy <kchamart@redhat.com>
>>> ---
>>>  docs/formatdomain.html.in | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
>>> index 6fd2189cd..2410c92af 100644
>>> --- a/docs/formatdomain.html.in
>>> +++ b/docs/formatdomain.html.in
>>> @@ -1532,7 +1532,7 @@
>>>              of it being supported by host CPU.</dd>
>>>            <dt><code>require</code></dt>
>>>            <dd>Guest creation will fail unless the feature is supported by host
>>> -            CPU.</dd>
>>> +            CPU or the hypervisor is able to emulate it".</dd>
>>                                                           ^
>> I'll also remove the random "
> 
> Oops.  Thanks!
> 
>> Reviewed-by: John Ferlan <jferlan@redhat.com>
>>
>> John
>>
>> (should be safe for freeze too, but I won't push until my commit message
>> question is answered).
>>
>>>            <dt><code>optional</code></dt>
>>>            <dd>The feature will be supported by virtual CPU if and only if it
>>>              is supported by host CPU.</dd>
>>>
> 

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] docs: formatdomain: Clarify CPU feature policy option "require"
Posted by Kashyap Chamarthy 6 years ago
On Fri, Mar 30, 2018 at 08:50:15AM -0400, John Ferlan wrote:

[...]

> So if I change to:
> 
> Using the 'require' value for the 'policy' attribute indicates
> that the guest will have the feature so the host CPU does not need
> to support it if the hypervisor can emulate it.
> 
> E.g. 'x2apic' is emulated by QEMU even if the host does not support it:
> 
>     <feature policy='require' name='x2apic'/>
> 
> 
> I think that covers it.

Excelleent, that phrasing covers it; thanks, John!

    * * *

PS: A project for later: We should restructure the 'formatdomain.html' a
bit more, so that *infuriatingly* large paragraphs (e.g. look at the
"host-model" paragraph here[*]) that obstructs readability.  I will
propose a different email when I gather the energy for it.


[*] https://libvirt.org/formatdomain.html#elementsCPU -- you have to scroll
    down to see the "host-model" description (this "lack of ability to
    linking to the specific XML element description should also be
    fixed.)

-- 
/kashyap

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