- 31 1月, 2018 20 次提交
-
-
由 Daniel P. Berrange 提交于
Add a virtlockd-admin-sock can serves the admin protocol for the virtlockd daemon and define a virtlockd:///{system,session} URI scheme for connecting to it. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Add a virtlogd-admin-sock can serves the admin protocol for the virtlogd daemon and define a virtlogd:///{system,session} URI scheme for connecting to it. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
With the current code it is neccessary to call virNetDaemonNewPostExecRestart() and then for each server that needs restarting you are supposed to call virNetDaemonAddSeverPostExecRestart() This is fine if there's only ever one server, but as soon as you have two servers it is impossible to use this design. The code has no idea which servers were recorded in the JSON state doc, nor in which order the hash table serialized its keys. So this patch changes things so that we only call virNetDaemonNewPostExecRestart() passing in a callback, which is invoked once for each server found int he JSON state doc. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
It is not possible to blindly call virNetDaemonGetServer() because in a post-exec restart scenario, some servers may not exist and this method will pollute the error logs. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The server name and client data callbacks need to be non-NULL or the system will crash at various times. This is particularly bad when some of the crashes only occur post-exec restart. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The virNetServer class is passing a pointer to itself to the virNetServerClient as a 'void *' pointer. This is presumably due to fact that the virnetserverclient.h file doesn't see the virNetServerPtr typedef. The typedef is easily movable though, which lets us get typesafe parameter passing, removing the confusion of passing two distinct 'void *' pointers to one method. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
When receiving multiple socket FDs from systemd, it is critical to know what socket address each corresponds to so we can setup the right protocols on each. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
We don't have any per-client private data we need to persist, but the RPC infrastructure requires that we provide the callbacks and serialize an empty JSON object. This makes us future proof going forwards. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The admin server functionality is a generic concept that should be wired up into all libvirt daemons, but is currently integrated with the libvirtd code. Move it all into the src/admin directory to prepare for broader reuse. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Martin Kletzander 提交于
During reconnect we need to reconstruct the paths of all cachetunes so that they get cleaned up when the domain is stopped. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
We can use this from more places later, so just a future code de-duplication. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
The virresctrl will use this as well and we need to have that info after restart to properly clean up /sys/fs/resctrl. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Due to confusing naming the pointer to the mask got copied which must not happen, so use UpdateMask instead of SetMask. That also means we can get completely rid of SetMask. Also don't clear the free bits since it is not used again (leftover from previous versions). Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Introduce virResctrlAllocCopyMasks() and use that to initially copy the default group schemata to the allocation before reserving any parts of the cache. The reason for this is that when new group is created the schemata will have unknown data in it. If there was previously group with the same CLoS ID, it will have the previous valies, if not it will have all bits set. And we need to set all unspecified (in the XML) allocations to the same one as the default group. Some non-Linux functions now need to be made public due to this change. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1289368Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Peter Krempa 提交于
While the QEMU QAPI schema describes 'lun' as a number, the code dealing with JSON strings does not strictly adhere to this schema and thus formats the number back as a string. Use the new helper to retrieve both possibilities. Note that the formatting code is okay and qemu will accept it as an int. Tweak also one of the test strings to verify that both formats work with libvirt. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1540290
-
由 Peter Krempa 提交于
The helper is useful in cases when the JSON we have to parse may contain one of the two due to historical reasons and the number value itself would be stored as a string.
-
由 Andrea Bolognani 提交于
The <capabilities> feature has an attribute named 'policy', but the error message mentioned the non-existing 'state' attribute instead. Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
- 30 1月, 2018 8 次提交
-
-
由 Peter Krempa 提交于
Commit 000e9504 tried to fix improper bracketing when refreshing disk volume stats for a backing volume. Unfortunately the condition is still wrong as in cases as the backing store being inaccessible storageBackendUpdateVolTargetInfo returns -2 if instructed to ignore errors. The condition does not take this into account. Dumping XML of a volume which has inacessible backing store would then result into: # virsh vol-dumpxml http.img --pool default error: An error occurred, but the cause is unknown Properly ignore -2 for backing volumes. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1540022
-
由 Martin Kletzander 提交于
We are skipping non-directories under /sys/fs/resctrl/(info/) since those are not interesting for us. However in tests it can sometimes happen that ent->d_type is 0 instead of 4 (DT_DIR) for directories. I've seen it fail on two machines. Different machines, different systems, I cannot reproduce it even using the same setup. So one of the ways how to work around this is call stat() on it. The other one is not checking if it is a directory since we'll find out eventually when we want to read some files underneath it. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
This wil be used in the future, but it makes sense for now as well. It makes sure there is no mask leftover that would leak. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Pointed out during review on one or two places, but it actually appears in lot more places. So let's be consistent. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
When working on the CAT series one of the changes was that the pointer got allocated in another part of the code, even when resctrl was not available on the host system. However this one particular place neglected that so it needs to be fixed in order to get the proper error message when requesting <cachetune/> on HW with no support for it. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Erik Skultety 提交于
Commits f83c7c88 and 6eb1f2b9 broke the build on FreeBSD and OSX because of symbols being undefined for those platforms. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 John Ferlan 提交于
After processing the processEvent->data for a qemuProcessEventHandler callout, it's expected that the called processEvent->eventType helper will perform the proper free on the data field. In this case it's a qemuMonitorEventPanicInfoPtr.
-
- 29 1月, 2018 12 次提交
-
-
由 Erik Skultety 提交于
Just like SRIOV, a PCI device is only capable of the mediated devices framework when it's bound to the vendor native driver, thus if a driver change occurs, e.g. vendor_native->vfio, we need to refresh some of the device's capabilities to reflect the reality, mdev included. Signed-off-by: NErik Skultety <eskultet@redhat.com> Suggested-by: NWu Zongyong <cordius.wu@huawei.com> Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Erik Skultety 提交于
Now that we have all the building blocks in place, switch the nodedev driver to use the "new" virMediatedDeviceType type instead of the "old" virNodeDevCapMdevType one. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Erik Skultety 提交于
These are not necessary anymore, since these are going to be shadowed by the helpers provided by util/virmdev.c module. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Erik Skultety 提交于
This is a replacement for the existing udevPCIGetMdevTypesCap which is static to the udev backend. This simple helper constructs the sysfs path from the device's base path for each mdev type and queries the corresponding attributes of that type. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Erik Skultety 提交于
This should serve as a replacement for the existing udevFillMdevType which is responsible for fetching the device type's attributes from the sysfs interface. The problem with the existing solution is that it's tied to the udev backend. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Erik Skultety 提交于
This is later going to replace the existing virNodeDevCapMdevType, since: 1) it's going to couple related stuff in a single module 2) util is supposed to contain helpers that are widely accessible across the whole repository. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Erik Skultety 提交于
There were some leftovers from early development which never got used. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Erik Skultety 提交于
Most of them are static, however in case of PCI and SCSI_HOST devices, the nested capabilities can change dynamically, e.g. due to a driver change (from host_pci_driver -> vfio_pci). Signed-off-by: NErik Skultety <eskultet@redhat.com> Suggested-by: NWu Zongyong <cordius.wu@huawei.com>
-
由 Erik Skultety 提交于
Whether asking for a number of capabilities supported by a device or listing them, it's handled essentially by a copy-paste code, so extract the common stuff into this new helper which also updates all capabilities just before touching them. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Erik Skultety 提交于
Since we moved the helpers from nodedev driver to src/conf, the actual 'update' function using those helpers should be moved as well so that we don't need to call back into the driver. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Erik Skultety 提交于
The capabilities are defined/parsed/formatted/queried from this module, no reason for 'update' not being part of the module as well. This also involves some module-specific prefix changes. This patch also drops the node_device_linux_sysfs module from the repo since: a) it only contained the capability handlers we just moved b) it's only linked with the driver (by design) and thus unreachable to other modules c) we touch sysfs across all the src/util modules so the module being deleted hasn't been serving its original intention for some time already. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Erik Skultety 提交于
We can call directly the virNodeDeviceGetSCSIHostCaps helper instead. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-