- 10 11月, 2015 2 次提交
-
-
由 Peter Krempa 提交于
If mlock is required either due to use of VFIO hostdevs or due to the fact that it's enabled it needs to be tweaked prior to adding new memory or after removing a module. Add a helper to determine when it's necessary and reuse it both on hotplug and hotunplug. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1273491
-
由 Peter Krempa 提交于
New function qemuDomainGetMlockLimitBytes will now handle the calculation so that it unifies the logic to one place and allows later reuse.
-
- 21 10月, 2015 1 次提交
-
-
由 Ishmanpreet Kaur Khera 提交于
We have macros for both positive and negative string matching. Therefore there is no need to use !STREQ or !STRNEQ. At the same time as we are dropping this, new syntax-check rule is introduced to make sure we won't introduce it again. Signed-off-by: NIshmanpreet Kaur Khera <khera.ishman@gmail.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 24 9月, 2015 3 次提交
-
-
由 Michal Privoznik 提交于
So far we have the following pattern occurring over and over again: if (!vm->persistent) qemuDomainRemoveInactive(driver, vm); It's safe to put the check into the function and save some LoC. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Martin Kletzander 提交于
I initially added this in order to keep the code more error-prone to following additions, but it seems it's still frowned upon. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Michal Privoznik 提交于
Now that virQEMUDriverCreateXMLConf is never called with NULL (after 086f37e9) we can safely drop useless check in qemuDomainDeviceDefPostParse as we are guaranteed to be always called with the driver initialized. Therefore checking if driver is NULL makes no sense. Moreover, if we mix it with direct driver dereference. And after that, we are sure that nor @cfg will be NULL, therefore we can drop checks for that too. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 23 9月, 2015 1 次提交
-
-
由 Peter Krempa 提交于
My original implementation was based on a qemu version that still did not have all the checks in place. Using sizes that would align to odd megabyte increments will produce the following error: qemu-kvm: -device pc-dimm,node=0,memdev=memdimm0,id=dimm0: backend memory size must be multiple of 0x200000 qemu-kvm: -device pc-dimm,node=0,memdev=memdimm0,id=dimm0: Device 'pc-dimm' could not be initialized Introduce an alignment retrieval function for memory devices and use it to align the devices separately and modify a test case to verify it.
-
- 22 9月, 2015 6 次提交
-
-
由 Peter Krempa 提交于
For some machine types ppc64 machines now require that memory sizes are aligned to 256MiB increments (due to the dynamically reconfigurable memory). As now we treat existing configs reasonably in regards to migration, we can round all the sizes unconditionally. The only drawback will be that the memory size of a VM can potentially increase by (256MiB - 1byte) * number_of_NUMA_nodes. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1249006
-
由 Peter Krempa 提交于
Add 'initial_memory' member to struct virDomainMemtune so that the memory size can be pre-calculated once instead of inferring it always again and again. Separating of the fields will also allow finer granularity of decisions in later patches where it will allow to keep the old initial memory value in cases where we are handling incomming migration from older versions that did not always update the size from NUMA as the code did previously. The change also requires modification of the qemu memory alignment function since at the point where we are modifying the size of NUMA nodes the total size needs to be recalculated too. The refactoring done in this patch also fixes a crash in the hyperv driver that did not properly initialize def->numa and thus virDomainNumaGetMemorySize(def->numa) crashed. In summary this patch should have no functional impact at this point.
-
由 Peter Krempa 提交于
The name of the variable was misleading. Rename it and it's setting accessor before other fixes.
-
由 Peter Krempa 提交于
Extract the size determination into a separate function and reuse it across the memory device alignment functions. Since later we will need to decide the alignment size according to architecture let's pass def to the functions.
-
由 Peter Krempa 提交于
Add a simple helper so that the code doesn't have to rewrite the same condition multiple times.
-
由 Pavel Fedin 提交于
Since test suite now correctly creates capabilities cache, the hack is not needed any more. Signed-off-by: NPavel Fedin <p.fedin@samsung.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 21 9月, 2015 1 次提交
- 18 9月, 2015 4 次提交
-
-
由 Michal Privoznik 提交于
So far this function was not kept in sync with changing virDomainDiskDef. Fill in all the missing checks and reorganize their order so it's easier to track which items are not being checked for. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
I always felt like this function is qemu specific rather than libvirt-wide. Other drivers may act differently on virDomainDef change and in fact may require talking to underlying hypervisor even if something else's than disk->src has changed. I know that the function is still incomplete, but lets break that into two commits that are easier to review. This one is pure code movement. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
This new private API should return true iff sources of two disks differs in sense that qemu should be instructed to change the disk backend. For instance, ejecting a CDROM is such case, or pointing disk into a different ISO location, and so on. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Jiri Denemark 提交于
Every single call to qemuDomainEventQueue() uses the following pattern: if (event) qemuDomainEventQueue(driver, event); Let's move the check for valid event to qemuDomainEventQueue and simplify all callers. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 10 9月, 2015 1 次提交
-
-
由 Andrea Bolognani 提交于
Up until now, the default has been rtl8139, but no check was in place to make sure that device was actually available. Now we try rtl8139, e1000 and virtio-net in turn, checking for availability before using any of them: this means we have a much better chance for the guest to be able to boot.
-
- 04 9月, 2015 1 次提交
-
-
由 John Ferlan 提交于
Rather than have different usages of STR function in order to determine whether the domain is s390-ccw or s390-ccw-virtio, make a single API which will check the machine.os prefix. Then use the function.
-
- 24 8月, 2015 1 次提交
-
-
由 Martin Kletzander 提交于
We are automatically generating some socket paths for domains, but all those paths end up in a directory that's the same for multiple domains. The problem is that multiple domains can each run with different seclabels (users, selinux contexts, etc.). The idea here is to create a per-domain directory labelled in a way that each domain can access its own unix sockets. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1146886Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 13 8月, 2015 3 次提交
-
-
由 Martin Kletzander 提交于
The numad hint stored in priv->autoNodeset is information that gets lost during daemon restart. And because we would like to use that information in the future, we also need to save it in the status XML. For the sake of tests, we need to initialize nnumaCell_max to some value, so that the restoration doesn't fail in our test suite. There is no need to fill in the actual numa cell data since the recalculating function virCapabilitiesGetCpusForNodemask() will not fail, it will just skip filling the data in the bitmap which we don't use in tests anyway. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
This needs a reorder of XML option definitions. It might come in handy one day. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
When parsing private domain data, there are two paths that are flawed. They are both error paths, just from different parts of the function. One of them can call free() on an uninitialized pointer. Initialization to NULL is enough here. The other one is a bit trickier to explain, but as easy as the first one to fix. We create capabilities, parse them and then assign them into the private data pointer inside the domain object. If, however, we get to fail from now on, the error path calls unrefs the capabilities and then, when the domain object is being cleaned, qemuDomainObjPrivateFree() tries to unref them as well. That causes a segfault. Settin the pointer to NULL upon successful addition to the private data is enough. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 12 8月, 2015 1 次提交
-
-
由 Laine Stump 提交于
Commit e8d55172 updated the domain post-parse to automatically add pcie-root et al for certain ARM "virt" machinetypes, but didn't update the function qemuDomainSupportsPCI() which is called later on when we are auto-assigning PCI addresses and default settings for the PCI controller <model> and <target> attributes. The result was that PCI addresses weren't assigned, and the controllers didn't have their attribute default values set, leading to an error when the domain was started, e.g.: internal error: autogenerated dmi-to-pci-bridge options not set This patch adds the same check made in the earlier patch to qemuDomainSupportsPCI(), so that PCI address auto-assignment and target/model default values will be set.
-
- 06 8月, 2015 2 次提交
-
-
由 Michal Privoznik 提交于
While reviewing e8d55172 I've noticed a few unaligned lines. Fix this. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Pavel Fedin 提交于
Here we assume that if qemu supports generic PCI host controller, it is a part of virt machine and can be used for adding PCI devices. In qemu this is actually a PCIe bus, so we also declare multibus capability so that 0'th bus is specified to qemu correctly as 'pcie.0' Signed-off-by: NPavel Fedin <p.fedin@samsung.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 03 8月, 2015 1 次提交
-
-
由 Martin Kletzander 提交于
The virDomainObjListRemove() function unlocks a domain that it's given due to legacy code. And because of that code, which should be refactored, that last virObjectUnlock() cannot be just removed. So instead, lock it right back for qemu for now. All calls to qemuDomainRemoveInactive() are followed by code that unlocks the domain again, plus the domain should be locked during qemuDomainObjEndJob(), so the right place to lock it is right after virDomainObjListRemove(). The only place where this would cause a problem is the autodestroy callback, so we need to get another reference there and uref+unlock it afterwards. Luckily, returning NULL from that function doesn't mean an error, and only means that it doesn't need to be unlocked anymore. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 08 7月, 2015 2 次提交
-
-
由 Ján Tomko 提交于
Since QEMU commit ea96bc6 [1]: i386: drop FDC in pc-q35-2.4+ if neither it nor floppy drives are wanted the floppy controller is no longer implicit. Specify it explicitly on the command line if the machine type version is 2.4 or later. Note that libvirt's floppy drives do not result in QEMU implying the controller, because libvirt uses if=none instead of if=floppy. https://bugzilla.redhat.com/show_bug.cgi?id=1227880 [1] http://git.qemu.org/?p=qemu.git;a=commitdiff;h=ea96bc6
-
由 Luyao Huang 提交于
When use setvcpus command with --guest option to a offline vm, we will get error: # virsh setvcpus test3 1 --guest error: Guest agent is not responding: QEMU guest agent is not connected However guest is not running, agent status could not be connected. In this case, report domain is not running will be better than agent is not connected. Move the guest status check more early to output error to point out guest status is not right. Also from the logic, a running vm is a basic requirement to use agent, we cannot use agent if vm is not running. Signed-off-by: NLuyao Huang <lhuang@redhat.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 01 7月, 2015 2 次提交
-
-
由 Peter Krempa 提交于
Using a custom device tree image may cause unexpected behavior in architectures that use this approach to detect platform devices. Since usually the device tree is generated by qemu and thus it's not normally used let's taint VMs using it to make it obvious as a possible source of problems.
-
由 Jiri Denemark 提交于
The code which generates paths for UNIX socket blindly used target name without checking if it was set. Thus for the following device XML <channel type='unix'> <source mode='bind'/> <target type='virtio'/> </channel> we would generate "/var/lib/libvirt/qemu/channel/target/NAME.(null)" path which works but is not really correct. Let's not use the ".target_name" suffix at all if target name is not set. https://bugzilla.redhat.com/show_bug.cgi?id=1226854Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 19 6月, 2015 5 次提交
-
-
由 Jiri Denemark 提交于
QEMU_CAPS_SEAMLESS_MIGRATION capability says QEMU supports SPICE_MIGRATE_COMPLETED event. Thus we can just drop all code which polls query-spice and replace it with waiting for the event. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
To avoid polling for asyncAbort flag changes. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
When libvirtd is restarted during migration, we properly cancel the ongoing migration (unless it managed to almost finished before the restart). But if we were also migrating storage using NBD, we would completely forget about the running disk mirrors. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
So that they can format private data (e.g., disk private data) stored elsewhere in the domain object. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
By switching block jobs to use domain conditions, we can drop some pretty complicated code in NBD storage migration. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 18 6月, 2015 1 次提交
-
-
由 Peter Krempa 提交于
The privileged flag will not change while the configuration might change. Make the 'privileged' flag member of the driver again and mark it immutable. Should that ever change add an accessor that will group reads of the state.
-
- 04 6月, 2015 2 次提交
-
-
由 Peter Krempa 提交于
In qemuDomainUpdateCurrentMemorySize I misplaced the actual update of the balloon size to a place where it may not be initialized. Move it a few lines above.
-
由 Peter Krempa 提交于
When qemu does not support the balloon event the current memory size needs to be queried. Since there are two places that implement the same logic, split it out into a function and reuse.
-