virtinst: prepare XML parsers to handle GIC for ARM
GIC is used instead of APIC on ARM and libvirt allows configure specific version of GIC for guests. Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
3d73f9cd3b
commit
0dbfb399cd
|
@ -165,6 +165,7 @@ class XMLParseTest(unittest.TestCase):
|
|||
check("vmport", False, True)
|
||||
check("kvm_hidden", None, True)
|
||||
check("pvspinlock", None, True)
|
||||
check("gic_version", None, False)
|
||||
|
||||
check = self._make_checker(guest.cpu)
|
||||
check("match", "exact", "strict")
|
||||
|
|
|
@ -25,7 +25,7 @@ class DomainFeatures(XMLBuilder):
|
|||
Class for generating <features> XML
|
||||
"""
|
||||
_XML_ROOT_NAME = "features"
|
||||
_XML_PROP_ORDER = ["acpi", "apic", "pae"]
|
||||
_XML_PROP_ORDER = ["acpi", "apic", "pae", "gic_version"]
|
||||
|
||||
acpi = XMLProperty("./acpi", is_bool=True,
|
||||
default_name="default", default_cb=lambda s: False)
|
||||
|
@ -33,6 +33,7 @@ class DomainFeatures(XMLBuilder):
|
|||
default_name="default", default_cb=lambda s: False)
|
||||
pae = XMLProperty("./pae", is_bool=True,
|
||||
default_name="default", default_cb=lambda s: False)
|
||||
gic_version = XMLProperty("./gic/@version")
|
||||
|
||||
hap = XMLProperty("./hap", is_bool=True)
|
||||
viridian = XMLProperty("./viridian", is_bool=True)
|
||||
|
|
|
@ -71,6 +71,11 @@ class _Devices(_CapsBlock):
|
|||
disk = XMLChildProperty(_make_capsblock("disk"), is_single=True)
|
||||
|
||||
|
||||
class _Features(_CapsBlock):
|
||||
_XML_ROOT_NAME = "features"
|
||||
gic = XMLChildProperty(_make_capsblock("gic"), is_single=True)
|
||||
|
||||
|
||||
class DomainCapabilities(XMLBuilder):
|
||||
@staticmethod
|
||||
def build_from_params(conn, emulator, arch, machine, hvtype):
|
||||
|
@ -161,3 +166,4 @@ class DomainCapabilities(XMLBuilder):
|
|||
devices = XMLChildProperty(_Devices, is_single=True)
|
||||
|
||||
arch = XMLProperty("./arch")
|
||||
features = XMLChildProperty(_Features, is_single=True)
|
||||
|
|
Loading…
Reference in New Issue