- 04 3月, 2020 17 次提交
-
-
由 Peter Krempa 提交于
Use the 'flat' flag for 'query-named-block-nodes' if qemu supports QEMU_CAPS_QMP_QUERY_NAMED_BLOCK_NODES_FLAT in qemuBlockGetNamedNodeData. We don't need the data so plumb in whether qemu supports the 'flat' output. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Modern qemu allows to skip the nested redundant data in the output of query-named-block-nodes. Plumb in the support for the argument that enables it. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Replace qemuMonitorBlockGetNamedNodeData by qemuBlockGetNamedNodeData. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Use g_autoptr to get rid of the cleanup section. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Detect the presence of the flag and make it available internally as QEMU_CAPS_QMP_QUERY_NAMED_BLOCK_NODES_FLAT. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
The monitor password callback was removed long time ago but the callback type and variable were left around. Finish the cleanup. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Ján Tomko 提交于
Format the 'vhost-user-fs' device on the QEMU command line. This device provides shared file system access using the FUSE protocol carried over virtio. The actual file server is implemented in an external vhost-user-fs device backend process. https://bugzilla.redhat.com/show_bug.cgi?id=1694166Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com> Tested-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Ján Tomko 提交于
Look into /usr/share/qemu/vhost-user to see whether we can find a suitable virtiofsd binary, in case the user did not provide one in the domain XML. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com> Tested-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Ján Tomko 提交于
Wire up the code to put virtiofsd in the emulator cgroup on domain startup. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com> Tested-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Ján Tomko 提交于
Start virtiofsd for each <filesystem> device using it. Pre-create the socket for communication with QEMU and pass it to virtiofsd. Note that virtiofsd needs to run as root. https://bugzilla.redhat.com/show_bug.cgi?id=1694166 Introduced by QEMU commit a43efa34c7d7b628cbf1ec0fe60043e5c91043ea Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com> Tested-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Ján Tomko 提交于
This is not yet supported. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com> Tested-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Ján Tomko 提交于
Reject unsupported configurations. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com> Tested-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NMasayoshi Mizuma <m.mizuma@jp.fujitsu.com>
-
由 Ján Tomko 提交于
Add a 'virtiofsd_debug' option for tuning whether to run virtiofsd in debug mode. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com> Tested-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Ján Tomko 提交于
Introduce a new 'virtiofs' driver type for filesystem. <filesystem type='mount' accessmode='passthrough'> <driver type='virtiofs'/> <source dir='/path'/> <target dir='mount_tag'> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </filesystem> Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com> Tested-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Ján Tomko 提交于
Introduced by QEMU commit 98fc1ada4cf70af0f1df1a2d7183cf786fc7da05 virtio: add vhost-user-fs base device Released in QEMU v4.2.0. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com> Acked-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Tested-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Ján Tomko 提交于
Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com> Tested-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Ján Tomko 提交于
Pass logManager to qemuExtDevicesStart for future usage. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Tested-by: NAndrea Bolognani <abologna@redhat.com>
-
- 27 2月, 2020 1 次提交
-
-
由 Pavel Hrdina 提交于
The default memlock limit is 64k which is not enough to start a single VM. The requirements for one VM are 12k, 8k for eBPF map and 4k for eBPF program, however, it fails to create eBPF map and program with 64k limit. By testing I figured out that the minimal limit is 80k to start a single VM with functional eBPF and if I add 12k I can start another one. This leads into following calculation: 80k as memlock limit worked to start a VM with eBPF which means there is 68k of lock memory that I was not able to figure out what was using it. So to get a number for 4096 VMs: 68 + 12 * 4096 = 49220 If we round it up we will get 64M of memory lock limit to support 4096 VMs with default map size which can hold 64 entries for devices. This should be good enough as a sane default and users can change it if the need to. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1807090Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 26 2月, 2020 4 次提交
-
-
由 Jiri Denemark 提交于
Whenever there is a guest CPU configured in domain XML, we will call some CPU driver APIs to validate the CPU definition and check its compatibility with the hypervisor. Thus domains with guest CPU specification can only be started if the guest architecture is supported by the CPU driver. But we would add a default CPU to any domain as long as QEMU reports it causing failures to start any domain on affected architectures. https://bugzilla.redhat.com/show_bug.cgi?id=1805755Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Peter Krempa 提交于
While our code can detect ISO as a separate format, qemu does not use it as such and just passes it through as raw. Add conversion for detected parts of the backing chain so that the validation code does not reject it right away. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Ján Tomko 提交于
This function only uses the domain definition. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NPavel Mores <pmores@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 25 2月, 2020 2 次提交
-
-
由 Ján Tomko 提交于
Include virutil.h in all files that use it, instead of relying on it being pulled in somehow. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
由 Ján Tomko 提交于
Historically, this file was a dump for most of our helper functions and needed almost everywhere. With the introduction of virfile.h and virstring.h, and more importantly, virenum.h and the introduction of GLib, that is no longer true. Remove its include from C files that don't even use it. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
- 24 2月, 2020 2 次提交
-
-
由 Peter Krempa 提交于
Both callers pass false. Since we frown upon format probing, remove the unused possibility to do the probing. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Ján Tomko 提交于
The backend name is memory-backend-memfd but we've been checking for memory-backend-memory. Reported by GCC on rawhide: ../../../src/internal.h:75:22: error: 'strcmp' of a string of length 21 and an array of size 21 evaluates to nonzero [-Werror=string-compare] ../../../src/qemu/qemu_command.c:3525:20: note: in expansion of macro 'STREQ' 3525 | } else if (STREQ(backendType, "memory-backend-memory") && | ^~~~~ Signed-off-by: NJán Tomko <jtomko@redhat.com> Fixes: 24b74d18Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 23 2月, 2020 12 次提交
-
-
由 Daniel Henrique Barboza 提交于
Another vircgroup helper to avoid code repetition between the LXC and QEMU driver. Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Daniel Henrique Barboza 提交于
lxcDomainSetMemoryParameters() and qemuDomainSetMemoryParameters() has duplicated chunks of code that can be put in a new helper. Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Daniel Henrique Barboza 提交于
This new helper avoids more code repetition inside lxcDomainSetBlkioParameters() and qemuDomainSetBlkioParameters(). Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Daniel Henrique Barboza 提交于
After the introduction of virDomainDriverMergeBlkioDevice() in a previous patch, it is now clear that lxcDomainSetBlkioParameters() and qemuDomainSetBlkioParameters() uses the same loop to set cgroup blkio parameter of a domain. Avoid the repetition by adding a new helper called virDomainCgroupSetupDomainBlkioParameters(). Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Daniel Henrique Barboza 提交于
lxcDomainParseBlkioDeviceStr() and qemuDomainParseBlkioDeviceStr() are the same function. Avoid code repetition by putting the code in a new helper. Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Daniel Henrique Barboza 提交于
lxcDomainMergeBlkioDevice() and qemuDomainMergeBlkioDevice() are the same functions. This duplicated code can't be put in the existing domain_cgroup.c since it's not cgroup related. This patch introduces a new src/hypervisor/domain_driver.c to host this more generic code that can be shared between virt drivers. This new file is then used to create a new helper called virDomainDeivceMergeBlkioDevice() to eliminate the code repetition mentioned above. Callers in LXC and QEMU files were updated. This change is a preliminary step for more code reduction of cgroup related code inside lxcDomainSetBlkioParameters() and qemuDomainSetBlkioParameters(). Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Daniel Henrique Barboza 提交于
qemuSetupCgroupVcpuBW() and lxcSetVcpuBWLive() shares the same code to set CPU CFS period and quota. This code can be moved to a new virCgroupSetupCpuPeriodQuota() helper to avoid code repetition. A similar code is also executed in virLXCCgroupSetupCpuTune(), but without the rollback on error. Use the new helper in this function as well since the 'period' rollback, if not a straight improvement for virLXCCgroupSetupCpuTune(), is benign. And we end up cutting more code repetition. Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Daniel Henrique Barboza 提交于
The code that calls virCgroupSetCpuShares() and virCgroupGetCpuShares() is repeated in 4 different places. Let's put it in a new virCgroupSetupCpuShares() to avoid code repetition. There's a reason of why we execute a Get in the same value we just executed Set, explained in detail by commit 97814d8a. Let's add a gist of the reasoning behind it as a comment in this new function as well. Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Daniel Henrique Barboza 提交于
The code from qemuSetupCgroupCpusetCpus() and virLXCCgroupSetupCpusetTune() can be centralized in a new helper called virCgroupSetupCpusetCpus(). Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Daniel Henrique Barboza 提交于
virLXCCgroupSetupMemTune() and qemuSetupMemoryCgroup() shares duplicated code that can be put in a new helper to avoid code repetition. Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Daniel Henrique Barboza 提交于
There is duplicated code between virt drivers that needs to be moved to avoid code repetition. In the case of duplicated code between lxc_cgroup.c and qemu_cgroup.c a common place would be utils/vircgroup.c. The problem is that this would introduce /conf related definitions that shouldn't be imported to vircgroup.c, which is supposed to be a place for utilitary cgroups functions only. And syntax-check would forbid it anyway due to cross-directory includes being used. An alternative would be to overload domain_conf.c, which already contains all the definitions required. But that file is already crowded with XML handling code and we wouldn't do any favors to it by putting more utilitary, non-XML parsing/formatting code there. In [1], Cole suggested a 'domain_cgroup' file to host common code between lxc_cgroup and qemu_cgroup, and Daniel suggested a 'src/hypervisor' dir to host these type of files. This patch introduces src/hypervisor/domain_cgroup.c and, to get started, introduces a new virDomainCgroupSetupBlkio() function to host shared code between virLXCCgroupSetupBlkioTune() and qemuSetupBlkioCgroup(). [1] https://www.redhat.com/archives/libvir-list/2019-December/msg00817.htmlSigned-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Daniel Henrique Barboza 提交于
There are code repetition of set() and get() blkio device parameters across lxc and qemu files. Use the new vircgroup helpers to trim the repetition a bit. Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 21 2月, 2020 2 次提交
-
-
由 Laine Stump 提交于
This setting can be updating very easily on an already active interface by just changing it in sysfs. If the bridge used for connection is also changed, there is no need to separately update it, because the new setting isf done as a part of connecting to the bridge anyway. Signed-off-by: NLaine Stump <laine@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Laine Stump 提交于
This patch pushes the isolatedPort setting from the <interface> down all the way to the callers of virNetDevBridgeAddPort(), and sets BR_ISOLATED on the port (using virNetDevBridgePortSetIsolated()) after the port has been successfully added to the bridge. Signed-off-by: NLaine Stump <laine@redhat.com> Signed-off-by: NLaine Stump <laine@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-