- 12 9月, 2018 1 次提交
-
-
由 Laine Stump 提交于
virDomainDefCollectBootOrder() is called for every item on the list for each type of device. One of the checks it makes is to gather the order attributes from the <boot> element of all devices, and assure that no two devices have been given the same order. Since (internally to libvirt, *not* in the domain XML) an <interface type='hostdev'> is on both the list of hostdev devices and the list of network devices, it will be counted twice, and the code that checks for multiple devices with the same boot order will give a false positive. To remedy this, we make sure to return early for hostdev devices that have a parent.type != NONE. This was introduced in commit 5b75a4, which was first in libvirt-4.4.0. Resolves: https://bugzilla.redhat.com/1601318Signed-off-by: NLaine Stump <laine@laine.org> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 10 9月, 2018 1 次提交
-
-
由 Jiri Denemark 提交于
Broken by v3.10.0-68-gaed3d038. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 07 9月, 2018 1 次提交
-
-
由 Andrea Bolognani 提交于
Attempting to use a chardev definition like <serial type='unix'> <target type='isa-serial'/> </serial> correctly results in an error being reported, since the source path - a required piece of information - is missing; however, the very similar <serial type='unix'> <target type='pci-serial'/> </serial> was happily accepted by libvirt, only to result in libvirtd crashing as soon as the guest was started. The issue was caused by checking the chardev's targetType against whitelisted values from virDomainChrChannelTargetType without first checking the chardev's deviceType to make sure it is actually a channel, for which the check makes sense, rather than a different type of chardev. The only reason this wasn't spotted earlier is that the whitelisted values just so happen to correspond to USB and PCI serial devices and Xen and UML consoles respectively, all of which are fairly uncommon. https://bugzilla.redhat.com/show_bug.cgi?id=1609720Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 04 9月, 2018 5 次提交
-
-
由 Andrea Bolognani 提交于
The corresponding structs are declared there. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Andrea Bolognani 提交于
The function is called on a virDomainDeviceInfo, so it should be declared along with it. Moving this function requires moving and making public virDomainDeviceCCWAddressIsValid() as well, but that's perfectly fine since the same reasoning above also applies to it, due to virDomainDeviceCCWAddress being (correctly) declared in device_conf. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Andrea Bolognani 提交于
It's used in virDomainDeviceInfo, which makes domain_conf the wrong place to declare it. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1623157 Changing MTU on a running guest is not possible and trying to do so made us face many problems. That's why we forbid it in 5f44d7e3. However, there is still one possible path where users can sneak in change: migration XML. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1621910 When introducing this check back in 4ad54a41 my mindset was that if an element is missing in update XML then user is requesting for removal of the corresponding setting. For instance, if <bandwidth/> is not present in update XML any QoS previously set on <interface/> is cleared out. Well this assumption is correct but only to some extent. Turns out, we have some users who when updating path to ISO image construct very minimalistic disk XML and pass it to device update API. Such XML is lacking a lot of information, and alias is one of them. This triggers error in virDomainDefCompatibleDevice() because we think that user is requesting to remove the alias. Well, they are not. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 28 8月, 2018 2 次提交
-
-
由 Andrea Bolognani 提交于
None of the existing models is suitable for use with RISC-V virt guests, and we don't want information about the serial console to be missing from the XML. The name is based on comments in qemu/hw/riscv/virt.c: RISC-V machine with 16550a UART and VirtIO MMIO and in qemu/hw/char/serial.c: QEMU 16550A UART emulation along with the output of dmesg in the guest: Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled 10000000.uart: ttyS0 at MMIO 0x10000000 (irq = 13, base_baud= 230400) is a 16550A Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Ján Tomko 提交于
Commit deb057fd added a switch without a default case. Add it and call virReportEnumRangeError for _LAST too. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
- 21 8月, 2018 4 次提交
-
-
由 Peter Krempa 提交于
Similarly to backing store indexes which will become stable eventually we need also to be able to format and store in the status XML for later use the index for the top level of the backing chain. Add XML formatter, parser, schema and docs. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Allow storing of private data in the status XML for disks. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
If a user configures the backing chain in the XML we should not ignore it. We already do parse it but don't format it out. As a safety-precaution don't attempt to format detected chain into the inactive XML. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1610072 Due to historical reasons we were not parsing device info on guestfwd channel. Sure, it doesn't make much sense to parse <address/> but it surely makes sense to parse its alias (which might be an user alias). This reverts commit 47a3dd46 which fixed https://bugzilla.redhat.com/show_bug.cgi?id=1172526. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
- 17 8月, 2018 3 次提交
-
-
由 Vitaly Kuznetsov 提交于
Qemu-3.0 supports Hyper-V-style PV TLB flush, Windows guests can benefit from this feature as KVM knows which vCPUs are not currently scheduled (and thus don't require any immediate action). Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Vitaly Kuznetsov 提交于
Qemu-3.0 supports so-called 'Reenlightenment' notifications and this (in conjunction with 'hv-frequencies') can be used make Hyper-V on KVM pass stable TSC page clocksource to L2 guests. Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Vitaly Kuznetsov 提交于
Qemu-2.12 gained 'hv-frequencies' cpu flag to enable Hyper-V frequency MSRs. These MSRs are required (but not sufficient) to make Hyper-V on KVM pass stable TSC page clocksource to L2 guests. Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 14 8月, 2018 7 次提交
-
-
由 Bing Niu 提交于
Add return value check to virResctrlAllocForeachCache in virDomainCachetuneDefFormat. The virResctrlAllocForeachCache does have return value, so need check return value to make sure function executed without error. Signed-off-by: NBing Niu <bing.niu@intel.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Bing Niu 提交于
Introduce a new section memorytune to support memory bandwidth allocation. This is consistent with existing cachetune. As the example: below: <cputune> ...... <memorytune vcpus='0'> <node id='0' bandwidth='30'/> </memorytune> </cputune> vpus --- vpus subjected to this memory bandwidth. id --- on which node memory bandwidth to be set. bandwidth --- the memory bandwidth percent to set. Signed-off-by: NBing Niu <bing.niu@intel.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Bing Niu 提交于
Factor out vcpus virDomainResctrlDef update from virDomainCachetuneDefParse and introduce virDomainResctrlAppend. virDomainResctrlAppend will format vcpus string and append a new virDomainResctrlDef to virDomainDefPtr. So that this logic can be reusable. Signed-off-by: NBing Niu <bing.niu@intel.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Bing Niu 提交于
Factor out vcpus overlapping detecting part from virDomainCachetuneDefParse and introduce virDomainResctrlVcpuMatch. Instead of allocating virResctrlAllocPtr by default, allocating virResctrlAllocPtr after confirm vcpus not overlap with existing ones. And virDomainResctrlVcpuMatch can be reused by other resource control technologies. virDomainResctrlVcpuMatch can clarify old vcpus overlap error whether an overlap or a redefinition. Signed-off-by: NBing Niu <bing.niu@intel.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Bing Niu 提交于
Extract vcpus parsing part from virDomainCachetuneDefParse into one function called virDomainResctrlParseVcpus. So that vcpus parsing logic can be reused by other resource control technologies. Adjust error message and use node->name so that the error message can fit to all technologies. Signed-off-by: NBing Niu <bing.niu@intel.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Bing Niu 提交于
Resctrl not only supports cache tuning, but also memory bandwidth tuning. Renaming cachetune to resctrl to reflect that. With resctrl, all allocation for different resources (cache, memory bandwidth) are aggregated and represented by a virResctrlAllocPtr inside virDomainResctrlDef. Signed-off-by: NBing Niu <bing.niu@intel.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Bing Niu 提交于
Some functions in virresctrl are for CAT only, while some of other functions are for resource allocation, not just CAT. So change their names to reflect the reality. Signed-off-by: NBing Niu <bing.niu@intel.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 10 8月, 2018 3 次提交
-
-
由 Pavel Hrdina 提交于
Previously we were ignoring "nodeset" attribute for hugepage pages if there was no guest NUMA topology configured in the domain XML. Commit <fa6bdf6a> partially fixed that issue but it introduced a somehow valid regression. In case that there is no guest NUMA topology configured and the "nodeset" attribute is set to "0" it was accepted and was working properly even though it was not completely valid XML. This patch introduces a workaround that it will ignore the nodeset="0" only in case that there is no guest NUMA topology in order not to hit the validation error. After this commit the following XML configuration is valid: <memoryBacking> <hugepages> <page size='2048' unit='KiB' nodeset='0'/> </hugepages> </memoryBacking> but this configuration remains invalid: <memoryBacking> <hugepages> <page size='2048' unit='KiB' nodeset='0'/> <page size='1048576' unit='KiB'/> </hugepages> </memoryBacking> The issue with the second configuration is that it was originally working, however changing the order of the <page> elements resolved into using different page size for the guest. The code is written in a way that it expect only one page configured and always uses only the first page in case that there is no guest NUMA topology configured. See qemuBuildMemPathStr() function for details. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1591235Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
We can safely validate the hugepage nodeset attribute at a define time. This validation is not done for already existing domains when the daemon is restarted. All the changes to the tests are necessary because we move the error from domain start into XML parse. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 08 8月, 2018 3 次提交
-
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
We cannot simply used the same code as for iscsi storage pool because the default mode is 'host' which is not possible with iscsi-direct. Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Simon Kobyda 提交于
Validate that the provided XML shmem name is not directory specific to "." or ".." as well as ensure that there is no path separator '/' in the name. https://bugzilla.redhat.com/show_bug.cgi?id=1192400Signed-off-by: NSimon Kobyda <skobyda@redhat.com> Reviewed-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 06 8月, 2018 1 次提交
-
-
由 Clementine Hayat 提交于
Introducing the pool as a noop. Integration inside the build system. Implementation will be in the following commits. Signed-off-by: NClementine Hayat <clem@lse.epita.fr> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 27 7月, 2018 1 次提交
-
-
由 Han Han 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1591151 Add function virDomainInputDefValidate to validate input devices. Make sure evdev attribute of source element is not used by mouse, keyboard, and tablet input device. Signed-off-by: NHan Han <hhan@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 26 7月, 2018 7 次提交
-
-
由 Daniel P. Berrangé 提交于
Use of enum types for struct fields is generally avoided since it causes warnings if the compiler assumes the enum is unsigned. For example commit 8e2982b5 Author: Cole Robinson <crobinso@redhat.com> Date: Tue Jul 24 16:27:54 2018 -0400 conf: Clean up virDomainDefParseCaps Introduced a line: if ((def->virtType = virDomainVirtTypeFromString(virttype)) < 0) { which causes a build failure with CLang conf/domain_conf.c:19143:65: error: comparison of unsigned enum expression < 0 is always false [-Werror,-Wtautological-compare] as the compiler is free to optimize away the "< 0" check due to the assumption that the enum type is unsigned and always in range. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Cole Robinson 提交于
SKIP_OSTYPE_CHECKS only hides some error reporting at this point, so it can be foled into SKIP_VALIDATE Acked-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
We should still make an effort to fill in data, just not raise an error if say an ostype/virttype combo disappeared from caps. Acked-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
The comment says: /* If the logic here seems fairly arbitrary, that's because it is :) * This is duplicating how the code worked before * CapabilitiesDomainDataLookup was added. We can simplify this, * but it would take a bit of work because the test suite fails * in numerous minor ways. */ Nowadays the test suite changes appear quite simple, just extending test capabilities data a bit so that we aren't trying to define invalid arch/os/virtType/machine combos Acked-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
- Convert to 'cleanup' label naming - Use more than one 'tmp' string and do all freeing at the end - Make the code easier to follow Acked-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
Handles parse virtType, os.type, bootloader bits, arch, machine, emulator Acked-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Han Han 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1607825 Introduced by commit d48813e8. Signed-off-by: NHan Han <hhan@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
- 25 7月, 2018 1 次提交
-
-
由 Shi Lei 提交于
With 'switch' we can utilize the compile time enum checks which we can't rely on with plain 'if' conditions. Signed-off-by: NShi Lei <shilei.massclouds@gmx.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-