From bbd392ff86249434ca63bb5977d2b1bd2d72a538 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Tue, 4 Feb 2014 19:02:04 +0100 Subject: [PATCH] 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 Additionally the attributes of the element for tickpolicy='catchup' are optional according to the parsing code. Express this in the XML and fix a spurious space added while formatting the element and add tests for it. --- docs/schemas/domaincommon.rng | 157 +++++++++++------- src/conf/domain_conf.c | 2 +- .../qemuxml2argv-clock-catchup.args | 5 + .../qemuxml2argv-clock-catchup.xml | 37 +++++ tests/qemuxml2argvtest.c | 1 + tests/qemuxml2xmltest.c | 1 + 6 files changed, 142 insertions(+), 61 deletions(-) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-clock-catchup.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-clock-catchup.xml diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 7f55f24fc0..63e02e4b14 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -857,54 +857,68 @@ - - - platform - hpet - kvmclock - pit - rtc - tsc - - - - - - boot - guest - wall - - - - - - - delay - catchup - merge - discard - - - - - - - - - - - - - - - auto - native - emulate - paravirt - smpsafe - - - + + + + + platform + rtc + + + + + + boot + guest + wall + + + + + + + + + + tsc + + + + + + + + + + + + + auto + native + emulate + paravirt + smpsafe + + + + + + + + hpet + pit + + + + + + + + + kvmclock + + + @@ -916,20 +930,43 @@ - - - - - - - - + + + + + + + delay + merge + discard + - - + + + + catchup - - + + + + + + + + + + + + + + + + + + + + +