1. 16 10月, 2013 10 次提交
  2. 15 10月, 2013 30 次提交
    • P
      cpu: x86: Clean up error messages in x86VendorLoad() · f2eca83c
      Peter Krempa 提交于
      Avoid a line exceeding 80 characters and change argument alignment in
      two error messages.
      f2eca83c
    • P
    • P
      25cbc13c
    • P
      cpu: x86: Fix return types of x86cpuidMatch and x86cpuidMatchMasked · 57d27a84
      Peter Krempa 提交于
      These return boolean results.
      57d27a84
    • P
      cpu: x86: Rename data_iterator and DATA_ITERATOR_INIT · 1bda29d1
      Peter Krempa 提交于
      Use virCPUx86DataIterator and virCPUx86DataIteratorInit.
      1bda29d1
    • J
      955be927
    • J
      4a530268
    • J
      a3e224e2
    • J
      cpu: x86: Rename struct cpuX86Data as virCPUx86Data · 0c63d120
      Jiri Denemark 提交于
      0c63d120
    • J
      01fabe2e
    • J
      cpu: Add support for loading and storing CPU data · 376261d1
      Jiri Denemark 提交于
      This patch adds cpuDataFormat and cpuDataParse APIs to be used in unit
      tests for testing APIs that deal with virCPUData. In the x86 world, this
      means we can now store/load arbitrary CPUID data in the test suite to
      check correctness of CPU related APIs that could not be tested before.
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      376261d1
    • P
      qemu: command: Fix macro indentation · fe1bf917
      Peter Krempa 提交于
      fe1bf917
    • P
      conf: Mark user provided strings in error messages when parsing XML · 59ae97b4
      Peter Krempa 提交于
      Use apostrophes to denote user provided option names when parsing the
      domain XML.
      59ae97b4
    • P
      schema: Rename option 'hypervtristate' to 'featurestate' · c4caa012
      Peter Krempa 提交于
      Change the RelaxNG schema option name so that it can be reused for
      non-hyperv feature flags.
      c4caa012
    • H
      fix typo in lxc_driver.c and virsh-nodedev.c · dcd0f6d7
      Hongwei Bi 提交于
      dcd0f6d7
    • D
      build: Add lxc testcase to dist list · 6285c17f
      Daniel Hansel 提交于
      Introduced by commit 3f029fb5 the RPM build
      was broken due to a missing LXC textcase.
      Signed-off-by: NDaniel Hansel <daniel.hansel@linux.vnet.ibm.com>
      6285c17f
    • C
      cgroup: leave blkio cgroup value checking to kernel · 521cec2a
      Chen Hanxiao 提交于
      The range of valid values for cgroup tunables has
      changed in the past and may change again in future
      kernels. Avoid hardcoding range checks in libvirt
      code, delegating range checking to the kernel itself.
      Signed-off-by: NChen Hanxiao <chenhanxiao@cn.fujitsu.com>
      521cec2a
    • C
      cgroup: show error when EINVAL is returned · 501476fc
      Chen Hanxiao 提交于
      When EINVAL is returned while changing a cgroups value, tell
      user that what values are invalid for the field.
      Signed-off-by: NChen Hanxiao <chenhanxiao@cn.fujitsu.com>
      501476fc
    • C
      docs: change the minimum weight description for blkio · b8b22d19
      Chen Hanxiao 提交于
      Since 2.6.39, kernel changed the minimum weight of device blkio.
      Update related docs.
      Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
      Signed-off-by: NChen Hanxiao <chenhanxiao@cn.fujitsu.com>
      b8b22d19
    • R
      vbox: handle 'saved' state of VMs · e06d23fd
      Ryota Ozaki 提交于
      VirtualBox has 'saved' state for VMs saved by the hypervisor.
      However, the state is treated as VIR_DOMAIN_NOSTATE by the vbox
      driver, resulting that virsh shows 'no state' for saved VMs.
      
      The fix treats the state as VIR_DOMAIN_SHUTOFF as same as
      other domains such as qemu.
      Signed-off-by: NRyota Ozaki <ozaki.ryota@gmail.com>
      e06d23fd
    • R
      vbox: merge duplicate state conversions · b98654fa
      Ryota Ozaki 提交于
      The code for converting between virtualbox API states
      and libvirt states was duplicated in two places. Pull
      the code out into a shared helper method.
      Signed-off-by: NRyota Ozaki <ozaki.ryota@gmail.com>
      b98654fa
    • G
      esx: Fix floppy.fileName handling in the vmx file parser · 842f6fd3
      Geoff Hickey 提交于
      The vmx file parsing code was reporting errors when parsing floppy.fileName
      entries if the filename didn't end in .flp. There is no such restriction in
      ESX; even using the GUI to configure floppy filenames you can specify any
      arbitrary file with any extension.
      
      Fix by changing the vmx parsing code so that it uses the floppy.fileType
      value to determine whether floppy.fileName refers to a block device or a
      regular file.
      
      Also remove code that would have generated an error if no floppy.fileName
      was specified. This is not an error either.
      
      Updated the floppy tests in vmx2xmltest.c and xml2vmxtest.c.
      842f6fd3
    • D
      Add some notes about secure usage of libvirt · 8f35fd21
      Daniel P. Berrange 提交于
      Start a page describing some of the things that applications
      using libvirt need to bear in mind to ensure security of their
      systems.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      8f35fd21
    • J
    • P
      xenapi: Fix build after const correctnes changes · 342cd2dd
      Peter Krempa 提交于
      In commit d2467709 the header of one of
      the post parse callbacks was changed, but the function used as the
      callback in the xenapi driver wasn't adapted. This resulted into:
      
        CC       xenapi/libvirt_driver_xenapi_la-xenapi_utils.lo
       xenapi/xenapi_driver.c:63:5: error: initialization from incompatible pointer type [-Werror]
       xenapi/xenapi_driver.c:63:5: error: (near initialization for 'xenapiDomainDefParserConfig.devicesPostParseCallback') [-Werror]
      342cd2dd
    • E
      build: syntax check to avoid 'const fooPtr' · e7981016
      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).
      
      Now that the code base has been cleaned, enforce it with a syntax
      checker.
      
      * cfg.mk (sc_forbid_const_pointer_typedef): New rule.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      e7981016
    • E
      maint: avoid 'const fooPtr' in all remaining places · 33aec506
      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 all remaining offenders.
      
      * src/lxc/lxc_process.c (virLXCProcessSetupInterfaceBridged): Drop
      needless const.
      * src/uml/uml_driver.c (umlMonitorCommand): Use intended type.
      (umlMonitorAddress): Fix fallout.
      * src/xen/xm_internal.c (xenXMDomainSearchForUUID): Use intended type.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      33aec506
    • E
      maint: avoid 'const fooPtr' in qemu · 9a520a59
      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>
      9a520a59
    • E
      maint: avoid 'const fooPtr' in security · 84e80917
      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/security.
      
      * src/security/security_apparmor.c (reload_profile)
      (AppArmorSetSecurityHostdevLabelHelper)
      (AppArmorReleaseSecurityLabel, AppArmorRestoreSecurityAllLabel)
      (AppArmorSetSecurityProcessLabel)
      (AppArmorSetSecurityChildProcessLabel)
      (AppArmorSetSecurityImageLabel, AppArmorSecurityVerify)
      (AppArmorSetSecurityHostdevLabel)
      (AppArmorRestoreSecurityHostdevLabel, AppArmorSetFDLabel): Drop
      needless const.
      * src/security/security_selinux.c
      (virSecuritySELinuxSetSecurityFileLabel): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      84e80917
    • E
      maint: avoid 'const fooPtr' in conf · 539a9fae
      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 remaining offenders in src/conf, and their fallout.
      
      * src/conf/snapshot_conf.h (virDomainSnapshotAssignDef)
      (virDomainSnapshotFindByName): Drop attempt at const.
      * src/conf/interface_conf.h (virInterfaceObjIsActive)
      (virInterfaceDefFormat): Use intended type.
      (virInterfaceFindByMACString, virInterfaceFindByName)
      (virInterfaceAssignDef, virInterfaceRemove): Drop attempt at
      const.
      * src/conf/network_conf.h (virNetworkObjIsActive)
      (virNetworkDefFormat, virNetworkDefForwardIf)
      (virNetworkDefGetIpByIndex, virNetworkIpDefPrefix)
      (virNetworkIpDefNetmask): Use intended type.
      (virNetworkFindByUUID, virNetworkFindByName, virNetworkAssignDef)
      (virNetworkObjAssignDef, virNetworkRemoveInactive)
      (virNetworkBridgeInUse, virNetworkSetBridgeName)
      (virNetworkAllocateBridge): Drop attempt at const.
      * src/conf/netdev_vlan_conf.h (virNetDevVlanFormat): Make
      const-correct.
      * src/conf/node_device_conf.h (virNodeDeviceHasCap)
      (virNodeDeviceDefFormat): Use intended type.
      (virNodeDeviceFindByName, virNodeDeviceFindBySysfsPath)
      (virNodeDeviceAssignDef, virNodeDeviceObjRemove)
      (virNodeDeviceGetParentHost): Drop attempt at const.
      * src/conf/secret_conf.h (virSecretDefFormat): Use intended type.
      * src/conf/snapshot_conf.c (virDomainSnapshotAssignDef)
      (virDomainSnapshotFindByName): Fix fallout.
      * src/conf/interface_conf.c (virInterfaceBridgeDefFormat)
      (virInterfaceBondDefFormat, virInterfaceVlanDefFormat)
      (virInterfaceProtocolDefFormat, virInterfaceDefDevFormat)
      (virInterfaceDefFormat, virInterfaceFindByMACString)
      (virInterfaceFindByName, virInterfaceAssignDef)
      (virInterfaceRemove): Likewise.
      * src/conf/network_conf.c
      (VIR_ENUM_IMPL, virNetworkFindByName, virNetworkObjAssignDef)
      (virNetworkAssignDef, virNetworkRemoveInactive)
      (virNetworkDefGetIpByIndex, virNetworkIpDefPrefix)
      (virNetworkIpDefNetmask, virNetworkDHCPHostDefParseXML)
      (virNetworkIpDefFormat, virNetworkRouteDefFormat)
      (virPortGroupDefFormat, virNetworkForwardNatDefFormat)
      (virNetworkDefFormatInternal, virNetworkBridgeInUse)
      (virNetworkAllocateBridge, virNetworkSetBridgeName)
      (virNetworkDNSDefFormat, virNetworkDefFormat): Likewise.
      * src/conf/netdev_vlan_conf.c (virNetDevVlanFormat): Likewise.
      * src/conf/node_device_conf.c (virNodeDeviceHasCap)
      (virNodeDeviceFindBySysfsPath, virNodeDeviceFindByName)
      (virNodeDeviceAssignDef, virNodeDeviceObjRemove)
      (virNodeDeviceDefFormat, virNodeDeviceGetParentHost): Likewise.
      * src/conf/secret_conf.c (virSecretDefFormatUsage)
      (virSecretDefFormat): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      539a9fae