1. 21 2月, 2013 17 次提交
  2. 20 2月, 2013 10 次提交
    • E
      maint: enforce private symbol section sorting · 6ea7b3e8
      Eric Blake 提交于
      Automating a sorting check is the only way to ensure we don't
      regress.  Suggested by Dan Berrange.
      
      * src/check-symsorting.pl (check_sorting): Add a parameter,
      validate that groups are in order, and that files exist.
      * src/Makefile.am (check-symsorting): Adjust caller.
      * src/libvirt_private.syms: Fix typo.
      * src/libvirt_linux.syms: Fix file name.
      * src/libvirt_vmx.syms: Likewise.
      * src/libvirt_xenxs.syms: Likewise.
      * src/libvirt_sasl.syms: Likewise.
      * src/libvirt_libssh2.syms: Likewise.
      * src/libvirt_esx.syms: Mention file name.
      * src/libvirt_openvz.syms: Likewise.
      6ea7b3e8
    • J
      qemu: Do not ignore mandatory features in migration cookie · 69660042
      Jiri Denemark 提交于
      Due to "feature"/"features" nasty typo, any features marked as mandatory
      by one side of a migration are silently considered optional by the other
      side. The following is the code that formats mandatory features in
      migration cookie:
      
          for (i = 0 ; i < QEMU_MIGRATION_COOKIE_FLAG_LAST ; i++) {
              if (mig->flagsMandatory & (1 << i))
                  virBufferAsprintf(buf, "  <feature name='%s'/>\n",
                                    qemuMigrationCookieFlagTypeToString(i));
          }
      69660042
    • J
      qemu: switch PCI address alocation to use virDevicePCIAddress · bc28e56b
      Ján Tomko 提交于
      Some functions were using virDomainDeviceInfo where virDevicePCIAddress
      would suffice. Some were only using integers for slots and functions,
      assuming the bus numbers are always 0.
      
      Switch from virDomainDeviceInfoPtr to virDevicePCIAddressPtr:
      qemuPCIAddressAsString
      qemuDomainPCIAddressCheckSlot
      qemuDomainPCIAddressReserveAddr
      qemuDomainPCIAddressReleaseAddr
      
      Switch from int slot to virDevicePCIAddressPtr:
      qemuDomainPCIAddressReserveSlot
      qemuDomainPCIAddressReleaseSlot
      qemuDomainPCIAddressGetNextSlot
      
      Deleted functions (they would take the same parameters
      as ReserveAddr/ReleaseAddr do now.)
      qemuDomainPCIAddressReserveFunction
      qemuDomainPCIAddressReleaseFunction
      bc28e56b
    • G
      virsh: distinguish errors between missing argument and wrong option · dd71fa11
      Guannan Ren 提交于
      Specifying ':' to suppress the error messages printed by getopt().
      Then, distinguish the two types of errors.
      
      Before:
       # virsh -c
         virsh: option requires an argument -- 'c'
         error: unsupported option '-?'. See --help.
      
      After:
       # virsh -c
         error: option '-c' requires an argument
      
       # virsh -x
         error: unsupported option '-x'. See --help.
      dd71fa11
    • E
      maint: sort private syms to reflect recent header renames · f190a636
      Eric Blake 提交于
      Purely mechanical (roughly, s/\n/~/; s/~~/\n/; sort by line;
      s/~/\n/)
      
      * src/libvirt_private.syms: Sort sections by header file name.
      f190a636
    • E
      maint: fix header file owners of private symbols · 8a256f3c
      Eric Blake 提交于
      Recent renames were not reflected into the comments of
      libvirt_private.syms; furthermore, since we mix private headers from
      several directories into this file, knowing where the file lives
      can be helpful.
      
      * src/libvirt_private.sym: Reflect recent names.
      8a256f3c
    • N
      net: use structs for address and port ranges · bac8b2ca
      Natanael Copa 提交于
      We pass over the address/port start/end values many times so we put
      them in structs.
      Signed-off-by: NNatanael Copa <ncopa@alpinelinux.org>
      Signed-off-by: NLaine Stump <laine@laine.org>
      bac8b2ca
    • N
      net: add support for specifying port range for forward mode nat · 1716e7a6
      Natanael Copa 提交于
      Let users set the port range to be used for forward mode NAT:
      
      ...
        <forward mode='nat'>
          <nat>
            <port start='1024' end='65535'/>
          </nat>
        </forward>
      ...
      Signed-off-by: NNatanael Copa <ncopa@alpinelinux.org>
      Signed-off-by: NLaine Stump <laine@laine.org>
      1716e7a6
    • N
      net: support set public ip range for forward mode nat · 905629f4
      Natanael Copa 提交于
      Support setting which public ip to use for NAT via attribute
      address in subelement <nat> in <forward>:
      
      ...
        <forward mode='nat'>
            <address start='1.2.3.4' end='1.2.3.10'/>
        </forward>
      ...
      
      This will construct an iptables line using:
      
        '-j SNAT --to-source <start>-<end>'
      
      instead of:
      
        '-j MASQUERADE'
      Signed-off-by: NNatanael Copa <ncopa@alpinelinux.org>
      Signed-off-by: NLaine Stump <laine@laine.org>
      905629f4
    • J
      qemu: Use atomic ops for driver->nactive · 5d6f6367
      Jiri Denemark 提交于
      5d6f6367
  3. 19 2月, 2013 6 次提交
    • J
      rpc: Avoid deadlock when closing client connection · 921af429
      Jiri Denemark 提交于
      We need to drop the server lock before calling virObjectUnlock(client)
      since in case we had the last reference to the client, its dispose
      callback would be called and that could possibly try to lock the server
      and cause a deadlock. This is exactly what happens when there is only
      one QEMU domain running and it is marked to be autodestroyed when the
      connection dies. This results in qemuProcessAutoDestroy ->
      qemuProcessStop -> virNetServerRemoveShutdownInhibition call sequence,
      where the last function locks the server.
      921af429
    • J
      Avoid resetting errors in virTypedParamsFree · ee1d6d91
      Jiri Denemark 提交于
      The function does not report any errors so there should be no need too
      reset an existing error first. Moreover, virTypedParamsFree is mostly
      called in cleanup phase where it has the potential to reset any useful
      reported earlier.
      ee1d6d91
    • J
      virsh: Always print capacity unit · ada9e157
      Jiri Denemark 提交于
      It doesn't make sense to print the unit (B) only with Ki, Mi, ...
      prefixes. Even those poor bytes under 1 KiB are still bytes :-)
      ada9e157
    • E
      build: force correct gcc syntax for attribute_nonnull · e086deda
      Eric Blake 提交于
      Gcc lets you do:
      
      int ATTRIBUTE_NONNULL(1) foo(void *param);
      int foo(void *param) ATTRIBUTE_NONNULL(1);
      int ATTRIBUTE_NONNULL(1) foo(void *param) { ... }
      
      but chokes on:
      
      int foo(void *param) ATTRIBUTE_NONNULL(1) { ... }
      
      However, since commit eefb881d, we have intentionally been disabling
      ATTRIBUTE_NONNULL because of lame gcc handling of the attribute (that
      is, gcc doesn't do decent warning reporting, then compiles code that
      mysteriously fails if you break the contract of the attribute, which
      is surprisingly easy to do), leaving it on only for Coverity (which
      does a much better job of improved static analysis when the attribute
      is present).
      
      But completely eliding the macro makes it too easy to write code that
      uses the fourth syntax option, if you aren't using Coverity.  So this
      patch forces us to avoid syntax errors, even when not using the
      attribute under gcc.  It also documents WHY we disable the warning
      under gcc, rather than forcing you to find the commit log.
      
      * src/internal.h (ATTRIBUTE_NONNULL): Expand to empty attribute,
      rather than nothing, when on gcc.
      e086deda
    • G
      qemu: pass "-1" as uid/gid for unprivileged qemu · 272be1a8
      Guido Günther 提交于
      so we don't try to change uid/git to 0 when probing capabilities.
      272be1a8
    • D
      Add capabilities bit for -no-kvm-pit-reinjection · 41046256
      Doug Goldstein 提交于
      The conversion to qemuCaps dropped the ability with qemu{,-kvm} 1.2 and
      newer to set the lost tick policy for the PIT. While the
      -no-kvm-pit-reinjection option is depreacated, it is still supported at
      least through 1.4, it is better to not lose the functionality.
      41046256
  4. 18 2月, 2013 2 次提交
  5. 16 2月, 2013 5 次提交