[libvirt] [PATCH v2 11/11] qemu: auto-add pci-root controller for pc machine types

Laine Stump laine at laine.org
Thu Apr 18 16:58:49 UTC 2013


On 04/18/2013 08:09 AM, Ján Tomko wrote:
> On 04/18/2013 07:22 AM, Laine Stump wrote:
>> On 04/17/2013 03:00 PM, Ján Tomko wrote:
>>>      }
>>>  
>>> @@ -10146,6 +10150,12 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr qemuCaps,
>>>      if (virDomainDefAddImplicitControllers(def) < 0)
>>>          goto error;
>>>  
>>> +    if (STRPREFIX(def->os.machine,"pc")) {
>>> +        if (virDomainDefMaybeAddController(def, VIR_DOMAIN_CONTROLLER_TYPE_PCI, 0,
>>> +                                           VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT) < 0)
>>> +            goto error;
>>> +    }
>>> +
>>
>> Didn't you already do this in virDomainDefParseXML?
>>
> I did. This is for getting the domain definition from a qemu command
> line, as opposed to the XML.

Just occurred to me - this points out that we should do the same for the
other implicit controllers (maybe once all of the implicit controller
adds are moved to qemuDomainDefPostParse, we can make
virDomainDefPostParse a public function, and call it directly from the
end of qemuParseCommandline().)




More information about the libvir-list mailing list