diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 086a3da..835e73b 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -4504,11 +4504,10 @@ qemu-kvm -net nic,model=? /dev/null

NVRAM device

- One NVRAM device is always added to pSeries guests on PPC64. - And on PPC64, NVRAM devices' address type are VIO which - allows users to change.nvram element in XML file - is provided to specify its address. - Currently, libvirt only considers configuration for pSeries guests. + nvram device is always added to pSeries guest on PPC64, and its address + is allowed to be changed. Element nvram (only valid for + pSeries guest, since 1.0.5) is provided to + enable the address setting.

Example: usage of NVRAM configuration @@ -4526,13 +4525,13 @@ qemu-kvm -net nic,model=? /dev/null

spapr-vio

- VIO device address type, this is only for PPC64. + VIO device address type, only valid for PPC64.

reg

- Devices' address + Device address

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index a7be035..892931a 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -8168,8 +8168,7 @@ virDomainNVRAMDefParseXML(const xmlNodePtr node, error: virDomainNVRAMDefFree(def); - def = NULL; - return def; + return NULL; } static virSysinfoDefPtr @@ -11340,7 +11339,6 @@ virDomainDefParseXML(xmlDocPtr xml, } VIR_FREE(nodes); - def->nvram = NULL; if ((n = virXPathNodeSet("./devices/nvram", ctxt, &nodes)) < 0) { goto error; } @@ -11349,9 +11347,7 @@ virDomainDefParseXML(xmlDocPtr xml, virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("only a single nvram device is supported")); goto error; - } - - if (n > 0) { + } else if (n == 1) { virDomainNVRAMDefPtr nvram = virDomainNVRAMDefParseXML(nodes[0], flags); if (!nvram)