1. 30 9月, 2014 16 次提交
  2. 23 9月, 2014 11 次提交
  3. 22 9月, 2014 13 次提交
    • F
      block: Always compile virtio-blk dataplane · 52b53c04
      Fam Zheng 提交于
      Dataplane doesn't depend on linux-aio any more, so we don't need the
      compiling condition now.
      
      Configure options are kept but just print a message.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 1410329871-28885-4-git-send-email-famz@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      52b53c04
    • F
      vring: Better error handling if num is too large · 032f8b81
      Fam Zheng 提交于
      To be more consistent inside this function.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 1410329871-28885-3-git-send-email-famz@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      032f8b81
    • F
      virtio: Import virtio_vring.h · d9612b43
      Fam Zheng 提交于
      This header has no further dependencies. It only has some stable data
      types and primitive functions, so we can copy it to include/hw/virtio in
      order to allow vring code (and its user virtio-blk dataplane) to be
      built unconditionally, even for cross compiling.
      Suggested-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 1410329871-28885-2-git-send-email-famz@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      d9612b43
    • C
      async: aio_context_new(): Handle event_notifier_init failure · 2f78e491
      Chrysostomos Nanakos 提交于
      On a system with a low limit of open files the initialization
      of the event notifier could fail and QEMU exits without printing any
      error information to the user.
      
      The problem can be easily reproduced by enforcing a low limit of open
      files and start QEMU with enough I/O threads to hit this limit.
      
      The same problem raises, without the creation of I/O threads, while
      QEMU initializes the main event loop by enforcing an even lower limit of
      open files.
      
      This commit adds an error message on failure:
      
       # qemu [...] -object iothread,id=iothread0 -object iothread,id=iothread1
       qemu: Failed to initialize event notifier: Too many open files in system
      Signed-off-by: NChrysostomos Nanakos <cnanakos@grnet.gr>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      2f78e491
    • J
      block: vhdx - fix reading beyond pointer during image creation · e91a8b2f
      Jeff Cody 提交于
      In vhdx_create_metadata(), we allocate 40 bytes to entry_buffer for
      the various metadata table entries.  However, we write out 64kB from
      that buffer into the new file.  Only write out the correct 40 bytes.
      Signed-off-by: NJeff Cody <jcody@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      e91a8b2f
    • S
      block: delete cow block driver · 550830f9
      Stefan Hajnoczi 提交于
      This patch removes support for the cow file format.
      
      Normally we do not break backwards compatibility but in this case there
      is no impact and it is the most logical option.  Extraordinary claims
      require extraordinary evidence so I will show why removing the cow block
      driver is the right thing to do.
      
      The cow file format is the disk image format for Usermode Linux, a way
      of running a Linux system in userspace.  The performance of UML was
      never great and it was hacky, but it enjoyed some popularity before
      hardware virtualization support became mainstream.
      
      QEMU's block/cow.c is supposed to read this image file format.
      Unfortunately the file format was underspecified:
      
      1. Earlier Linux versions used the MAXPATHLEN constant for the backing
         filename field.  The value of MAXPATHLEN can change, so Linux
         switched to a 4096 literal but QEMU has a 1024 literal.
      
      2. Padding was not used on the header struct (both in the Linux kernel
         and in QEMU) so the struct layout varied across architectures.  In
         particular, i386 and x86_64 were different due to int64_t alignment
         differences.  Linux now uses __attribute__((packed)), QEMU does not.
      
      Therefore:
      
      1. QEMU cow images do not conform to the Linux cow image file format.
      
      2. cow images cannot be shared between different host architectures.
      
      This means QEMU cow images are useless and QEMU has not had bug reports
      from users actually hitting these issues.
      
      Let's get rid of this thing, it serves no purpose and no one will be
      affected.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Message-id: 1410877464-20481-1-git-send-email-stefanha@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      550830f9
    • C
      block/archipelago: Fix typo in qemu_archipelago_truncate() · 3e7e6f18
      Chrysostomos Nanakos 提交于
      Fix a typo introduced by 94c80a43Signed-off-by: NChrysostomos Nanakos <cnanakos@grnet.gr>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      3e7e6f18
    • J
      ahci: Add test_identify case to ahci-test. · 0fa781e3
      John Snow 提交于
      Utilizing all of the bring-up code in pci_enable and hba_enable,
      this test issues a simple IDENTIFY command via the HBA and retrieves
      the response via the PIO receive mechanisms of the HBA.
      
      Bugs: The DPS interrupt (Descriptor Processed Status) does not
      currently get set. This will need to be adjusted in a future
      patch series when the AHCI DMA pathways are reworked to allow
      the feature, which may be utilized by OSX guests.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Message-id: 1408643079-30675-9-git-send-email-jsnow@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      0fa781e3
    • J
      ahci: Add test_hba_enable to ahci-test. · dbc180e5
      John Snow 提交于
      This test engages the HBA functionality and initializes
      values to sane defaults to allow for minimal HBA functionality.
      
      Buffers are allocated and pointers are updated to allow minimal
      I/O commands to complete as expected. Error registers and responses
      are sanity checked for specification adherence.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Message-id: 1408643079-30675-8-git-send-email-jsnow@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      dbc180e5
    • J
      ahci: Add test_hba_spec to ahci-test. · c2f3029f
      John Snow 提交于
      Add a test routine that checks the boot-up values of the HBA
      configuration memory space against the AHCI 1.3 specification
      and Intel ICH9 data sheet (for Q35 machines) for adherence and
      sane values.
      
      The HBA is not yet engaged or put into the idle state.
      
      [Replaced g_assert_false(...) with g_assert(!...) for glib <2.38
      compatibility, reported by Peter Maydell <peter.maydell@linaro.org>.
      --Stefan]
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Message-id: 1408643079-30675-7-git-send-email-jsnow@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      c2f3029f
    • J
      ahci: properly shadow the TFD register · fac7aa7f
      John Snow 提交于
      In a real AHCI device, several S/ATA registers are mirrored or shadowed
      within the AHCI register set. These registers are not updated
      synchronously for each read access, but are instead updated after a
      Device-to-Host Register FIS packet is received. The D2H FIS contains
      the values from these registers on the device.
      
      In QEMU, by reaching directly into the device to grab these bits before
      they are "sent," we may introduce race conditions where unexpected
      values are present "before they are sent" which could cause issues for
      some guests, particularly if an attempt is made to read the PxTFD
      register prior to enabling the port, where incorrect values will be read.
      
      This patch also addresses the boot-time values for the PxTFD and PxSIG
      registers to bring them in line with the AHCI 1.3 specification.
      
      Lastly, several fields (PxTFD, PxSIG and PxSACT) are read-only,
      and any attempts to write to them should be ignored.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Message-id: 1408643079-30675-6-git-send-email-jsnow@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      fac7aa7f
    • J
      ahci: add test_pci_enable to ahci-test. · 96d6d3ba
      John Snow 提交于
      This adds a test wherein we engage the PCI AHCI
      device and ensure that the memory region for the
      HBA functionality is now accessible.
      
      Under Q35 environments, additional PCI configuration
      is performed to ensure that the HBA functionality
      will become usable.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Message-id: 1408643079-30675-5-git-send-email-jsnow@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      96d6d3ba
    • J
      ahci: Add test_pci_spec to ahci-test. · 8840a843
      John Snow 提交于
      Adds a specification adherence test for AHCI
      where the boot-up values for the PCI configuration space
      are compared against the AHCI 1.3 specification.
      
      This test does not itself attempt to engage the device.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Message-id: 1408643079-30675-4-git-send-email-jsnow@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      8840a843