1. 09 2月, 2012 15 次提交
    • M
      sheepdog: fix co_recv coroutine context · 6d1acda8
      MORITA Kazutaka 提交于
      The co_recv coroutine has two things that will try to enter it:
      
        1. The select(2) read callback on the sheepdog socket.
        2. The aio_add_request() blocking operations, including a coroutine
           mutex.
      
      This patch fixes it by setting NULL to co_recv before sending data.
      
      In future, we should make the sheepdog driver fully coroutine-based
      and simplify request handling.
      Signed-off-by: NMORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      6d1acda8
    • A
      AHCI: Fix port reset race · c9b308d2
      Alexander Graf 提交于
      bdrv_aio_cancel() can trigger bdrv_aio_flush() which makes all aio
      that is currently in flight finish. So what we do is:
      
        port reset
        detect ncq in flight
        cancel ncq
        delete ncq sg list
      
      at which point we have double freed the sg list. Instead, with this
      patch we do:
      
        port reset
        detect ncq in flight
        cancel ncq
        check if we are really still in flight
        delete ncq sg list
      
      which makes things work and gets rid of the race.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      c9b308d2
    • D
      rewrite QEMU_BUILD_BUG_ON · ea8f978f
      Dong Xu Wang 提交于
      On some platforms, __LINE__ will not expand to real number in QEMU_BUILD_BUG_ON,
      so if using QEMU_BUILD_BUG_ON twice, compiler will report errors. This patch will
      fix it.
      
      BTW, I got error message on RHEL 6.1/gcc 4.4.5.
      Signed-off-by: NDong Xu Wang <wdongxu@linux.vnet.ibm.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      ea8f978f
    • K
      qcow2: Keep unknown header extension when rewriting header · 75bab85c
      Kevin Wolf 提交于
      If we want header extensions to work as compatible extensions, we can't
      destroy yet unknown header extensions when rewriting the header (e.g.
      for changing the backing file). Save all unknown header extensions in a
      list of blobs and include them in a new header.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      75bab85c
    • K
      qcow2: Update whole header at once · e24e49e6
      Kevin Wolf 提交于
      In order to switch the backing file, qcow2 issues multiple write
      requests that only changed a part of the image header. Any failure after
      the first one would leave the header in an corrupted state. With this
      patch, the whole header is written at once, so we can't fail in the
      middle.
      
      At the same time, this gives us a reusable functions that updates all
      fields of the qcow2 header and not only the backing file.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      e24e49e6
    • K
      vpc: Round up image size during fixed image creation · ecd880d9
      Kevin Wolf 提交于
      The geometry calculation algorithm from the VHD spec rounds the image
      size down if it doesn't exactly match a geometry. During image
      conversion, this causes the image to be truncated. For dynamic images,
      we already have code in place to round up instead, let's do the same for
      fixed images.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      ecd880d9
    • C
      vpc: Add support for Fixed Disk type · 24da78db
      Charles Arnold 提交于
      The Virtual Hard Disk Image Format Specification allows for three
      types of hard disk formats, Fixed, Dynamic, and Differencing.  Qemu
      currently only supports Dynamic disks.  This patch adds support for
      the Fixed Disk format.
      
      Usage:
          Example 1: qemu-img create -f vpc -o type=fixed <filename> [size]
          Example 2: qemu-img convert -O vpc -o type=fixed <input filename> <output filename>
      
      While it is also allowed to specify '-o type=dynamic', the default disk type
      remains Dynamic and is what is used when the type is left unspecified.
      Signed-off-by: NCharles Arnold <carnold@suse.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      24da78db
    • R
      iSCSI: add configuration variables for iSCSI · f9dadc98
      Ronnie Sahlberg 提交于
      This patch adds configuration variables for iSCSI to set
      initiator-name to use when logging in to the target,
      which type of header-digest to negotiate with the target
      and username and password for CHAP authentication.
      
      This allows specifying a initiator-name either from the command line
      -iscsi initiator-name=iqn.2004-01.com.example:test
      or from a configuration file included with -readconfig
          [iscsi]
            initiator-name = iqn.2004-01.com.example:test
            header-digest = CRC32C|CRC32C-NONE|NONE-CRC32C|NONE
            user = CHAP username
            password = CHAP password
      
      If you use several different targets, you can also configure this on a per
      target basis by using a group name:
          [iscsi "iqn.target.name"]
          ...
      
      The configuration file can be read using -readconfig.
      Example :
      qemu-system-i386 -drive file=iscsi://127.0.0.1/iqn.ronnie.test/1
       -readconfig iscsi.conf
      Signed-off-by: NRonnie Sahlberg <ronniesahlberg@gmail.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      f9dadc98
    • S
      qemu-io: add write -z option for bdrv_co_write_zeroes · 71b58b82
      Stefan Hajnoczi 提交于
      Extend the qemu-io write command with the -z option to call
      bdrv_co_write_zeroes().  Exposing the zero write interface from qemu-io
      allows us to write tests that exercise this new block layer interface.
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      71b58b82
    • S
      qed: add .bdrv_co_write_zeroes() support · 0e71be19
      Stefan Hajnoczi 提交于
      Zero writes are a dedicated interface for writing regions of zeroes into
      the image file.  If clusters are not yet allocated it is possible to use
      an efficient metadata representation which keeps the image file compact
      and does not store individual zero bytes.
      
      Implementing this for the QED image format is fairly straightforward.
      The only issue is that when a zero write touches an existing cluster we
      have to allocate a bounce buffer and perform a regular write.
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      0e71be19
    • S
      qed: replace is_write with flags field · 6e4f59bd
      Stefan Hajnoczi 提交于
      Per-request attributes like read/write are currently implemented as bool
      fields in the QEDAIOCB struct.  This becomes unwiedly as the number of
      attributes grows.  For example, the qed_aio_setup() function would have
      to take multiple bool arguments and at call sites it would be hard to
      distinguish the meaning of each bool.
      
      Instead use a flags field with bitmask constants.  This will be used
      when zero write support is added.
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      6e4f59bd
    • S
      block: perform zero-detection during copy-on-read · 79c053bd
      Stefan Hajnoczi 提交于
      Copy-on-Read populates the image file with data read from a backing
      image.  In order to avoid bloating the image file when all zeroes are
      read we should scan the buffer and perform an optimized zero write
      operation.
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      79c053bd
    • S
      block: add .bdrv_co_write_zeroes() interface · f08f2dda
      Stefan Hajnoczi 提交于
      The ability to zero regions of an image file is a useful primitive for
      higher-level features such as image streaming or zero write detection.
      
      Image formats may support an optimized metadata representation instead
      of writing zeroes into the image file.  This allows zero writes to be
      potentially faster than regular write operations and also preserve
      sparseness of the image file.
      
      The .bdrv_co_write_zeroes() interface should be implemented by block
      drivers that wish to provide efficient zeroing.
      
      Note that this operation is different from the discard operation, which
      may leave the contents of the region indeterminate.  That means
      discarded blocks are not guaranteed to contain zeroes and may contain
      junk data instead.
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      f08f2dda
    • S
      cutils: extract buffer_is_zero() from qemu-img.c · 1a6d39fd
      Stefan Hajnoczi 提交于
      The qemu-img.c:is_not_zero() function checks if a buffer contains all
      zeroes.  This function will come in handy for zero-detection in the
      block layer, so clean it up and move it to cutils.c.
      
      Note that the function now returns true if the buffer is all zeroes.
      This avoids the double-negatives (i.e. !is_not_zero()) that the old
      function can cause in callers.
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      1a6d39fd
    • P
      ARM devboards: Set arm_sysctl properties before init, not after · 7a65c8cc
      Peter Maydell 提交于
      The ARM devboard models (vexpress-a9, realview, versatilepb, etc)
      were accidentally trying to set one of the arm_sysctl properties
      after device init. This has now become a fatal error; set the property
      before device init where it should be done instead.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      7a65c8cc
  2. 08 2月, 2012 6 次提交
    • A
      Merge remote-tracking branch 'bonzini/qdev-props-for-anthony' into staging · a6421530
      Anthony Liguori 提交于
      * bonzini/qdev-props-for-anthony: (25 commits)
        qdev: remove unused fields from PropertyInfo
        qdev: initialize properties via QOM
        qdev: inline qdev_prop_set into qdev_prop_set_ptr
        qdev: access properties via QOM
        qdev: fix off-by-one
        qdev: let QOM free properties
        qdev: remove parse/print methods for pointer properties
        qdev: make the non-legacy pci address property accept an integer
        qdev: remove parse/print methods for mac properties
        qdev: remove print/parse methods from LostTickPolicy properties
        qdev: remove parse method for string properties
        qdev: allow reusing get/set for legacy property
        qdev: remove direct calls to print/parse
        qom: add property get/set wrappers for links
        qom: fix canonical paths vs. interfaces
        qom: use object_resolve_path_type for links
        qom: add object_resolve_path_type
        qom: fix off-by-one
        qom: add property get/set wrappers for C types
        qom: add QObject-based property get/set wrappers
        ...
      a6421530
    • A
      Merge remote-tracking branch 'aneesh/for-upstream' into staging · dc717bfd
      Anthony Liguori 提交于
      * aneesh/for-upstream:
        hw/9pfs: Remove O_NOATIME flag from 9pfs open() calls in readonly mode
        hw/9pfs: Update MAINTAINERS file
        fsdev: Fix parameter parsing for proxy helper
        hw/9pfs: Fix crash when mounting with synthfs
        hw/9pfs: Preserve S_ISGID
        hw/9pfs: Add new security model mapped-file.
      dc717bfd
    • A
      Merge remote-tracking branch 'sweil/w32' into staging · a283b1b8
      Anthony Liguori 提交于
      * sweil/w32:
        w32: Initialise critical section before starting thread (fix #922131)
        w32: Build windows and console executables
      a283b1b8
    • M
      Restore consistent formatting · cf4dc461
      malc 提交于
      Signed-off-by: Nmalc <av1474@comtv.ru>
      cf4dc461
    • S
      w32: Initialise critical section before starting thread (fix #922131) · edc1de97
      Stefan Weil 提交于
      This patch was contributed by Bogdan Harjoc. I added some assertions.
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      edc1de97
    • S
      w32: Build windows and console executables · 0fa5491e
      Stefan Weil 提交于
      System emulation executables with SDL are typically windows
      executables. Sometimes console executables are more useful,
      so create both variants if linker option -mwindows was detected.
      
      v2:
      This version uses QEMU_PROGW / QEMU_PROG instead of QEMU_PROG / QEMU_PROGC.
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      0fa5491e
  3. 07 2月, 2012 19 次提交