You need to sign in or sign up before continuing.
- 09 12月, 2019 6 次提交
-
-
由 Daniel P. Berrangé 提交于
Now that the domain XML APIs don't use virCapsPtr we can stop passing it around many QEMU driver methods. Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Our normal practice is for the object type to be the name prefix, and the object instance be the first parameter passed in. Rename these to virDomainObjSave and virDomainDefSave moving their primary parameter to be the first one. Ensure that the xml options are passed into both functions in prep for future work. Finally enforce checking of the return type and mark all parameters as non-NULL. Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
As part of a goal to eliminate the need to use virCapsPtr for anything other than the virConnectGetCapabilies() API impl, cache the host arch against the QEMU driver struct and use that field directly. In the tests we move virArchFromHost() globally in testutils.c so that every test runs with a fixed default architecture reported. Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 05 12月, 2019 1 次提交
-
-
由 Michal Privoznik 提交于
In v5.9.0-370-g8fa0374c I've tried to fix a bug by removing some stale XATTRs in qemuProcessStop(). However, I forgot to do nothing when the VIR_QEMU_PROCESS_STOP_NO_RELABEL flag was specified. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
-
- 03 12月, 2019 7 次提交
-
-
由 Peter Krempa 提交于
We clear some capabilities here so the lockouts need to be re-evaluated. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
由 Peter Krempa 提交于
Do all post-processing of capabilities in qemuProcessPrepareQEMUCaps. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
由 Peter Krempa 提交于
Move the post-processing of the QEMU_CAPS_CHARDEV_FD_PASS flag to the new function. The clearing of the capability is based on the presence of VIR_QEMU_PROCESS_START_STANDALONE so we must also pass in the process start flags. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
由 Peter Krempa 提交于
Start aggregating all capability post-processing code in one place. The comment was modified while moving it as it was mentioning floppies which are no longer clearing the blockdev capability. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
The function is now used only in qemu_process.c so move it there and name it 'qemuProcessPrepareQEMUCaps' which is more appropriate to what it's doing. The reworded comment now mentions that it will also post-process the caps for VM startup. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
The redetection was originally added in 43c01d38 as a way to recover from libvirtd upgrade from the time when we didn't persist the qemu capabilities in the status XML. Also this the oldest supported qemu by more than two years. Even if somebody would have a running VM running at least qemu 1.5 with such an old libvirt we certainly wouldn't do the right thing by redetecting the capabilities and then trying to communicate with qemu. For now it will be the best to just stop considering this scenario any more and error out for such VM. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Commit c90fb5a8 added explicit use of the private copy of the qemu capabilities to various places. The change to qemuProcessInit was bogus though as at the point where we re-initiate the post parse callbacks priv->qemuCaps is still NULL as we clear it after shutdown of the VM and don't initiate it until a later point. Using the value from priv->qemuCaps might mislead readers of the code into thinking that something useful is being passed at that point so go with an explicit NULL instead. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 27 11月, 2019 1 次提交
-
-
由 Peter Krempa 提交于
Block jobs may be members of async jobs so it makes more sense to refresh block job state after we do steps for async job recovery. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
- 26 11月, 2019 1 次提交
-
-
由 Laine Stump 提交于
This also isn't required (due to the vportprofile being stored in the NetDef as a pointer rather than being directly contained), but it seemed dishonest to not mark it as const (and thus permit users to modify its contents) Signed-off-by: NLaine Stump <laine@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
- 22 11月, 2019 2 次提交
-
-
由 Michal Privoznik 提交于
If user starts a blockcommit or a blockcopy then we modify access for qemu on both images and leave it like that until the job terminates. So far so good. Problem is, if user instead of terminating the job (where we would modify the access again so that the state before the job is restored) calls destroy on the domain or if qemu dies whilst executing the block job. In this case we don't ever clear the access we granted at the beginning. To fix this, maybe a bit harsh approach is used, but it works: after all labels were restored (that is after qemuSecurityRestoreAllLabel() was called), we iterate over each disk in the domain and remove XATTRs from the whole backing chain and also from any file the disk is being mirrored to. This would have been done at the time of pivot, but it isn't because user decided to kill the domain instead. If we don't do this and leave some XATTRs behind the domain might be unable to start. Also, secdriver can't do this because it doesn't know if there is any job running. It's outside of its scope - the hypervisor driver is responsible for calling secdriver's APIs. Moreover, this is safe to call because we don't remember labels for any member of a backing chain except of the top layer. But that one was restored in qemuSecurityRestoreAllLabel() call done earlier. Therefore, not only we don't remember labels (and thus this is basically a NOP for other images in the backing chain) it is also safe to call this when no blockjob was started in the first place, or if some parts of the backing chain are shared with some other domains - this is NOP, unless a block job is active at the time of domain destroy. https://bugzilla.redhat.com/show_bug.cgi?id=1741456#c19Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
Install the convertor function which enables the internals that will use -blockdev to make qemu open the firmware image and stop using -drive. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 21 11月, 2019 4 次提交
-
-
由 Jiri Denemark 提交于
The functions return virDomainCapsCPUModelsPtr and thus they should be called *CPUModels for consistency. Functions called *CPUDefinitions will work on qemuMonitorCPUDefsPtr. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Jiri Denemark 提交于
The function would return a valid virDomainCapsCPUModelsPtr with empty CPU models list if query-cpu-definitions exists in QEMU, but returns GenericError meaning it's not in fact implemented. This behaviour is a bit strange especially after such virDomainCapsCPUModels structure is stored in capabilities XML and parsed back, which will result in NULL virDomainCapsCPUModelsPtr rather than a structure containing nothing. Let's just keep virDomainCapsCPUModelsPtr NULL if the QMP command is not implemented and change the return value to int so that callers can easily check for failure or success. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Jiri Denemark 提交于
Some callers of virQEMUCapsGetCPUDefinitions will need to filter the returned list of CPU models. Let's add the filtering parameters directly to virQEMUCapsGetCPUDefinitions to avoid copying the CPU models list twice. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Jiri Denemark 提交于
Rather than returning a direct pointer the list stored in qemuCaps the function now creates a new copy of the CPU models list. The main purpose of this seemingly useless change is to update callers to free the result returned by virQEMUCapsGetCPUDefinitions because the internals of this function will change significantly in the following patches. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 19 11月, 2019 2 次提交
-
-
由 Daniel Henrique Barboza 提交于
Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
The @def variable holds pointer to the domain defintion, but is set only somewhere in the middle of the function. This is suboptimal. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
- 18 11月, 2019 1 次提交
-
-
由 Pavel Hrdina 提交于
Commit <f136b831> reworked process affinity setting but did not take cgroups into account which introduced an issue when starting VM with custom cpuset.cpus for the whole machine group. If the machine group is limited to some pCPUs libvirt should not try to set a VM to run on all pCPUs as it will result in permission denied when writing to cpuset.cpus. To fix this the affinity has to be set separately from cgroups cpuset. Resolves: <https://bugzilla.redhat.com/show_bug.cgi?id=1746517> Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 15 11月, 2019 4 次提交
-
-
由 Ján Tomko 提交于
Prefer the GLib version to the one from gnulib. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@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>
-
- 13 11月, 2019 1 次提交
-
-
由 Jiri Denemark 提交于
When a CPU definition wants to explicitly disable some features that are unknown to QEMU, we can safely drop them from the definition before starting QEMU. Naturally QEMU won't enable such features implicitly. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 12 11月, 2019 1 次提交
-
-
由 Michal Privoznik 提交于
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
- 24 10月, 2019 1 次提交
-
-
由 Michal Privoznik 提交于
In few places we have the following code pattern: int ret; ... /* @ret is not accessed here */ ret = f(...); return ret; This pattern can be written less verbose: ... return f(...); This patch was generated with following coccinelle spatch: @@ type T; constant C; expression f; identifier ret; @@ -T ret = C; ... when != ret -ret = f; -return ret; +return f; Afterwards I needed to fix a few places, e.g. comment in virDomainNetIPParseXML() was removed too because coccinelle thinks it refers to @ret while in fact it doesn't. Also in few places it replaced @ret declaration with a few spaces instead of removing the line. But nothing terribly wrong. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
- 21 10月, 2019 2 次提交
-
-
由 Ján Tomko 提交于
Replace all occurrences of if (VIR_STRDUP(a, b) < 0) /* effectively dead code */ with: a = g_strdup(b); Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
Replace all the occurrences of ignore_value(VIR_STRDUP_QUIET(a, b)); with a = g_strdup(b); Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 17 10月, 2019 2 次提交
-
-
由 Carlos Santos 提交于
On musl libc "stderr" is a preprocessor macro whose expansion leads to compilation errors: In file included from qemu/qemu_process.c:66: qemu/qemu_process.c: In function 'qemuProcessQMPFree': qemu/qemu_process.c:8418:21: error: expected identifier before '(' token VIR_FREE((proc->stderr)); ^~~~~~ Prevent this by renaming the homonymous field in the _qemuProcessQMP struct to "stdErr". Signed-off-by: NCarlos Santos <casantos@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
Provide some consistency over error message variable name and usage when saving error messages across possible other errors or possibility of resetting of the last error. Instead of virSaveLastError paired up with virSetError and virFreeError, we should use the newer virErrorPreserveLast and virRestoreError. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 16 10月, 2019 4 次提交
-
-
由 Ján Tomko 提交于
Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
Now that all the types using VIR_AUTOUNREF have a cleanup func defined to virObjectUnref, use g_autoptr instead of VIR_AUTOUNREF. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
Since commit 44e7f029 util: rewrite auto cleanup macros to use glib's equivalent VIR_AUTOPTR aliases to g_autoptr. Replace all of its use by the GLib macro version. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
Since commit 44e7f029 util: rewrite auto cleanup macros to use glib's equivalent VIR_AUTOFREE is just an alias for g_autofree. Use the GLib macros directly instead of our custom aliases. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-