1. 10 1月, 2013 3 次提交
    • G
      qemu: add usb-serial caps flag · f8d478b6
      Guannan Ren 提交于
      QEMU_CAPS_DEVICE_USB_SERIAL /* -device usb-serial */
      f8d478b6
    • M
      qemu_agent: Remove agent reference only when disposing it · f2a4e5f1
      Michal Privoznik 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=892079
      
      With current code, if user calls virDomainPMSuspendForDuration()
      followed by virDomainDestroy(), the former API checks for qemu agent
      presence, which will evaluate as true (if agent is configured). While
      talking to qemu agent, the qemu driver is unlocked, so the latter API
      starts executing.  However, if machine dies meanwhile, libvirtd gets
      EOF on the agent socket and qemuProcessHandleAgentEOF() is called. The
      handler clears reference to qemu agent while the destroy API already
      holding a reference to it. This leads to NULL dereferencing later in
      the code. Therefore, the agent pointer should be set to NULL only if
      we are the exclusive owner of it.
      f2a4e5f1
    • E
      maint: fix comment typo · 70345318
      Eric Blake 提交于
      While OOM can have knock-on effects that trash a system, generally
      the first symptom is one of memory thrashing.
      
      * src/qemu/qemu_cgroup.c (qemuSetupCgroup): Reword slightly.
      70345318
  2. 09 1月, 2013 5 次提交
  3. 08 1月, 2013 21 次提交
  4. 07 1月, 2013 8 次提交
    • E
      build: .service files don't need to be executable · 5ec4b22b
      Eric Blake 提交于
      See also commit 66ff2ddc, where we avoided installing these files
      as executables.
      
      * daemon/Makefile.am (libvirtd.service): Drop chmod.
      * tools/Makefile.am (libvirt-guests.service): Likewise.
      * src/Makefile.am (virtlockd.service, virtlockd.socket):
      Likewise.
      5ec4b22b
    • E
      build: properly substitute virtlockd.socket · cb854b8f
      Eric Blake 提交于
      virtlockd.service could be installed to a configurable root,
      but virtlockd.socket was hardcoded to installation into a
      distro.
      
      * src/Makefile.am (virtlockd.service, virtlockd.socket): Drop
      unused substitutions.
      * src/locking/virtlockd.socket.in (ListenStream): Don't hard-code
      /var.
      cb854b8f
    • E
      build: use common .in replacement mechanism · 462a6962
      Eric Blake 提交于
      We had several different styles of .in conversion in our Makefiles:
      ALLCAPS, @ALLCAPS@, @lower@, ::lower::
      Canonicalize on one form, to make it easier to copy and paste
      between .in files.
      
      Also, we were using some non-portable sed constructs: \@ is an
      undefined escape sequence (it happens to be @ itself in GNU sed,
      but POSIX allows it to mean something else), as well as risky
      behavior (failure to consistently quote things means a space
      in $(sysconfdir) could throw things off; also, Autoconf recommends
      using | rather than , or ! in the s||| operator, because | has to
      be quoted in shell and is therefore less likely to appear in file
      names than , or !).
      
      Fix all of these uses to follow the same syntax.
      
      * daemon/libvirtd.8.in: Switch to @var@.
      * tools/virt-xml-validate.in: Likewise.
      * tools/virt-pki-validate.in: Likewise.
      * src/locking/virtlockd.init.in: Likewise.
      * daemon/Makefile.am: Prefer | over ! in sed.
      (libvirtd.8): Prefer consistent substitution.
      (libvirtd.init, libvirtd.service): Avoid non-portable sed.
      * tools/Makefile.am (libvirt-guests.sh, libvirt-guests.init)
      (libvirt-guests.service): Likewise.
      (virt-xml-validate, virt-pki-validate, virt-sanlock-cleanup):
      Prefer consistent capitalization.
      * src/Makefile.am (virtlockd.init, virtlockd.service)
      (virtlockd.socket): Prefer consistent substitution.
      462a6962
    • O
      qemu: Check if the shared disk's cdbfilter conflicts with others · 1279e421
      Osier Yang 提交于
      This prevents domain starting and disk attaching if the shared disk's
      setting conflicts with other active domain(s), E.g. A domain with
      "sgio" set as "filtered", however, another active domain is using
      it set as "unfiltered".
      1279e421
    • O
      qemu: set unpriv_sgio when starting domain and attaching disk · 278f87c4
      Osier Yang 提交于
      This ignores the default "filtered" if unpriv_sgio is not supported
      by kernel, but for explicit request "filtered", it error out for
      domain starting.
      278f87c4
    • O
      conf: Parse and format the new XML · 535aed56
      Osier Yang 提交于
      Like "rawio", "sgio" is only allowed for block disk of device
      type "lun".
      
      It doesn't default disk->sgio to "filtered" when parsing, as
      it won't be able to distinguish explicitly requested "filtered"
      and a default "filtered" in driver then. We have to error out for
      explicit request when the kernel doesn't support the new sysfs
      knob "unpriv_sgio", however, for defaulted "filtered", we can
      just ignore it if the kernel doesn't support "unpriv_sgio".
      535aed56
    • O
      qemu: Add a hash table for the shared disks · d7ead3e1
      Osier Yang 提交于
      This introduces a hash table for qemu driver, to store the shared
      disk's info as (@major:minor, @ref_count). @ref_count is the number
      of domains which shares the disk.
      
      Since we only care about if the disk support unprivileged SG_IO
      commands, and the SG_IO commands only make sense for block disk,
      this patch only manages (add/remove hash entry) the shared disk for
      block disk.
      
      * src/qemu/qemu_conf.h: (Add member 'sharedDisks' of type
                               virHashTablePtr; Declare helpers
                               qemuGetSharedDiskKey, qemuAddSharedDisk
                               and qemuRemoveSharedDisk)
      * src/qemu/qemu_conf.c (Implement the 3 helpers)
      * src/qemu/qemu_process.c (Update 'sharedDisks' when domain
                                 starting and shutdown)
      * src/qemu/qemu_driver.c (Update 'sharedDisks' when attaching
                                or detaching disk).
      d7ead3e1
    • O
      util: Prepare helpers for unpriv_sgio setting · ba72cb12
      Osier Yang 提交于
      "virGetDeviceID" could be used across the sources, but it doesn't
      relate with this series, and could be done later.
      
      * src/util/virutil.h: (Declare virGetDeviceID, and
                             vir{Get,Set}DeviceUnprivSGIO)
      * src/util/virutil.c: (Implement virGetDeviceID and
                             vir{Get,Set}DeviceUnprivSGIO)
      * src/libvirt_private.syms: Export private symbols of upper helpers
      ba72cb12
  5. 05 1月, 2013 3 次提交
    • P
      snapshot: qemu: Allow redefinition of external snapshots · 731a5a4d
      Peter Krempa 提交于
      A redefinition of an external inactive snapshot/checkpoint wasn't
      possible without this change.
      731a5a4d
    • P
      snapshot: qemu: Fix segfault and vanishing snapshots when redefining · 709b0f37
      Peter Krempa 提交于
      When the disk alignment check done while redefining an existing snapshot
      failed, the qemu driver attempted to free the existing snapshot. As in
      the cleanup path the definition of the snapshot wasn't assigned, the
      cleanup code dereferenced a NULL pointer.
      
      This patch changes the behavior on error paths while redefining snapshot
      in two ways:
      
      1) On failure, modifications done on the snapshot definition object are
      rolled back.
      
      2) The previous definition of the data isn't freed until it's certain it
      won't be needed any more.
      
      This change avoids the segfault and additionally the snapshot doesn't
      vanish if redefinition fails for some reason.
      709b0f37
    • P
      snapshot: qemu: Separate logic blocks with newlines · 4494b11f
      Peter Krempa 提交于
      4494b11f