- 07 8月, 2019 14 次提交
-
-
由 John Ferlan 提交于
Commit d2899a64 added a new exit path, but didn't free @fakerootdir. Let's just use VIR_AUTOFREE instead to make life easier. Found by Coverity Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
If virQEMUDriverGetCapabilities returns NULL, then a subsequent deref of @caps would cause an error, so we just return failure. Found by Coverity Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Daniel P. Berrangé 提交于
The previous bump to 4.4 was done in: commit 24241c23 Author: Daniel P. Berrange <berrange@redhat.com> Date: Wed Jul 5 10:35:32 2017 +0100 Require use of GCC 4.4 or CLang compilers with 4.4 picked due to RHEL-6. Since we dropped RHEL-6, the next oldest distro is RHEL-7 (4.8.5), and thus we pick 4.8 as the new min. Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Ilias Stamatis 提交于
Signed-off-by: NIlias Stamatis <stamatis.iliass@gmail.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Ilias Stamatis 提交于
Until now, testDomainGetTime would always return the same fixed values everytime it was called. By using domain-private data we can make this API return the values previously set with testDomainSetTime, or use the same old fixed values in case testDomainSetTime hasn't been called at all. Signed-off-by: NIlias Stamatis <stamatis.iliass@gmail.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Erik Skultety 提交于
Typo introduced by commit d73f3f58. https://bugzilla.redhat.com/show_bug.cgi?id=1738483Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Ilias Stamatis 提交于
The qemu and vz implementations don't emit any signals when this API is called, so we can do the same here for now and succeed by doing nothing. Signed-off-by: NIlias Stamatis <stamatis.iliass@gmail.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Cole Robinson 提交于
The qemu driver already does some <rng> model validation, based on qemuCaps. However, the logic for exposing <rng> model values in domcaps is basically identical. This drops the qemuCaps checking and compares against the domCaps data directly. This approach makes it basically impossible to add a new <rng> model to the qemu driver without extending domcaps. The validation can also be shared with other drivers eventually. Reviewed-by: NReviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
Fill in virDomainCaps at Validate time and use it to call virDomainCapsDeviceDefValidate Reviewed-by: NReviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
This is an entrypoint to validate a virDomainDeviceDef against values filled into virDomainCaps. Currently it's just a stub Reviewed-by: NReviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
qemuCaps is tied to a binary on disk. domCaps is tied to a combo of binary+machine+arch+virttype values. For the qemu driver this almost entirely translates to a permutation of qemuCaps though Upcoming patches want to use the domCaps data store at XML validate time, but we need to cache the data so we aren't repeatedly regenerating it. Add a domCapsCache hash table to qemuCaps. This ensures that the domCaps cache is blown away whenever qemuCaps needs to be regenerated. Similarly when qemuCaps is invalidated, the next call to virQEMUCapsCacheLookup will unref qemuCaps and free our cache as well. Adjust virQEMUDriverGetDomainCapabilities to search the cache and add to it if we don't find a hit. Signed-off-by: NCole Robinson <crobinso@redhat.com> Reviewed-by: NReviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Cole Robinson 提交于
For now it's just a helper for building a qemu virDomainCapsPtr, used in qemuConnectGetDomainCapabilities Reviewed-by: NReviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
The model logic is taken from qemuDomainRNGDefValidate Reviewed-by: NReviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
This adds device <rng> reporting. Example output: <rng supported='yes'> <enum name='model'> <value>virtio</value> <value>virtio-transitional</value> <value>virtio-non-transitional</value> </enum> <enum name='backendModel'> <value>random</value> <value>egd</value> </enum> </rng> Reviewed-by: NReviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
- 06 8月, 2019 26 次提交
-
-
由 Michal Privoznik 提交于
This way it is obvious when adding a new resource control type that stats helper func needs to be updated too. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Michal Privoznik 提交于
If the host doesn't have resctrl then the monitor is going to be NULL and we must avoid dereferencing it. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Michal Privoznik 提交于
The capabilities object must be unrefed when no longer needed. Use VIR_AUTOUNREF() for that. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Vitaly Kuznetsov 提交于
Current code doesn't allow us to add sub-features as we always print the closing '/>'. As a preparatory change to implementing 'direct' sub-feature for 'stimer' feature switch to printing closing tag individually. No functional change. Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Vitaly Kuznetsov 提交于
Some Hyper-V features (like the upcoming Direct Synthetic timers) are announced by feature bits in Edx but KVM_FEATURE_DEF() supports only Eax. Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Michal Privoznik 提交于
This piece of code will be re-used later. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> ACKed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Michal Privoznik 提交于
In near future we will need to check for number of members of two different types of lists: PCI and NVMe. Rename CHECK_LIST_COUNT to CHECK_PCI_LIST_COUNT to mark explicitly what type of list it is working with. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> ACKed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Michal Privoznik 提交于
The myInit() function is called before any of the test cases because it prepares all internal structures for individual cases. Well, if it fails there's no point in proceeding with testing. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> ACKed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Michal Privoznik 提交于
I find this function more readable if checks for passed storage source are done first and backing chain is done last. Mixing them together does not hurt, but is less readable. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> ACKed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Michal Privoznik 提交于
This function does not change any of the passed addresses. It just reads them. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> ACKed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Michal Privoznik 提交于
This function does not change any of the passed addresses. It just reads them. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> ACKed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Ilias Stamatis 提交于
Signed-off-by: NIlias Stamatis <stamatis.iliass@gmail.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Ilias Stamatis 提交于
Signed-off-by: NIlias Stamatis <stamatis.iliass@gmail.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Ilias Stamatis 提交于
On success update the domain-private data. Consider / and /boot to be the only mountpoints avaiable in order to be consistent with the other FS-related calls. Signed-off-by: NIlias Stamatis <stamatis.iliass@gmail.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Ilias Stamatis 提交于
vm-specific data can be used by APIs that need to preserve some state between calls Some of them are: - FS-related APIs for remembering which mountpoints are frozen - virDomainSetTime / virDomainGetTime for maintaining time information - virDomainSetIOThreadParams for storing the I/O thread parameters - virDomainManagedSaveDefineXML for internally storing the VM definition Signed-off-by: NIlias Stamatis <stamatis.iliass@gmail.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Ilias Stamatis 提交于
The main value here is the current balloon value which taken from the config. All the other values (except for period) are derived by 2^n division so that compiler prefers bitwise operations. Period value was kept fixed in order to produce predictable results in a test environment. Signed-off-by: NIlias Stamatis <stamatis.iliass@gmail.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Ilias Stamatis 提交于
Signed-off-by: NIlias Stamatis <stamatis.iliass@gmail.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Ilias Stamatis 提交于
This should just forward the call to testDomainCreateXML since we can't do anything with the provided file descriptors in the test driver. Signed-off-by: NIlias Stamatis <stamatis.iliass@gmail.com>
-
由 Ilias Stamatis 提交于
This should just forward the call to testDomainCreateWithFlags since we can't do anything with the provided file descriptors in the test driver. Signed-off-by: NIlias Stamatis <stamatis.iliass@gmail.com>
-
由 Jim Fehlig 提交于
The xencommons service provides all the essential services such as xenstored, xenconsoled, etc. needed by the libvirt Xen driver, so libvirtd should be started after xencommons. The xendomains service uses Xen's xl tool to operate on any domains it finds running, even those managed by libvirt. Add a conflicts on the xendomains service to ensure it is not enabled when libvirtd is enabled. Signed-off-by: NJim Fehlig <jfehlig@suse.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel Henrique Barboza 提交于
This code that executes virPCIDeviceReattach in all virPCIDevicePtr objects of a given virPCIDeviceListPtr list is replicated twice in the code. Putting it in a helper function helps with readability. Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Daniel Henrique Barboza 提交于
virHostdevReattachPCIDevice() is a static that simply does a wait loop with virPCIDeviceWaitForCleanup() before calling virPCIDeviceReattach(). This loop traces back to commit d1e5676c, aiming to solve a race condition between Libvirt returning the device back to the host and QEMU trying to access it in the meantime, which resulted in QEMU exiting on error and killing the guest. This happens because device_del is asynchronous, returning OK even if the guest didn't release the device. Commit 01abc8a1 moved this code to qemu_hostdev.c, 82e8dd4c added the pci-stub conditional for the loop, 899b2611 moved the code to virhostdev.c where it stood until now. The intent of this wait loop is still valid: device_del is still not bullet proof into preventing the conditions that commit d1e5676c aimed to fix, especially when considering all the architectures we must support. However, this loop is executed only in virHostdevReattachPCIDevice(), leaving every other virPCIDeviceReattach() call prone to that error. Let's move the wait loop code to virPCIDeviceReattach(). This will: - make every reattach call safe from this race condition with the pci-stub; - allow for a bit of code cleanup (virHostdevReattachPCIDevice() can be erased, and virHostdevReAttachPCIDevices() can use virPCIDeviceReattach() directly); - make it easier to understand the overall reattach mechanisms in Libvirt, without the risk of a newcomer wondering why reattach is done slightly different in some instances. Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Daniel Henrique Barboza 提交于
This code that executes virPCIDeviceReset in all virPCIDevicePtr objects of a given virPCIDeviceListPtr list is replicated twice in the code. Putting it in a helper function helps with readability. Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
There is no restriction on maximum value of PCI domain. In fact, Linux kernel uses plain atomic inc when assigning PCI domains: drivers/pci/pci.c:static int pci_get_new_domain_nr(void) drivers/pci/pci.c-{ drivers/pci/pci.c- return atomic_inc_return(&__domain_nr); drivers/pci/pci.c-} Of course, this function is called only if kernel was compiled without PCI domain support or ACPI did not provide PCI domain. However, QEMU still has the same restriction as us: in set_pci_host_devaddr() QEMU checks if domain isn't greater than 0xffff. But one can argue that that's a QEMU limitation. We still want to be able to cope with other hypervisors that don't have this limitation (possibly). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Michal Privoznik 提交于
Currently, the way we format PCI address is using printf-s precision, e.g. "%.4x". This works if we don't want to print any value outside of bounds (which is usually the case). However, turns out, PCI domain can be 0x10000 which doesn't work well with our format strings. However, if we change the format string to "%04x" then we still pad small values with zeroes but also we are able to print values that are larger than four digits. In fact, this format string used by kernel to print a PCI address: "%04x:%02x:%02x.%d" The other three format strings (for bus, device and function) are changed too, so that we use the same format string as kernel. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Michal Privoznik 提交于
The format string for a PCI address is copied over and over again, often with slight adjustments. Introduce global VIR_PCI_DEVICE_ADDRESS_FMT macro that holds the formatting string and use it wherever possible. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-