- 16 6月, 2017 4 次提交
-
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1431112 Imagine a FS mounted on /dev/blah/blah2. Our process of creating suffix for temporary location where all the mounted filesystems are moved is very simplistic. We want: /var/run/libvirt/qemu/$domName.$suffix\ were $suffix is just the mount point path stripped of the "/dev/" prefix. For instance: /var/run/libvirt/qemu/fedora.mqueue for /dev/mqueue /var/run/libvirt/qemu/fedora.pts for /dev/pts and so on. Now if we plug /dev/blah/blah2 into the example we see some misbehaviour: /var/run/libvirt/qemu/fedora.blah/blah2 Well, misbehaviour if /dev/blah/blah2 is a file, because in that case we call virFileTouch() instead of virFileMakePath(). The solution is to replace all the slashes in the suffix with say dots. That way we don't have to care about nested directories. IOW, the result we want for given example is: /var/run/libvirt/qemu/fedora.blah.blah2 Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1431112 There can be nested mount points. For instance /dev/shm/blah can be a mount point and /dev/shm too. It doesn't make much sense to return the former path because callers preserve the latter (and with that the former too). Therefore prune nested mount points. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1431112 After 290a00e4 we know how to deal with file mount points. However, when cleaning up the temporary location for preserved mount points we are still calling rmdir(). This won't fly for files. We need to call unlink(). Now, since we don't really care if the cleanup succeeded or not (it's the best effort anyway), we can call both rmdir() and unlink() without need for differentiation between files and directories. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Martin Kletzander 提交于
Change the settings from qemuDomainUpdateDeviceLive() as otherwise the call would succeed even though nothing has changed. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1414627Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 14 6月, 2017 6 次提交
-
-
由 Jiri Denemark 提交于
Most places which want to check ABI stability for an active domain need to call this API rather than the original qemuDomainDefCheckABIStability. The only exception is in snapshots where we need to decide what to do depending on the saved image data. https://bugzilla.redhat.com/show_bug.cgi?id=1460952Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Jiri Denemark 提交于
When making ABI stability checks for an active domain, we need to make sure we use the same migratable definition which virDomainGetXMLDesc with the MIGRATABLE flag provides, otherwise the ABI check will fail. This is implemented in the new qemuDomainCheckABIStability which takes a domain object and generates the right migratable definition from it. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Jiri Denemark 提交于
This patch separates the actual ABI checks from getting migratable defs in qemuDomainDefCheckABIStability so that we can create another wrapper which will use different methods to get the migratable defs. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Jiri Denemark 提交于
The main goal of this function is to enable reusing the parsing code from qemuDomainDefCopy. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1214369 My fix 671d1859 was incomplete. If domain doesn't have hugepages enabled, because of missing condition we would still be putting hugepages path onto qemu cmd line. Clean up the conditions so that it's more visible next time. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Erik Skultety 提交于
With the current logic, we only free @tlsalias as part of the error label and would have to free it explicitly earlier in the code. Convert the error label to cleanup, so that we have only one sink, where we handle all frees. Since JSON object append operation consumes pointers, make sure @backend is cleared before we hit the cleanup label. Signed-off-by: NErik Skultety <eskultet@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
- 13 6月, 2017 9 次提交
-
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1214369 Consider the following XML: <memoryBacking> <hugepages> <page size='2048' unit='KiB' nodeset='1'/> </hugepages> <source type='file'/> <access mode='shared'/> </memoryBacking> <numa> <cell id='0' cpus='0-3' memory='512000' unit='KiB'/> <cell id='1' cpus='4-7' memory='512000' unit='KiB'/> </numa> The following cmd line is generated: -object memory-backend-file,id=ram-node0,mem-path=/var/lib/libvirt/qemu/ram, share=yes,size=524288000 -numa node,nodeid=0,cpus=0-3,memdev=ram-node0 -object memory-backend-file,id=ram-node1,mem-path=/var/lib/libvirt/qemu/ram, share=yes,size=524288000 -numa node,nodeid=1,cpus=4-7,memdev=ram-node1 This is obviously wrong as for node 1 hugepages should have been used. The hugepages configuration is more specific than <source type='file'/>. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1214369 https://bugzilla.redhat.com/show_bug.cgi?id=1458638 Historically, we've always supported memAccess for domains backed by hugepages. However, somewhere along the way we've regressed and stopped allowing such configuration. Fix it. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1455819 It may happen that a domain is started without any huge pages. However, user might try to attach a DIMM module later. DIMM backed by huge pages (why would somebody want to mix regular and huge pages is beyond me). Therefore we have to create the dir if we haven't done so far. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1455819 Currently, the per-domain path for huge pages mmap() for qemu is created iff domain has memoryBacking and hugepages in it configured. However, this alone is not enough because there can be a DIMM module with hugepages configured too. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Jiri Denemark 提交于
Commit v3.4.0-44-gac793bd7 fixed a memory leak, but failed to return the special -3 value. Thus an attempt to start a domain with corrupted managed save file would removed the corrupted file and report "An error occurred, but the cause is unknown" instead of starting the domain from scratch. https://bugzilla.redhat.com/show_bug.cgi?id=1460962
-
由 Philipp Hahn 提交于
Insert missing "IO" into function name. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Andrea Bolognani 提交于
Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Marc Hartmayer 提交于
Use ATTRIBUTE_FALLTHROUGH, introduced by commit 5d84f596, instead of comments to indicate that the fall through is an intentional behavior. Signed-off-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com> Reviewed-by: NBjoern Walk <bwalk@linux.vnet.ibm.com>
-
由 Marc Hartmayer 提交于
Add a comment for mon->watch to make clear what's the purpose of this value. Signed-off-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com> Reviewed-by: NBjoern Walk <bwalk@linux.vnet.ibm.com>
-
- 12 6月, 2017 3 次提交
-
-
由 Shivaprasad G Bhat 提交于
The virDomainUSBAddressEnsure returns 0 or -1, so commit id 'de325472' checking for 1 like qemuDomainAttachChrDeviceAssignAddr was wrong. Signed-off-by: NShivaprasad G Bhat <sbhat@linux.vnet.ibm.com>
-
由 Pavel Hrdina 提交于
Commit 824272cb attempted to fix escaping of characters in unix socket path but it was wrong. We need to escape only ',', there is no escape character for '='. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Jie Wang 提交于
Exiting early through the cleanup path did result in 'mirror' being leaked.
-
- 09 6月, 2017 1 次提交
-
-
由 Ján Tomko 提交于
Be nicer to the user and report a proper error instead of: An error occurred, but the cause is unknown https://bugzilla.redhat.com/show_bug.cgi?id=1460086
-
- 08 6月, 2017 5 次提交
-
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1447618 Currently, any attempt to change MTU on an interface that is plugged to a running domain is silently ignored. We should either do what's asked or error out. Well, we can update the host side of the interface, but we cannot change 'host_mtu' attribute for the virtio-net device. Therefore we have to error out. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NLaine Stump <laine@laine.org>
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1408701 While implementing MTU (572eda12 and friends), I've forgotten to actually set MTU on the host NIC in case of hotplug. We correctly tell qemu on the monitor what the MTU should be, but we are not actually setting it on the host NIC. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NLaine Stump <laine@laine.org>
-
由 Ján Tomko 提交于
Format iommu_platform= and ats= for virtio devices. https://bugzilla.redhat.com/show_bug.cgi?id=1283251Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Ján Tomko 提交于
Format the device-iotlb attribute. https://bugzilla.redhat.com/show_bug.cgi?id=1283251Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1459091 Currently, we are querying for vhostuser interface name in post parse callback. At that time interface might not yet exist. However, it has to exist when starting domain. Therefore it makes more sense to query its name at that point. This partially reverts 57b5e27d. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 07 6月, 2017 12 次提交
-
-
由 Erik Skultety 提交于
When adding the aliased serial stub console, the structure wasn't properly allocated (VIR_ALLOC instead of virDomainChrDefNew) which then resulted in SIGSEGV in virDomainChrSourceIsEqual during a serial device coldplug. https://bugzilla.redhat.com/show_bug.cgi?id=1434278Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Jiri Denemark 提交于
If QEMU is new enough and we have the live updated CPU definition in either save or migration cookie, we can use it to enforce ABI. The original guest CPU from domain XML will be stored in private data. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Jiri Denemark 提交于
Since the domain XML saved in a snapshot or saved image uses the original guest CPU definition but we still want to enforce ABI when restoring the domain if libvirt and QEMU are new enough, we save the live updated CPU definition in a save cookie. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Jiri Denemark 提交于
Since the domain XML send during migration uses the original guest CPU definition but we still want the destination to enforce ABI if it is new enough, we send the live updated CPU definition in a migration cookie. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Jiri Denemark 提交于
When persistent migration of a transient domain is requested but no custom XML is passed to the migration API we would just let the destination daemon make a persistent definition from the live definition itself. This is not a problem now, but once the destination daemon starts replacing the original CPU definition with the one from migration cookie before starting a domain, it would need to add more ugly hacks to reverse the operation. Let's just always send the persistent definition in the cookie to make things a bit cleaner. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Jiri Denemark 提交于
The destination host may not be able to start a domain using the live updated CPU definition because either libvirt or QEMU may not be new enough. Thus we need to send the original guest CPU definition. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Jiri Denemark 提交于
When starting a domain we update the guest CPU definition to match what QEMU actually provided (since it is allowed to add or removed some features unless check='full' is specified). Let's store the original CPU in domain private data so that we can use it to provide a backward compatible domain XML. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Jiri Denemark 提交于
The following patches will add an actual content in the cookie and use the data when restoring a domain. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Jiri Denemark 提交于
This patch implements a new save cookie object and callbacks for qemu driver. The actual useful content will be added in the object later. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Jiri Denemark 提交于
virDomainXMLOption gains driver specific callbacks for parsing and formatting save cookies. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Jiri Denemark 提交于
The new structure encapsulates save image header and associated data (domain XML). Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Jiri Denemark 提交于
The function is now called virQEMUSaveDataWrite and it is now doing everything it needs to save both the save image header and domain XML to a file. Be it a new file or an existing file in which a user wants to change the domain XML. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-