- 19 11月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
On the domain startup, this function is called to dump some info about the CPUs. At the beginning of the function we check if we aren't running older qemu which is not exposing the CPUs via 'qom-list'. However, we are not checking for even older qemus, which throw 'CommandNotFound' error. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 13 11月, 2013 2 次提交
-
-
由 Peter Krempa 提交于
The QOM path in qemu that contains the CPUID registers of a running VM may not be present (introduced in QEMU 1.5). Since commit d94b7817 we have a regression with QEMU that don't support reporting of the CPUID register state via the monitor as the process startup code expects the path to exist. This patch adds code that checks with the monitor if the requested path already exists and uses it only in this case.
-
由 Peter Krempa 提交于
To allow returning more granular errors, change the error type to an integer.
-
- 08 11月, 2013 1 次提交
-
-
由 Jiri Denemark 提交于
The qemu monitor supports retrieval of actual CPUID bits presented to the guest using QMP monitor. Add APIs to extract these information and tests for them. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
- 15 10月, 2013 1 次提交
-
-
由 Eric Blake 提交于
'const fooPtr' is the same as 'foo * const' (the pointer won't change, but it's contents can). But in general, if an interface is trying to be const-correct, it should be using 'const foo *' (the pointer is to data that can't be changed). Fix up offenders in src/qemu. * src/qemu/qemu_bridge_filter.h (networkAllowMacOnPort) (networkDisallowMacOnPort): Use intended type. * src/qemu/qemu_bridge_filter.c (networkAllowMacOnPort) (networkDisallowMacOnPort): Likewise. * src/qemu/qemu_command.c (qemuBuildTPMBackendStr) (qemuBuildTPMDevStr, qemuBuildCpuArgStr) (qemuBuildObsoleteAccelArg, qemuBuildMachineArgStr) (qemuBuildSmpArgStr, qemuBuildNumaArgStr): Likewise. * src/qemu/qemu_conf.c (qemuSharedDeviceEntryCopy): Likewise. * src/qemu/qemu_driver.c (qemuDomainSaveImageStartVM): Likewise. * src/qemu/qemu_hostdev.c (qemuDomainHostdevNetConfigVirtPortProfile): Likewise. * src/qemu/qemu_monitor_json.c (qemuMonitorJSONAttachCharDevCommand): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 03 10月, 2013 2 次提交
-
-
由 Michal Privoznik 提交于
After successful @cmd construction the memory where @keys points to is part of @cmd. Avoid double freeing it.
-
由 Michal Privoznik 提交于
When querying for kvm, we try to find 'enabled' field. Hence the error message should report we haven't found 'enabled' and not 'running' (which is not even in the reply). Probably a typo or copy-paste error.
-
- 24 9月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Most callers of qemuParseKeywords were assigning its return value to a 'size_t' variable. Then then also checked '< 0' for error condition, but this will never be true with the unsigned size_t variable. Rather than using 'ssize_t', change qemuParseKeywords so that the element count is returned via an output parameter, leaving the return value solely as an error indicator. This avoids a crash accessing beyond the end of an error upon OOM. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 20 7月, 2013 1 次提交
-
-
由 Jiri Denemark 提交于
This API provides a NULL-terminated list of devices which are currently attached to a QEMU domain.
-
- 18 7月, 2013 1 次提交
-
-
由 Jiri Denemark 提交于
-
- 16 7月, 2013 5 次提交
-
-
由 John Ferlan 提交于
This patch will add the qemuMonitorJSONGetMemoryStats() to execute a "guest-stats" on the balloonpath using "get-qom" replacing the former mechanism which looked through the "query-ballon" returned data for the fields. The "query-balloon" code only returns 'actual' memory. Rather than duplicating the existing code, have the JSON API use the GetBalloonInfo API. A check in the qemuMonitorGetMemoryStats() will be made to ensure the balloon driver path has been set. Since the underlying JSON code can return data not associated with the balloon driver, we don't fail on a failure to get the balloonpath. Of course since we've made the check, we can then set the ballooninit flag. Getting the path here is primarily due to the process reconnect path which doesn't attempt to set the collection period.
-
由 John Ferlan 提交于
At vm startup and attach attempt to set the balloon driver statistics collection period based on the value found in the domain xml file. This is not done at reconnect since it's possible that a collection period was set on the live guest and making the set period call would reset to whatever value is stored in the config file. Setting the stats collection period has a side effect of searching through the qom-list output for the virtio balloon driver and making sure that it has the right properties in order to allow setting of a collection period and eventually fetching of statistics. The walk through the qom-list is expensive and thus the balloonpath will be saved in the monitor private structure as well as a flag indicating that the initialization has already been attempted (in the event that a path is not found, no sense to keep checking). This processing model conforms to the qom object model model which requires setting object properties after device startup. That is, it's not possible to pass the period along via the startup code as it won't be recognized.
-
由 John Ferlan 提交于
Add a new qemuMonitorJSONSetObjectProperty() method to support invocation of the 'qom-set' JSON monitor command with a provided path, property, and expected data type to set. NOTE: The set API was added only for the purpose of the qemumonitorjsontest The test code uses the same "/machine/i440fx" property as the get test and attempts to set the "realized" property to "true" (which it should be set at anyway).
-
由 John Ferlan 提交于
Add a new qemuMonitorJSONGetObjectProperty() method to support invocation of the 'qom-get' JSON monitor command with a provided path, property, and expected data type return. The qemuMonitorJSONObjectProperty is similar to virTypedParameter; however, a future patch will extend it a bit to include a void pointer to balloon driver statistic data. NOTE: The ObjectProperty structures and API are added only for the purpose of the qemumonitorjsontest The provided test will execute a qom-get on "/machine/i440fx" which will return a property "realized".
-
由 John Ferlan 提交于
Add a new qemuMonitorJSONGetObjectListPaths() method to support invocation of the 'qom-list' JSON monitor command with a provided path. NOTE: The ListPath structures and API's are added only for the purpose of the qemumonitorjsontest The returned list of paired data fields of "name" and "type" that can be used to peruse QOM configuration data and eventually utilize for the balloon statistics. The test does a "{"execute":"qom-list", "arguments": { "path": "/"}}" which returns "{"return": [{"name": "machine", "type": "child<container>"}, {"name": "type", "type": "string"}]}" resulting in a return of an array of 2 elements with [0].name="machine", [0].type="child<container>". The [1] entry appears to be a header that could be used some day via a command such as "virsh qemuobject --list" to format output.
-
- 12 7月, 2013 3 次提交
-
-
由 Michal Privoznik 提交于
This function wraps 'chardev-remove' qemu monitor command around. It takes chardev alias as its single argument besides qemu monitor pointer.
-
由 Michal Privoznik 提交于
The function being introduced is responsible for preparing and executing 'chardev-add' qemu monitor command. Moreover, in case of PTY chardev, the corresponding pty path is updated.
-
由 Michal Privoznik 提交于
Currently, we are building InetSocketAddress qemu json type within the qemuMonitorJSONNBDServerStart function. However, other future functions may profit from the code as well. So it should be moved into a static function.
-
- 11 7月, 2013 1 次提交
-
-
由 Daniel P. Berrange 提交于
Convert the type of loop iterators named 'i', 'j', k', 'ii', 'jj', 'kk', to be 'size_t' instead of 'int' or 'unsigned int', also santizing 'ii', 'jj', 'kk' to use the normal 'i', 'j', 'k' naming Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 10 7月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
-
- 03 7月, 2013 1 次提交
-
-
由 Chen Fan 提交于
Add monitor callback API domainGuestPanic, that implements 'destroy', 'restart' and 'preserve' events of the 'on_crash' in the XML when domain crashed.
-
- 01 7月, 2013 1 次提交
-
-
由 Michal Novotny 提交于
Implement check whether (maximum) vCPUs doesn't exceed machine type's cpu-max settings. On older versions of QEMU the check is disabled. Signed-off-by: NMichal Novotny <minovotn@redhat.com>
-
- 07 6月, 2013 2 次提交
-
-
由 Peter Krempa 提交于
This patch implements support for the "cpu-add" QMP command that plugs CPUs into a live guest. The "cpu-add" command was introduced in QEMU 1.5. For the hotplug to work machine type "pc-i440fx-1.5" is required.
-
由 Peter Krempa 提交于
The 'online' parameter has only two possible values. Use a bool for it.
-
- 06 6月, 2013 1 次提交
-
-
由 Ján Tomko 提交于
Found with 'git grep "= 1"'.
-
- 23 5月, 2013 1 次提交
-
-
由 Michal Privoznik 提交于
-
- 21 5月, 2013 1 次提交
-
-
由 Osier Yang 提交于
-
- 14 5月, 2013 3 次提交
-
-
由 Eric Blake 提交于
Commit bd56d0d8 could lead to freeing an uninitialized pointer: qemu/qemu_monitor_json.c: In function 'qemuMonitorJSONGetCommandLineOptionParameters': qemu/qemu_monitor_json.c:4284: warning: 'cmd' may be used uninitialized in this function * src/qemu/qemu_monitor_json.c (qemuMonitorJSONGetCommandLineOptionParameters): Initialize variable. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
Ever since the conversion to using only QMP for probing features of qemu 1.2 and newer, we have been unable to detect features that are added only by additional command line options. For example, we'd like to know if '-machine mem-merge=on' (added in qemu 1.5) is present. To do this, we will take advantage of qemu 1.5's query-command-line-parameters QMP call [1]. This patch wires up the framework for probing the command results; if the QMP command is missing, or if a particular command line option does not output any parameters (for example, -net uses a polymorphic parser, which showed up as no parameters as of qemu 1.5), we silently treat that command as having no results. [1] https://lists.gnu.org/archive/html/qemu-devel/2013-04/msg05180.html * src/qemu/qemu_monitor.h (qemuMonitorGetOptions) (qemuMonitorSetOptions) (qemuMonitorGetCommandLineOptionParameters): New functions. * src/qemu/qemu_monitor_json.h (qemuMonitorJSONGetCommandLineOptionParameters): Likewise. * src/qemu/qemu_monitor.c (_qemuMonitor): Add cache field. (qemuMonitorDispose): Clean it. (qemuMonitorGetCommandLineOptionParameters): Implement new function. * src/qemu/qemu_monitor_json.c (qemuMonitorJSONGetCommandLineOptionParameters): Likewise. (testQemuMonitorJSONGetCommandLineParameters): Test it. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
No need to open code a string list cleanup, if we are nice to the caller by guaranteeing a NULL-terminated result. * src/qemu/qemu_monitor_json.c (qemuMonitorJSONGetCPUDefinitions) (qemuMonitorJSONGetCommands, qemuMonitorJSONGetEvents) (qemuMonitorJSONGetObjectTypes, qemuMonitorJSONGetObjectProps): Use simpler cleanup. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 16 4月, 2013 1 次提交
-
-
由 Stefan Berger 提交于
Check for an unsupported QMP command when using the query-tpm-models and query-tpm-types commands before checking for general errors in order to avoid error messages in the log. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
-
- 13 4月, 2013 1 次提交
-
-
由 Stefan Berger 提交于
Probe for QEMU's QMP TPM support by querying the lists of supported TPM models (query-tpm-models) and backend types (query-tpm-types). The setting of the capability flags following the strings returned from the commands above is only provided in the patch where domain_conf.c gets TPM support due to dependencies on functions only introduced there. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: NCorey Bryant <coreyb@linux.vnet.ibm.com> Tested-by: NCorey Bryant <coreyb@linux.vnet.ibm.com>
-
- 11 4月, 2013 1 次提交
-
-
由 Peter Krempa 提交于
Instead of always using HMP use the QMP send-key command introduced in qemu 1.3.
-
- 15 3月, 2013 1 次提交
-
-
由 Li Zhang 提交于
When getting CPUs' information, it assumes that CPU indexes are not contiguous. But for ppc64 platform, CPU indexes are not contiguous because SMT is needed to be disabled, so CPU information is not right on ppc64 and vpuinfo, vcpupin can't work corretly. This patch is to remove the assumption to be compatible with ppc64. Test: 4 vcpus are assigned to one VM and execute vcpuinfo command. Without patch: There is only one vcpu informaion can be listed. With patch: All vcpus' information can be listed correctly. Signed-off-by: NLi Zhang <zhlcindy@linux.vnet.ibm.com>
-
- 26 2月, 2013 1 次提交
-
-
由 Eric Blake 提交于
I built without yajl support, and noticed a strange failure message in qemumonitorjsontest: 2013-02-22 16:12:37.503+0000: 19812: error : virJSONValueToString:1119 : internal error No JSON parser implementation is available 2013-02-22 16:12:37.503+0000: 19812: error : qemuMonitorJSONCommandWithFd:253 : out of memory While a later patch will fix the test to skip when json is not present, this patch avoids overriding the more useful error message from virJSONValueToString returning NULL. * src/qemu/qemu_monitor_json.c (qemuMonitorJSONCommandWithFd): Don't override message. (qemuMonitorJSONCheckError): Don't print NULL. * src/qemu/qemu_agent.c (qemuAgentCommand): Don't override message. (qemuAgentCheckError): Don't print NULL. (qemuAgentArbitraryCommand): Properly fail on OOM.
-
- 23 2月, 2013 5 次提交
-
-
由 Michal Privoznik 提交于
This will be used after all migration work is done to stop NBD server running on destination. It doesn't take any arguments, just issues a command.
-
由 Michal Privoznik 提交于
This will be used with new migration scheme. This patch creates basically just monitor stub functions. Wiring them into something useful is done in later patches.
-
由 Michal Privoznik 提交于
This will be used with new migration scheme. This patch creates basically just monitor stub functions. Wiring them into something useful is done in later patches.
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
As a side effect, this also fixes reporting disk migration process. It was added to memory migration progress, which was wrong. Disk progress has dedicated fields in virDomainJobInfo structure.
-