- 16 11月, 2018 11 次提交
-
-
由 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>
-
由 Michal Privoznik 提交于
The TPM code currently accepts pointer to a domain definition. This is okay for now, but in near future the security driver APIs it calls will require domain object. Therefore, change the TPM code to accept the domain object pointer. 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>
-
由 Marc-André Lureau 提交于
QEMU 3.1 should only expose the property if the host is actually capable of creating hugetable-backed memfd. However, it may fail at runtime depending on requested "hugetlbsize". Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Marc-André Lureau 提交于
Check availability of "-object memory-backend-memfd". Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Daniel Henrique Barboza 提交于
Commit ("qemu_domain.c: moving maxCpu validation to qemuDomainDefValidate") shortened the code of qemuProcessStartValidateXML. The function is called only by qemuProcessStartValidate, in the same file, and its code is now a single check that calls virDomainDefValidate. Instead of leaving a function call just to execute a single check, this patch puts the check in the body of qemuProcessStartValidate in the place where qemuProcessStartValidateXML was being called. The function can now be removed. Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NJohn Ferlan <jferlan@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>
-
由 Daniel Henrique Barboza 提交于
qemuValidateCpuCount validates the maxCpus value of a domain at startup time, preventing it to start if the value exceeds a maximum. This checking is also done at qemu_domain.c, qemuDomainDefValidate. However, it is done only for x86 (and even then, in a specific scenario). We want this check to be done for all archs. To accomplish this, let's first make qemuValidateCpuCount public so it can be used inside qemuDomainDefValidate. The function was renamed to qemuProcessValidateCpuCount to be compliant with the other public methods at qemu_process.h. The method signature was slightly adapted to fit the const 'def' variable used in qemuDomainDefValidate. This change has no downside in in its original usage at qemuProcessStartValidateXML. Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Daniel Henrique Barboza 提交于
Adding the maxCpus value in the error message of qemuValidateCpuCount allows the user to set an acceptable maxCpus count without knowing QEMU internals. x86 guests, that might have been created prior to the x86 qemuDomainDefValidate maxCpus check code (that validates the maxCpus value in editing time), will also benefit from this change. Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Wang Yechao 提交于
The commit 89563efc fix the monitor error when closing the QEMU monitor. The QEMU agent has a problem similar to QEMU monitor. So fix the QEMU agent with the same method. Signed-off-by: NWang Yechao <wang.yechao255@zte.com.cn> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 15 11月, 2018 17 次提交
-
-
由 Yi Min Zhao 提交于
This commit adds hotplug support for PCI devices on S390 guests. There's no need to implement hot unplug for zPCI as QEMU implements an unplug callback which will unplug both PCI and zPCI device in a cascaded way. Currently, the following PCI devices are supported: virtio-blk-pci virtio-net-pci virtio-rng-pci virtio-input-host-pci virtio-keyboard-pci virtio-mouse-pci virtio-tablet-pci vfio-pci SCSIVhost device 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>
-
由 Yi Min Zhao 提交于
Add new functions to generate zPCI command string and append it to QEMU command line. And the related tests are added. 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>
-
由 Yi Min Zhao 提交于
This patch adds new functions for reservation, assignment and release to handle the uid/fid. If the uid/fid is defined in the domain XML, they will be reserved directly in the collecting phase. If any of them is not defined, we will find out an available value for them from the zPCI address hashtable, and reserve them. For the hotplug case there might not be a zPCI definition. So allocate and reserve uid/fid the case. Assign if needed and reserve uid/fid for the defined case. Signed-off-by: NYi Min Zhao <zyimin@linux.ibm.com> Reviewed-by: NBjoern Walk <bwalk@linux.ibm.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.ibm.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
由 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>
-
由 Yi Min Zhao 提交于
This patch provides a caching mechanism for the device address extensions uid and fid on S390. For efficient sparse address allocation, we introduce two hash tables for uid/fid which hold the address set information per domain. Also in order to improve performance of searching available value, we introduce our own callbacks for the two hashtables. In this way, uid/fid is saved in hash key and hash value could be any non-NULL pointer due to no operation on hash value. That is also the reason why we don't introduce hash value free callback. Signed-off-by: NYi Min Zhao <zyimin@linux.ibm.com> Reviewed-by: NBoris Fiuczynski <fiuczy@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>
-
由 Yi Min Zhao 提交于
This patch introduces PCI address extension flag for virDomainDeviceInfo and virPCIDeviceAddress. The extension flag in virDomainDeviceInfo is used internally during calculating PCI extension flag. The one in virPCIDeviceAddress is the duplicate to indicate extension address is being used. Currently only zPCI extension address is introduced to deal with 'uid' and 'fid' on the S390 platform. Signed-off-by: NYi Min Zhao <zyimin@linux.ibm.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.ibm.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Yi Min Zhao 提交于
QEMU on s390 supports PCI multibus since forever. 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>
-
由 Yi Min Zhao 提交于
Let's introduce zPCI capability. 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>
-
由 Vitaly Kuznetsov 提交于
QEMU 3.1 supports Hyper-V Enlightened VMCS feature which significantly speeds up nested Hyper-V on KVM environments. Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com>
-
由 Vitaly Kuznetsov 提交于
Support Hyper-V Enlightened VMCS in domain config. QEMU support will be implemented in the next patch, adding interim VIR_DOMAIN_HYPERV_EVMCS cases to src/qemu/* for now. Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com>
-
由 Vitaly Kuznetsov 提交于
QEMU 3.1 supports Hyper-V-style PV IPIs making it cheaper for Windows guests to send an IPI, especially when it targets many CPUs. Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NVitaly Kuznetsov <vkuznets@redhat.com>
-
由 Vitaly Kuznetsov 提交于
Support Hyper-V PV IPI enlightenment in domain config. QEMU support will be implemented in the next patch, adding interim VIR_DOMAIN_HYPERV_IPI cases to src/qemu/* for now. Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NVitaly Kuznetsov <vkuznets@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>
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1631622 If polkit authentication is enabled, an attempt to open the connection failed during virAccessDriverPolkitGetCaller when the call to virIdentityGetCurrent returned NULL resulting in the errors: virAccessDriverPolkitGetCaller:87 : access denied: Policy kit denied action org.libvirt.api.connect.getattr from <anonymous> Because qemuProcessReconnect runs in a thread during daemonRunStateInit processing it doesn't have the thread local identity. Thus when the virGetConnectNWFilter is called as part of the qemuProcessFiltersInstantiate when virDomainConfNWFilterInstantiate is run the attempt to get the idenity fails and results in the anonymous error above. To fix this, let's grab/use the virIdenityPtr of the process that will be creating the thread, e.g. what daemonRunStateInit has set and use that for our thread. That way any other similar processing that uses/requires an identity for any other call that would have previously been successfully run won't fail in a similar manner. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Wang Huaqiang 提交于
Refactoring qemuDomainGetStatsCpu, make it possible to add more CPU statistics. Signed-off-by: NWang Huaqiang <huaqiang.wang@intel.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Wang Huaqiang 提交于
Add functions for creating, destroying, reconnecting resctrl monitor in qemu according to the configuration in domain XML. Signed-off-by: NWang Huaqiang <huaqiang.wang@intel.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 14 11月, 2018 1 次提交
-
-
由 Nikolay Shirokovskiy 提交于
This patch introduces a new shutdown reason "daemon" in order to indicate that the daemon needed to force shutdown the domain as the best course of action to take at the moment. This action would occur during reconnection when processing encounters an error once the monitor reconnection is successful. Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NErik Skultety <eskultet@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>
-
- 12 11月, 2018 2 次提交
-
-
由 Jiri Denemark 提交于
The gotShutdown bool has been redundant since we started setting VIR_DOMAIN_SHUTDOWN state after receiving SHUTDOWN event from QEMU. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Jiri Denemark 提交于
If gotShutdown is true, the domain state cannot be running because of the following code in qemuProcessHandleShutdown: priv->gotShutdown = true; VIR_DEBUG("Transitioned guest %s to shutdown state", vm->def->name); virDomainObjSetState(vm, VIR_DOMAIN_SHUTDOWN, VIR_DOMAIN_SHUTDOWN_UNKNOWN); Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 09 11月, 2018 1 次提交
-
-
由 Wang Yechao 提交于
On aarch64, lauch vm with the follow configuration: <interface type="hostdev" managed="yes"> <mac address="fa:16:3e:14:41:00"/> <source> <address type="pci" domain="0x0000" bus="0x01" slot="0x0b" function="0x2"/> </source> </interface> libvirtd will crash when accessing net->model. Signed-off-by: NWang Yechao <wang.yechao255@zte.com.cn> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
- 08 11月, 2018 2 次提交
-
-
由 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>
-
由 Jiri Denemark 提交于
Since commit v4.7.0-302-ge6d77a75 processing RESUME event is mandatory for updating domain state. But the event handler explicitly ignored this event in some cases. Thus the state would be wrong after a fake reboot or when a domain was rebooted after it crashed. BTW, the code to ignore RESUME event after SHUTDOWN didn't make sense even before making RESUME event mandatory. Most likely it was there as a result of careless copy&paste from qemuProcessHandleStop. The corresponding debug message was clarified since the original state does not have to be "paused" only and while we have a "resumed" event, the state is called "running". https://bugzilla.redhat.com/show_bug.cgi?id=1612943Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 07 11月, 2018 2 次提交
-
-
由 John Ferlan 提交于
The current qemuProcessReconnect logic paints a broad brush determining that the shutdown reason must be crashed if it was determined that the domain was started with -no-shutdown; however, there's many other ways to get to the error label, so let's narrow our reasoning window for using VIR_DOMAIN_SHUTOFF_CRASHED to the period where we essentially know we've tried to create to the monitor and before we were successful in opening the connection. Failures that occur outside that window would thus be considered as VIR_DOMAIN_SHUTOFF_UNKNOWN, at least for now. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 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>
-
- 06 11月, 2018 2 次提交
-
-
由 Ján Tomko 提交于
Make it avaiable to other chardev types. Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Ján Tomko 提交于
Remove repetition of the 'socket' device and its alias. Signed-off-by: NJán Tomko <jtomko@redhat.com>
-