- 15 11月, 2019 23 次提交
-
-
由 Ján Tomko 提交于
With g_mkstemp_full, there is no need to distinguish between mkostemp and mkostemps (no suffix vs. a suffix of a fixed length), because the GLib function looks for the XXXXXX pattern everywhere in the string. Use S_IRUSR | S_IWUSR for the permissions and do not pass O_RDWR in flags since it's implied. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Ján Tomko 提交于
Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Ján Tomko 提交于
Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Ján Tomko 提交于
Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Ján Tomko 提交于
Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Ján Tomko 提交于
This saves us from allocating vars upfront, since GLib deals with that for us. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Ján Tomko 提交于
Using GRegex simplifies the code since g_match_info_fetch will copy the matched substring for us. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Ján Tomko 提交于
Now that the cleanup section is empty, the ret variable is no longer necessary. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Ján Tomko 提交于
Use GRegex from GLib instead of regcomp. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Ján Tomko 提交于
Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Ján Tomko 提交于
Replace the use of regcomp with GRegex. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Ján Tomko 提交于
The code using regexes got moved, but the include stayed. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Ján Tomko 提交于
This flag is not needed to use extended regular expression syntax with GRegex and it makes GRegex ignore whitespace in the regex. Remove the unintended usage, even though it should not matter in this case. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Jonathon Jongsma 提交于
The 'ramfb' attribute provides a framebuffer to the guest that can be used as a boot display for the vgpu For example, the following configuration can be used to provide a vgpu with a boot display: <hostdev mode='subsystem' type='mdev' model='vfio-pci' display='on' ramfb='on'> <source> <address uuid='$UUID'/> </source> </hostdev> Reviewed-by: NCole Robinson <crobinso@redhat.com> Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com>
-
由 Jonathon Jongsma 提交于
As suggested by Cole, this patch uses the domain capabilities to validate the supported video model types. This allows us to remove the model type validation from qemu_process.c and qemu_domain.c and consolidates it all in a single place that will automatically adjust when new domain capabilities are added. Reviewed-by: NCole Robinson <crobinso@redhat.com> Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com>
-
由 Jonathon Jongsma 提交于
Continue consolidation of video device validation started in previous patch. Reviewed-by: NCole Robinson <crobinso@redhat.com> Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com>
-
由 Jonathon Jongsma 提交于
The goal is to move all of the video device validation to a single place and use domain caps to validate the supported video device models. Since qemuDomainDeviceDefValidateVideo() is called from qemuProcessStartValidate(), these changes should not change anny behavior. Reviewed-by: NCole Robinson <crobinso@redhat.com> Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com>
-
由 Jonathon Jongsma 提交于
In a follow-up commit, we will use the domain capabilities to validate video device configurations, which means that we also need to make sure that the domain capabilities include the "none" video device. Reviewed-by: NCole Robinson <crobinso@redhat.com> Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com>
-
由 Jonathon Jongsma 提交于
commit 9bfcf0f6 added the QEMU_CAPS_DEVICE_RAMFB capability but did not set the domain capability. This patch sets the domain capability for the ramfb device and updates the tests. Reviewed-by: NCole Robinson <crobinso@redhat.com> Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com>
-
由 Jonathon Jongsma 提交于
Several tests were not specifying the necessary qemu capabilities for what they were testing. Due to the way that the video devices are currently validated, this is not causing any problems. But a change to video device validation in a following patch would have exposed this issue and resulted in multiple test failures about the domain configuration not supporting particular video models. Reviewed-by: NCole Robinson <crobinso@redhat.com> Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com>
-
由 Jonathon Jongsma 提交于
This allows us to simplify the function and avoid jumping to 'cleanup'. Reviewed-by: NCole Robinson <crobinso@redhat.com> Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com>
-
由 Jonathon Jongsma 提交于
When the virDomainCapsDeviceDefValidate() function returned an error status (-1), we were aborting the function early, but returning the default return value (0). This patch properly returns an error in that case. Reviewed-by: NCole Robinson <crobinso@redhat.com> Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com>
-
由 Jim Fehlig 提交于
The ordering of lock manager locks in the libxl driver has a flaw that was uncovered by a migration error path. In the perform phase of migration, the source host calls virDomainLockProcessPause to release the lock before sending the VM to the destination host. If the send fails an attempt is made to reacquire the lock with virDomainLockProcessResume, but that too can fail if the destination host has not finished cleaning up the failed VM and releasing the lock it acquired when starting to receive the VM. This change delays calling virDomainLockProcessResume in libxlDomainStart until the VM is successfully created, but before it is unpaused. A similar approach is used by the qemu driver, avoiding the need to release the lock if VM creation fails. In the migration perform phase, releasing the lock with virDomainLockProcessPause is delayed until the VM is successfully sent to the destination, which avoids reacquiring the lock if the send fails. Signed-off-by: NJim Fehlig <jfehlig@suse.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
- 14 11月, 2019 17 次提交
-
-
由 Daniel Henrique Barboza 提交于
Reviewed-by: NCole Robinson <crobinso@redhat.com> Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
由 Daniel Henrique Barboza 提交于
Reviewed-by: NCole Robinson <crobinso@redhat.com> Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
由 Michal Privoznik 提交于
The virHostGetBootTimeProcfs() function is defined only for Linux and therefore it's only call should also be done if we're on Linux. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Add a helper which converts qemu emulator capabilities to the domain capability XML. This will simplify future additions of new features. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Declare the capabilities as enum values and store them in an array. This makes adding new features more straightforward and simplifies the formatter which now doesn't require changing. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
While the qemu driver currently implements all domain capability features, we should initialize all features using the helper similarly to how we do it in drivers which don't support any. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
For future extensions of the domain caps it's useful to have a single point that initializes all capabilities as unsupported by a driver. The driver then can enable specific ones. Signed-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>
-
由 Peter Krempa 提交于
Extract it to virDomainCapsFormatFeatures so that the main function does not get so bloated over time. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Introduce qemuDomainCapsFeatureFormatSimple which does exactly the same thing but it's a function. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Use our helper instead of the gnulib one. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Make it more obvious that the function will return NULL if the file is not executable and stop reusing variables. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Simplify the final lookup loop by freeing memory automatically and thus being able to directly return the result. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
When parsing allowed authentication methods for the native ssh lib transports we used strsep. Since we have virStringSplit helper let's use that one. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Michal Privoznik 提交于
When we want to know the boot timestamp of the host, we can call virHostGetBootTime(). Under the hood, it uses getutxid() which is defined by POSIX and properly check for in configure. However, musl took a path where it declares the function but instead of providing any useful implementation it returns NULL meaning "no record found". If that's the case, use our second best option - /proc/uptime and a bit of maths. https://bugzilla.redhat.com/show_bug.cgi?id=1760885Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
由 Jiri Denemark 提交于
All callers use nameLen == -1 anyway. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-