1. 08 4月, 2011 12 次提交
    • E
      docs: tweak virsh restore warning · 5bc22e12
      Eric Blake 提交于
      * tools/virsh.pod: Fix grammar, and clarify wording.
      * src/qemu/qemu_driver.c (qemudDomainObjStart): Drop redundant
      condition.
      5bc22e12
    • W
      do not build libvirt_iohelper when building without libvirtd · 2999bb06
      Wen Congyang 提交于
      The libexec program libvirt_iohelper is only for libvirtd. If we build rpm
      without libvirtd, we will receive the following messages:
      
      Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/wency/rpmbuild/BUILDROOT/libvirt-0.9.0-1.el6.x86_64
      error: Installed (but unpackaged) file(s) found:
         /usr/libexec/libvirt_iohelper
      2999bb06
    • S
      nwfilters: support for TCP flags evaluation · 6ab24feb
      Stefan Berger 提交于
      This patch adds support for the evaluation of TCP flags in nwfilters.
      
      It adds documentation to the web page and extends the tests as well.
      Also, the nwfilter schema is extended.
      
      The following are some example for rules using the tcp flags:
      
      <rule action='accept' direction='in'>
          <tcp state='NONE' flags='SYN/ALL' dsptportstart='80'/>
      </rule>
      <rule action='drop' direction='in'>
          <tcp state='NONE' flags='SYN/ALL'/>
      </rule>
      6ab24feb
    • T
      setmem: add --current option to virsh setmem command · 80427f1d
      Taku Izumi 提交于
      This patch adds the new option (--current) to the "virsh setmem" command.
      When --current option is specified, it affects a "current" domain.
      The word "current" denotes that if a domain is running, it affects
      a running domain only; otherwise it affects a persistent domain.
      Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
      80427f1d
    • T
      setmem: add VIR_DOMAIN_MEM_CURRENT support to qemu · 95298e23
      Taku Izumi 提交于
      This patch adds virDomainSetMemoryFlags(,,VIR_DOMAIN_MEM_CURRENT) support
      code to qemu driver.
      
      Also, change virDomainObjIsActive to return bool, given its usage.
      Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
      95298e23
    • T
      setmem: introduce VIR_DOMAIN_MEM_CURRENT flag · 0f2e50be
      Taku Izumi 提交于
      This patch introduces VIR_DOMAIN_MEM_CURRENT flag and
      modifies virDomainSetMemoryFlags function to support it.
      Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
      0f2e50be
    • J
      build: Install libxenlight log dir · f7e9b448
      Jim Fehlig 提交于
      Add $localstatedir/log/libvirt/libxl when building libxenlight driver
      f7e9b448
    • T
      setmaxmem: remove the code to invoke virDomainSetMemory in cmdSetmaxmem · 74891d94
      Taku Izumi 提交于
      When the new maximum memory size becomes less than the current memory size,
      I think it is not the libvirt client but the each driver that decides the behavior
      (reject the operation or shrink the current memory size).
      Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
      74891d94
    • E
      virsh: fix mingw startup · 8ae5df5d
      Eric Blake 提交于
      * .gnulib: Update to latest, for pipe2.
      * bootstrap.conf (gnulib_modules): Add pipe2.
      * src/util/event_poll.c (virEventPollInit): Use it, to avoid
      problematic virSetCloseExec on mingw.
      8ae5df5d
    • E
      build: fix gitignore sorting · 02c39a2f
      Eric Blake 提交于
      Make it so we don't have to 'git add -f' particular files like
      po/POTFILES.in all the time (tested by fixing one of our
      special-case files as part of the patch).
      
      * .gnulib: Update to latest.
      * bootstrap: Resync from coreutils.
      * .gitignore: Sort whitelist entries correctly, including ignoring
      files rather than directories.
      * m4/virt-compile-warnings.m4: Convert tabs to space.
      02c39a2f
    • L
      docs: add an IPv6 address to network XML examples · f25d064e
      Laine Stump 提交于
      It was just pointed out that, although I added documentation for the
      IPv6 additions to the network XML, I neglected to use those additions
      in the examples. This patch adds an IPv6 address to each of the
      examples except for the "default" network, since that is a faithful
      reproduction of the default network config that's automatically
      installed, which doesn't include any IPv6 address (for good reason -
      because there is no such thing as IPv6 NAT, there is no one IPv6
      address that would work for all installations).
      f25d064e
    • M
      Add domainSet/GetSchedulerParameters to libxl driver · a7a4414b
      Markus Groß 提交于
      Libxenlight currently only supports the credit scheduler.
      Therefore setting or getting a parameter of other
      schedulers raise an error (for now).
      a7a4414b
  2. 07 4月, 2011 11 次提交
    • O
      qemu: Remove the managed state file only if restoring succeeded · a73bbfc8
      Osier Yang 提交于
      1) Both "qemuDomainStartWithFlags" and "qemuAutostartDomain" try to
      restore the domain from managedsave'ed image if it exists (by
      invoking "qemuDomainObjRestore"), but it unlinks the image even
      if restoring fails, which causes data loss. (This problem exists
      for "virsh managedsave dom; virsh start dom").
      
      The fix for is to unlink the managed state file only if restoring
      succeeded.
      
      2) For "virsh save dom; virsh restore dom;", it can cause data
      corruption if one reuse the saved state file for restoring. Add
      doc to tell user about it.
      
      3) In "qemuDomainObjStart", if "managed_save" is NULL, we shouldn't
      fallback to start the domain, skipping it to cleanup as a incidental
      fix. Discovered by Eric.
      a73bbfc8
    • W
      reattach pci devices when qemuPrepareHostdevPCIDevices() failed · a4efb2e3
      Wen Congyang 提交于
      Reattach all pci devices that we detached when qemuPrepareHostdevPCIDevices()
      failed.
      a4efb2e3
    • W
      reattach pci device when pciBindDeviceToStub() failed · 4e8969eb
      Wen Congyang 提交于
      We should bind pci device to original driver when pciBindDeviceToStub() failed.
      If the pci device is not bound to any driver before calling pciBindDeviceToStub(),
      we should only unbind it from pci-stub. If it is bound to pci-stub, we should not
      unbind it from pci-stub.
      4e8969eb
    • W
      rename pciUnBindDeviceFromStub() to pciUnbindDeviceFromStub() and float it up · 9121b193
      Wen Congyang 提交于
      This patch do the following things:
      1. rename the function as 'Unbind' is better than 'UnBind'.
      2. pciUnbindDeviceFromStub() will be used in the function pciBindDeviceToStub() in
         next patch. Float it up, instead of having to have a forward declaration
      9121b193
    • W
      remove devices from driver->activePciHostdevs when qemuPrepareHostdevPCIDevices() failed · 11549859
      Wen Congyang 提交于
      We should not mark pci devices as active when qemuPrepareHostdevPCIDevices()
      failed.
      11549859
    • W
      pci: avoid invalid free, init path to NULL · d5981f1c
      Wen Congyang 提交于
      This bug was introduce by commit 57162db8, and it will cause libvirtd crashed.
      d5981f1c
    • E
      build: avoid compiler warning on cygwin · f6447e8a
      Eric Blake 提交于
      In file included from util/threads.c:31:
      util/threads-pthread.c: In function 'virThreadSelfID':
      util/threads-pthread.c:214: warning: cast from function call of type 'pthread_t' to non-matching type 'int' [-Wbad-function-cast]
      
      * src/util/threads-pthread.c (virThreadSelfID) [!SYS_gettid]:
      Add intermediate cast to silence gcc.
      f6447e8a
    • M
      Add domainIsUpdated to libxl driver · bf7f6251
      Markus Groß 提交于
      bf7f6251
    • J
      Fix build for older gcc · 3df6fd70
      Jim Fehlig 提交于
      With gcc 4.3.4 I'm seeing the following warning failure
      
      cc1: warnings being treated as errors
      cc1: error: -funit-at-a-time is required for inlining of functions
      that are only called once [-Wdisabled-optimization]
      
      Add -funit-at-a-time to WARN_CFLAGS.
      3df6fd70
    • S
      Change locking for udev monitor and callbacks · 28795828
      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>
      28795828
    • E
      tests: fix recent test failures · 25b39315
      Eric Blake 提交于
      * tests/qemuxml2argvdata/qemuxml2argv-*.args: Reflect reserved VGA
      port change.
      25b39315
  3. 06 4月, 2011 6 次提交
    • J
      qemu: Support for overriding NPROC limit · 87e78b2b
      Jiri Denemark 提交于
      This patch adds max_processes option to qemu.conf which can be used to
      override system default limit on number of processes that are allowed to
      be running for qemu user.
      87e78b2b
    • O
      qemu: Always reserves slot 0x02 for primary VGA. · 7b2cac12
      Osier Yang 提交于
      To address https://bugzilla.redhat.com/show_bug.cgi?id=692355
      
      This fix is to reserve slot 0x02 for primary VGA even if there
      is no "video" specified in domain XML to avoid the problem.
      7b2cac12
    • E
      libxl: avoid compiler warning · 3eb869a0
      Eric Blake 提交于
      cc1: warnings being treated as errors
      libxl/libxl_driver.c: In function 'libxlDomainSetVcpusFlags':
      libxl/libxl_driver.c:1570:14: error: cast from function call of type 'double' to non-matching type 'unsigned int' [-Wbad-function-cast]
      libxl/libxl_driver.c:1578:15: error: cast from function call of type 'double' to non-matching type 'unsigned int' [-Wbad-function-cast]
      
      This was the only use of floor() and ceil(), and floating-point
      is overkill for power-of-two manipulations.
      
      * src/libxl/libxl_driver.c (libxlDomainSetVcpusFlags): Avoid -lm
      for trivial computations.
      3eb869a0
    • D
      Fix typo in systemtap tapset directory name · a7e80bde
      Daniel P. Berrange 提交于
      The systemtap directory for tapsets is called
      
        /usr/share/systemtap/tapset
      
      Not
      
       /usr/share/systemtap/tapsets
      
      * daemon/Makefile.am,libvirt.spec.in: s/tapsets/tapset/
      a7e80bde
    • D
      Don't try to enable stack protector on Win32 · dba5ba62
      Daniel P. Berrange 提交于
      The GCC Win32 compiler will claim to support -fstack-protector,
      but if it actually gets triggered by a suitable code pattern,
      linking will fail. Other non-Linux OS likely suffer the same
      way with gcc.
      
      * m4/virt-compile-warnings.m4: Only use stack protector when
        the build target is Linux.
      dba5ba62
    • D
      Avoid compiler warnings about int -> void * casts · 5b099250
      Daniel P. Berrange 提交于
      GCC is a little confused about the cast of beginthread/beginthreadex
      from unsigned long -> void *. Go via an intermediate variable avoids
      the bogus warning, and makes the code a little cleaner
      
      * src/util/threads-win32.c: Avoid compiler warning in cast
      5b099250
  4. 05 4月, 2011 11 次提交
    • D
      Improve SCSI volume key generation · fdcd06ef
      Daniel P. Berrange 提交于
      The SCSI volumes get a better 'key' field based on the fully
      qualified volume path. All SCSI volumes have a unique serial
      available in hardware which can be obtained by sending a
      suitable SCSI command. Call out to udev's 'scsi_id' command
      to fetch this value
      
      * src/storage/storage_backend_scsi.c: Improve volume key
        field value stability and uniqueness
      fdcd06ef
    • J
      qemu: Ignore unusable binaries · ef264e82
      Jiri Denemark 提交于
      When initializing qemu guest capabilities, we should ignore qemu
      binaries that we are not able to extract version/help info from since
      they will be unusable for creating domains anyway. Ignoring them is also
      much better than letting initialization of qemu driver fail.
      ef264e82
    • J
      qemu: Rewrite LOOKUP_PTYS macro into a function · 69afdf14
      Jiri Denemark 提交于
      The macro is huge and gives us nothing but headache when maintaining it.
      69afdf14
    • D
      Enable use of -Wold-style-definition compiler flag · a4e37ff1
      Daniel P. Berrange 提交于
      A couple of functions were declared using the old style foo()
      for no-parameters, instead of foo(void)
      
      * src/xen/xen_hypervisor.c, tests/testutils.c: Replace () with (void)
        in some function declarations
      * m4/virt-compile-warnings.m4: Enable -Wold-style-definition
      a4e37ff1
    • D
      Enable use of -Wmissing-noreturn · 329e9dc6
      Daniel P. Berrange 提交于
      * src/internal.h: Define a ATTRIBUTE_NO_RETURN annotation
      * src/lxc/lxc_container.c: Annotate lxcContainerDummyChild
        with ATTRIBUTE_NO_RETURN
      * tests/eventtest.c: Mark async thread as ATTRIBUTE_NO_RETURN
      * m4/virt-compile-warnings.m4: Enable -Wmissing-noreturn
      329e9dc6
    • D
      Enable -Wmissing-format-attribute warning · 7d76d5d5
      Daniel P. Berrange 提交于
      Add a couple of missing ATTRIBUTE_FMT_PRINTF annotations
      
      * tools/virsh.c, tests/testutils.c: Add printf format attribute
      * m4/virt-compile-warnings.m4: Enable -Wmissing-format-attribute
      7d76d5d5
    • D
      Remove acinclude.m4 file · 4825b521
      Daniel P. Berrange 提交于
      Split the bit acinclude.m4 file into smaller pieces named
      as m4/virt-XXXXX.m4
      
      * .gitignore: Ignore gettext related files
      * acinclude.m4: Delete
      * m4/virt-compile-warnings.m4: Checks for GCC compiler flags
      * m4/virt-pkgconfig-back-compat.m4: Backcompat check for
        pkgconfig program
      4825b521
    • D
      Use gnulib's manywarnings & warnings modules · 0e867555
      Daniel P. Berrange 提交于
      Remove custom code for checking compiler warnings, using
      gl_WARN_ADD instead. Don't list all flags ourselves, use
      gnulib's gl_MANYWARN_ALL_GCC to get all possible GCC flags,
      then turn off the ones we don't want yet.
      
      * acinclude.m4: Rewrite to use gl_WARN_ADD and gl_MANYWARN_ALL_GCC
      * bootstrap.conf: Add warnings & manywarnings
      * configure.ac: Switch to gl_WARN_ADD
      * m4/compiler-flags.m4: Obsoleted by gl_WARN_ADD
      0e867555
    • D
      Remove possible uninitialized variable in openvz driver · 22240241
      Daniel P. Berrange 提交于
      * src/openvz/openvz_driver.c: Initialize saveptr variable
      22240241
    • M
      Use virBufferPtr for sexpr2string instead of manual buffer handling · 9e3550dc
      Matthias Bolte 提交于
      Removes 4kb stack allocation in the XenD subdriver.
      9e3550dc
    • M
      xend: Remove 4kb stack allocation · 9faf3d08
      Matthias Bolte 提交于
      9faf3d08