- 16 11月, 2018 4 次提交
-
-
由 Michal Privoznik 提交于
For metadata locking we might need an extra fork() which given latest attempts to do fewer fork()-s is suboptimal. Therefore, there will be a qemu.conf knob to {en|dis}able this feature. But since the feature is actually not metadata locking itself rather than remembering of the original owner of the file this is named as 'rememberOwner'. But patches for that feature are not even posted yet so there is actually no qemu.conf entry in this patch nor a way to enable this feature. Even though this is effectively a dead code for now it is still desired. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Marc-André Lureau 提交于
Add a new memoryBacking source type "memfd", supported by QEMU (when the capability is available). A memfd is a specialized anonymous memory kind. As such, an anonymous source type could be automatically using a memfd. However, there are some complications when migrating from different memory backends in qemu (mainly due to the internal object naming at this point, but there could be more). For now, it is simpler and safer to simply introduce a new source type "memfd". Eventually, the "anonymous" type could learn to use memfd transparently in a separate change. The main benefits are that it doesn't need to create filesystem files, and it also enforces sealing, providing a bit more safety. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Daniel Henrique Barboza 提交于
Previous patch removed the call to qemuProcessValidateCpuCount from qemuProcessStartValidateXML, in qemu_process.c. The only caller left is qemuDomainDefValidate, in qemu_domain.c. Instead of having a public function declared inside qemu_process.c that isn't used in that file, this patch moves the function to qemu_domain.c, making in static and renaming it to qemuDomainValidateCpuCount to be compliant with other static functions names in the file. Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Daniel Henrique Barboza 提交于
Adding maxCpu validation in qemuDomainDefValidate allows the user to spot over the board maxCpus counts at editing time, instead of facing a runtime error when starting the domain. This check is also arch independent. This leaves us with 2 calls to qemuProcessValidateCpuCount: one in qemuProcessStartValidateXML and the new one at qemuDomainDefValidate. The call in qemuProcessStartValidateXML is redundant. Following up in that code, there is a call to virDomainDefValidate, which in turn will call config.domainValidateCallback. In this case, the callback function is qemuDomainDefValidate. This means that, on startup time, qemuProcessValidateCpuCount will be called twice. To avoid that, let's also remove the qemuProcessValidateCpuCount call from qemuProcessStartValidateXML. Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 15 11月, 2018 3 次提交
-
-
由 Yi Min Zhao 提交于
We should ensure that QEMU supports zPCI when a zPCI address is defined in XML and otherwise report an error. This patch introduces a generic validation function qemuDomainDeviceDefValidateAddress() which calls qemuDomainDeviceDefValidateZPCIAddress() if address type is PCI address. Signed-off-by: NYi Min Zhao <zyimin@linux.ibm.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.ibm.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Yi Min Zhao 提交于
The pci-root depends on zpci capability. So autogenerate pci-root if zpci exists. Signed-off-by: NYi Min Zhao <zyimin@linux.ibm.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.ibm.com> Reviewed-by: NStefan Zimmermann <stzi@linux.ibm.com> Reviewed-by: NBjoern Walk <bwalk@linux.ibm.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Julio Faracco 提交于
The function qemuDomainGetHostdevPath() is using VIR_FREE to free the paths stored in tmpPaths. Both syntax analyzer are reporting a warning about this. Replacing the old method to function virStringListFreeCount() fixes the warnings/errors. Signed-off-by: NJulio Faracco <jcfaracco@gmail.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 13 11月, 2018 2 次提交
-
-
由 Erik Skultety 提交于
VFIO AP has a limitation on a single device per domain, however, when commit 11708641 added the support for vfio-ap, check for this limitation was performed as part of the post parse code. Generally, checks like that should be performed within the driver's validation callback to eliminate any slight chance of failing in post parse, which could potentially result in the domain XML config vanishing. Signed-off-by: NErik Skultety <eskultet@redhat.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.ibm.com>
-
由 Erik Skultety 提交于
Since we'll need to validate other models apart from VFIO PCI too, having a helper for each model should keep the code base cleaner. Signed-off-by: NErik Skultety <eskultet@redhat.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.ibm.com>
-
- 08 11月, 2018 1 次提交
-
-
由 Eric Blake 提交于
If qemuDomainSnapshotDiscard() fails for any reason (rare, but possible with an ill-timed ENOMEM or if qemuDomainSnapshotForEachQcow2() has problems talking to the qemu guest monitor), then an attempt to retry the snapshot deletion API will crash because we didn't undo the effects of virDomainSnapshotDropParent() temporarily rearranging the internal list structures, and the second attempt to drop parents will dereference NULL. Fix it by instead noting that there are only two callers to qemuDomainSnapshotDiscard(), and only one of the two callers wants the parent to be updated; thus we can move the call to virDomainSnapshotDropParent() into a code path that only gets executed on success. Signed-off-by: NEric Blake <eblake@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 07 11月, 2018 1 次提交
-
-
由 John Ferlan 提交于
When qemuProcessReconnectHelper was introduced (commit d38897a5) reconnection failure used VIR_DOMAIN_SHUTOFF_FAILED; however, that was changed in commit bda2f17d to either VIR_DOMAIN_SHUTOFF_CRASHED or VIR_DOMAIN_SHUTOFF_UNKNOWN. When QEMU_CAPS_NO_SHUTDOWN checking was removed in commit fe35b1ad the conditional state was just left at VIR_DOMAIN_SHUTOFF_CRASHED. So introduce qemuDomainIsUsingNoShutdown which will manage the condition when the domain was started with -no-shutdown so that when/if reconnection failure occurs we can restore the decision point used to determine whether CRASHED or UNKNOWN is provided. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 19 10月, 2018 1 次提交
-
-
由 Eric Blake 提交于
virXMLFormatElement() frees attrBuf on success, but not necessarily on failure. Most other callers of this function take the time to reset attrBuf afterwords, but qemuDomainObjPrivateXMLFormatBlockjobs() was relying on it succeeding, and could thus result in a memory leak. Signed-off-by: NEric Blake <eblake@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 02 10月, 2018 2 次提交
-
-
由 Marc Hartmayer 提交于
This function updates the used QEMU capabilities of @vm by querying the QEMU capabilities cache. Signed-off-by: NMarc Hartmayer <mhartmay@linux.ibm.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.ibm.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Marc Hartmayer 提交于
Signed-off-by: NMarc Hartmayer <mhartmay@linux.ibm.com> Reviewed-by: NBjoern Walk <bwalk@linux.ibm.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.ibm.com> Reviewed-by: NStefan Zimmermann <stzi@linux.ibm.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 26 9月, 2018 1 次提交
-
-
由 Jiri Denemark 提交于
Thanks to the previous commit the RESUME event handler knows what reason should be used when changing the domain state to VIR_DOMAIN_RUNNING, but the emitted VIR_DOMAIN_EVENT_RESUMED event still uses a generic VIR_DOMAIN_EVENT_RESUMED_UNPAUSED detail. Luckily, the event detail can be easily deduced from the running reason, which saves us from having to pass one more value to the handler. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 22 9月, 2018 2 次提交
-
-
由 Wang Yechao 提交于
Create a qemuDomainRemoveInactiveJobLocked which copies qemuDomainRemoveInactiveJob except of course calling another new helper qemuDomainRemoveInactiveLocked. The qemuDomainRemoveInactiveLocked is a copy of qemuDomainRemoveInactive except that instead of calling virDomainObjListRemove it calls virDomainObjListRemoveLocked. Signed-off-by: NWang Yechao <wang.yechao255@zte.com.cn> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Wang Yechao 提交于
Introduce qemuDomainRemoveInactiveJobCommon to handle what will be the common parts of the code with a new function that will be used to call virDomainObjListRemoveLocked instead of the unlocked variant. Signed-off-by: NWang Yechao <wang.yechao255@zte.com.cn> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 17 9月, 2018 1 次提交
-
-
由 Michal Privoznik 提交于
Even though the current use of the function does not require full implementation with transactions (none of the callers pass a path somewhere under /dev), it doesn't hurt either. Moreover, in future patches the paradigm is going to shift so that any API that touches a file is required to use transactions. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 13 9月, 2018 1 次提交
-
-
由 John Ferlan 提交于
Commit 82327038 moved a couple of checks out of the XML parser into the domain validation; however, those checks seem to be more useful as hypervisor specific checks rather than the more general domain conf checks (nothing in the docs indicate a specific error). Fortunately only QEMU was processing the memoryBacking, thus add the changes to qemuDomainDefValidateMemory and change the code a bit to make usage of the similar deref to def->mem and the mem->nhugepages filter. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
-
- 12 9月, 2018 1 次提交
-
-
由 Michal Privoznik 提交于
In some cases we are checking if the mount namespace is enabled at two places: one is at the beginning of exported function (e.g. qemuDomainNamespaceSetupDisk()) and the other is at the beginning of qemuDomainNamespaceMknodPaths() which is called from the former function anyway. Then we have some other functions which rely on the later check solely. In order to compensate for possibly needless function call, qemuDomainNamespaceMknodPaths() returns early if @npaths is zero. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 07 9月, 2018 1 次提交
-
-
由 Michal Privoznik 提交于
There is no need to check if @npaths is not zero. Let's qemuDomainNamespaceUnlinkPaths() handle that. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 06 9月, 2018 1 次提交
-
-
由 Andrea Bolognani 提交于
The appropriate time to ensure the required capabilities are present is validate rather than command line generation: add a new qemuDomainDeviceDefValidateInput() function and move all existing checks there. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 31 8月, 2018 1 次提交
-
-
由 Farhan Ali 提交于
S390 is aware of both vfio-pci and vfio-ccw devices, so on S390 the capability QEMU_CAPS_VFIO_PCI_DISPLAY will be available. Add an extra check to make sure we only set the display to off for vfio-pci mediated devices. Otherwise we add display for vfio-ccw device and this breaks vfio-ccw device qemu command line. Fixes: d54e45b6 conf: Introduce new <hostdev> attribute 'display' Signed-off-by: NFarhan Ali <alifm@linux.ibm.com> Reviewed-by: NMarc Hartmayer <mhartmay@linux.ibm.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
- 29 8月, 2018 2 次提交
-
-
由 Luyao Huang 提交于
Commit 6534b3c4 tried to raise an error when there is no numa nodes by setting access='shared' in the domain config, but added a helper called from qemuDomainDeviceDefValidate instead of a helper called from qemuDomainDefValidate for XML: <memoryBacking> <hugepages/> <access mode='shared'/> </memoryBacking> Since there are no memory devices in the test XML, there would be no validation failure, but the test added was still failing. Investigating that it turns out that unnecessary XML elements were causing the failure (no need for <video>, <graphics>, <pm>, usb controller model "piix3-uhci", disk attribute for "discard='unmap'", <serial>, <console>, <channel> and a memballoon model). Removing all those before moving the method caused the test to succeed. So this patch moves the validation to the right place and removes all the unnecessary XML pieces that were causing a false validation failure. https://bugzilla.redhat.com/show_bug.cgi?id=1448149#c14Signed-off-by: NLuyao Huang <lhuang@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Andrea Bolognani 提交于
We would have used virtio for networking anyway, but it's better to be explicit; for graphics, none of the existing models work right now but virtio is the only one which has a non-PCI variant, so it's as good a default as any Spotted-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 28 8月, 2018 2 次提交
-
-
由 Andrea Bolognani 提交于
None of the existing models is suitable for use with RISC-V virt guests, and we don't want information about the serial console to be missing from the XML. The name is based on comments in qemu/hw/riscv/virt.c: RISC-V machine with 16550a UART and VirtIO MMIO and in qemu/hw/char/serial.c: QEMU 16550A UART emulation along with the output of dmesg in the guest: Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled 10000000.uart: ttyS0 at MMIO 0x10000000 (irq = 13, base_baud= 230400) is a 16550A Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Lubomir Rintel 提交于
Signed-off-by: NLubomir Rintel <lkundrak@v3.sk> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
- 24 8月, 2018 3 次提交
-
-
由 Lubomir Rintel 提交于
Signed-off-by: NLubomir Rintel <lkundrak@v3.sk> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Lubomir Rintel 提交于
Signed-off-by: NLubomir Rintel <lkundrak@v3.sk> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Lubomir Rintel 提交于
They're ARM specific. Signed-off-by: NLubomir Rintel <lkundrak@v3.sk> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
- 21 8月, 2018 5 次提交
-
-
由 Peter Krempa 提交于
Pass in the node name as the backend alias when -blockdev is used. As copy-on-read is expressed by a separate -blockdev backing chain member we need to decide which node name to use here. For empty cdroms when using -blockdev there is no backend at all so NULL is returned. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Prepare the full backing chain by instantiating authentication and TLS transport secrets and other necessary objects so that we can add the full backing chain explicitly to qemu. This also includes allocation of nodenames for the individual backing chain members. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
The copy-on-read feature is expressed by adding a new node layer in qemu when using -blockdev. Since we will keep these per-disk (as opposed to per storage source) we need to store the appropriate node names in the disk definition. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
When using -blockdev you need to use the qom path to refer to the disk fronends. Add means for storing the path and getting it after restart. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Node names for block objects in qemu need to be unique for an instance of the qemu process. Add a counter to generate objects sequentially and store it in the status XML so that we can restore it. The helpers added allow to create new node names and reset the counter after the VM process terminates. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 14 8月, 2018 1 次提交
-
-
由 Bing Niu 提交于
Resctrl not only supports cache tuning, but also memory bandwidth tuning. Renaming cachetune to resctrl to reflect that. With resctrl, all allocation for different resources (cache, memory bandwidth) are aggregated and represented by a virResctrlAllocPtr inside virDomainResctrlDef. Signed-off-by: NBing Niu <bing.niu@intel.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 09 8月, 2018 2 次提交
-
-
由 Peter Krempa 提交于
Starting from pc-q35-2.4 the floppy controller is not enabled by default. Fix the version check so that it does not match 2.11 as being 2.1. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Katerina Koukiou 提交于
The rest of blkiotune parameters are not updatable through UpdateDeviceFlags API. https://bugzilla.redhat.com/show_bug.cgi?id=1601677Signed-off-by: NKaterina Koukiou <kkoukiou@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 08 8月, 2018 1 次提交
-
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 07 8月, 2018 1 次提交
-
-
由 Boris Fiuczynski 提交于
Add support and tests for vhost-vsock-ccw. Signed-off-by: NBoris Fiuczynski <fiuczy@linux.ibm.com>
-