- 04 12月, 2012 2 次提交
-
-
由 Daniel P. Berrange 提交于
Currently to deal with auto-shutdown libvirtd must periodically poll all stateful drivers. Thus sucks because it requires acquiring both the driver lock and locks on every single virtual machine. Instead pass in a "inhibit" callback to virStateInitialize which drivers can invoke whenever they want to inhibit shutdown due to existance of active VMs. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The only important state that should prevent libvirtd shutdown is from running VMs. Networks, host devices, network filters and storage pools are all long lived resources that have no significant in-memory state. They should not block shutdown.
-
- 30 11月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
The virStateInitialize method and several cgroups methods were using an 'int privileged' parameter or similar for dual-state values. These are better represented with the bool type. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 02 11月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
The libvirt coding standard is to use 'function(...args...)' instead of 'function (...args...)'. A non-trivial number of places did not follow this rule and are fixed in this patch. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 28 9月, 2012 2 次提交
-
-
由 Daniel P. Berrange 提交于
The 'const char *category' parameter only has a few possible values now that the filename has been separated. Turn this parameter into an enum instead. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Currently the logging APIs have a 'const char *category' parameter which indicates where the log message comes from. This is typically a combination of the __FILE__ string and other prefix. Split the __FILE__ off into a dedicated parameter so it can passed to the log outputs Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 21 9月, 2012 1 次提交
-
-
由 Eric Blake 提交于
https://www.gnu.org/licenses/gpl-howto.html recommends that the 'If not, see <url>.' phrase be a separate sentence. * tests/securityselinuxhelper.c: Remove doubled line. * tests/securityselinuxtest.c: Likewise. * globally: s/; If/. If/
-
- 17 9月, 2012 1 次提交
-
-
由 Osier Yang 提交于
This simply implements listAllNodeDevices using helper virNodeDeviceList src/node_device/node_device_driver.h: * Declare nodeListAllNodeDevices. src/node_device/node_device_driver.c: * Implement nodeListAllNodeDevices. src/node_device/node_device_hal.c: * Hook listAllNodeDevices to nodeListAllNodeDevices. src/node_device/node_device_udev.c * Hook listAllNodeDevices to nodeListAllNodeDevices.
-
- 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
-
- 19 7月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
Update the node device driver to use virReportError instead of the virNodeDeviceReportError custom macro Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 10 4月, 2012 1 次提交
-
-
由 Eric Blake 提交于
I noticed these compiler warnings when building for the s390 architecture. * src/node_device/node_device_udev.c (udevDeviceMonitorStartup): Mark unused variable. * src/nodeinfo.c (linuxNodeInfoCPUPopulate): Avoid unused variable.
-
- 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 9月, 2011 1 次提交
-
-
由 Michal Privoznik 提交于
as they are not used with debugging turned off.
-
- 08 9月, 2011 1 次提交
-
-
由 Soren Hansen 提交于
Xen PV domU's have no PCI bus. node_device_udev.c calls pci_system_init which looks for /sys/bus/pci. If it does not find /sys/bus/pci (which it won't in a Xen PV domU) it returns unsuccesfully (ENOENT), which libvirt considers fatal. This makes libvirt unusable in this environment, even though there are plenty of valid virtualisation options that work there (LXC, UML, and QEmu spring to mind) https://bugzilla.redhat.com/show_bug.cgi?id=709471Signed-off-by: NSoren Hansen <soren@linux2go.dk>
-
- 16 8月, 2011 1 次提交
-
-
由 Roopa Prabhu 提交于
This patch moves some of the sriov related pci code from node_device driver to src/util/pci.[ch]. Some functions had to go thru name and argument list change to accommodate the move. Signed-off-by: NRoopa Prabhu <roprabhu@cisco.com> Signed-off-by: NChristian Benvenuti <benve@cisco.com> Signed-off-by: NDavid Wang <dwang2@cisco.com>
-
- 20 7月, 2011 1 次提交
-
-
由 Michal Privoznik 提交于
DMI is Intel & Intel-compatible specific. Don't try to dump information on non-compatible architectures, which results only in error message in logs.
-
- 13 7月, 2011 1 次提交
-
-
由 Eric Blake 提交于
* src/node_device/node_device_driver.c (nodeNumOfDevices) (nodeListDevices, nodeDeviceGetXMLDesc, nodeDeviceCreateXML): Reject unknown flags. * src/node_device/node_device_hal.c (halNodeDrvOpen): Likewise. * src/node_device/node_device_udev.c (udevNodeDrvOpen): Likewise.
-
- 08 7月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Now that the public APIs always use unsigned flags, the internal driver callbacks might as well do likewise. * src/driver.h (vrDrvOpen, virDrvDomainCoreDump) (virDrvDomainGetXMLDesc, virDrvNetworkGetXMLDesc) (virDrvNWFilterGetXMLDesc): Update type. * src/remote/remote_protocol.x (remote_open_args) (remote_domain_core_dump_args, remote_domain_get_xml_desc_args) (remote_network_get_xml_desc_args) (remote_nwfilter_get_xml_desc_args): Likewise. * src/test/test_driver.c: Update clients. * src/remote/remote_driver.c: Likewise. * src/xen/xen_hypervisor.c: Likewise. * src/xen/xen_hypervisor.h: Likewise. * src/xen/xen_driver.c: Likewise. * src/xen/xend_internal.c: Likewise. * src/xen/xend_internal.h: Likewise. * src/xen/xm_internal.c: Likewise. * src/xen/xm_internal.h: Likewise. * src/xen/xs_internal.c: Likewise. * src/xen/xs_internal.h: Likewise. * src/xen/xen_inotify.c: Likewise. * src/xen/xen_inotify.h: Likewise. * src/phyp/phyp_driver.c: Likewise. * src/openvz/openvz_driver.c: Likewise. * src/vmware/vmware_driver.c: Likewise. * src/vbox/vbox_driver.c: Likewise. * src/vbox/vbox_tmpl.c: Likewise. * src/xenapi/xenapi_driver.c: Likewise. * src/esx/esx_driver.c: Likewise. * src/esx/esx_interface_driver.c: Likewise. * src/esx/esx_network_driver.c: Likewise. * src/esx/esx_storage_driver.c: Likewise. * src/esx/esx_device_monitor.c: Likewise. * src/esx/esx_secret_driver.c: Likewise. * src/esx/esx_nwfilter_driver.c: Likewise. * src/interface/netcf_driver.c: Likewise. * src/nwfilter/nwfilter_driver.c: Likewise. * src/libxl/libxl_driver.c: Likewise. * src/qemu/qemu_driver.c: Likewise. * src/lxc/lxc_driver.c: Likewise. * src/uml/uml_driver.c: Likewise. * src/network/bridge_driver.c: Likewise. * src/secret/secret_driver.c: Likewise. * src/storage/storage_driver.c: Likewise. * src/node_device/node_device_hal.c: Likewise. * src/node_device/node_device_udev.c: Likewise. * src/remote_protocol-structs: Likewise.
-
- 21 6月, 2011 1 次提交
-
-
由 Cole Robinson 提交于
Since we virEventRegisterDefaultImpl is now a public API, callers need a way to invoke the default registered Handle and Timeout functions. We already have general functions for these internally, so promote them to the public API. v2: Actually add APIs to libvirt.h
-
- 06 6月, 2011 1 次提交
-
-
由 Matthias Bolte 提交于
Annotate the ESX device driver dummy. Refactor the udev and hal device driver strcuts to match the common annotation pattern.
-
- 12 5月, 2011 2 次提交
-
-
由 Lai Jiangshan 提交于
These VIR_XXXX0 APIs make us confused, use the non-0-suffix APIs instead. How do these coversions works? The magic is using the gcc extension of ##. When __VA_ARGS__ is empty, "##" will swallow the "," in "fmt," to avoid compile error. example: origin after CPP high_level_api("%d", a_int) low_level_api("%d", a_int) high_level_api("a string") low_level_api("a string") About 400 conversions. 8 special conversions: VIR_XXXX0("") -> VIR_XXXX("msg") (avoid empty format) 2 conversions VIR_XXXX0(string_literal_with_%) -> VIR_XXXX(%->%%) 0 conversions VIR_XXXX0(non_string_literal) -> VIR_XXXX("%s", non_string_literal) (for security) 6 conversions Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
-
由 Eric Blake 提交于
If we plow on after udev_device_get_syspath fails, we will hit a NULL dereference. Clang found one due to strdup later in udevSetParent, but in fact we hit a NULL dereference sooner because of the use of STREQ within virNodeDeviceFindBySysfsPath. * src/conf/node_device_conf.h (virNodeDeviceFindBySysfsPath): Mark path argument non-null. * src/node_device/node_device_udev.c (udevSetParent): Avoid null dereference.
-
- 06 5月, 2011 1 次提交
-
-
由 Eric Blake 提交于
We already have virAsprintf, so picking a similar name helps for seeing a similar purpose. Furthermore, the prefix V before printf generally implies 'va_list', even though this variant was '...', and the old name got in the way of adding a new va_list version. global rename performed with: $ git grep -l virBufferVSprintf \ | xargs -L1 sed -i 's/virBufferVSprintf/virBufferAsprintf/g' then revert the changes in ChangeLog-old.
-
- 03 5月, 2011 1 次提交
-
-
由 Michal Privoznik 提交于
The patch which moved libpciaccess initialization to one place caused regression - we were not able to run on system with no PCI bus, like s390(x).
-
- 07 4月, 2011 1 次提交
-
-
由 Serge Hallyn 提交于
We're seeing bugs apparently resulting from thread unsafety of libpciaccess, such as https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/726099 To prevent those, as suggested by danpb on irc, move the nodeDeviceLock(driverState) higher into the callers. In particular: udevDeviceMonitorStartup should hold the lock while calling udevEnumerateDevices(), and udevEventHandleCallback should hold it over its entire execution. It's not clear to me whether it is ok to hold the nodeDeviceLock while taking the virNodeDeviceObjLock(dev) on a device. If not, then the lock will need to be dropped around the calling of udevSetupSystemDev(), and udevAddOneDevice() may not actually be safe to call from higher layers with the driverstate lock held. libvirt 0.8.8 with this patch on it seems to work fine for me. Assuming it looks ok and I haven't done anything obviously dumb, I'll ask the bug submitters to try this patch. Signed-off-by: NSerge Hallyn <serge.hallyn@ubuntu.com>
-
- 05 4月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Even with -Wuninitialized (which is part of autobuild.sh --enable-compile-warnings=error), gcc does NOT catch this use of an uninitialized variable: { if (cond) goto error; int a = 1; error: printf("%d", a); } which prints 0 (supposing the stack started life wiped) if cond was true. Clang will catch it, but we don't use clang as often. Using gcc -Wjump-misses-init catches it, but also gives false positives: { if (cond) goto error; int a = 1; return a; error: return 0; } Here, a was never used in the scope of the error block, so declaring it after goto is technically fine (and clang agrees). However, given that our HACKING already documents a preference to C89 decl-before-statement, the false positive warning is enough of a prod to comply with HACKING. [Personally, I'd _really_ rather use C99 decl-after-statement to minimize scope, but until gcc can efficiently and reliably catch scoping and uninitialized usage bugs, I'll settle with the compromise of enforcing a coding standard that happens to reject false positives if it can also detect real bugs.] * acinclude.m4 (LIBVIRT_COMPILE_WARNINGS): Add -Wjump-misses-init. * src/util/util.c (__virExec): Adjust offenders. * src/conf/domain_conf.c (virDomainTimerDefParseXML): Likewise. * src/remote/remote_driver.c (doRemoteOpen): Likewise. * src/phyp/phyp_driver.c (phypGetLparNAME, phypGetLparProfile) (phypGetVIOSFreeSCSIAdapter, phypVolumeGetKey) (phypGetStoragePoolDevice) (phypVolumeGetPhysicalVolumeByStoragePool) (phypVolumeGetPath): Likewise. * src/vbox/vbox_tmpl.c (vboxNetworkUndefineDestroy) (vboxNetworkCreate, vboxNetworkDumpXML) (vboxNetworkDefineCreateXML): Likewise. * src/xenapi/xenapi_driver.c (getCapsObject) (xenapiDomainDumpXML): Likewise. * src/xenapi/xenapi_utils.c (createVMRecordFromXml): Likewise. * src/security/security_selinux.c (SELinuxGenNewContext): Likewise. * src/qemu/qemu_command.c (qemuBuildCommandLine): Likewise. * src/qemu/qemu_hotplug.c (qemuDomainChangeEjectableMedia): Likewise. * src/qemu/qemu_process.c (qemuProcessWaitForMonitor): Likewise. * src/qemu/qemu_monitor_text.c (qemuMonitorTextGetPtyPaths): Likewise. * src/qemu/qemu_driver.c (qemudDomainShutdown) (qemudDomainBlockStats, qemudDomainMemoryPeek): Likewise. * src/storage/storage_backend_iscsi.c (virStorageBackendCreateIfaceIQN): Likewise. * src/node_device/node_device_udev.c (udevProcessPCI): Likewise.
-
- 22 3月, 2011 1 次提交
-
-
qemu:///session由 Eric Blake 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=684655 points out a regression introduced in commit 2215050e - non-root users can't connect to qemu:///session because libvirtd dies when it can't use pciaccess initialization. * src/node_device/node_device_udev.c (udevDeviceMonitorStartup): Don't abort udev driver (and libvirtd overall) if non-root user can't use pciaccess.
-
- 10 2月, 2011 3 次提交
-
-
由 Daniel P. Berrange 提交于
Most of te VIR_INFO calls in the udev driver are only relevant to developers so can switch to VIR_DEBUG. Failure to initialize libpciaccess though is a fatal error * src/node_device/node_device_udev.c: Adjust log levels
-
由 Daniel P. Berrange 提交于
The Linux kernel headers don't have a value for SCSI type 12, but HAL source code shows this to be a 'raid'. Add workaround for this type. Lower log level for unknown types since this is not a fatal error condition. Include the device sysfs path in the log output to allow identification of which device has problems. * src/node_device/node_device_udev.c: Add SCSI RAID type
-
由 Daniel P. Berrange 提交于
libpciaccess has many bugs in its pci_system_init/cleanup functions that makes calling them multiple times unwise. eg it will double close() FDs, and leak other FDs. * src/node_device/node_device_udev.c: Only initialize libpciaccess once
-
- 04 1月, 2011 1 次提交
-
-
由 Chris Wright 提交于
The udev driver does not update a PCI device with its SR-IOV capabilities, when applicable, the way the hal driver does. As a result, dumping the device's XML will not include the relevant physical or virtual function information. With this patch, the XML is correct: # virsh nodedev-dumpxml pci_0000_09_00_0 <device> <name>pci_0000_09_00_0</name> <parent>pci_0000_00_1c_0</parent> <driver> <name>vxge</name> </driver> <capability type='pci'> <domain>0</domain> <bus>9</bus> <slot>0</slot> <function>0</function> <product id='0x5833'>X3100 Series 10 Gigabit Ethernet PCIe</product> <vendor id='0x17d5'>Neterion Inc.</vendor> <capability type='virt_functions'> <address domain='0x0000' bus='0x0a' slot='0x00' function='0x1'/> <address domain='0x0000' bus='0x0a' slot='0x00' function='0x2'/> <address domain='0x0000' bus='0x0a' slot='0x00' function='0x3'/> </capability> </capability> </device> # virsh nodedev-dumpxml pci_0000_0a_00_1 <device> <name>pci_0000_0a_00_1</name> <parent>pci_0000_00_1c_0</parent> <driver> <name>vxge</name> </driver> <capability type='pci'> <domain>0</domain> <bus>10</bus> <slot>0</slot> <function>1</function> <product id='0x5833'>X3100 Series 10 Gigabit Ethernet PCIe</product> <vendor id='0x17d5'>Neterion Inc.</vendor> <capability type='phys_function'> <address domain='0x0000' bus='0x09' slot='0x00' function='0x0'/> </capability> </capability> </device> Cc: Dave Allan <dallan@redhat.com> Signed-off-by: NChris Wright <chrisw@redhat.com>
-
- 02 7月, 2010 1 次提交
-
-
由 Cole Robinson 提交于
We only use libpciaccess for resolving device product/vendor. If initializing the library fails (say if using qemu:///session), don't warn so loudly, and carry on as usual.
-
- 09 6月, 2010 1 次提交
-
-
由 David Allan 提交于
* This patch is a modification of a patch submitted by Nigel Jones. It fixes several memory leaks on device addition/removal: 1. Free the virNodeDeviceDefPtr in udevAddOneDevice if the return value is non-zero 2. Always release the node device reference after the device has been processed. * Refactored for better readability per the suggestion of clalance
-
- 29 5月, 2010 1 次提交
-
-
由 David Allan 提交于
* If a nodedev has a parent that we don't want to display, we should continue walking up the udev device tree to see if any of its earlier ancestors are devices that we display. It makes the tree much nicer looking than having a whole lot of devices hanging off the root node.
-
- 28 5月, 2010 1 次提交
-
-
由 David Allan 提交于
* Incorporated Jim's feedback (v1 & v2) * Moved case of DEVTYPE == "wlan" up as it's definitive that we have a network interface. * Made comment more detailed about the wired case to explain better how it differentiates between wired network interfaces and USB devices.
-
- 26 5月, 2010 1 次提交
-
-
由 Daniel P. Berrange 提交于
Allow for a host UUID in the capabilities XML. Local drivers will initialize this from the SMBIOS data. If a sanity check shows SMBIOS uuid is invalid, allow an override from the libvirtd.conf configuration file * daemon/libvirtd.c, daemon/libvirtd.conf: Support a host_uuid configuration option * docs/schemas/capability.rng: Add optional host uuid field * src/conf/capabilities.c, src/conf/capabilities.h: Include host UUID in XML * src/libvirt_private.syms: Export new uuid.h functions * src/lxc/lxc_conf.c, src/qemu/qemu_driver.c, src/uml/uml_conf.c: Set host UUID in capabilities * src/util/uuid.c, src/util/uuid.h: Support for host UUIDs * src/node_device/node_device_udev.c: Use the host UUID functions * tests/confdata/libvirtd.conf, tests/confdata/libvirtd.out: Add new host_uuid config option to test
-
- 21 5月, 2010 3 次提交
-
-
由 Jim Meyering 提交于
Handle concatenated strings manually.
-
由 Jim Meyering 提交于
Run this: git grep -l 'VIR_ERROR\s*("'|xargs perl -pi -e \ 's/(VIR_ERROR)\s*\((".*?"),/$1(_($2),/'
-
由 Jim Meyering 提交于
Run this: git grep -l 'VIR_ERROR0\s*("'|xargs perl -pi -e \ 's/(VIR_ERROR0)\s*\((".*?")\)/$1(_($2))/'
-
- 12 5月, 2010 1 次提交
-
-
由 Cole Robinson 提交于
Product and vendor values were swapped in the XML, which made virt-manager PCI device listing kinda useless.
-