Re: [libvirt] [PATCHv3 1/3] schema: Fix guest timer specification schema according to the docs
On 02/07/14 21:30, Eric Blake wrote: On 02/07/2014 07:21 AM, Peter Krempa wrote: According to the documentation describing various tunables for domain timers not all the fields are supported by all the driver types. Express these in the RNG: - rtc, platform: Only these support the track attribute. - tsc: only one to support frequency and mode attributes - hpet, pit: tickpolicy/catchup attribute/element - kvmclock: no extra attributes are supported --- docs/schemas/domaincommon.rng | 153 +- 1 file changed, 93 insertions(+), 60 deletions(-) +optional + element name=catchup +optional + attribute name=threshold +ref name=unsignedInt/ + /attribute + attribute name=slew +ref name=unsignedInt/ + /attribute + attribute name=limit +ref name=unsignedInt/ + /attribute Are all three attributes mandatory as a group? Or is each attribute optional in isolation? The C code says the latter, which means this part has to be written: element name='catchup' optional attribute name='threshold'... /optional optional attribute name='slew'... and so on. I've fixed this, and ACK with that fix; it might also be nice to add a testsuite addition that proves we handle 'threshold' without also having to specify 'slew' and 'limit'. added some tests. The tests also showed that the catchup element was being formatted with a spurious space, so I fixed that too in this patch. Pushed now; Thanks. Peter signature.asc Description: OpenPGP digital signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCHv3 1/3] schema: Fix guest timer specification schema according to the docs
According to the documentation describing various tunables for domain timers not all the fields are supported by all the driver types. Express these in the RNG: - rtc, platform: Only these support the track attribute. - tsc: only one to support frequency and mode attributes - hpet, pit: tickpolicy/catchup attribute/element - kvmclock: no extra attributes are supported --- docs/schemas/domaincommon.rng | 153 +- 1 file changed, 93 insertions(+), 60 deletions(-) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 7f55f24..12fc0db 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -857,54 +857,68 @@ /define define name=timer element name=timer - attribute name=name -choice - valueplatform/value - valuehpet/value - valuekvmclock/value - valuepit/value - valuertc/value - valuetsc/value -/choice - /attribute - optional -attribute name=track - choice -valueboot/value -valueguest/value -valuewall/value - /choice -/attribute - /optional - optional -attribute name=tickpolicy - choice -valuedelay/value -valuecatchup/value -valuemerge/value -valuediscard/value - /choice -/attribute - /optional - optional -ref name=catchup/ - /optional - optional -attribute name=frequency - ref name=unsignedInt/ -/attribute - /optional - optional -attribute name=mode - choice -valueauto/value -valuenative/value -valueemulate/value -valueparavirt/value -valuesmpsafe/value - /choice -/attribute - /optional + choice +group + attribute name=name +choice + valueplatform/value + valuertc/value +/choice + /attribute + optional +attribute name=track + choice +valueboot/value +valueguest/value +valuewall/value + /choice +/attribute + /optional + optional +ref name=tickpolicy/ + /optional +/group +group + attribute name=name +valuetsc/value + /attribute + optional +ref name=tickpolicy/ + /optional + optional +attribute name=frequency + ref name=unsignedInt/ +/attribute + /optional + optional +attribute name=mode + choice +valueauto/value +valuenative/value +valueemulate/value +valueparavirt/value +valuesmpsafe/value + /choice +/attribute + /optional +/group +group + attribute name=name +choice + valuehpet/value + valuepit/value +/choice + /attribute + optional +ref name=tickpolicy/ + /optional +/group +group + attribute name=name +valuekvmclock/value + /attribute +/group + /choice optional attribute name=present choice @@ -916,20 +930,39 @@ empty/ /element /define - define name=catchup -element name=catchup - optional -attribute name=threshold - ref name=unsignedInt/ -/attribute -attribute name=slew - ref name=unsignedInt/ + + define name=tickpolicy +choice + group +attribute name=tickpolicy + choice +valuedelay/value +valuemerge/value +valuediscard/value + /choice /attribute -attribute name=limit - ref name=unsignedInt/ + /group + group +attribute name=tickpolicy + valuecatchup/value /attribute - /optional -/element +optional + element name=catchup +optional + attribute name=threshold +ref name=unsignedInt/ + /attribute + attribute name=slew +ref name=unsignedInt/ + /attribute + attribute name=limit +ref name=unsignedInt/ + /attribute +/optional + /element +/optional + /group +/choice /define !-- A bootloader may be used to extract the OS information instead of -- 1.8.5.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCHv3 1/3] schema: Fix guest timer specification schema according to the docs
On 02/07/2014 07:21 AM, Peter Krempa wrote: According to the documentation describing various tunables for domain timers not all the fields are supported by all the driver types. Express these in the RNG: - rtc, platform: Only these support the track attribute. - tsc: only one to support frequency and mode attributes - hpet, pit: tickpolicy/catchup attribute/element - kvmclock: no extra attributes are supported --- docs/schemas/domaincommon.rng | 153 +- 1 file changed, 93 insertions(+), 60 deletions(-) +optional + element name=catchup +optional + attribute name=threshold +ref name=unsignedInt/ + /attribute + attribute name=slew +ref name=unsignedInt/ + /attribute + attribute name=limit +ref name=unsignedInt/ + /attribute Are all three attributes mandatory as a group? Or is each attribute optional in isolation? The C code says the latter, which means this part has to be written: element name='catchup' optional attribute name='threshold'... /optional optional attribute name='slew'... and so on. ACK with that fix; it might also be nice to add a testsuite addition that proves we handle 'threshold' without also having to specify 'slew' and 'limit'. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list