- 25 1月, 2019 25 次提交
-
-
由 Ján Tomko 提交于
Now that the nested loop is gone. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
由 Ján Tomko 提交于
Use qemuBuildControllersCommandLine since it builds the command line for (nearly) all controllers, not just one. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
由 Ján Tomko 提交于
section Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
由 Ján Tomko 提交于
Since they go on the USB bus, format them after USB hubs. https://bugzilla.redhat.com/show_bug.cgi?id=1375402Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
由 Ján Tomko 提交于
Now that the inner loop does not require any other variables, it can be easily separated. Apart from reducing the indentation level this will allow it to be called from different code paths. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
由 Ján Tomko 提交于
Now that it's no longer needed, remove the argument. This removes the last helper variable in qemuBuildControllerDevCommandLine. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
由 Ján Tomko 提交于
qemuBuildLegacyUSBControllerCommandLine is the only place where we need to count the USB controllers. Count them again instead of keeping track in a variable passed to qemuBuildControllerDevStr. This removes the need for another variable in the loop in qemuBuildControllerDevCommandLine. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
由 Ján Tomko 提交于
Count them in qemuBuildLegacyUSBControllerCommandLine to remove yet another variable accessed from the loop in qemuBuildControllerDevCommandLine. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
由 Ján Tomko 提交于
Shorten some long conditions. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
由 Ján Tomko 提交于
This removes the need to mark it in the 'usbcontroller' variable. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
由 Ján Tomko 提交于
Move out the code formatting "-usb" on the QEMU command line. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
由 Ján Tomko 提交于
Similar to what commit 86dba8f3 did for virPortAllocatorRelease, ignore port 0 in virPortAllocatorSetUsed. For all the reasonable use cases the callers already check that the port is non-zero, however if the port from the XML overflows unsigned short and turns into 0, it can be set as used by virPortAllocatorSetUsed but not released by virPortAllocatorRelease. Also skip port '0' in virPortAllocatorSetUsed to make this behavior symmetric. The serenity was disturbed by commit 5dbda5e9 which started using virPortAllocatorRelease instead of virPortAllocatorSetUsed (false). https://bugzilla.redhat.com/show_bug.cgi?id=1591645Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
由 Thomas Huth 提交于
There is no "GNU Lesser General Public License, version 2", only version 2.1 and later. In "version 2", the license was still called "Library" instead of "Lesser". So assume that version 2.1 is meant here. Signed-off-by: NThomas Huth <thuth@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Thomas Huth 提交于
The tools/virt-xml-validate.in file is licensed under the terms of the GPL, but then says "You should have received a copy of the GNU *Lesser* General Public License". Thus scratch the "Lesser" here. Signed-off-by: NThomas Huth <thuth@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Thomas Huth 提交于
The bootstrap.conf is licensed under the terms of the LGPL, but then suggests to "See the GNU General Public License for more details". That should be the "GNU Lesser General Public License" instead, of course. Signed-off-by: NThomas Huth <thuth@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Cole Robinson 提交于
Switch qemuBuildVirtioDevStr to use virDomainDeviceSetData: callers pass in the virDomainDeviceType and the void * DefPtr. This will save us from having to repeatedly extend the function argument list in subsequent patches. Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
This is essentially a wrapper for easily setting the variable name in virDomainDeviceDef that matches its associated VIR_DOMAIN_DEVICE_TYPE. Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
Current code essentially duplicates the same logic, but misses some cases (like vhost-vsock-device). Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
The vhost-scsi device string should depend on the requested address type, not strictly on the emulated arch. This is the same logic used by qemuBuildVirtioDevStr, and this particular path is already tested in the hostdev-scsi-vhost-scsi-ccw tests Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
Move the rng->model == VIRTIO check to parse time. This also allows us to remove similar checks throughout the qemu driver Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
If we validate that memballoon is NONE|VIRTIO at parse time, we can drop similar checks elsewhere in the qemu driver Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
This will be extended in the future, so let's simplify things by centralizing the checks. Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
So later code can more easily access def->model Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 John Ferlan 提交于
Found that it was missing in formatstorage and had a few typos in the storage driver page. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com>
-
由 Cheng Lin 提交于
If the two sysfs_path are both NULL, there may be an incorrect object returned for virNodeDeviceObjListFindBySysfsPath(). This check exists in old interface virNodeDeviceFindBySysfsPath(). e.g. virNodeDeviceFindBySysfsPath(virNodeDeviceObjListPtr devs, const char *sysfs_path) { ... if ((devs->objs[i]->def->sysfs_path != NULL) && (STREQ(devs->objs[i]->def->sysfs_path, sysfs_path))) { ... } Reviewed-by: NCole Robinson <crobinso@redhat.com> Signed-off-by: NCheng Lin <cheng.lin130@zte.com.cn>
-
- 24 1月, 2019 7 次提交
-
-
由 Michal Privoznik 提交于
13 bytes in 1 blocks are definitely lost in loss record 44 of 179 at 0x4C2EE6F: malloc (vg_replace_malloc.c:299) by 0x9514A69: strdup (in /lib64/libc-2.27.so) by 0x5E60C0B: virStrdup (virstring.c:956) by 0x54C856F: virHostGetDRMRenderNode (qemuxml2argvmock.c:190) by 0x57CB4E3: qemuProcessGraphicsSetupRenderNode (qemu_process.c:4860) by 0x57CB571: qemuProcessSetupGraphics (qemu_process.c:4881) by 0x57CE01B: qemuProcessPrepareDomain (qemu_process.c:6040) by 0x57D102E: qemuProcessCreatePretendCmd (qemu_process.c:6975) by 0x114C1C: testCompareXMLToArgv (qemuxml2argvtest.c:611) by 0x134B90: virTestRun (testutils.c:174) by 0x123478: mymain (qemuxml2argvtest.c:1697) by 0x136BFA: virTestMain (testutils.c:1112) Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Michal Privoznik 提交于
This partially reverts 00dc991c. 2,030 (1,456 direct, 574 indirect) bytes in 14 blocks are definitely lost in loss record 77 of 80 at 0x4C30E96: calloc (vg_replace_malloc.c:711) by 0x50F83AA: virAlloc (viralloc.c:143) by 0x5178DFA: virPCIDeviceNew (virpci.c:1753) by 0x51753E9: virPCIDeviceIterDevices (virpci.c:468) by 0x5175EB5: virPCIDeviceGetParent (virpci.c:759) by 0x517AB55: virPCIDeviceIsBehindSwitchLackingACS (virpci.c:2476) by 0x517AC24: virPCIDeviceIsAssignable (virpci.c:2494) by 0x10BF27: testVirPCIDeviceIsAssignable (virpcitest.c:229) by 0x10D14C: virTestRun (testutils.c:174) by 0x10C535: mymain (virpcitest.c:422) by 0x10F1B6: virTestMain (testutils.c:1112) by 0x10CF93: main (virpcitest.c:455) Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Michal Privoznik 提交于
This is a return argument that is to be compared against NULL on successful return. However, it is not initialized and therefore relies on callers setting it to NULL prior calling the function. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Eric Blake 提交于
Asserting the value we set four lines earlier in qemuBlockjobState doesn't buy us any safety (if the public header adds a value, we end up skipping that value without the compiler warning us of our gap); what we really want is to assert that the value auto-assigned by the compiler matches the actual last value in the public headers (as was done below for qemuBlockJobType). Add useful comments while at it. Signed-off-by: NEric Blake <eblake@redhat.com> ACKed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Jim Fehlig 提交于
Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
由 Jim Fehlig 提交于
Upstream apparmor is switching to named profiles. In short, /usr/sbin/dnsmasq { becomes profile dnsmasq /usr/sbin/dnsmasq { Consequently, any profiles that reference profiles in a peer= condition need to be updated if the referenced profile switches to a named profile. Apparmor commit 9ab45d81 switched dnsmasq to a named profile. ATM it is the only named profile switch that has affected libvirt. Add rules to the libvirtd profile to reference dnsmasq in peer= conditions by profile name. Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
由 Jim Fehlig 提交于
The libxl driver does not set the new memory value in the active domain def after a successful balloon. This results in the old memory value in <currentMemory>. E.g. virsh dumpxml test | grep currentMemory <currentMemory unit='KiB'>20971520</currentMemory> virsh setmem test 16777216 --live virsh dumpxml test | grep currentMemory <currentMemory unit='KiB'>20971520</currentMemory> Set the new memory value in active domain def after a successful call to libxl_set_memory_target(). Signed-off-by: NJim Fehlig <jfehlig@suse.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 23 1月, 2019 7 次提交
-
-
由 Peter Krempa 提交于
Hanlde all the possible failure codes as per ACPI standard documented in the function header. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1660410Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
We forgot to document the specific fields for the 0x103 and 0x200 sources which are tied to device removal and device hotplug respectively. The value description is based on the ACPI 6.2A standard Table 6-207 and Table 6-208. At the time of writing of this patch the standard can be accessed e.g. at: https://www.uefi.org/sites/default/files/resources/ACPI%206_2_A_Sept29.pdfSigned-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Radoslaw Biernacki 提交于
The @linkdev is In/Out function parameter as second order reference pointer so requires first order dereference for checking NULL which can be the result of virPCIGetNetName(). Fixes: d6ee56d7 (util: change virPCIGetNetName() to not return error if device has no net name) Signed-off-by: NRadoslaw Biernacki <radoslaw.biernacki@linaro.org> Signed-off-by: Ndann frazier <dann.frazier@canonical.com>
-
由 Radoslaw Biernacki 提交于
The device xml parser code does not set "model" while parsing the following XML: <interface type='hostdev'> <source> <address type='pci' domain='0x0002' bus='0x01' slot='0x00' function='0x2'/> </source> </interface> The net->model can be NULL and therefore must be compared using STREQ_NULLABLE instead of plain STREQ. Fixes: ac47e4a6 (qemu: replace "def->nets[i]" with "net" and "def->sounds[i]" with "sound") Fixes: c7fc151e (qemu: assign virtio devices to PCIe slot when appropriate) Signed-off-by: NRadoslaw Biernacki <radoslaw.biernacki@linaro.org> Signed-off-by: Ndann frazier <dann.frazier@canonical.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Radoslaw Biernacki 提交于
Removing redundant sections of the code Signed-off-by: NRadoslaw Biernacki <radoslaw.biernacki@linaro.org> Signed-off-by: Ndann frazier <dann.frazier@canonical.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Radoslaw Biernacki 提交于
libvirt wrongly assumes that VF netdev has to have the netdev assigned to PF. There is no such requirement in SRIOV standard. This patch change the virNetDevSwitchdevFeature() function to deal with SRIOV devices which does not have netdev on PF. Also corrects one comment about PF netdev assumption. One example of such devices is ThunderX VNIC. By applying this change, VF device is used for virNetlinkCommand() as it is the only netdev assigned to VNIC. Signed-off-by: NRadoslaw Biernacki <radoslaw.biernacki@linaro.org> Signed-off-by: Ndann frazier <dann.frazier@canonical.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Christian Ehrhardt 提交于
This adds the virt-aa-helper support for gl enabled graphics devices to generate rules for the needed rendernode paths. Example in domain xml: <graphics type='spice'> <gl enable='yes' rendernode='/dev/dri/bar'/> </graphics> results in: "/dev/dri/bar" rw, Special cases are: - multiple devices with rendernodes -> all are added - non explicit rendernodes -> follow recently added virHostGetDRMRenderNode - rendernode without opengl (in egl-headless for example) -> still add the node Fixes: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1757085Reviewed-by: NErik Skultety <eskultet@redhat.com> Acked-by: NJamie Strandboge <jamie@canonical.com> Signed-off-by: NChristian Ehrhardt <christian.ehrhardt@canonical.com>
-
- 22 1月, 2019 1 次提交
-
-
由 Ján Tomko 提交于
Add a capability check to qemuDomainDefValidate and refuse to start a domain with VNC graphics if the TLS secret was set in qemu.conf and it's not supported. Note that qemuDomainSecretGraphicsPrepare does not generate any secret data if the capability is not present and qemuBuildTLSx509BackendProps is not called at all. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-