- 14 8月, 2017 2 次提交
-
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Martin Kletzander 提交于
It doesn't access anything from conf/ and ti will be needed to use from other util/ places. This split makes the separation clearer. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 12 8月, 2017 1 次提交
-
-
由 Laine Stump 提交于
On Linux each network device *can* (but not necessarily *does*) have an attribute called phys_port_id which can be read from the file of that name in the netdev's sysfs directory. The examples I've seen have been a many-digit hexadecimal number (as an ASCII string). This value can be useful when a single PCI device is associated with multiple netdevs (e.g a dual port Mellanox SR-IOV NIC - this card has a single PCI Physical Function (PF), and that PF has two netdevs associated with it (the "net" subdirectory of the PF in sysfs has two links rather than the usual single link to a netdev directory). Each of the PF netdevs has a different phys_port_id. The Virtual Functions (VF) are similar - the PF (a PCI device) has "n" VFs (also each of these is a PCI device), each VF has two netdevs, and each of the VF netdevs points back to the VF PCI device (with the "device" entry in its sysfs directory) as well as having a phys_port_id matching the PF netdev it is associated with. virNetDevGetPhysPortID() simply attempts to read the phys_port_id for the given netdev and return it to the caller. If this particular netdev driver doesn't support phys_port_id, it returns NULL (*not* a NULL-terminated string, but a NULL pointer) but still counts it as a success.
-
- 08 8月, 2017 1 次提交
-
-
由 Ján Tomko 提交于
Rewrite virConfReadMem to take a null-terminated string. All the callers were calling strlen on it anyway.
-
- 03 8月, 2017 1 次提交
-
-
由 Peter Krempa 提交于
Export the function from the util module so that dynamic linking can override it.
-
- 02 8月, 2017 1 次提交
-
-
由 Michal Privoznik 提交于
These functions were made exportable back in 3aa3e072 when I was splitting network code into parsing and list management parts. Since then the split is finished now and these two functions do not need to be exported anymore. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 27 7月, 2017 1 次提交
-
-
由 Peter Krempa 提交于
Split out the worker loop into a separate function and export it. Reviewed-by: NEric Blake <eblake@redhat.com>
-
- 26 7月, 2017 1 次提交
-
-
由 Pavel Hrdina 提交于
The new virFileCache will nicely handle the caching logic for any data that we would like to cache. For each type of data we will just need to implement few handlers that will take care of creating, validating, loading and saving the cached data. The cached data must be an instance of virObject. Currently we cache QEMU capabilities which will start using virFileCache. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
- 25 7月, 2017 3 次提交
-
-
由 Martin Kletzander 提交于
It is more related to a domain as we might use it even when there is no systemd and it does not use any dbus/systemd functions. In order not to use code from conf/ in util/ pass machineName in cgroups code as a parameter. That also fixes a leak of machineName in the lxc driver and cleans up and de-duplicates some code. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Michal Privoznik 提交于
This reverts commit 328bd244. As it turns out, this is not portable and very Linux & glibc specific. Worse, this may lead to not starving writers on Linux but everywhere else. Revert this and if the starvation occurs resolve it. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Andrea Bolognani 提交于
The original name didn't hint at the fact that PHBs are a pSeries-specific concept. Suggested-by: NPeter Krempa <pkrempa@redhat.com> Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
- 24 7月, 2017 3 次提交
-
-
由 Michal Privoznik 提交于
Up until now we only had virObjectLockable which uses mutexes for mutually excluding each other in critical section. Well, this is not enough. Future work will require RW locks so we might as well have virObjectRWLockable which is introduced here. Moreover, polymorphism is introduced to our code for the first time. Yay! More specifically, virObjectLock will grab a write lock, virObjectLockRead will grab a read lock then (what a surprise right?). This has great advantage that an object can be made derived from virObjectRWLockable in a single line and still continue functioning properly (mutexes can be viewed as grabbing write locks only). Then just those critical sections that can grab a read lock need fixing. Therefore the resulting change is going to be way smaller. In order to avoid writer starvation, the object initializes RW lock that prefers writers. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Michal Privoznik 提交于
We already have virRWLockInit. But this uses pthread defaults which prefer reader to initialize the RW lock. This may lead to writer starvation. Therefore we need to have the counterpart that prefers writers. Now, according to the pthread_rwlockattr_setkind_np() man page setting PTHREAD_RWLOCK_PREFER_WRITER_NP attribute is no-op. Therefore we need to use PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP attribute. So much for good enum value names. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Peter Krempa 提交于
Move it to virstring.c and improve it to parse and validate ports. New name is virStringParsePort.
-
- 21 7月, 2017 2 次提交
-
-
由 Andrea Bolognani 提交于
The virDomainDeviceInfo struct is defined in device_conf, so generic functions that operate on it should also be defined there rather than in domain_conf. Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Andrea Bolognani 提交于
All other virDomain*Def follow this naming convention for their allocation function. Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
- 20 7月, 2017 2 次提交
-
-
由 Peter Krempa 提交于
Since virBitmapSubtract is unused modify it to perform bitmap intersection.
-
由 Antoine Millet 提交于
A new function virNetDevOpenvswitchUpdateVlan has been created to instruct OVS of the changes. qemuDomainChangeNet has been modified to handle the update of the VLAN configuration for a running guest and rely on virNetDevOpenvswitchUpdateVlan to do the actual update if needed. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 17 7月, 2017 6 次提交
-
-
由 John Ferlan 提交于
Now that we have a bit more control, let's convert our object into a lockable object and let that magic handle the create and lock/unlock. This also involves creating a virNodeDeviceEndAPI in order to handle the object cleanup for API's that use the Add or Find API's in order to get a locked/reffed object. The EndAPI will unlock and unref the object returning NULL to indicate to the caller to not use the obj. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
In an overall effort to privatize access to virNodeDeviceObj and virNodeDeviceObjList into the virnodedeviceobj module, move the object list parsing from node_device_driver and replace with a call to a virnodedeviceobj helper. This follows other similar APIs/helpers which peruse the object list looking for some specific data in order to get/return an @device (virNodeDevice) object to the caller. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
We're about to move the call to nodeDeviceSysfsGetSCSIHostCaps from node_device_driver into virnodedeviceobj, so move the guts of the code from the driver specific node_device_linux_sysfs into its own API since virnodedeviceobj cannot callback into the driver. Nothing in the code deals with sysfs anyway, as that's hidden by the various virSCSIHost* and virVHBA* utility function calls. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Ensure that any function that walks the node device object list is prefixed by virNodeDeviceObjList. Also, modify the @filter param name for virNodeDeviceObjListExport to be @aclfilter. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
In preparation to make things private, make the ->devs be pointers to a virNodeDeviceObjList and then manage everything inside virnodedeviceobj Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Rather than passing the object to be removed by reference, pass by value and then let the caller decide whether or not the object should be free'd and how to handle the logic afterwards. This includes free'ing the object and/or setting the local variable to NULL to prevent subsequent unexpected usage (via something like virNodeDeviceObjRemove in testNodeDeviceDestroy). For now this function will just handle the remove of the object from the list for which it was placed during virNodeDeviceObjAssignDef. This essentially reverts logic from commit id '61148074' that free'd the device entry on list, set *dev = NULL and returned. Thus fixing a bug in node_device_hal.c/dev_refresh() which would never call dev_create(udi) since @dev would have been set to NULL. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 16 7月, 2017 1 次提交
-
-
由 John Ferlan 提交于
Create a common API to handle the instantiation path filter lookup. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 15 7月, 2017 4 次提交
-
-
由 Andrea Bolognani 提交于
pSeries guests will soon need the new information; luckily, we can figure it out automatically most of the time, so users won't have to worry about it. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NLaine Stump <laine@laine.org>
-
由 Andrea Bolognani 提交于
There are no external users. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NLaine Stump <laine@laine.org>
-
由 Andrea Bolognani 提交于
There are no external users. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NLaine Stump <laine@laine.org>
-
由 Andrea Bolognani 提交于
This function was private to the QEMU driver and was, accordingly, called qemuDomainPCIBusFullyReserved(). However the function is really not QEMU-specific at all, so it makes sense to move it closer to the virDomainPCIAddressBus struct it operates on. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NLaine Stump <laine@laine.org>
-
- 14 7月, 2017 2 次提交
-
-
由 Peter Krempa 提交于
Fill them in right away rather than having to figure out at runtime whether they are necessary or not. virStorageSourceNetworkDefaultPort does not need to be exported any more.
-
由 Peter Krempa 提交于
Make the stuff hardcoded in qemu a global helper so that other parts of the code can determine the default port too.
-
- 11 7月, 2017 3 次提交
-
-
由 Michal Privoznik 提交于
It comes very handy to have source path for chardevs. We already have such function: virDomainAuditChardevPath() but it's static and has name not suitable for exposing. Moreover, while exposing it change its name slightly to virDomainChrSourceDefGetPath. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Peter Krempa 提交于
The code will become more universal so it makes more sense for it to live with the rest of the JSON functions.
-
由 Peter Krempa 提交于
Allows testing whether a virJSONValue is an object.
-
- 27 6月, 2017 1 次提交
-
-
由 Roman Bogorodskiy 提交于
Add support for vgaconf driver configuration. In domain xml it looks like this: <video> <driver vgaconf='io|on|off'> <model .../> </video> It was added with bhyve gop video in mind to allow users control how the video device is exposed to the guest, specifically, how VGA I/O is handled. One can refer to the bhyve manual page to get more detailed description of the possible VGA configuration options: https://www.freebsd.org/cgi/man.cgi?query=bhyve&manpath=FreeBSD+12-current The relevant part could be found using the 'vgaconf' keyword. Also, add some tests for this new feature. Signed-off-by: NRoman Bogorodskiy <bogorodskiy@gmail.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 20 6月, 2017 1 次提交
-
-
由 Peter Krempa 提交于
-
- 12 6月, 2017 1 次提交
-
-
由 Pavel Hrdina 提交于
This reverts commit 22b02f44. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
- 07 6月, 2017 3 次提交
-
-
由 Jiri Denemark 提交于
When starting a domain we update the guest CPU definition to match what QEMU actually provided (since it is allowed to add or removed some features unless check='full' is specified). Let's store the original CPU in domain private data so that we can use it to provide a backward compatible domain XML. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Jiri Denemark 提交于
virDomainXMLOption gains driver specific callbacks for parsing and formatting save cookies. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Jiri Denemark 提交于
The code will be used by snapshots and domain save/restore code to store additional data for a saved running domain. It is analogous to migration cookies, but simple and one way only. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-