mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-07-30 21:47:18 +00:00
Fix libvirtd restart for domains with PCI passthrough devices
When libvirtd shuts down, it places a <state/> tag in the XML state file it writes out for guests with PCI passthrough devices. For devices that are attached at bootup time, the state tag is empty. However, at libvirtd startup time, it ignores anything with a <state/> tag in the XML, effectively hiding the guest. This patch remove the check for VIR_DOMAIN_XML_INTERNAL_STATUS when parsing the XML. * src/conf/domain_conf.c: remove VIR_DOMAIN_XML_INTERNAL_STATUS flag check in virDomainHostdevSubsysPciDefParseXML()
This commit is contained in:
parent
be34c3c7ef
commit
cdc42d0a48
@ -2876,7 +2876,7 @@ static int
|
|||||||
virDomainHostdevSubsysPciDefParseXML(virConnectPtr conn,
|
virDomainHostdevSubsysPciDefParseXML(virConnectPtr conn,
|
||||||
const xmlNodePtr node,
|
const xmlNodePtr node,
|
||||||
virDomainHostdevDefPtr def,
|
virDomainHostdevDefPtr def,
|
||||||
int flags) {
|
int flags ATTRIBUTE_UNUSED) {
|
||||||
|
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
xmlNodePtr cur;
|
xmlNodePtr cur;
|
||||||
@ -2890,8 +2890,7 @@ virDomainHostdevSubsysPciDefParseXML(virConnectPtr conn,
|
|||||||
|
|
||||||
if (virDomainDevicePCIAddressParseXML(conn, cur, addr) < 0)
|
if (virDomainDevicePCIAddressParseXML(conn, cur, addr) < 0)
|
||||||
goto out;
|
goto out;
|
||||||
} else if ((flags & VIR_DOMAIN_XML_INTERNAL_STATUS) &&
|
} else if (xmlStrEqual(cur->name, BAD_CAST "state")) {
|
||||||
xmlStrEqual(cur->name, BAD_CAST "state")) {
|
|
||||||
/* Legacy back-compat. Don't add any more attributes here */
|
/* Legacy back-compat. Don't add any more attributes here */
|
||||||
char *devaddr = virXMLPropString(cur, "devaddr");
|
char *devaddr = virXMLPropString(cur, "devaddr");
|
||||||
if (devaddr &&
|
if (devaddr &&
|
||||||
|
Loading…
Reference in New Issue
Block a user