[libvirt] [PATCH 1/2] schema: Fix the definition of SEV in domain capabilities schema

Erik Skultety posted 2 patches 7 years ago
[libvirt] [PATCH 1/2] schema: Fix the definition of SEV in domain capabilities schema
Posted by Erik Skultety 7 years ago
The whole <sev> element was optional which it shouldn't be as if the
platform doesn't support SEV we should format <sev supported='no'/>.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
---
 docs/schemas/domaincaps.rng | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/docs/schemas/domaincaps.rng b/docs/schemas/domaincaps.rng
index e25201fc68..ed29823548 100644
--- a/docs/schemas/domaincaps.rng
+++ b/docs/schemas/domaincaps.rng
@@ -185,9 +185,7 @@
         <ref name='gic'/>
         <ref name='vmcoreinfo'/>
         <ref name='vmgenid'/>
-        <optional>
-          <ref name='sev'/>
-        </optional>
+        <ref name='sev'/>
       </interleave>
     </element>
   </define>
@@ -213,12 +211,15 @@
 
   <define name='sev'>
     <element name='sev'>
-      <element name='cbitpos'>
-        <data type='unsignedInt'/>
-      </element>
-      <element name='reducedPhysBits'>
-        <data type='unsignedInt'/>
-      </element>
+      <ref name='supported'/>
+      <optional>
+        <element name='cbitpos'>
+          <data type='unsignedInt'/>
+        </element>
+        <element name='reduced-phys-bits'>
+          <data type='unsignedInt'/>
+        </element>
+      </optional>
     </element>
   </define>
 
-- 
2.14.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 1/2] schema: Fix the definition of SEV in domain capabilities schema
Posted by Ján Tomko 7 years ago
On Thu, Jun 14, 2018 at 02:28:02PM +0200, Erik Skultety wrote:
>The whole <sev> element was optional which it shouldn't be as if the
>platform doesn't support SEV we should format <sev supported='no'/>.
>
>Signed-off-by: Erik Skultety <eskultet@redhat.com>
>---
> docs/schemas/domaincaps.rng | 19 ++++++++++---------
> 1 file changed, 10 insertions(+), 9 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 1/2] schema: Fix the definition of SEV in domain capabilities schema
Posted by Ján Tomko 7 years ago
On Thu, Jun 14, 2018 at 02:28:02PM +0200, Erik Skultety wrote:
>The whole <sev> element was optional which it shouldn't be as if the
>platform doesn't support SEV we should format <sev supported='no'/>.
>
>Signed-off-by: Erik Skultety <eskultet@redhat.com>
>---
> docs/schemas/domaincaps.rng | 19 ++++++++++---------
> 1 file changed, 10 insertions(+), 9 deletions(-)
>
>diff --git a/docs/schemas/domaincaps.rng b/docs/schemas/domaincaps.rng
>index e25201fc68..ed29823548 100644
>--- a/docs/schemas/domaincaps.rng
>+++ b/docs/schemas/domaincaps.rng
>@@ -185,9 +185,7 @@
>         <ref name='gic'/>
>         <ref name='vmcoreinfo'/>
>         <ref name='vmgenid'/>
>-        <optional>
>-          <ref name='sev'/>
>-        </optional>
>+        <ref name='sev'/>
>       </interleave>
>     </element>
>   </define>
>@@ -213,12 +211,15 @@
>
>   <define name='sev'>
>     <element name='sev'>
>-      <element name='cbitpos'>
>-        <data type='unsignedInt'/>
>-      </element>
>-      <element name='reducedPhysBits'>
>-        <data type='unsignedInt'/>
>-      </element>
>+      <ref name='supported'/>
>+      <optional>
>+        <element name='cbitpos'>
>+          <data type='unsignedInt'/>
>+        </element>
>+        <element name='reduced-phys-bits'>

Actually, s/reduced-phys-bits/reducedPhysBits/

>+          <data type='unsignedInt'/>
>+        </element>
>+      </optional>
>     </element>
>   </define>
>
>-- 
>2.14.4
>
>--
>libvir-list mailing list
>libvir-list@redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 1/2] schema: Fix the definition of SEV in domain capabilities schema
Posted by Erik Skultety 7 years ago
On Thu, Jun 14, 2018 at 05:56:15PM +0200, Ján Tomko wrote:
> On Thu, Jun 14, 2018 at 02:28:02PM +0200, Erik Skultety wrote:
> > The whole <sev> element was optional which it shouldn't be as if the
> > platform doesn't support SEV we should format <sev supported='no'/>.
> >
> > Signed-off-by: Erik Skultety <eskultet@redhat.com>
> > ---
> > docs/schemas/domaincaps.rng | 19 ++++++++++---------
> > 1 file changed, 10 insertions(+), 9 deletions(-)
> >
> > diff --git a/docs/schemas/domaincaps.rng b/docs/schemas/domaincaps.rng
> > index e25201fc68..ed29823548 100644
> > --- a/docs/schemas/domaincaps.rng
> > +++ b/docs/schemas/domaincaps.rng
> > @@ -185,9 +185,7 @@
> >         <ref name='gic'/>
> >         <ref name='vmcoreinfo'/>
> >         <ref name='vmgenid'/>
> > -        <optional>
> > -          <ref name='sev'/>
> > -        </optional>
> > +        <ref name='sev'/>
> >       </interleave>
> >     </element>
> >   </define>
> > @@ -213,12 +211,15 @@
> >
> >   <define name='sev'>
> >     <element name='sev'>
> > -      <element name='cbitpos'>
> > -        <data type='unsignedInt'/>
> > -      </element>
> > -      <element name='reducedPhysBits'>
> > -        <data type='unsignedInt'/>
> > -      </element>
> > +      <ref name='supported'/>
> > +      <optional>
> > +        <element name='cbitpos'>
> > +          <data type='unsignedInt'/>
> > +        </element>
> > +        <element name='reduced-phys-bits'>
>
> Actually, s/reduced-phys-bits/reducedPhysBits/

Wow, how did that one got in there?! I didn't even notice this bit to be honest
(since I basically only did a simple code movement), I guess it could have only
happened as part of resolving some merge conflicts with an older branch I got,
so thanks for pointing that out, I'll adjust.

Erik

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