1. 08 5月, 2012 3 次提交
    • Z
      block: make bdrv_create adopt coroutine · 5b7e1542
      Zhi Yong Wu 提交于
      The current qemu.git introduces failure with preallocation and some
      sizes:
      
      qemu-img create -f qcow2 new.img 976563K -o preallocation=metadata
      qemu-img: qemu-coroutine-lock.c:111: qemu_co_mutex_unlock: Assertion
      `mutex->locked == 1' failed.
      
      And lock needs to work in coroutine context. So to fix this issue, we
      need to make bdrv_create adopt coroutine at first.
      Signed-off-by: NZhi Yong Wu <wuzhy@linux.vnet.ibm.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      5b7e1542
    • K
      qcow2: Limit COW to where it's needed · 54e68143
      Kevin Wolf 提交于
      This fixes a regression introduced in commit 250196f1. The bug leads to
      data corruption, found during an Autotest run with a Fedora 8 guest.
      
      Consider a write request whose first part is covered by an already
      allocated cluster, but additional clusters need to be newly allocated.
      When counting the number of clusters to allocate, the qcow2 code would
      decide to do COW for all remaining clusters of the write request, even
      if some of them are already allocated.
      
      If during this COW operation another write request is issued that touches
      the same cluster, it will still refer to the old cluster. When the COW
      completes, the first request will update the L2 table and the second
      write request will be lost. Note that the requests need not overlap, it's
      enough for them to touch the same cluster.
      
      This patch ensures that only clusters that really require COW are
      considered for allocation. In this case any other request writing to the
      same cluster will be an allocating write and gets serialised.
      Reported-by: NMarcelo Tosatti <mtosatti@redhat.com>
      Tested-by: NMarcelo Tosatti <mtosatti@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      54e68143
    • M
      sheepdog: switch to writethrough mode if cluster doesn't support flush · 115c2b5a
      MORITA Kazutaka 提交于
      This is necessary for qemu to work with the older version of Sheepdog
      which doesn't support SD_OP_FLUSH_VDI.
      Signed-off-by: NMORITA Kazutaka <morita.kazutaka@gmail.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      115c2b5a
  2. 07 5月, 2012 5 次提交
    • H
      hw/ac97: Mask out the EAPD bit on Powerdown Ctrl/Stat writes · 847c25d0
      Hans de Goede 提交于
      The Linux AC97 driver tests this bit to decide wether or not to show
      an External amplifier toggle control.
      
      This patch was also tested with a Windows XP guest without any issues.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: Nmalc <av1474@comtv.ru>
      847c25d0
    • H
      hw/ac97: Mask out unused bits of volume controls · 7873bfb8
      Hans de Goede 提交于
      The Linux ac97 drivers does a number of register read/write tests to
      see how much resolution a volume control actually has.
      
      This patch takes this into account by masking out any bits written to
      a volume control reg which should not be there according to the spec.
      
      After this the Linux ac97 driver correctly uses a range of 0 - 0x1f for
      the PCM out volume, as stated in the spec, and we can fix the FIXME
      in update_combined_volume_out().
      
      This patch was also tested with a Windows XP guest without any issues.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: Nmalc <av1474@comtv.ru>
      7873bfb8
    • H
      hw/ac97: Use AC97_Record_Gain_Mute not AC97_Line_In_Volume_Mute · f94e9b9b
      Hans de Goede 提交于
      After commit 19677a38:
      "hw/ac97: add support for volume control"
      
      We are (correctly) using AC97_Record_Gain_Mute and not AC97_Line_In_Volume_Mute
      for recording volume, but various places in hw/ac97 were still assumimg that
      we are using AC97_Line_In_Volume_Mute for record volume control, this patch
      fixes this.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: Nmalc <av1474@comtv.ru>
      f94e9b9b
    • H
      hw/ac97: Make a bunch of mixer registers read only · d044be37
      Hans de Goede 提交于
      The Linux ac97 driver tries to see if optional things like video input
      volume control are available in 2 ways:
      1) See if the mute bit is set after reset, if it is no further tests are done
      2) If the mute bit is not set it does a write/read test of the mute bit
      
      This patch changes our ac97 to conform to what the Linux driver expects, it
      initializes registers for things which we don't emulate to 0 (so the mute bit
      is not set) and makes them read only.
      
      This causes Linux to now longer show the following (functionless)
      controls in alsamixer:
      
      Master Mono vol + mute
      3d Control toggle
      PCM out pre / post 3d select
      Surround toggle
      CD vol + mute
      Mic vol + mute
      Mic boost toggle
      Mic mic1 / mic2 select
      Video vol + mute
      Phone vol + mute
      Beep mono vol + mute
      Aux vol + mute
      Mono "output mic" / "mix" select
      Sigmatel 4 speaker stereo toggle
      Sigmatel ADC 6Db att toggle
      Sigmatel DAC 6Db att toggle
      
      This patch was also tested with a Windows XP guest and there it also makes
      a number of functionless mixer controls go away.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: Nmalc <av1474@comtv.ru>
      d044be37
    • H
      hw/ac97: Fix log message in mixer_load · a4e652eb
      Hans de Goede 提交于
      Fix a small copy and paste error in logging.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: Nmalc <av1474@comtv.ru>
      a4e652eb
  3. 04 5月, 2012 1 次提交
  4. 03 5月, 2012 12 次提交
  5. 02 5月, 2012 19 次提交