- 30 3月, 2020 2 次提交
-
-
由 Peter Krempa 提交于
If the storage source has the query part set, format it in the output. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Add a new attribute for holding the query part for http(s) disks. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 27 3月, 2020 2 次提交
-
-
由 Peter Krempa 提交于
The quotes are forbidden only inside the value, but the value itself may be enclosed in quotes. Fix the RNG schema and validator and add a test case. https://bugzilla.redhat.com/show_bug.cgi?id=1804750Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 26 3月, 2020 2 次提交
-
-
由 Jiri Denemark 提交于
Host-model CPU definitions (and domain capabilities) will use the original CPU models (without noTSX in their name) and explicitly disable hle and rtm features. This way domains with host-model CPUs will be migratable even to older versions of libvirt which do not support the noTSX model variants. The new models will be advertised in host capabilities and they may be used explicitly with custom CPUs. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NChristian Ehrhardt <christian.ehrhardt@canonical.com> Tested-by: NChristian Ehrhardt <christian.ehrhardt@canonical.com>
-
由 Christian Ehrhardt 提交于
One of the mitigation methods for TAA[1] is to disable TSX support on the host system. Linux added a mechanism to disable TSX globally through the kernel command line, and many Linux distributions now default to tsx=off. This makes existing CPU models that have HLE and RTM enabled not usable anymore. Add new versions of all CPU models that have the HLE and RTM features enabled, that can be used when TSX is disabled in the host system. On systems disabling the features without those types defined in cpu-maps users end up without modern CPU types in the list of usable CPUs to use in the likes of virsh domcapabilities or tools higher in the stack like virt-manager. This adds: -Cascadelake-Server-noTSX -Icelake-Client-noTSX -Icelake-Server-noTSX -Skylake-Server-noTSX-IBRS -Skylake-Client-noTSX-IBRS Introduced in QEMU by commit v4.2.0-rc2-3-g9ab2237f19 (function) and commit v4.2.0-rc2-4-g02fa60d101 (names) References: [1] TAA, TSX asynchronous Abort: https://software.intel.com/security-software-guidance/insights/deep-dive-intel-transactional-synchronization-extensions-intel-tsx-asynchronous-abort https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/tsx_async_abort.html Fixes: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1853200Signed-off-by: NChristian Ehrhardt <christian.ehrhardt@canonical.com> Message-Id: <20200310104806.2723-2-christian.ehrhardt@canonical.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
- 25 3月, 2020 5 次提交
-
-
由 Peter Krempa 提交于
Use qemuAgentCommandFull so that callers of qemuAgentGetFSInfo can suppress error reports if the function is not supported by the guest agent. Since this patch removes the last use of qemuAgentErrorCommandUnsupported the whole function is deleted as well. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Use qemuAgentCommandFull so that callers of qemuAgentGetTimezone can suppress error reports if the function is not supported by the guest agent. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Use qemuAgentCommandFull so that callers of qemuAgentGetOSInfo can suppress error reports if the function is not supported by the guest agent. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Use qemuAgentCommandFull so that callers of qemuAgentGetUsers can suppress error reports if the function is not supported by the guest agent. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Marc-André Lureau 提交于
Unfortunately, advisory record locking lose the lock if any fd refering to the file is closed. There doesn't seem to be a way to preserve the lock atomically. We could eventually retake the lock if low pidfilefd is required. This fixes processes being leaked, as they are not killed in virPidFileForceCleanupPath() if the lock can be taken. Here also, we may consider this is not good enough, as a process may leak by simply closing the pidfilefd. Fixes commit d146105f ("virCommand: Actually acquire pidfile instead of just writing it") Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 24 3月, 2020 15 次提交
-
-
由 Michal Privoznik 提交于
Our virCommand module allows us to set a pidfile for commands we want to spawn. The caller constructs the string of pidfile path and then uses virCommandSetPidFile() to tell the module to write the pidfile once the command is ran. This usually works, but has two flaws: 1) the child process does not hold the pidfile open & locked. Therefore, the caller (or anybody else) can't use our fancy virPidFileForceCleanupPath() function to kill the command afterwards. Also, for everybody else on the system it's needlessly harder to check if the pid from the pidfile is still alive or not. 2) if the caller ever makes a mistake and passes the same pidfile path for two different commands, the start of the second command will overwrite the pidfile even though the first command might still be running. NOTE that this temporarily renders some command spawning unusable, specifically those code patterns where both virCommandSetPidFile() is used together with instructing spawned command to acquire pidfile itself. Fortunately, there is only one occurrence of such pattern and it is in qemuProcessStartManagedPRDaemon(). This is fixed in next commit. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
-
由 Michal Privoznik 提交于
As a part of c799d150 I've introduced a test case that tests whether passing error object between processes works. The test spawns a child which reports a system error, parent process then reads the error and compares with expected output. Problem with this approach is that error message contains stringified errno which is not portable. FreeBSD has generally different messages than Linux. Therefore, use g_strerror() to do the errno to string translation for us. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Peter Krempa 提交于
Our code allows snapshots of NVMe based disks which means we create overlay file with a 'json:{}' pseudo-uri refering to the NVME device. Our parser code doesn't handle them though. Add the parser and test it via the XML->json->XML round-trip and reference data. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Format cookies into the backing store string without encryption as they will not be visible on the command line when formatting a 'target' only string. In cases when cookies or other options are used we must use the JSON format rather than pure URI. Add tests to validate the scenario. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
QEMU requires an extra wrapper object where only the "file" member is populated. This is basically a placeholder for establishing the format layer. We did the same in qemuDiskSourceGetProps for the old-school JSON usage with -drive but forgot to adopt this for -blockdev. https://bugzilla.redhat.com/show_bug.cgi?id=1804617Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
qemublocktest showed that we don't add the "fat:" prefix for directory storage when formatting the backing store string. While it's unlikely to be used it's simple enough to actually implement the support rather than trying to forbid it. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
With -blockdev libvirt provides the string which is recorded as 'backing store' property of an image to qemu. Add testing for qemuBlockGetBackingStoreString which generates these strings as there's logic which determines which format to use. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
We had two non-syncrhonized arrays holding the individual data. This was a lazy way to do it when I was adding new tests recently. Since it's hard to extend with new data to test refactor the storage of test data to use a new struct where all per-image data are kept and can be extended easily. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
The function was misplaced. Group it together with other helper functions for testing disk XML to qemu JSON props conversion. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Use automatic variable clearing and remove the cleanup sections of testQemuDiskXMLToProps, testQemuDiskXMLToPropsValidateSchema and testQemuDiskXMLToPropsValidateFile. testQemuDiskXMLToPropsValidateFileSrcOnly already uses new helpers. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Based on the configuration from the only qemuxml2argv test. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Mauro S. M. Rodrigues 提交于
virHostCPUGetStatsLinux walks through every cpu in /proc/stat until it finds cpu%cpuNum that matches with the requested cpu. If none is found it logs the error but it should return -1, instead of 0. Otherwise virsh nodecpustats --cpu <invalid cpu number> and API bindings don't fail properly, printing a blank line instead of an error message. This patch also includes an additional test for virhostcputest to avoid this regression to happen again in the future. Fixes: 93af79fbReported-by: NSatheesh Rajendran <satheera@in.ibm.com> Signed-off-by: NMauro S. M. Rodrigues <maurosr@linux.vnet.ibm.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NChristian Ehrhardt <christian.ehrhardt@canonical.com> Tested-by: NChristian Ehrhardt <christian.ehrhardt@canonical.com>
-
由 Daniel Henrique Barboza 提交于
Using the 'uuid' element for ppc64 NVDIMM memory added in the previous patch, use it in qemuBuildMemoryDeviceStr() to pass it over to QEMU. Another ppc64 restriction is the necessity of a mem->labelsize, given than ppc64 only support label-area backed NVDIMMs. Finally, we don't want ppc64 NVDIMMs to align up due to the high risk of going beyond the end of file with a 256MiB increment that the user didn't predict. Align it down instead. If target size is less than the minimum of 256MiB + labelsize, error out since QEMU will error out if we attempt to round it up to the minimum. 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 提交于
ppc64 NVDIMM support was implemented in QEMU by commit [1]. The support is similar to what x86 already does, aside from an extra 'uuid' element. This patch introduces a new optional 'uuid' element for the NVDIMM memory model. This element behaves like the 'uuid' element of the domain definition - if absent, we'll create a new one, otherwise use the one provided by the XML. The 'uuid' element is exclusive to pseries guests and are unavailable for other architectures. Next patch will use this new element to add NVDIMM support for ppc64. [1] https://github.com/qemu/qemu/commit/ee3a71e36654317b14ede0290e87628f8b79f850Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Daniel Henrique Barboza 提交于
Update ppc64 capabilities to pick up the new NVDIMM capability support for ppc64. Since the ppc64 capabilities weren't updated for some time, the bulk of the changes here are related to the blockdev support (see commit c6a9e54c for info) that we are picking up just now. Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 23 3月, 2020 1 次提交
-
-
由 Rafael Fonseca 提交于
The functionality is now provided by glib's GKeyFile. Signed-off-by: NRafael Fonseca <r4f4rfs@gmail.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 20 3月, 2020 7 次提交
-
-
由 Michal Privoznik 提交于
When running a function in a forked child, so far the only thing we could report is exit status of the child and the error message. However, it may be beneficial to the caller to know the actual error that happened in the child. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NPavel Mores <pmores@redhat.com>
-
由 Peter Krempa 提交于
Validate that we are able to parse back the dotted syntax arrays we were generating in the pre-blockdev era. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
virBitmapNewEmpty can't fail now so we can make it obvious and fix all callers. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
qemuBlockStorageSourceGetFormatRawProps aggregated both formats but since we now have props specific for either of those formats it's unwanted to aggregate the code such way. Split out the 'luks' props formatter into qemuBlockStorageSourceGetFormatLUKSProps. The wrong separation demonstrates istself on formatting of the 'size' and 'offset' attributes for the 'luks' driver which does not conform to the qapi schema. https://bugzilla.redhat.com/show_bug.cgi?id=1814975Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
The 'luks' driver in qemu is as any other non-raw format driver and thus doesn't support the properties for 'slice'. Since libvirt considers luks files to be raw+encryption we need to special case them when dealing with the slice. https://bugzilla.redhat.com/show_bug.cgi?id=1814975Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Since libvirt handles the luks encryption in a weird special way (raw+encryption) we should really test that case with slices as well. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 19 3月, 2020 2 次提交
-
-
由 Pino Toscano 提交于
Since the removal of gnulib, HAVE_SOCKETPAIR is no more defined, making these two tests effectively skipped. Use the same strategy used in other generic library bits, i.e. exclude the socketpair usage on Windows. Semi-related change in virnetdaemontest.c to make it build: since virutil.h does not include unistd.h anymore, we need to include it. Signed-off-by: NPino Toscano <ptoscano@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Pino Toscano 提交于
It seems like CD-ROMs may have no 'fileName' property specified in case there is nothing configured as attachment for the drive. Hence, make sure that virVMXParseDisk() do not consider it mandatory anymore, considering it an empty block cdrom device. Sadly virVMXParseDisk() is used also to parse disk and floppies, so make sure that a NULL fileName is handled in cdrom- and floppy-related paths. https://bugzilla.redhat.com/show_bug.cgi?id=1808610Signed-off-by: NPino Toscano <ptoscano@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Tested-by: NRichard W.M. Jones <rjones@redhat.com>
-
- 18 3月, 2020 1 次提交
-
-
由 Michal Privoznik 提交于
So far, when using the qemu:///embed driver, management applications can't chose whether they want to register their domains in machined or not. While having that option is certainly desired, it will require more work. What we can do meanwhile is to generate names that include part of hash of the root directory. This is to ensure that if two applications using different roots but the same domain name (and ID) start the domain no clashing name for machined is generated. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
- 17 3月, 2020 3 次提交
-
-
由 Peter Krempa 提交于
Some branches were not covered and thus we didn't catch that the bitmaps are not re-enabled if nothing is merged into them. Two bitmaps are necessary to reliably test the case due to hash table ordering. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Tested-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Peter Krempa 提交于
Use the 'snapshots-synthetic-broken' test data for block-commit. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
Test handling of more complex cases of merging bitmaps accross snapshots. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-