- 20 9月, 2012 1 次提交
-
-
由 liguang 提交于
supersede tedious statements getting cpu bitmap from parameter cpumap by virBitmapNewData function Signed-off-by: Nliguang <lig.fnst@cn.fujitsu.com>
-
- 18 9月, 2012 2 次提交
-
-
由 Laine Stump 提交于
The final patch in Hu Tao's series to enhance virBitmap actually removes virDomainCpuSetParse and virDomainCpuSetFormat as "no longer used", and the rest of the series hadn't taken care of two uses of virDomainCpuSetParse in the xen code. This patch replaces those with appropriate virBitmap functions. It should be pushed prior to the patch removing virDomainCpuSetParse.
-
由 Hu Tao 提交于
-
- 17 9月, 2012 1 次提交
-
-
由 Osier Yang 提交于
Including QEMU, LXC, UML, XEN drivers.
-
- 30 8月, 2012 1 次提交
-
-
由 Peter Krempa 提交于
virDomainVcpuPinAdd does a realloc on vcpupin_list if the new vcpu pin definition doesn't fit into the array. The list is an array of pointers but the function definition didn't support returning the changed pointer to the caller if it was realloced. This caused segfaults if realloc would change the base pointer.
-
- 24 8月, 2012 1 次提交
-
-
由 Philipp Hahn 提交于
When the XenStore tdb lives persistently and is not cleared between host reboots, Xend (version 3.4 and 4.1) re-creates the domain information located in XenStore below /vm/$UUID. (According to the xen-3.2-commit hg265950e3df69 to fix a problem when locally migrating a domain to the host itself.) When doing so a version number is added to the UUID separated by one dash, which confuses xenStoreDomainIntroduced(): It iterates over all domains and tries to lookup all inactive domains using xenStoreDomainGetUUID(), which fails if the running domain is renamed: virUUIDParse() fails to parse the versioned UUID and the domain is flagged as missing. When this happens the function delays .2s and re-tries 20 times again, multiplied by the number of renamed VMs. 14:48:38.878: 4285: debug : xenStoreDomainIntroduced:1354 : Some domains were missing, trying again This adds a significant delay: # time virsh list >/dev/null real 0m6.529s # xenstore-list /vm 00000000-0000-0000-0000-000000000000 00000000-0000-0000-0000-000000000000-1 00000000-0000-0000-0000-000000000000-2 00000000-0000-0000-0000-000000000000-3 00000000-0000-0000-0000-000000000000-4 00000000-0000-0000-0000-000000000000-5 7c06121e-90c3-93d4-0126-50481d485cca 00000000-0000-0000-0000-000000000000-6 00000000-0000-0000-0000-000000000000-7 144ad19d-dfb4-2f80-8045-09196bb8784f 00000000-0000-0000-0000-000000000000-8 144ad19d-dfb4-2f80-8045-09196bb8784f-1 00000000-0000-0000-0000-000000000000-9 00000000-0000-0000-0000-000000000000-10 00000000-0000-0000-0000-000000000000-11 00000000-0000-0000-0000-000000000000-12 00000000-0000-0000-0000-000000000000-13 00000000-0000-0000-0000-000000000000-14 144ad19d-dfb4-2f80-8045-09196bb8784f-2 00000000-0000-0000-0000-000000000000-15 144ad19d-dfb4-2f80-8045-09196bb8784f-3 00000000-0000-0000-0000-000000000000-16 The patch adds truncation of the UUID as read from the XenStore path before passing it to virUUIDParse(). The same issue is reported at <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=666135> Signed-off-by: NPhilipp Hahn <hahn@univention.de>
-
- 22 8月, 2012 1 次提交
-
-
由 Hu Tao 提交于
-
- 18 8月, 2012 1 次提交
-
-
由 Shradha Shah 提交于
Move the functions the parse/format, and validate PCI addresses to their own file so they can be conveniently used in other places besides device_conf.c Refactoring existing code without causing any functional changes to prepare for new code. This patch makes the code reusable. Signed-off-by: NShradha Shah <sshah@solarflare.com>
-
- 07 8月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
This converts the following public API datatypes to use the virObject infrastructure: virConnectPtr virDomainPtr virDomainSnapshotPtr virInterfacePtr virNetworkPtr virNodeDevicePtr virNWFilterPtr virSecretPtr virStreamPtr virStorageVolPtr virStoragePoolPtr The code is significantly simplified, since the mutex in the virConnectPtr object now only needs to be held when accessing the per-connection virError object instance. All other operations are completely lock free. * src/datatypes.c, src/datatypes.h, src/libvirt.c: Convert public datatypes to use virObject * src/conf/domain_event.c, src/phyp/phyp_driver.c, src/qemu/qemu_command.c, src/qemu/qemu_migration.c, src/qemu/qemu_process.c, src/storage/storage_driver.c, src/vbox/vbox_tmpl.c, src/xen/xend_internal.c, tests/qemuxml2argvtest.c, tests/qemuxmlnstest.c, tests/sexpr2xmltest.c, tests/xmconfigtest.c: Convert to use virObjectUnref/virObjectRef Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 27 7月, 2012 1 次提交
-
-
由 Osier Yang 提交于
This is a follow up patch of commit f9ce7dad, it modifies all the files which declare the copyright like "See COPYING.LIB for the License of this software" to use the detailed/consistent one. And deserts the outdated comments like: * libvirt-qemu.h: * Summary: qemu specific interfaces * Description: Provides the interfaces of the libvirt library to handle * qemu specific methods * * Copy: Copyright (C) 2010, 2012 Red Hat, Inc. Uses the more compact style like: * libvirt-qemu.h: Interfaces specific for QEMU/KVM driver * * Copyright (C) 2010, 2012 Red Hat, Inc.
-
- 23 7月, 2012 1 次提交
-
-
由 Osier Yang 提交于
Per the FSF address could be changed from time to time, and GNU recommends the following now: (http://www.gnu.org/licenses/gpl-howto.html) You should have received a copy of the GNU General Public License along with Foobar. If not, see <http://www.gnu.org/licenses/>. This patch removes the explicit FSF address, and uses above instead (of course, with inserting 'Lesser' before 'General'). Except a bunch of files for security driver, all others are changed automatically, the copyright for securify files are not complete, that's why to do it manually: src/security/security_selinux.h src/security/security_driver.h src/security/security_selinux.c src/security/security_apparmor.h src/security/security_apparmor.c src/security/security_driver.c
-
- 20 7月, 2012 4 次提交
-
-
由 Daniel P. Berrange 提交于
Update the legacy Xen drivers to use virReportError instead of the statsError, virXenInotifyError, virXenStoreError, virXendError, xenUnifiedError, xenXMError custom macros Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The xenHypervisorInit method was called from two different locations, during initial driver registration and also while opening a Xen connection. The former can't report any useful errors to the end user/app, so remove it. To ensure thread safety use a VIR_ONCE_GLOBAL_INIT call to invoke xenHypervisorInit from the xenHypervisorOpen method.
-
由 Daniel P. Berrange 提交于
As per the comment, the Xen hypervisor driver is considered to be mandatory when running privileged. When it fails to open, we should thus return an error, not ignore it.
-
由 Daniel P. Berrange 提交于
The Xen driver had a number of error reports which passed a constant string without format specifiers and was missing "%s". Furthermore the errors were related to failing system calls, but virReportSystemError was not used. So the only useful piece of info (the errno) was being discarded
-
- 17 7月, 2012 1 次提交
-
-
由 Stefan Berger 提交于
Introduce new members in the virMacAddr 'class' - virMacAddrSet: set virMacAddr from a virMacAddr - virMacAddrSetRaw: setting virMacAddr from raw 6 byte MAC address buffer - virMacAddrGetRaw: writing virMacAddr into raw 6 byte MAC address buffer - virMacAddrCmp: comparing two virMacAddr - virMacAddrCmpRaw: comparing a virMacAddr with a raw 6 byte MAC address buffer then replace raw MAC addresses by replacing - 'unsigned char *' with virMacAddrPtr - 'unsigned char ... [VIR_MAC_BUFLEN]' with virMacAddr and introduce usage of above functions where necessary.
-
- 04 5月, 2012 1 次提交
-
-
由 Osier Yang 提交于
Coverity logs: Error: RESOURCE_LEAK: /builddir/build/BUILD/libvirt-0.9.10/src/xen/xen_inotify.c:103: alloc_fn: Calling allocation function "xenDaemonLookupByUUID". /builddir/build/BUILD/libvirt-0.9.10/src/xen/xend_internal.c:2534: alloc_fn: Storage is returned from allocation function "virGetDomain". /builddir/build/BUILD/libvirt-0.9.10/src/datatypes.c:191: alloc_arg: "virAlloc" allocates memory that is stored into "ret". /builddir/build/BUILD/libvirt-0.9.10/src/util/memory.c:101: alloc_fn: Storage is returned from allocation function "calloc". /builddir/build/BUILD/libvirt-0.9.10/src/util/memory.c:101: var_assign: Assigning: "*((void **)ptrptr)" = "calloc(1UL, size)". /builddir/build/BUILD/libvirt-0.9.10/src/datatypes.c:210: return_alloc: Returning allocated memory "ret". /builddir/build/BUILD/libvirt-0.9.10/src/xen/xend_internal.c:2534: var_assign: Assigning: "ret" = "virGetDomain(conn, name, uuid)". /builddir/build/BUILD/libvirt-0.9.10/src/xen/xend_internal.c:2541: return_alloc: Returning allocated memory "ret". /builddir/build/BUILD/libvirt-0.9.10/src/xen/xen_inotify.c:103: var_assign: Assigning: "dom" = storage returned from "xenDaemonLookupByUUID(conn, rawuuid)". /builddir/build/BUILD/libvirt-0.9.10/src/xen/xen_inotify.c:126: leaked_storage: Variable "dom" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK: /builddir/build/BUILD/libvirt-0.9.10/src/xen/xen_hypervisor.c:2742: alloc_fn: Calling allocation function "fopen". /builddir/build/BUILD/libvirt-0.9.10/src/xen/xen_hypervisor.c:2742: var_assign: Assigning: "cpuinfo" = storage returned from "fopen("/proc/cpuinfo", "r")". /builddir/build/BUILD/libvirt-0.9.10/src/xen/xen_hypervisor.c:2763: noescape: Variable "cpuinfo" is not freed or pointed-to in function "xenHypervisorMakeCapabilitiesInternal". /builddir/build/BUILD/libvirt-0.9.10/src/xen/xen_hypervisor.c:2574:45: noescape: "xenHypervisorMakeCapabilitiesInternal" does not free or save its pointer parameter "cpuinfo". /builddir/build/BUILD/libvirt-0.9.10/src/xen/xen_hypervisor.c:2768: leaked_storage: Variable "cpuinfo" going out of scope leaks the storage it points to. Error: RESOURCE_LEAK: /builddir/build/BUILD/libvirt-0.9.10/src/xen/xen_hypervisor.c:2752: alloc_fn: Calling allocation function "fopen". /builddir/build/BUILD/libvirt-0.9.10/src/xen/xen_hypervisor.c:2752: var_assign: Assigning: "capabilities" = storage returned from "fopen("/sys/hypervisor/properties/capabilities", "r")". /builddir/build/BUILD/libvirt-0.9.10/src/xen/xen_hypervisor.c:2763: noescape: Variable "capabilities" is not freed or pointed-to in function "xenHypervisorMakeCapabilitiesInternal". /builddir/build/BUILD/libvirt-0.9.10/src/xen/xen_hypervisor.c:2574:60: noescape: "xenHypervisorMakeCapabilitiesInternal" does not free or save its pointer parameter "capabilities". /builddir/build/BUILD/libvirt-0.9.10/src/xen/xen_hypervisor.c:2768: leaked_storage: Variable "capabilities" going out of scope leaks the storage it points to.
-
- 13 4月, 2012 1 次提交
-
-
由 Stefan Bader 提交于
On newer xend (v3.x and after) there is no state and domid reported for inactive domains. When initially creating connections this is handled in various places by assigning domain->id = -1. But once an instance has been running, the id is set to the current domain id. And it does not change when the instance is shut down. So when querying the domain info, the hypervisor driver, which gets asked first will indicate it cannot find information, then the xend driver is asked and will set the status to NOSTATE because it checks for the -1 domain id. Checking domain/status for 0 seems to be more reliable for that. One note: I am not sure whether the domain->id also should get set back to -1 whenever any sub-driver thinks the instance is no longer running. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=746007 BugLink: http://bugs.launchpad.net/bugs/929626Signed-off-by: NStefan Bader <stefan.bader@canonical.com>
-
- 30 3月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
The code is splattered with a mix of sizeof foo sizeof (foo) sizeof(foo) Standardize on sizeof(foo) and add a syntax check rule to enforce it Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 27 3月, 2012 1 次提交
-
-
由 Martin Kletzander 提交于
Return statements with parameter enclosed in parentheses were modified and parentheses were removed. The whole change was scripted, here is how: List of files was obtained using this command: git grep -l -e '\<return\s*([^()]*\(([^()]*)[^()]*\)*)\s*;' | \ grep -e '\.[ch]$' -e '\.py$' Found files were modified with this command: sed -i -e \ 's_^\(.*\<return\)\s*(\(\([^()]*([^()]*)[^()]*\)*\))\s*\(;.*$\)_\1 \2\4_' \ -e 's_^\(.*\<return\)\s*(\([^()]*\))\s*\(;.*$\)_\1 \2\3_' Then checked for nonsense. The whole command looks like this: git grep -l -e '\<return\s*([^()]*\(([^()]*)[^()]*\)*)\s*;' | \ grep -e '\.[ch]$' -e '\.py$' | xargs sed -i -e \ 's_^\(.*\<return\)\s*(\(\([^()]*([^()]*)[^()]*\)*\))\s*\(;.*$\)_\1 \2\4_' \ -e 's_^\(.*\<return\)\s*(\([^()]*\))\s*\(;.*$\)_\1 \2\3_'
-
- 23 3月, 2012 2 次提交
-
-
由 Daniel P. Berrange 提交于
Move error reporting out of the callers, into virURIParse and virURIFormat, to get consistency. * include/libvirt/virterror.h, src/util/virterror.c: Add VIR_FROM_URI * src/util/viruri.c, src/util/viruri.h: Add error reporting * src/esx/esx_driver.c, src/libvirt.c, src/libxl/libxl_driver.c, src/lxc/lxc_driver.c, src/openvz/openvz_driver.c, src/qemu/qemu_driver.c, src/qemu/qemu_migration.c, src/remote/remote_driver.c, src/uml/uml_driver.c, src/vbox/vbox_tmpl.c, src/vmx/vmx.c, src/xen/xen_driver.c, src/xen/xend_internal.c, tests/viruritest.c: Remove error reporting Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Since we defined a custom virURIPtr type, we should use a virURIFree method instead of assuming it will always be a typedef for xmlURIPtr * src/util/viruri.c, src/util/viruri.h, src/libvirt_private.syms: Add a virURIFree method * src/datatypes.c, src/esx/esx_driver.c, src/libvirt.c, src/qemu/qemu_migration.c, src/vmx/vmx.c, src/xen/xend_internal.c, tests/viruritest.c: s/xmlFreeURI/virURIFree/ Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 08 3月, 2012 1 次提交
-
-
由 Eric Blake 提交于
On 64-bit platforms, unsigned long and unsigned long long are identical, so we don't have to worry about overflow checks. On 32-bit platforms, anywhere we narrow unsigned long long back to unsigned long, we have to worry about overflow; it's easier to do this in one place by having most of the code use the same or wider types, and only doing the narrowing at the last minute. Therefore, the memory set commands remain unsigned long, and the memory get command now centralizes the overflow check into libvirt.c, so that drivers don't have to repeat the work. This also fixes a bug where xen returned the wrong value on failure (most APIs return -1 on failure, but getMaxMemory must return 0 on failure). * src/driver.h (virDrvDomainGetMaxMemory): Use long long. * src/libvirt.c (virDomainGetMaxMemory): Raise overflow. * src/test/test_driver.c (testGetMaxMemory): Fix driver. * src/rpc/gendispatch.pl (name_to_ProcName): Likewise. * src/xen/xen_hypervisor.c (xenHypervisorGetMaxMemory): Likewise. * src/xen/xen_driver.c (xenUnifiedDomainGetMaxMemory): Likewise. * src/xen/xend_internal.c (xenDaemonDomainGetMaxMemory): Likewise. * src/xen/xend_internal.h (xenDaemonDomainGetMaxMemory): Likewise. * src/xen/xm_internal.c (xenXMDomainGetMaxMemory): Likewise. * src/xen/xm_internal.h (xenXMDomainGetMaxMemory): Likewise. * src/xen/xs_internal.c (xenStoreDomainGetMaxMemory): Likewise. * src/xen/xs_internal.h (xenStoreDomainGetMaxMemory): Likewise. * src/xenapi/xenapi_driver.c (xenapiDomainGetMaxMemory): Likewise. * src/esx/esx_driver.c (esxDomainGetMaxMemory): Likewise. * src/libxl/libxl_driver.c (libxlDomainGetMaxMemory): Likewise. * src/qemu/qemu_driver.c (qemudDomainGetMaxMemory): Likewise. * src/lxc/lxc_driver.c (lxcDomainGetMaxMemory): Likewise. * src/uml/uml_driver.c (umlDomainGetMaxMemory): Likewise.
-
- 25 2月, 2012 1 次提交
-
-
由 Martin Kletzander 提交于
Function xmlParseURI does not remove square brackets around IPv6 address when parsing. One of the solutions is making wrappers around functions working with xmlURI*. This assures that uri->server will be always properly assigned and it doesn't have to be changed when used on some new place in the code. For this purpose, functions virParseURI and virSaveURI were added. These function are wrappers around xmlParseURI and xmlSaveUri respectively. Also there is one new syntax check function to prohibit these functions anywhere else. File changes: - src/util/viruri.h -- declaration - src/util/viruri.c -- definition - src/libvirt_private.syms -- symbol export - src/Makefile.am -- added source and header files - cfg.mk -- added sc_prohibit_xmlURI - all others -- ID name and include fixes
-
- 10 2月, 2012 1 次提交
-
-
由 Osier Yang 提交于
The auto-generated WWN comply with the new addressing schema of WWN: <quote> the first nibble is either hex 5 or 6 followed by a 3-byte vendor identifier and 36 bits for a vendor-specified serial number. </quote> We choose hex 5 for the first nibble. And for the 3-bytes vendor ID, we uses the OUI according to underlying hypervisor type, (invoking virConnectGetType to get the virt type). e.g. If virConnectGetType returns "QEMU", we use Qumranet's OUI (00:1A:4A), if returns ESX|VMWARE, we use VMWARE's OUI (00:05:69). Currently it only supports qemu|xen|libxl|xenapi|hyperv|esx|vmware drivers. The last 36 bits are auto-generated.
-
- 07 2月, 2012 2 次提交
-
-
由 Philipp Hahn 提交于
filename is not initialized to NULL while it's unconditionally freed in the error path. Signed-off-by: NPhilipp Hahn <hahn@univention.de>
-
由 Philipp Hahn 提交于
On CentOS5: If "virsh edit $DOM" is used and an error happens (for example changing any live cycle action to a non-existing value), libvirt forgets that $DOM exists, since it is already removed from the internal hash tables, which are used for domain lookup. In once case (unreproducible) even the persistent configuration /etc/xen/$DOM was deleted. Instead of using the compound function xenXMConfigSaveFile() explicitly use xenFomatXM() and virConfWriteFile() to distinguish between a failure in converting the libvirt definition to the xen-xm format and a problem when writing the file. Signed-off-by: NPhilipp Hahn <hahn@univention.de>
-
- 06 2月, 2012 1 次提交
-
-
由 Philipp Hahn 提交于
On CentOS5 with xen-3.0.3: Program received signal SIGSEGV, Segmentation fault. virFree (ptrptr=0x8) at util/memory.c:310 310 free(*(void**)ptrptr); (gdb) bt #0 virFree (ptrptr=0x8) at util/memory.c:310 #1 0x00002aaaaae167c8 in xenXMDomainDefineXML (conn=0x694e80, xml=0x6b2ce0 "P\fk") at xen/xm_internal.c:1199 #2 0x00002aaaaae070d7 in xenUnifiedDomainDefineXML (conn=0x8, xml=0x6ac040 "<domain type='xen'>\n <name>pv</name>\n <uuid>20291bc0-453a-4d6c-c6ac-4e5af63b932c</uuid>\n <memory>1048576</memory>\n <currentMemory>1048576</currentMemory>\n <vcpu>1</vcpu>\n <os>\n <type arch='x8"...) at xen/xen_driver.c:1524 #3 0x00002aaaaada7803 in virDomainDefineXML (conn=0x694e80, xml=0x6ac040 "<domain type='xen'>\n <name>pv</name>\n <uuid>20291bc0-453a-4d6c-c6ac-4e5af63b932c</uuid>\n <memory>1048576</memory>\n <currentMemory>1048576</currentMemory>\n <vcpu>1</vcpu>\n <os>\n <type arch='x8"...) at libvirt.c:7823 #4 0x0000000000426173 in cmdEdit (ctl=0x7fffffffb8e0, cmd=<value optimized out>) at virsh.c:14882 #5 0x000000000041c9ce in vshCommandRun (ctl=0x7fffffffb8e0, cmd=0x658c50) at virsh.c:17712 #6 0x000000000042c3b9 in main (argc=1, argv=<value optimized out>) at virsh.c:19317 Signed-off-by: NPhilipp Hahn <hahn@univention.de>
-
- 02 2月, 2012 1 次提交
-
-
由 Philipp Hahn 提交于
libvirt supports 4 different versions of the user-land XenD daemon. When queried the daemon just returns its generation number, which is hard to match to the version of the Xen tools. Replace the magic generation numbers by named enum definitions to improve code readability. Signed-off-by: NPhilipp Hahn <hahn@univention.de>
-
- 28 1月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
Rename virFormatMacAddr, virGenerateMacAddr and virParseMacAddr to virMacAddrFormat, virMacAddrGenerate and virMacAddrParse respectively
-
- 26 1月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
In preparation for the patch to include Murmurhash3, which introduces a virhashcode.h and virhashcode.c files, rename the existing hash.h and hash.c to virhash.h and virhash.c respectively.
-
- 24 1月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
Add a new API virDomainShutdownFlags and define: VIR_DOMAIN_SHUTDOWN_DEFAULT = 0, VIR_DOMAIN_SHUTDOWN_ACPI_POWER_BTN = (1 << 0), VIR_DOMAIN_SHUTDOWN_GUEST_AGENT = (1 << 1), Also define some flags for the reboot API VIR_DOMAIN_REBOOT_DEFAULT = 0, VIR_DOMAIN_REBOOT_ACPI_POWER_BTN = (1 << 0), VIR_DOMAIN_REBOOT_GUEST_AGENT = (1 << 1), Although these two APIs currently have the same flags, using separate enums allows them to expand separately in the future. Add stub impls of the new API for all existing drivers
-
- 23 1月, 2012 1 次提交
-
-
由 Guido Günther 提交于
by dereferencing a NULL pointer in the call to virNodeSuspendGetTargetMask.
-
- 21 1月, 2012 1 次提交
-
-
由 Guido Günther 提交于
-
- 20 1月, 2012 2 次提交
-
-
由 Eric Blake 提交于
While we still don't want to enable gcc's new -Wformat-literal warning, I found a rather easy case where the warning could be reduced, by getting rid of obsolete error-reporting practices. This is the last place where we were passing the (unused) net and conn arguments for constructing an error. * src/util/virterror_internal.h (virErrorMsg): Delete prototype. (virReportError): Delete macro. * src/util/virterror.c (virErrorMsg): Make static. * src/libvirt_private.syms (virterror_internal.h): Drop export. * src/util/conf.c (virConfError): Convert to macro. (virConfErrorHelper): New function, and adjust error calls. * src/xen/xen_hypervisor.c (virXenErrorFunc): Delete. (xenHypervisorGetSchedulerType) (xenHypervisorGetSchedulerParameters) (xenHypervisorSetSchedulerParameters) (xenHypervisorDomainBlockStats) (xenHypervisorDomainInterfaceStats) (xenHypervisorDomainGetOSType) (xenHypervisorNodeGetCellsFreeMemory, xenHypervisorGetVcpus): Update callers.
-
由 Eric Blake 提交于
Reusing common code makes things smaller; it also buys us some additional safety, such as now rejecting duplicate parameters during a set operation. * src/qemu/qemu_driver.c (qemuDomainSetBlkioParameters) (qemuDomainSetMemoryParameters, qemuDomainSetNumaParameters) (qemuSetSchedulerParametersFlags) (qemuDomainSetInterfaceParameters, qemuDomainSetBlockIoTune) (qemuDomainGetBlkioParameters, qemuDomainGetMemoryParameters) (qemuDomainGetNumaParameters, qemuGetSchedulerParametersFlags) (qemuDomainBlockStatsFlags, qemuDomainGetInterfaceParameters) (qemuDomainGetBlockIoTune): Use new helpers. * src/esx/esx_driver.c (esxDomainSetSchedulerParametersFlags) (esxDomainSetMemoryParameters) (esxDomainGetSchedulerParametersFlags) (esxDomainGetMemoryParameters): Likewise. * src/libxl/libxl_driver.c (libxlDomainSetSchedulerParametersFlags) (libxlDomainGetSchedulerParametersFlags): Likewise. * src/lxc/lxc_driver.c (lxcDomainSetMemoryParameters) (lxcSetSchedulerParametersFlags, lxcDomainSetBlkioParameters) (lxcDomainGetMemoryParameters, lxcGetSchedulerParametersFlags) (lxcDomainGetBlkioParameters): Likewise. * src/test/test_driver.c (testDomainSetSchedulerParamsFlags) (testDomainGetSchedulerParamsFlags): Likewise. * src/xen/xen_hypervisor.c (xenHypervisorSetSchedulerParameters) (xenHypervisorGetSchedulerParameters): Likewise.
-
- 18 1月, 2012 1 次提交
-
-
由 Osier Yang 提交于
pciTrySecondaryBusReset checks if there is active device on the same bus, however, qemu driver doesn't maintain an effective list for the inactive devices, and it passes meaningless argument for parameter "inactiveDevs". e.g. (qemuPrepareHostdevPCIDevices) if (!(pcidevs = qemuGetPciHostDeviceList(hostdevs, nhostdevs))) return -1; ..skipped... if (pciResetDevice(dev, driver->activePciHostdevs, pcidevs) < 0) goto reattachdevs; NB, the "pcidevs" used above are extracted from domain def, and thus one won't be able to attach a device of which bus has other device even detached from host (nodedev-detach). To see more details of the problem: RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=773667 This patch is to resolve the problem by introducing an inactive PCI device list (just like qemu_driver->activePciHostdevs), and the whole logic is: * Add the device to inactive list during nodedev-dettach * Remove the device from inactive list during nodedev-reattach * Remove the device from inactive list during attach-device (for non-managed device) * Add the device to inactive list after detach-device, only if the device is not managed With the above, we have a sufficient inactive PCI device list, and thus we can use it for pciResetDevice. e.g.(qemuPrepareHostdevPCIDevices) if (pciResetDevice(dev, driver->activePciHostdevs, driver->inactivePciHostdevs) < 0) goto reattachdevs;
-
- 05 1月, 2012 2 次提交
-
-
由 Jim Fehlig 提交于
xen-unstable c/s 23874:651aed73b39c added another member to xen_domctl_getdomaininfo struct and bumped domctl version to 8. Add a corresponding domctl v8 struct in xen hypervisor sub-driver and detect domctl v8 during initialization.
-
由 Jim Fehlig 提交于
The console path in xenstore is /local/domain/<id>/console/tty for PV guests (PV console) and /local/domain/<id>/serial/0/tty (serial console) for HVM guests. Similar to Xen's in-tree console client, read the correct path for PV vs HVM.
-
- 19 12月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
The lifetime of the virDomainEventState object is tied to the lifetime of the driver, which in stateless drivers is tied to the lifetime of the virConnectPtr. If we add & remove a timer when allocating/freeing the virDomainEventState object, we can get a situation where the timer still triggers once after virDomainEventState has been freed. The timeout callback can't keep a ref on the event state though, since that would be a circular reference. The trick is to only register the timer when a callback is registered with the event state & remove the timer when the callback is unregistered. The demo for the bug is to run while true ; do date ; ../tools/virsh -q -c test:///default 'shutdown test; undefine test; dominfo test' ; done prior to this fix, it will frequently hang and / or crash, or corrupt memory
-