- 27 3月, 2017 31 次提交
-
-
由 Martin Kletzander 提交于
Don't leak guest if adding it to virCapabilities fails. Also return NULL and not pointer to free'd object with zero references in such case. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Guests are handled in callers, but if something goes wrong (when it cannot be added to virCapabilities, for example), there's no way for them to free it properly. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Both QEMU and bhyve are using the same function for setting up the CPU in virCapabilities, so de-duplicate it, save code and time, and help other drivers adopt it. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
STREQ_NULLABLE returns true if both parameters are NULL. And that's not what we want here. We just want to skop comparing source nodes that don't have that info set. The function wouldn't make much sense with nodeName == NULL, so we don't need to check that. Moreover, the function's declaration uses ATTRIBUDE_NONNULL for nodeName, which not only means that function expects the parameter not to be NULL, but actually tells the compiler that it can optimize out the NULL checks. That way it could end up calling strcmp on NULL (either nodeformat or nodebacking). GCC figures this out if libvirt is compiled with lv_cv_static_analysis=yes, unfortunately not everyone uses that. Caused by cbc6d535. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Peter Krempa 提交于
Management tools may want to check whether the threshold is still set if they missed an event. Add the data to the bulk stats API where they can also query the current backing size at the same time.
-
由 Peter Krempa 提交于
To allow updating stats based on the node name, add a helper function that will fetch the required data from 'query-named-block-nodes' and return it in hash table for easy lookup.
-
由 Peter Krempa 提交于
Move the helper that frees JSON entries put into hash tables into the JSON module so that it does not have to be reimplemented.
-
由 Peter Krempa 提交于
Detect the node names when setting block threshold and when reconnecting or when they are cleared when a block job finishes. This operation will become a no-op once we fully support node names.
-
由 Peter Krempa 提交于
To allow matching the node names gathered via 'query-named-block-nodes' we need to query and then use the top level nodes from 'query-block'. Add the data to the structure returned by qemuMonitorGetBlockInfo.
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
oVirt uses relative names with directories in them. Test such configuration. Also tests a snapshot done with _REUSE_EXTERNAL and a relative backing file pre-specified in the qcow2 metadata.
-
由 Peter Krempa 提交于
Since we have to match the images by filename a common backing image will break the detection process. Add a test case to see that the code correctly did not continue the detection process.
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
The code is rather magic so a test case will help making sure that everything works well. The first case is a simple backing chain.
-
由 Peter Krempa 提交于
qemu for some time already sets node names automatically for the block nodes. This patch adds code that attempts a best-effort detection of the node names for the backing chain from the output of 'query-named-block-nodes'. The only drawback is that the data provided by qemu needs to be matched by the filename as seen by qemu and thus if two disks share a single backing store file the detection won't work. This will allow us to use qemu commands such as 'block-set-write-threshold' which only accepts node names. In this patch only the detection code is added, it will be used later.
-
由 Peter Krempa 提交于
Add monitor tooling for calling query-named-block-nodes. The monitor returns the data as the raw JSON array that is returned from the monitor. Unfortunately the logic to extract the node names for a complete backing chain will be so complex that I won't be able to extract any meaningful subset of the data in the monitor code.
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
Add code to call the appropriate monitor command and code to lookup the given disk backing chain member.
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
Add a simple wrapper which will allow to set the threshold for delivering the event.
-
由 Peter Krempa 提交于
The new API can be used to configure the threshold when VIR_DOMAIN_EVENT_ID_BLOCK_THRESHOLD should be fired.
-
由 Peter Krempa 提交于
Bind it to qemu's BLOCK_WRITE_THRESHOLD event. Look up the disk by nodename and construct the string to return.
-
由 Peter Krempa 提交于
The code is currently simple, but if we later add node names, it will be necessary to generate the names based on the node name. Add a helper so that there's a central point to fix once we add self-generated node names.
-
由 Peter Krempa 提交于
Looks up a disk and its corresponding backing chain element by node name.
-
由 Peter Krempa 提交于
The event is fired when a given block backend node (identified by the node name) experiences a write beyond the bound set via block-set-write-threshold QMP command. This wires up the monitor code to extract the data and allow us receiving the events and the capability.
-
由 Peter Krempa 提交于
When using thin provisioning, management tools need to resize the disk in certain cases. To avoid having them to poll disk usage introduce an event which will be fired when a given offset of the storage is written by the hypervisor. Together with the API which will be added later, it will allow registering thresholds for given storage backing volumes and this event will then notify management if the threshold is exceeded.
-
由 Peter Krempa 提交于
'nodeformat' should be used for strings which describe the storage format object, and 'nodebacking' for the actual storage object itself.
-
由 Peter Krempa 提交于
The function has very specific semantics. Split out the part that parses the backing store specification string into a separate helper so that it can be reused later while keeping the wrapper with existing semantics. Note that virStorageFileParseChainIndex is pretty well covered by the test suite.
-
由 Peter Krempa 提交于
It will be useful to set indentation level to 0 after formatting a nested structure rather than having to track the depth.
-
由 Peter Krempa 提交于
Our code calls it when starting or re-starting the domain or when hotplugging the disk so there's nothing to be detected.
-
- 26 3月, 2017 6 次提交
-
-
由 Roman Bogorodskiy 提交于
Along with video and VNC support, bhyve has introduced USB tablet support as an input device. This tablet is exposed to a guest as a device on an XHCI controller. At present, tablet is the only supported device on the XHCI controller in bhyve, so to make things simple, it's allowed to only have a single XHCI controller with a single tablet device. In detail, this commit: - Introduces a new capability bit for XHCI support in bhyve - Adds an XHCI controller and tabled support with 1:1 mapping between them - Adds a couple of unit tests
-
由 Roman Bogorodskiy 提交于
There are a number of functions in bhyve_capabilities.c that probe hypervisor capabilities by executing the bhyve(1) binary with the specific device arugment, checking error message (if any) and setting proper capability bit. As those are extremely similar, move this logic into a helper function and convert existing functions to use that.
-
由 Roman Bogorodskiy 提交于
* Extract filling bhyve capabilities from virBhyveDomainCapsBuild() into a new function virBhyveDomainCapsFill() to make testing easier by not having to mock firmware directory listing and hypervisor capabilities probing * Also, just presence of the firmware files is not sufficient to enable os.loader.supported, hypervisor should support UEFI boot too * Add tests to domaincapstest for the main caps possible flows: - when UEFI bootrom is supported - when video (fbus) is supported - neither of above is supported
-
由 Roman Bogorodskiy 提交于
Commit df769041 made the 'machine' element in domaincaps optional. Update the schema to reflect that.
-
由 Roman Bogorodskiy 提交于
qemuMigrationResetTLS() does not initialize 'ret' by default, so when it jumps to 'cleanup' on error, the 'ret' variable will be uninitialized, which clang complains about. Set it to '-1' by default.
-
由 Roman Bogorodskiy 提交于
virPCIGetDeviceAddressFromSysfsLink() should return virPCIDeviceAddressPtr, so return NULL in the stub instead of "-1".
-
- 25 3月, 2017 3 次提交
-
-
由 John Ferlan 提交于
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1300769 If the migration flags indicate this migration will be using TLS, then while we have connection in the Begin phase check and setup the TLS environment that will be used by virMigrationRun during the Perform phase for the source to configure TLS. Processing adds an "-object tls-creds-x509,endpoint=client,..." and possibly an "-object secret,..." to handle the passphrase response. Then it sets the 'tls-creds' and possibly 'tls-hostname' migration parameters. The qemuMigrateCancel will clean up and reset the environment as it was originally found. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
If the migration flags indicate this migration will be using TLS, then set up the destination during the prepare phase once the target domain has been started to add the TLS objects to perform the migration. This will create at least an "-object tls-creds-x509,endpoint=server,..." for TLS credentials and potentially an "-object secret,..." to handle the passphrase response to access the TLS credentials. The alias/id used for the TLS objects will contain "libvirt_migrate". Once the objects are created, the code will set the "tls-creds" and "tls-hostname" migration parameters to signify usage of TLS. During the Finish phase we'll be sure to attempt to clear the migration parameters and delete those objects (whether or not they were created). We'll also perform the same reset during recovery if we've reached FINISH3. If the migration isn't using TLS, then be sure to check if the migration parameters exist and clear them if so.
-