- 12 4月, 2019 8 次提交
-
-
由 Michal Privoznik 提交于
Firstly, virCommandRun() does report an error on failure (which in most cases is more accurate than what we overwrite it with). Secondly, usually errno is not set (or gets overwritten in the cleanup code) which makes virReportSystemError() report useless error messages. Drop all virReportSystemError() calls in cases like this (I've found three occurrences). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Andrea Bolognani 提交于
Introduced-by: e0fae78a Spotted-by: Lintian Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Michal Privoznik 提交于
The latter is deprecated and will be removed soon. The advised replacement is '-overcommit mem-lock=on|off'. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Michal Privoznik 提交于
Added in QEMU commit of v3.0.0-rc0~48^2~9 (then fixed by v3.1.0-rc0~119^2~37) QEMU is replacing '-realtime mlock' with '-overcommit mem-lock'. Add a capability to tell if we're dealing new new enough qemu to use the replacement. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Michal Privoznik 提交于
The '-realtime mlock' cmd line argument was introduced in QEMU commit v1.5.0-rc0~190 which matches minimal QEMU version we require. Therefore, the capability will always be present. Apparently, nearly none of our xml2argv test cases had the capability hence slightly bigger change under qemuxml2argvdata/. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Pavel Hrdina 提交于
The 'bandwidths' variable is allocated using VIR_RESIZE_N so it has to be freed as well. ==118315== 8 bytes in 1 blocks are definitely lost in loss record 299 of 2,401 ==118315== at 0x4C29DAD: malloc (vg_replace_malloc.c:308) ==118315== by 0x4C2C100: realloc (vg_replace_malloc.c:836) ==118315== by 0x52C3FAF: virReallocN (viralloc.c:245) ==118315== by 0x52C4079: virExpandN (viralloc.c:294) ==118315== by 0x532BBA8: virResctrlAllocParseProcessMemoryBandwidth (virresctrl.c:1156) ==118315== by 0x532BBA8: virResctrlAllocParseMemoryBandwidthLine (virresctrl.c:1211) ==118315== by 0x532BBA8: virResctrlAllocParse (virresctrl.c:1414) ==118315== by 0x532BBA8: virResctrlAllocGetGroup (virresctrl.c:1446) ==118315== by 0x532C11D: virResctrlAllocGetDefault (virresctrl.c:1464) ==118315== by 0x532D15E: virResctrlAllocAssign (virresctrl.c:1923) ==118315== by 0x532D15E: virResctrlAllocCreate (virresctrl.c:2042) ==118315== by 0x31E1ABEE: qemuProcessResctrlCreate (qemu_process.c:2596) ==118315== by 0x31E1ABEE: qemuProcessLaunch (qemu_process.c:6444) ==118315== by 0x31E1E341: qemuProcessStart (qemu_process.c:6721) ==118315== by 0x31E81315: qemuDomainObjStart.constprop.50 (qemu_driver.c:7288) ==118315== by 0x31E81A65: qemuDomainCreateWithFlags (qemu_driver.c:7341) ==118315== by 0x54DDB4B: virDomainCreate (libvirt-domain.c:6534) Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Andrea Bolognani 提交于
A bunch of files include src/rpc/virnetsaslcontext.h, which in turn includes <sasl/sasl.h>, and without the corresponding CFLAGS the compiler can't locate the latter if it happens to be installed outside of the default include path as is the case, for example, on FreeBSD. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Cole Robinson 提交于
Standardize on putting the _LAST enum value on the second line of VIR_ENUM_IMPL invocations. Later patches that add string labels to VIR_ENUM_IMPL will push most of these to the second line anyways, so this saves some noise. Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
- 11 4月, 2019 4 次提交
-
-
由 Daniel P. Berrangé 提交于
Getting the guest time and hostname both require use of guest agent commands. These must not be allowed for read-only users, so the permissions check must validate "write" permission not "read". Fixes CVE-2019-3886 Reviewed-by: NJim Fehlig <jfehlig@suse.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
The virDomainGetHostname API is fetching guest information and this may involve use of an untrusted guest agent. As such its use must be forbidden on a read-only connection to libvirt. Fixes CVE-2019-3886 Reviewed-by: NJim Fehlig <jfehlig@suse.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Few of the scripts in build-aux are included in EXTRA_DIST. This is not a serious problem since they are primarily tools intended for developers upstream, and downstream builds won't need them. Having them missing, however, complicates downstream patching because it means patches that are auto-exported from git will fail to apply if they include a change to a file in build-aux/. By bundling all these scripts in the dist we make patching more straightforward. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Pavel Hrdina 提交于
The only place where we have extra empty comment line. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 10 4月, 2019 25 次提交
-
-
由 Peter Krempa 提交于
The function open-codes addition into an array. Use the helper instead. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Demonstrate how VIR_RETURN_PTR is used by refactoring qemu_block.c Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
With the introduction of more and more internal data types which support VIR_AUTOPTR it's becoming common to see the following pattern: VIR_AUTOPTR(virSomething) some = NULL virSomethingPtr ret = NULL; ... (ret is not touched ) ... VIR_STEAL_PTR(ret, some); return ret; This patch introduces a macro named VIR_RETURN_PTR which returns the pointer directly without the need for an explicitly defined return variable and use of VIR_STEAL_PTR. Internally obviously a temporary pointer is created to allow setting the original pointer to NULL so that the VIR_AUTOPTR function does not free the memory which we want to actually return. The name of the temporary variable is deliberately long and complex to minimize the possibility of collision. 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 提交于
This is a locally used helper struct but we can make use of automatic freeing for it. 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 提交于
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 提交于
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 提交于
Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Ján Tomko 提交于
Also free the backends array, not just its members. Fixes: d3f9dda2Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Ján Tomko 提交于
It is no longer used. Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Ján Tomko 提交于
Commit 6864d8f7 moved this one level up for qemuBuildMemoryBackendProps but left qemuBuildMemPathStr intact. Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Ján Tomko 提交于
Use qemuBuildMemoryGetDefaultPagesize. Fixes: 6864d8f7Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Michal Privoznik 提交于
If a management application wants to use firmware auto selection feature it can't currently know if the libvirtd it's talking to support is or not. Moreover, it doesn't know which values that are accepted for the @firmware attribute of <os/> when parsing will allow successful start of the domain later, i.e. if the mgmt application wants to use 'bios' whether there exists a FW descriptor in the system that describes bios. This commit then adds 'firmware' enum to <os/> element in <domainCapabilities/> XML like this: <enum name='firmware'> <value>bios</value> <value>efi</value> </enum> We can see both 'bios' and 'efi' listed which means that there are descriptors for both found in the system (matched with the machine type and architecture reported in the domain capabilities earlier and not shown here). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Acked-by: NLaszlo Ersek <lersek@redhat.com>
-
由 Michal Privoznik 提交于
The point of this API is to fetch all FW descriptors, parse them and return list of supported interfaces and SMM feature for given combination of machine type and guest architecture. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Acked-by: NLaszlo Ersek <lersek@redhat.com>
-
由 Michal Privoznik 提交于
This part of the code will be reused later. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Acked-by: NLaszlo Ersek <lersek@redhat.com>
-
由 Michal Privoznik 提交于
This piece of code will be reused later. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Acked-by: NLaszlo Ersek <lersek@redhat.com>
-
由 Peter Krempa 提交于
This reverts commit a5e16020. Getting rid of unistd.h from our headers will require more work than just fixing the broken mingw build. Revert it until I have a more complete proposal. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
util/virutil.h bogously included unistd.h. Drop it and replace it by including it directly where needed. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
virutil.(c|h) is a very gross collection of random code. Remove the enum handlers from there so we can limit the scope where virtutil.h is used. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
'viralloc.h' does not provide any type or macro which would be necessary in headers. Prevent leakage of the inclusion. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Keeping them with viralloc.h forcibly pulls in the other stuff from viralloc.h into other header files. This in turn creates a mess as more and more headers pull in the 'viral' header file. If we want to make 'viralloc.h' omnipresent we should pick a different approach. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Han Han 提交于
Define VMX_CONFIG_FORMAT_ARGV to replace the hardcoded 'vmware-vmx' string used by the domxml-X-native APIs. This follows the pattern used by other drivers. Reviewed-by: NCole Robinson <crobinso@redhat.com> Signed-off-by: NHan Han <hhan@redhat.com>
-
- 09 4月, 2019 3 次提交
-
-
由 Peter Krempa 提交于
Now that the memory disposal is handled automatically we can simplify the cleanup paths. In this case it's not as simple as sometimes the value of the called function is returned. While at it fix the initialization value of the returned variable. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Pavel Hrdina 提交于
The later is the correct CPU model name. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Julio Faracco 提交于
This commit fixes an unitialized variable to avoid garbage value when virNetDevBridgeGet method returns error. When, that method fails before initialize 'val' variable, it can cause problems related to that. Signed-off-by: NJulio Faracco <jcfaracco@gmail.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-