- 15 11月, 2019 10 次提交
-
-
由 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 30 次提交
-
-
由 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>
-
由 Pino Toscano 提交于
It was lifted with c92b6023. Signed-off-by: NPino Toscano <ptoscano@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Jidong Xia 提交于
With this patch users can cold plug some sound devices. use "virsh attach-device vm sound.xml --config" command. Consider the following sound.xml for a domain: <sound model='ich6'> <address type='pci' domain='0x0000' bus='0x00' slot='xxx' function='0'/> </sound> Reviewed-by: NCole Robinson <crobinso@redhat.com> Signed-off-by: NJidong Xia <xiajidong@cmss.chinamobile.com>
-
由 Mao Zhongyi 提交于
A function virStringParseYesNo was added to convert string 'yes' to true and 'no' to false, so use this helper to replace 'STREQ(.*, \"yes\")' and 'STREQ(.*, \"no\")' as it allows us to drop several repetitive if-then-else string->bool conversion blocks. Reviewed-by: NCole Robinson <crobinso@redhat.com> Signed-off-by: NMao Zhongyi <maozhongyi@cmss.chinamobile.com> Signed-off-by: NZhang Shengju <zhangshengju@cmss.chinamobile.com>
-
由 Mao Zhongyi 提交于
A function virStringParseYesNo was added to convert string 'yes' to true and 'no' to false, so use this helper to replace 'STREQ(.*, \"yes\")' and 'STREQ(.*, \"no\")' as it allows us to drop several repetitive if-then-else string->bool conversion blocks. Reviewed-by: NCole Robinson <crobinso@redhat.com> Signed-off-by: NMao Zhongyi <maozhongyi@cmss.chinamobile.com> Signed-off-by: NZhang Shengju <zhangshengju@cmss.chinamobile.com> Acked-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Mao Zhongyi 提交于
This helper performs a conversion from a "yes|no" string to a corresponding boolean, and several conversions were already done, but there are still some omissions. For most of the remaining usages in domain_conf.c only "yes" is explicitly checked for. This means all other values are implicitly handled as 'false'. In this case, use virStringParseYesNo to handle the conversion and reserve the original logic of not raise an error, so ignore the return value of helper. Reviewed-by: NCole Robinson <crobinso@redhat.com> Signed-off-by: NMao Zhongyi <maozhongyi@cmss.chinamobile.com> Signed-off-by: NZhang Shengju <zhangshengju@cmss.chinamobile.com>
-
由 Ján Tomko 提交于
Use this GLib macro instead of bswap_32 from gnulib. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Ján Tomko 提交于
Instead of vsnprintf from gnulib, use g_vsnprintf from GLib. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
Use the glib function rather than gnulib. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
The callers don't actually use the returned errno for reporting errors. Additionally virFileResolveAllLinks returns -1 rather than -errno on error thus you'd get a spurious EPERM even on other errors. Don't try to return errno in this case. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Return -1 on failure rather than -errno since none of the callers actually cares about the return value. This specifically fixes returns of -ENOMEM in cases of bad usage, which would report wrong error anyways. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
The caller doesn't care about the actual return value, so return -1 rather than errno. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
The callers don't care about the actual return value, so return -1 rather than errno. 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>
-