1. 07 1月, 2013 6 次提交
    • 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
      docs: Add docs and rng schema for new XML tag sgio · b9c57e7b
      Osier Yang 提交于
      This introduces new XML tag "sgio" for disk, its valid values
      are "filtered" and "unfiltered", setting it as "filtered" will
      set the disk's unpriv_sgio to 0, and "unfiltered" to set it
      as 1, which allows the unprivileged SG_IO commands.
      b9c57e7b
    • 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
  2. 05 1月, 2013 15 次提交
  3. 04 1月, 2013 6 次提交
  4. 03 1月, 2013 3 次提交
    • M
      qemu: Don't parse log output when starting up a domain · b3f2b4ca
      Michal Privoznik 提交于
      Despite our great effort we still parsed qemu log output.
      We wouldn't notice unless upcoming qemu 1.4 changed the
      format of the logs slightly. Anyway, now we should gather
      all interesting knobs like pty paths from monitor. Moreover,
      since for historical reasons the first console can be just
      an alias to the first serial port, we need to check this and
      copy the pty path if that's the case to the first console.
      b3f2b4ca
    • E
      build: use autobuild module to make build logs nicer · 83aca30f
      Eric Blake 提交于
      A recent build failure made me realize that we could usefully add
      a bit more information to configure output, for aid in analysis of
      failed builds.  Pulling in the autobuild module merely adds these
      four lines to configure output:
      
      configure: autobuild project... libvirt
      configure: autobuild revision... v1.0.1-113-g7a74eeaf
      configure: autobuild hostname... myhost
      configure: autobuild timestamp... 20130102T233543Z
      
      which can be useful even if not using the Autobuild project to parse
      build logs.
      
      * bootstrap.conf (gnulib_modules): Add autobuild.
      * configure.ac: Favor git version over release version, when available.
      83aca30f
    • E
      maint: update to latest gnulib · 7a74eeaf
      Eric Blake 提交于
      'make syntax-check' warned that gnulib's copyright is now out of date.
      
      * .gnulib: Update to latest, for copyright year bump.
      * gnulib/local/m4/ssize_t.m4.diff: Regenerate.
      * bootstrap: Synchronize from upstream.
      7a74eeaf
  5. 02 1月, 2013 3 次提交
  6. 30 12月, 2012 1 次提交
    • M
      qemu: Adapt to new log format · 28224c4d
      Michal Privoznik 提交于
      Since 586502189edf9fd0f89a83de96717a2ea826fdb0 qemu commit, the log
      lines reporting chardev's path has changed from:
      
      $ ./x86_64-softmmu/qemu-system-x86_64 -serial pty -serial pty -monitor pty
      char device redirected to /dev/pts/5
      char device redirected to /dev/pts/6
      char device redirected to /dev/pts/7
      
      to:
      
      $ ./x86_64-softmmu/qemu-system-x86_64 -serial pty -serial pty -monitor pty
      char device compat_monitor0 redirected to /dev/pts/5
      char device serial0 redirected to /dev/pts/6
      char device serial1 redirected to /dev/pts/7
      
      However, with current code we are not prepared for such change, which
      results in us being unable to start any domain.
      28224c4d
  7. 28 12月, 2012 2 次提交
    • M
      sanlock: Chown lease files as well · ce753ec5
      Michal Privoznik 提交于
      Since sanlock doesn't run under root:root, we have chown()'ed the
      __LIBVIRT__DISKS__ lease file to the user:group defined in the
      sanlock config. However, when writing the patch I've forgot about
      lease files for each disk (this is the
      /var/lib/libvirt/sanlock/<md5>) file.
      ce753ec5
    • M
      python: Adapt to virevent rename · e2d7e7c6
      Michal Privoznik 提交于
      With our recent renames under src/util/* we forgot to adapt
      python wrapper code generator. This results in some methods being
      not exposed:
      
      $ python examples/domain-events/events-python/event-test.py
      Using uri:qemu:///system
      Traceback (most recent call last):
        File "examples/domain-events/events-python/event-test.py", line 585, in <module>
          main()
        File "examples/domain-events/events-python/event-test.py", line 543, in main
          virEventLoopPureStart()
        File "examples/domain-events/events-python/event-test.py", line 416, in virEventLoopPureStart
          virEventLoopPureRegister()
        File "examples/domain-events/events-python/event-test.py", line 397, in virEventLoopPureRegister
          libvirt.virEventRegisterImpl(virEventAddHandleImpl,
      AttributeError: 'module' object has no attribute 'virEventRegisterImpl'
      e2d7e7c6
  8. 24 12月, 2012 2 次提交
  9. 22 12月, 2012 2 次提交
    • V
      S390: Re-enable capability probing for virtio devices. · fec9822e
      Viktor Mihajlovski 提交于
      Since we switched to QMP probing, the object types are spelled out
      explicitly, i.e. virtio-net-pci. This has effectively disabled
      the capability detection of s390 virtio devices. The trivial fix
      is to add the s390 virtio types explicitly to qemuCapsObjectProps.
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      fec9822e
    • L
      util: fix botched check for new netlink request filters · 7c366506
      Laine Stump 提交于
      This is an adjustment to the fix for
      
        https://bugzilla.redhat.com/show_bug.cgi?id=889319
      
      to account for two bonehead mistakes I made.
      
      commit ac2797cf attempted to fix a
      problem with netlink in newer kernels requiring an extra attribute
      with a filter flag set in order to receive an IFLA_VFINFO_LIST from
      netlink. Unfortunately, the #ifdef that protected against compiling it
      in on systems without the new flag went a bit too far, assuring that
      the new code would *never* be compiled, and even if it had, the code
      was incorrect.
      
      The first problem was that, while some IFLA_* enum values are also
      their existence at compile time, IFLA_EXT_MASK *isn't* #defined, so
      checking to see if it's #defined is not a valid method of determining
      whether or not to add the attribute. Fortunately, the flag that is
      being set (RTEXT_FILTER_VF) *is* #defined, and it is never present if
      IFLA_EXT_MASK isn't, so it's sufficient to just check for that flag.
      
      And to top it off, due to the code not actually compiling when I
      thought it did, I didn't realize that I'd been given the wrong arglist
      to nla_put() - you can't just send a const value to nla_put, you have
      to send it a pointer to memory containing what you want to add to the
      message, along with the length of that memory.
      
      This time I've actually sent the patch over to the other machine
      that's experiencing the problem, applied it to the branch being used
      (0.10.2) and verified that it works properly, i.e. it does fix the
      problem it's supposed to fix. :-/
      7c366506