You need to sign in or sign up before continuing.
- 26 8月, 2019 6 次提交
-
-
由 Peter Krempa 提交于
virStorageSourceParseBackingURI will report special return values in some cases. Preserve it in virStorageSourceParseBackingJSONUriStr. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Return the storage source definition via a pointer in the arguments and document the returned values. This will simplify the possibility to ignore certain backing store types which are not representable by libvirt. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Automatically free the 'root' temporary variable to get rid of some complexity. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Automatically clean the 'uri' variable and get rid of the 'cleanup' label. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
There is no cleanup code. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Automatically free the intermediate JSON data to get rid of the cleanup section. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 23 8月, 2019 6 次提交
-
-
由 Michal Privoznik 提交于
After my previous patches we have virPCIDeviceBindToStub() and virPCIDeviceUnbindFromStub() which really do nothing but call virPCIDeviceBindToStubWithOverride() and virPCIDeviceUnbindFromStubWithOverride() respectively. Drop "WithOverride" from the names and drop the thin wrappers. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
As stated in 84f9358b all kernels that we are interested in have 'drivers_override'. Drop the other, older style of overriding PCI device driver - newid. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Tested-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
由 Michal Privoznik 提交于
This function is no longer used after previous commit. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Tested-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
由 Michal Privoznik 提交于
Now that no one uses KVM style of PCI assignment we can safely remove 'pci-stub' backend. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Tested-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
由 Michal Privoznik 提交于
The KVM assignment is going to be removed shortly. Don't let the hostdev module configure it. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Tested-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
由 Michal Privoznik 提交于
There are two places where we need to create virPCIDevice from given virDomainHostdevDef. In both places the code is duplicated. Move them into a single function and call it from those two places. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Tested-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
- 22 8月, 2019 2 次提交
-
-
由 Michal Privoznik 提交于
This module contains function to get host boot time. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Michal Privoznik 提交于
The function takes raw UUID and formats it into string representation. However, the comment mistakenly states that the expected size of raw UUID buffer is VIR_UUID_RAW_LEN bytes. We don't have such constant since v0.3.2~24. It should have been VIR_UUID_BUFLEN. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
- 21 8月, 2019 5 次提交
-
-
由 Ján Tomko 提交于
Store the namespace URI as const char*, instead of in a function. Suggested-by: NJiri Denemark <jdenemar@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
A wrapper around xmlXPathRegisterNs that will save us from having to include xpathInternals.h everywhere we want to use a custom namespace and open-coding the strings already contained in virXMLNamespace. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
A function to automatically format the xmlns:<prefix>='<uri>' attribute for per-driver namespaces. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
We have hardcoded the namespace prefix in various places: 1) the xmlns string stored in the 'href' function 2) the xmlXPathRegisterNs call in each parser 3) all the parsing and formatting code actually dealing with these elements While eliminating the third one is probably a job for an actual XML-aware formatter, let's store the prefix separately here in the virXMLNamespace structure so that future patches can get rid of the first two bullets. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Ján Tomko 提交于
For various XMLs, we allow a custom namespace for passing unsupported configurations. Introduce a single structure to hold all the driver-specific functions to remove duplication. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
- 20 8月, 2019 2 次提交
-
-
由 Pavel Hrdina 提交于
If the first value in cpu.max is "max" return from function. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1741837Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Pavel Hrdina 提交于
Our virStrToLong* helpers converts string to integers where it wraps strtol standard function. After the conversion happens and there are some remaining invalid characters our helpers will fail if the second argument is NULL. We need to pass pointer to string in cases where there are multiple values in a single file. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1741825Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
- 17 8月, 2019 2 次提交
-
-
由 Michal Privoznik 提交于
The virHostdevPreparePCIDevices() function works in several steps. In the very first one, it checks if devices we want to detach from the host are not taken already by some other domain. However, this piece of code returns different results depending on the stub driver used (which is not wrong per se, but keep on reading). If the stub driver is KVM then virHostdevIsPCINodeDeviceUsed() is called which basically checks if a PCI device from the detach list is not used by any domain (including the one we are preparing the device for). If that is the case, an error is reported ("device in use") and -1 is returned. However, that is not what happens if the stub driver is VFIO. If the stub driver is VFIO, then we iterate over all PCI devices from the same IOMMU group and check if they are taken by some other domain (because a PCI device, well IOMMU group, can't be shared between two or more qemu processes). But we fail to check, if the device we are trying to detach from the host is not already taken by a domain. That is, calling virHostdevPreparePCIDevices() over a hostdev device twice succeeds the first time and fails too late in the second run (fortunately, virHostdevResetAllPCIDevices() will throw an error, but this is already too late because the PCI device in question was moved to the list of inactive PCI devices and now it appears in both lists). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Tested-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
由 Michal Privoznik 提交于
It may happen that there are two domains with the same name in two separate drivers (e.g. qemu and lxc). That is why for PCI devices we track both names of driver and domain combination which has taken the device. However, when we check if given PCI device is in use (or PCI devices from the same IOMMU group) we compare only domain name. This means that we can mistakenly claim device as free to use while in fact it isn't. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Tested-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
- 16 8月, 2019 4 次提交
-
-
由 Peter Krempa 提交于
virStorageSourceUpdatePhysicalSize is called only from qemuDomainStorageUpdatePhysical and all callers of it reset the libvirt error if -1 is returned. Don't bother setting the error in the first place. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
The function will be reused in the qemu snapshot code. The argument is turned into const similarly to the other virStorageFileSupports* functions. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
If the nbd export name contains a colon, our parser would not parse it properly as we split the string by colons. Modify the code to look up the exportname and copy any trailing characters as the export name is supposed to be at the end of the string. https://bugzilla.redhat.com/show_bug.cgi?id=1733044Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 hexin 提交于
The parent bridge configuration of the current device should be read and reset, instead of reading the current device configuration. Signed-off-by: NHe Xin <hexin15@baidu.com> Signed-off-by: NLiu Qi <liuqi16@baidu.com> Signed-off-by: NZhang Yu <zhangyu31@baidu.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 15 8月, 2019 2 次提交
-
-
由 Peter Krempa 提交于
Add virStorageFileSupportsCreate which allows silent check whether virStorageFileCreate is implemented. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Modify the return value so that callers don't have to repeat logic. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 14 8月, 2019 11 次提交
-
-
由 Ján Tomko 提交于
All the callers left require virPCIDeviceConfigOpen to be fatal and only use read-only access to the config file. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
For callers that only need read-only access and don't want an error reported. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
Allow wrappers to open PCI config as read-only. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
Only a handful of function need write access to the PCI config space. Create a wrapper function for those so that we can open it read only by default. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
A thin wrapper to allow creating new functions. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
As a side effect, this also silences the possible: internal error: Unable to get DBus system bus connection: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory error, since we check upfront whether dbus is available. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
Similar to how we cache the availability of machined. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
Split it out from virSystemdPMSupportTarget. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
Look up the binary name upfront to avoid the error: Cannot find 'pm-is-supported' in path: No such file or directory In that case, we just assume nodesuspend is not available. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Ján Tomko 提交于
Use a 'binary' variable to hold it. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Ján Tomko 提交于
Get rid of the ret variable as well as the cleanup label. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-