- 20 9月, 2016 1 次提交
-
-
由 Chen Hanxiao 提交于
s/unitl/until Signed-off-by: NChen Hanxiao <chenhanxiao@gmail.com>
-
- 19 9月, 2016 3 次提交
-
-
由 Michal Privoznik 提交于
Now that we have two same implementations for getting path for huge pages backed guest memory, lets merge them into one function. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
When trying to migrate a huge page enabled guest, I've noticed the following crash. Apparently, if no specific hugepages are requested: <memoryBacking> <hugepages/> </memoryBacking> and there are no hugepages configured on the destination, we try to dereference a NULL pointer. Program received signal SIGSEGV, Segmentation fault. 0x00007fcc907fb20e in qemuGetHugepagePath (hugepage=0x0) at qemu/qemu_conf.c:1447 1447 if (virAsprintf(&ret, "%s/libvirt/qemu", hugepage->mnt_dir) < 0) (gdb) bt #0 0x00007fcc907fb20e in qemuGetHugepagePath (hugepage=0x0) at qemu/qemu_conf.c:1447 #1 0x00007fcc907fb2f5 in qemuGetDefaultHugepath (hugetlbfs=0x0, nhugetlbfs=0) at qemu/qemu_conf.c:1466 #2 0x00007fcc907b4afa in qemuBuildMemoryBackendStr (size=4194304, pagesize=0, guestNode=0, userNodeset=0x0, autoNodeset=0x0, def=0x7fcc70019070, qemuCaps=0x7fcc70004000, cfg=0x7fcc5c011800, backendType=0x7fcc95087228, backendProps=0x7fcc95087218, force=false) at qemu/qemu_command.c:3297 #3 0x00007fcc907b4f91 in qemuBuildMemoryCellBackendStr (def=0x7fcc70019070, qemuCaps=0x7fcc70004000, cfg=0x7fcc5c011800, cell=0, auto_nodeset=0x0, backendStr=0x7fcc70020360) at qemu/qemu_command.c:3413 #4 0x00007fcc907c0406 in qemuBuildNumaArgStr (cfg=0x7fcc5c011800, def=0x7fcc70019070, cmd=0x7fcc700040c0, qemuCaps=0x7fcc70004000, auto_nodeset=0x0) at qemu/qemu_command.c:7470 #5 0x00007fcc907c5fdf in qemuBuildCommandLine (driver=0x7fcc5c07b8a0, logManager=0x7fcc70003c00, def=0x7fcc70019070, monitor_chr=0x7fcc70004bb0, monitor_json=true, qemuCaps=0x7fcc70004000, migrateURI=0x7fcc700199c0 "defer", snapshot=0x0, vmop=VIR_NETDEV_VPORT_PROFILE_OP_MIGRATE_IN_START, standalone=false, enableFips=false, nodeset=0x0, nnicindexes=0x7fcc95087498, nicindexes=0x7fcc950874a0, domainLibDir=0x7fcc700047c0 "/var/lib/libvirt/qemu/domain-1-fedora") at qemu/qemu_command.c:9547 Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Chen Hanxiao 提交于
Both qemu monitor and agent print the same log on HUANGUP event, which would be confusing when reading libvirtd log. This patch will give a different log message to them. Signed-off-by: NChen Hanxiao <chenhanxiao@gmail.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 16 9月, 2016 1 次提交
-
-
由 Laszlo Ersek 提交于
Most of QEMU's PCI display device models, such as: libvirt video/model/@type QEMU -device ------------------------- ------------ cirrus cirrus-vga vga VGA qxl qxl-vga virtio virtio-vga come with a linear framebuffer (sometimes called "VGA compatibility framebuffer"). This linear framebuffer lives in one of the PCI device's MMIO BARs, and allows guest code (primarily: firmware drivers, and non-accelerated OS drivers) to display graphics with direct memory access. Due to architectural reasons on aarch64/KVM hosts, this kind of framebuffer doesn't / can't work in qemu-system-(arm|aarch64) -M virt machines. Cache coherency issues guarantee a corrupted / unusable display. The problem has been researched by several people, including kvm-arm maintainers, and it's been decided that the best way (practically the only way) to have boot time graphics for such guests is to consolidate on QEMU's "virtio-gpu-pci" device. >From <https://bugzilla.redhat.com/show_bug.cgi?id=1195176>, libvirt supports <devices> <video> <model type='virtio'/> </video> </devices> but libvirt unconditionally maps @type='virtio' to QEMU's "virtio-vga" device model. (See the qemuBuildDeviceVideoStr() function and the "qemuDeviceVideo" enum impl.) According to the above, this is not right for the "virt" machine type; the qemu-system-(arm|aarch64) binaries don't even recognize the "virtio-vga" device model (justifiedly). Whereas "virtio-gpu-pci", which is a pure virtio device without a compatibility framebuffer, is available, and works fine. (The ArmVirtQemu ("AAVMF") platform of edk2 -- that is, the UEFI firmware for "virt" -- supports "virtio-gpu-pci", as of upstream commit 3ef3209d3028. See <https://tianocore.acgmultimedia.com/show_bug.cgi?id=66>.) Override the default mapping of "virtio", from "virtio-vga" to "virtio-gpu-pci", if qemuDomainMachineIsVirt() evaluates to true. Cc: Andrea Bolognani <abologna@redhat.com> Cc: Drew Jones <drjones@redhat.com> Cc: Marc-André Lureau <marcandre.lureau@redhat.com> Cc: Martin Kletzander <mkletzan@redhat.com> Suggested-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1372901Signed-off-by: NLaszlo Ersek <lersek@redhat.com> Acked-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 14 9月, 2016 7 次提交
-
-
由 Peter Krempa 提交于
Use the state information (online, hotpluggable) provided by the monitor code rather than trying to infer it. This fixes an issue where on architectures that require hotplug of multiple threads at once the sub-cores would get updated as offline on daemon restart thus creating an invalid configuration. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1375783
-
由 Peter Krempa 提交于
Return whether a vcpu entry is hotpluggable or online so that upper layers don't have to infer the information from other data. Advantage is that this code can be tested by unit tests.
-
由 Peter Krempa 提交于
Add separate iterator for iterating all the entries
-
由 Peter Krempa 提交于
The algorithm that matches data from query-cpus and query-hotpluggable-cpus is quite complex. Start using descriptive iterator names to avoid confusion.
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1372613 Apparently, some management applications use the following code pattern when waiting for a block job to finish: while (1) { virDomainGetBlockJobInfo(dom, disk, info, flags); if (info.cur == info.end) break; sleep(1); } Problem with this approach is in its corner cases. In case of QEMU, libvirt merely pass what has been reported on the monitor. However, if the block job hasn't started yet, qemu reports cur == end == 0 which tricks mgmt apps into thinking job is complete. The solution is to mangle cur/end values as described here [1]. 1: https://www.redhat.com/archives/libvir-list/2016-September/msg00017.htmlSigned-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
Even though we merely just pass to users whatever qemu provided on the monitor, we still do some translation. For instance we turn bytes into mebibytes, or fix job type if needed. However, in the future there is more fixing to be done so this code deserves its own function. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Name it virNumaGetHostMemoryNodeset and return only NUMA nodes which have memory installed. This is necessary as the kernel is not very happy to set the memory cgroup setting for nodes which do not have any memory. This would break vcpu hotplug with following message on such configruation: Invalid value '0,8' for 'cpuset.mems': Invalid argument Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1375268
-
- 13 9月, 2016 3 次提交
-
-
由 Peter Krempa 提交于
-
由 Nikolay Shirokovskiy 提交于
Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
-
由 Laine Stump 提交于
virQEMUDriverConfigNew() always initializes the bitmap in its cgroupControllers member to -1 (i.e. all 1's). Prior to commit a9331394, if qemu.conf had a line with "cgroup_controllers", cgroupControllers would get reset to 0 before going through a loop setting a bit for each named cgroup controller. commit a9331394 left out the "reset to 0" part, so cgroupControllers would always be -1; if you didn't want a controller included, there was no longer a way to make that happen. This was discovered by users who were using qemu commandline passthrough to use the "input-linux" method of directing keyboard/mouse input to a virtual machine: https://www.redhat.com/archives/vfio-users/2016-April/msg00105.html Here's the first report I found of the problem encountered after upgrading libvirt beyond v2.0.0: https://www.redhat.com/archives/vfio-users/2016-August/msg00053.html Thanks to sL1pKn07 SpinFlo <sl1pkn07@gmail.com> for bringing the problem up in IRC, and then taking the time to do a git bisect and find the patch that started the problem.
-
- 12 9月, 2016 4 次提交
-
-
由 Daniel P. Berrange 提交于
previous commit: commit 2c322378 Author: John Ferlan <jferlan@redhat.com> Date: Mon Jun 13 12:30:34 2016 -0400 qemu: Add the ability to hotplug the TLS X.509 environment added a parameter "bool listen" in some methods. This unfortunately clashes with the listen() method, causing compile failures on certain platforms (RHEL-6 for example) Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Jiri Denemark 提交于
When migration fails, we need to poke QEMU monitor to check for a reason of the failure. We did this using query-migrate QMP command, which is not supposed to return any meaningful result on the destination side. Thus if the monitor was still functional when we detected the migration failure, parsing the answer from query-migrate always failed with the following error message: "info migration reply was missing return status" This irrelevant message was then used as the reason for the migration failure replacing any message we might have had. Let's use harmless query-status for poking the monitor to make sure we only get an error if the monitor connection is broken. https://bugzilla.redhat.com/show_bug.cgi?id=1374613Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Peter Krempa 提交于
Qemu always opens the tray if forced to. Skip the waiting step in such case. This also helps if qemu does not report the tray change event when opening the cdrom forcibly (the documentation says that the event will not be sent although qemu in fact does trigger it even if @force is selceted). This is a workaround for a qemu issue where qemu does not send the tray change event in some cases (after migration with empty closed locked drive) and thus renders the cdrom useless from libvirt's point of view. Partially resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1368368
-
由 Peter Krempa 提交于
When a source image is dropped when missing due to startup policy the policy needs to be cleared since it was relevant only for the given storage source. New sources need to update it if needed.
-
- 09 9月, 2016 9 次提交
-
-
由 Michal Privoznik 提交于
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
Just like in the previous commit, teach qemu driver to detect whether qemu supports this configuration knob or not. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1366989 QEMU added another virtio-net tunable [1]. It basically allows users to set the size of RX virtio ring. But because virtio-net uses two separate ring buffers to pass data from/to guest they named it explicitly rx_queue_size. We should expose it in our XML too. 1: http://lists.nongnu.org/archive/html/qemu-devel/2016-08/msg02029.htmlSigned-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
If the incoming XML defined a path to a TLS X.509 certificate environment, add the necessary 'tls-creds-x509' object to the VIR_DOMAIN_CHR_TYPE_TCP character device. Likewise, if the environment exists the hot unplug needs adjustment as well. Note that all the return ret were changed to goto cleanup since the cfg needs to be unref'd Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
When building a chardev device string for tcp, add the necessary pieces to access provide the TLS X.509 path to qemu. This includes generating the 'tls-creds-x509' object and then adding the 'tls-creds' parameter to the VIR_DOMAIN_CHR_TYPE_TCP command line. Finally add the tests for the qemu command line. This test will make use of the "new(ish)" /etc/pki/qemu setting for a TLS certificate environment by *not* "resetting" the chardevTLSx509certdir prior to running the test. Also use the default "verify" option (which is "no"). Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Add a new TLS X.509 certificate type - "chardev". This will handle the creation of a TLS certificate capability (and possibly repository) for properly configured character device TCP backends. Unlike the vnc and spice there is no "listen" or "passwd" associated. The credentials eventually will be handled via a libvirt secret provided to a specific backend. Make use of the default verify option as well. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Rather than specify perhaps multiple TLS X.509 certificate directories, let's create a "default" directory which can then be used if the service (e.g. for now vnc and spice) does not supply a default directory. Since the default for vnc and spice may have existed before without being supplied, the default check will first check if the service specific path exists and if so, set the cfg entry to that; otherwise, the default will be set to the (now) new defaultTLSx509certdir. Additionally add a "default_tls_x509_verify" entry which can also be used to force the peer verification option (for vnc it's a x509verify option). Add/alter the macro for the option being found in the config file to accept the default value. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Jiri Denemark 提交于
If a migration of a domain which is already defined on the destination host failed early (before we tried to start QEMU), we would forget to remove the incoming transient definition. Later on when someone starts the domain on the destination host, we will use the stale incoming definition and the persistent definition will just be ignored. https://bugzilla.redhat.com/show_bug.cgi?id=1368774Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
The code for replacing domain's transient definition with the persistent one is repeated in several places and we'll need to add one more. Let's make a nice helper for it. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 07 9月, 2016 4 次提交
-
-
由 Peter Krempa 提交于
At this point it's guaranteed that 'persistentDef' is non-NULL so we don't need to check it again.
-
由 Peter Krempa 提交于
Similarly to vcpu hotplug the emulator thread cgroup numa mapping needs to be relaxed while hot-adding vcpus so that the threads can allocate data in the DMA zone. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1370084
-
由 Peter Krempa 提交于
When hot-adding vcpus qemu needs to allocate some structures in the DMA zone which may be outside of the numa pinning. Extract the code doing this in a set of helpers so that it can be reused.
-
由 Yuri Pudgorodskiy 提交于
A separate error code will help recognize real failures from necessity to try again Signed-off-by: NMaxim Nestratov <mnestratov@virtuozzo.com>
-
- 06 9月, 2016 3 次提交
-
-
由 Jiri Denemark 提交于
Debug priority is good enough for this. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Daniel P. Berrange 提交于
We already have the ability to turn off dumping of guest RAM via the domain XML. This is not particularly useful though, as it is under control of the management application. What is needed is a way for the sysadmin to turn off guest RAM defaults globally, regardless of whether the mgmt app provides its own way to set this in the domain XML. So this adds a 'dump_guest_core' option in /etc/libvirt/qemu.conf which defaults to false. ie guest RAM will never be included in the QEMU core dumps by default. This default is different from historical practice, but is considered to be more suitable as a default because a) guest RAM can be huge and so inflicts a DOS on the host I/O subsystem when dumping core for QEMU crashes b) guest RAM can contain alot of sensitive data belonging to the VM owner. This should not generally be copied around inside QEMU core dumps submitted to vendors for debugging c) guest RAM contents are rarely useful in diagnosing QEMU crashes Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Currently the QEMU processes inherit their core dump rlimit from libvirtd, which is really suboptimal. This change allows their limit to be directly controlled from qemu.conf instead.
-
- 03 9月, 2016 4 次提交
-
-
由 Qiaowei Ren 提交于
With current perf framework, this patch adds support and documentation for more perf events, including cache misses, cache references, cpu cycles, and instructions. Signed-off-by: NQiaowei Ren <qiaowei.ren@intel.com>
-
由 Qiaowei Ren 提交于
Remove the unnecessary switch since all VIR_PERF_EVENT* values are fetched
-
由 Qiaowei Ren 提交于
This patch rename qemuDomainGetStatsPerfRdt() to qemuDomainGetStatsPerfOneEvent() Signed-off-by: NQiaowei Ren <qiaowei.ren@intel.com>
-
由 Nikolay Shirokovskiy 提交于
Since the domain lock is not held during preparation of an external XML config, it is possible that the value can change resulting in unexpected failures during ABI consistency checking for some save and migrate operations. This patch adds a new flag to skip the checking of the cur_balloon value and then sets the destination value to the source value to ensure subsequent checks without the skip flag will succeed. This way it is protected from forges and is keeped up to date too. Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
-
- 02 9月, 2016 1 次提交
-
-
由 Xian Han Yu 提交于
The 'multi' element in PCI address struct used as 'virTristateSwitch', and its default value is 'VIR_TRISTATE_SWITCH_ABSENT'. Current PCI process use 'false' to initialization 'multi', which is ambiguously for assignment or comparison. This patch use '{0}' to initialize the whole PCI address struct, which fix the 'multi' initialization and makes code more simplify and explicitly. Signed-off-by: NXian Han Yu <xhyubj@linux.vnet.ibm.com>
-