- 22 8月, 2017 4 次提交
-
-
由 Pavel Hrdina 提交于
Remove check whether a variable was already set because the element is parsed only once now. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Currently we accept and correctly parse this chardev XML: ... <channel type='tcp'> <source mode='connect'/> <source mode='bind' host='localhost'/> <source service='4567'/> <target type='virtio' name='test'/> </channel> ... The parsed formatted XML is: ... <channel type='tcp'> <source mode='connect' host='localhost' service='4567'/> <target type='virtio' name='test'/> </channel> ... That behavior is super wrong and should not be allowed. If you notice the current parse takes the first found attribute and uses that value, so for example from the "<source mode='bind' host='localhost'/>" only the "host" attribute is used. It works the same way for all possible attributes that we are able to parse for source element. This patch enforces providing only one source element for all character devices, only for UDP type we allow to provide two source elements since you can specify both modes. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
This removes one level of indentation. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Ján Tomko 提交于
Since its introduction in commit 874e65aa, if someone requests: <os><bios useserial="yes"/><os/> we report an error if we cannot successfully count the number of serial devices via an XPath query. Instead of fixing the check (and moving it to the validation phase, to prevent existing domains from disappearing), drop it completely. For QEMU, the number of serials is checked when building the command line.
-
- 21 8月, 2017 2 次提交
-
-
由 Andrea Bolognani 提交于
I mistakenly thought pSeries guests supported 32 PHBs, but it turns out they only support 31. Validate the target index accordingly. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1479647Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Andrea Bolognani 提交于
Validation should happen after parsing, so the proper location for it is virDomainControllerDefValidate() rather than virDomainControllerDefParseXML(). Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
- 18 8月, 2017 4 次提交
-
-
由 Peter Krempa 提交于
Some failures of the post parse callback can be tolerated. This is specifically desired when loading the configs of existing VMs. In such case the post parse callback should not really be modifying anything in the definition. This patch adds a parse flag VIR_DOMAIN_DEF_PARSE_ALLOW_POST_PARSE_FAIL which will allow the callbacks to report non-fatal failures by returning a positive return value. In such case the field 'postParseFailed' in the domain definition is set to true, to notify the drivers that the callback failed and possibly needs to be re-run.
-
由 Peter Krempa 提交于
Post parse callbacks will need to be able to signal that they failed non-fatally. This means that we need to return the value returned by the callback without modification.
-
由 Peter Krempa 提交于
Some drivers use def-specific private data across callbacks (e.g. qemuCaps in the qemu driver). Currently it's mostly allocated in every single callback. This is rather wasteful, given that every single call to the device callback allocates it. The new callback will allocate the data (if not provided externally) and then use it for the VM, address and device post parse callbacks.
-
由 Peter Krempa 提交于
Add yet another post parse callback, which is executed prior the real one without @parseOpaque. This is meant to set basics before @parseOpaque (in case of the qemu driver qemuCaps) can be allocated. This callback will allow to optimize passing of custom parseOpaque through the callbacks.
-
- 17 8月, 2017 8 次提交
-
-
由 Pavel Hrdina 提交于
XPath is good for random search of elements, not for accessing attributes of one node. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Using XPath here doesn't add any benefit. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
The XPath call for these cases is more expensive than accessing the XML dom node directly. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
XPath is good for random search of elements, not for accessing attributes of one node. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
XPath is good for random search of elements, not for accessing attributes of one node. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
XPath is good for random search of elements, not for accessing attributes of one node. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
XPath is good for random search of elements, not for accessing attributes of one node. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
XPath is good for random search of elements, not for accessing attributes of one node. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 14 8月, 2017 7 次提交
-
-
由 Pavel Hrdina 提交于
XPath is good for random search of elements, not for accessing attributes of one node. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
XPath is good for random search of elements, not for accessing attributes of one node. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
XPath is good for random search of elements, not for accessing attributes of one node. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
XPath is good for random search of elements, not for accessing attributes of one node. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
XPath is good for random search of elements, not for accessing attributes of one node. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
The @remaining variable is leftover from old code and it's not used anymore. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 10 8月, 2017 1 次提交
-
-
由 Michal Privoznik 提交于
In virDomainNetDefParseXML() the def->coalesce is parsed and allocated by virDomainNetDefCoalesceParseXML() but in fact it's never freed . Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 08 8月, 2017 1 次提交
-
-
由 Ján Tomko 提交于
Make the comparison explicit.
-
- 07 8月, 2017 2 次提交
-
-
由 Michal Privoznik 提交于
When parsing <ioapic> feature we're using @tmp to store some temporary string but never free it. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
When parsing boot options from domain XML in virDomainDefParseBootOptions() initenv id stored to: def->os.initenv[i]->name def->os.initenv[i]->value But these are never freed. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 03 8月, 2017 1 次提交
-
-
由 Ján Tomko 提交于
My commit 0c1d8632 broke formatting of passthrough smartcard devices: <smartcard mode='passthrough' type='spicevmc'/> resulted in invalid XML: <smartcard mode='passthrough'> type='spicevmc'> <address type='ccid' controller='0' slot='0'/> </smartcard> Split out chardev source formatting function into two - one formatting the attributes and other formatting the subelements. Reported-by: NCole Robinson <crobinso@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 02 8月, 2017 9 次提交
-
-
由 Ján Tomko 提交于
The rombar attribute was already validated at the time of parsing the XML.
-
由 Ján Tomko 提交于
After an OOM error, virBuffer* APIs set buf->use to zero. Adding a buffer to the parent buffer only if use is non-zero would quietly drop data on error. Check the error beforehand to make sure buf->use is zero because we have not attempted to add anything to it.
-
由 Ján Tomko 提交于
Switch virDomainHubDefFormat to use a separate buffer for subelements.
-
由 Ján Tomko 提交于
Convert virDomainWatchdogDefFormat to use a separate buffer for subelements.
-
由 Ján Tomko 提交于
Convert virDomainSoundDefFormat to use a separate buffer for subelements.
-
由 Ján Tomko 提交于
Convert virDomainSmartcardDefFormat to use a separate buffer for possible subelements, to avoid the need for duplicated formatting logic in virDomainDeviceInfoNeedsFormat.
-
由 Ján Tomko 提交于
This function has grown to format more than just the address. Delete the comment completely to avoid failing to update it in the future. Also, the indentation is now handled by the virBuffer APIs, so the comment about indentation no longer makes sense.
-
由 Ján Tomko 提交于
This function returns false if virDomainDeviceInfoFormat would not format anything. Using it as the sole condition to decide whether to call virDomainDeviceInfoFormat or not is pointless, since the conditions are repeated in virDomainDeviceInfoFormat.
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1462653 Just like I've added support for setting rx_queue_size (in c56cdf25 and friends), qemu just gained support for setting tx ring size. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 25 7月, 2017 1 次提交
-
-
由 Martin Kletzander 提交于
It is more related to a domain as we might use it even when there is no systemd and it does not use any dbus/systemd functions. In order not to use code from conf/ in util/ pass machineName in cgroups code as a parameter. That also fixes a leak of machineName in the lxc driver and cleans up and de-duplicates some code. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-