[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



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().)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]