“c387fba08ce8face590793018b9950379120c40e”上不存在“release/0.10.0/doc_cn/index_cn.html”
  1. 23 2月, 2016 5 次提交
  2. 18 2月, 2016 3 次提交
    • P
      hw/sd/sdhci.c: Update to use SDBus APIs · 40bbc194
      Peter Maydell 提交于
      Update the SDHCI code to use the new SDBus APIs.
      
      This commit introduces the new command line options required
      to connect a disk to sdhci-pci:
      
       -device sdhci-pci -drive id=mydrive,[...] -device sd,drive=mydrive
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NAlistair Francis <alistair.francis@xilinx.com>
      Message-id: 1455646193-13238-6-git-send-email-peter.maydell@linaro.org
      40bbc194
    • P
      hw/sd: Add QOM bus which SD cards plug in to · c759a790
      Peter Maydell 提交于
      Add a QOM bus for SD cards to plug in to.
      
      Note that since sd_enable() is used only by one board and there
      only as part of a broken implementation, we do not provide it in
      the SDBus API (but instead add a warning comment about the old
      function). Whoever converts OMAP and the nseries boards to QOM
      will need to either implement the card switch properly or move
      the enable hack into the OMAP MMC controller model.
      
      In the SDBus API, the old-style use of sd_set_cb to register some
      qemu_irqs for notification of card insertion and write-protect
      toggling is replaced with methods in the SDBusClass which the
      card calls on status changes and methods in the SDClass which
      the controller can call to find out the current status. The
      query methods will allow us to remove the abuse of the 'register
      irqs' API by controllers in their reset methods to trigger
      the card to tell them about the current status again.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NAlistair Francis <alistair.francis@xilinx.com>
      Message-id: 1455646193-13238-5-git-send-email-peter.maydell@linaro.org
      c759a790
    • P
      hw/sd/sd.c: QOMify · 260bc9d8
      Peter Maydell 提交于
      Turn the SD card into a QOM device.
      This conversion only changes the device itself; the various
      functions which are effectively methods on the device are not
      touched at this point.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NPeter Crosthwaite <crosthwaite.peter@gmail.com>
      Reviewed-by: NAlistair Francis <alistair.francis@xilinx.com>
      Message-id: 1455646193-13238-3-git-send-email-peter.maydell@linaro.org
      260bc9d8
  3. 17 2月, 2016 5 次提交
    • H
      cuda: port SET_DEVICE_LIST command to new framework · 216c906e
      Hervé Poussineau 提交于
      Also implement the command, by taking device list mask into account
      when polling ADB devices.
      Signed-off-by: NHervé Poussineau <hpoussin@reactos.org>
      Reviewed-by: NMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      216c906e
    • D
      pseries: Simplify handling of the hash page table fd · 715c5407
      David Gibson 提交于
      When migrating the 'pseries' machine type with KVM, we use a special fd
      to access the hash page table stored within KVM.  Usually, this fd is
      opened at the beginning of migration, and kept open until the migration
      is complete.
      
      However, if there is a guest reset during the migration, the fd can become
      stale and we need to re-open it.  At the moment we use an 'htab_fd_stale'
      flag in sPAPRMachineState to signal this, which is checked in the migration
      iterators.
      
      But that's rather ugly.  It's simpler to just close and invalidate the
      fd on reset, and lazily re-open it in migration if necessary.  This patch
      implements that change.
      
      This requires a small addition to the machine state's instance_init,
      so that htab_fd is initialized to -1 (telling the migration code it
      needs to open it) instead of 0, which could be a valid fd.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Reviewed-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      715c5407
    • D
      nbd: implement TLS support in the protocol negotiation · f95910fe
      Daniel P. Berrange 提交于
      This extends the NBD protocol handling code so that it is capable
      of negotiating TLS support during the connection setup. This involves
      requesting the STARTTLS protocol option before any other NBD options.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-Id: <1455129674-17255-14-git-send-email-berrange@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      f95910fe
    • D
      nbd: convert to using I/O channels for actual socket I/O · 1c778ef7
      Daniel P. Berrange 提交于
      Now that all callers are converted to use I/O channels for
      initial connection setup, it is possible to switch the core
      NBD protocol handling core over to use QIOChannel APIs for
      actual sockets I/O.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-Id: <1455129674-17255-7-git-send-email-berrange@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      1c778ef7
    • D
      qom: add helpers for UserCreatable object types · 90998d58
      Daniel P. Berrange 提交于
      The QMP monitor code has two helper methods object_add
      and qmp_object_del that are called from several places
      in the code (QMP, HMP and main emulator startup).
      
      The HMP and main emulator startup code also share
      further logic that extracts the qom-type & id
      values from a qdict.
      
      We soon need to use this logic from qemu-img, qemu-io
      and qemu-nbd too, but don't want those to depend on
      the monitor, nor do we want to duplicate the code.
      
      To avoid this, move some code out of qmp.c and hmp.c
      adding new methods to qom/object_interfaces.c
      
       - user_creatable_add - takes a QDict holding a full
         object definition & instantiates it
       - user_creatable_add_type - takes an ID, type name,
         and QDict holding object properties & instantiates
         it
       - user_creatable_add_opts - takes a QemuOpts holding
         a full object definition & instantiates it
       - user_creatable_add_opts_foreach - variant on
         user_creatable_add_opts which can be directly used
         in conjunction with qemu_opts_foreach.
       - user_creatable_del - takes an ID and deletes the
         corresponding object
      
      The existing code is updated to use these new methods.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-Id: <1455129674-17255-2-git-send-email-berrange@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      90998d58
  4. 16 2月, 2016 3 次提交
    • P
      oslib-posix.c: Move workaround for OSX daemon() deprecation to osdep.h · d5db2ec1
      Peter Maydell 提交于
      The right place for "work around issues with system headers" code
      is osdep.h. Move the workaround for OSX's stdlib.h emitting a
      deprecation warning for daemon() to that header.
      
      This also fixes a problem where running clean-includes on
      oslib-posix.c would erroneously remove the #include <stdlib.h>
      from it, breaking the workaround.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      d5db2ec1
    • E
      build: Don't redefine 'inline' · 888ea96a
      Eric Blake 提交于
      Actively redefining 'inline' is wrong for C++, where gcc has an
      extension 'inline namespace' which fails to compile if the
      keyword 'inline' is replaced by a macro expansion.  This will
      matter once we start to include "qemu/osdep.h" first from C++
      files, depending also on whether the system headers are new
      enough to be using the gcc extension.
      
      But rather than just guard things by __cplusplus, let's look at
      the overall picture.  Commit df2542c7 in 2007 defined 'inline'
      to the gcc attribute __always_inline__, with the rationale "To
      avoid discarded inlining bug".  But compilers have improved since
      then, and we are probably better off trusting the compiler rather
      than trying to force its hand.
      
      So just nuke our craziness.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1455043788-28112-1-git-send-email-eblake@redhat.com
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      888ea96a
    • E
      build: Don't redefine 'inline' · b11d029b
      Eric Blake 提交于
      Actively redefining 'inline' is wrong for C++, where gcc has an
      extension 'inline namespace' which fails to compile if the
      keyword 'inline' is replaced by a macro expansion.  This will
      matter once we start to include "qemu/osdep.h" first from C++
      files, depending also on whether the system headers are new
      enough to be using the gcc extension.
      
      But rather than just guard things by __cplusplus, let's look at
      the overall picture.  Commit df2542c7 in 2007 defined 'inline'
      to the gcc attribute __always_inline__, with the rationale "To
      avoid discarded inlining bug".  But compilers have improved since
      then, and we are probably better off trusting the compiler rather
      than trying to force its hand.
      
      So just nuke our craziness.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1455043788-28112-1-git-send-email-eblake@redhat.com>
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      b11d029b
  5. 15 2月, 2016 3 次提交
  6. 11 2月, 2016 6 次提交
  7. 10 2月, 2016 4 次提交
  8. 09 2月, 2016 11 次提交
    • P
      hw: Add support for LSI SAS1068 (mptsas) device · e351b826
      Paolo Bonzini 提交于
      This adds the SAS1068 device, a SAS disk controller used in VMware that
      is oldish but widely supported and has decent performance.  Unlike
      megasas, it presents itself as a SAS controller and not as a RAID
      controller.  The device corresponds to the mptsas kernel driver in
      Linux.
      
      A few small things in the device setup are based on Don Slutz's old
      patch, but the device emulation was written from scratch based on Don's
      SeaBIOS patch and on the FreeBSD and Linux drivers.  It is 2400 lines
      shorter than Don's patch (and roughly the same size as MegaSAS---also
      because it doesn't support the similar SPI controller), implements SCSI
      task management functions (with asynchronous cancellation), supports
      big-endian hosts, has complete support for migration and follows the
      QEMU coding standards much more closely.
      
      To write the driver, I first split Don's patch in two parts, with
      the configuration bits in one file and the rest in a separate file.
      I first left mptconfig.c in place and rewrote the rest, then deleted
      mptconfig.c as well.  The configuration pages are still based mostly on
      VirtualBox's, though not exactly the same.  However, the implementation
      is completely different.  The contents of the pages themselves should
      not be copyrightable.
      Signed-off-by: NDon Slutz <Don@CloudSwitch.com>
      Message-Id: <1347382813-5662-1-git-send-email-Don@CloudSwitch.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      e351b826
    • P
      scsi-generic: grab device and port SAS addresses from backend · 9fd7e859
      Paolo Bonzini 提交于
      This lets a SAS adapter expose them through its own configuration
      mechanism.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      9fd7e859
    • P
      scsi: push WWN fields up to SCSIDevice · 2ecab408
      Paolo Bonzini 提交于
      SAS adapters need to access them in order to publish the SAS addresses
      of the end devices connected to them.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      2ecab408
    • A
      include/qemu/atomic.h: default to __atomic functions · a0aa44b4
      Alex Bennée 提交于
      The __atomic primitives have been available since GCC 4.7 and provide
      a richer interface for describing memory ordering requirements. As a
      bonus by using the primitives instead of hand-rolled functions we can
      use tools such as the ThreadSanitizer which need the use of well
      defined APIs for its analysis.
      
      If we have __ATOMIC defines we exclusively use the __atomic primitives
      for all our atomic access. Otherwise we fall back to the mixture of
      __sync and hand-rolled barrier cases.
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      Message-Id: <1453976119-24372-4-git-send-email-alex.bennee@linaro.org>
      [Use __ATOMIC_SEQ_CST for atomic_mb_read/atomic_mb_set on !POWER. - Paolo]
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      a0aa44b4
    • S
      memory: RCU ram_list.dirty_memory[] for safe RAM hotplug · 5b82b703
      Stefan Hajnoczi 提交于
      Although accesses to ram_list.dirty_memory[] use atomics so multiple
      threads can safely dirty the bitmap, the data structure is not fully
      thread-safe yet.
      
      This patch handles the RAM hotplug case where ram_list.dirty_memory[] is
      grown.  ram_list.dirty_memory[] is change from a regular bitmap to an
      RCU array of pointers to fixed-size bitmap blocks.  Threads can continue
      accessing bitmap blocks while the array is being extended.  See the
      comments in the code for an in-depth explanation of struct
      DirtyMemoryBlocks.
      
      I have tested that live migration with virtio-blk dataplane works.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Message-Id: <1453728801-5398-2-git-send-email-stefanha@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      5b82b703
    • P
      memory: add early bail out from cpu_physical_memory_set_dirty_range · 8bafcb21
      Paolo Bonzini 提交于
      This condition is true in the common case, so we can cut out the body of
      the function.  In addition, this makes it easier for the compiler to do
      at least partial inlining, even if it decides that fully inlining the
      function is unreasonable.
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      8bafcb21
    • F
      blockjob: Fix hang in block_job_finish_sync · 794f0141
      Fam Zheng 提交于
      With a mirror job running on a virtio-blk dataplane disk, sending "q" to
      HMP will cause a dead loop in block_job_finish_sync.
      
      This is because the aio_poll() only processes the AIO context of bs
      which has no more work to do, while the main loop BH that is scheduled
      for setting the job->completed flag is never processed.
      
      Fix this by adding a flag in BlockJob structure, to track which context
      to poll for the block job to make progress. Its value is set to true
      when block_job_coroutine_complete() is called, and is checked in
      block_job_finish_sync to determine which context to poll.
      Suggested-by: NStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Message-id: 1454379144-29807-1-git-send-email-famz@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      794f0141
    • P
      iov: avoid memcpy for "simple" iov_from_buf/iov_to_buf · ad523bca
      Paolo Bonzini 提交于
      memcpy can take a large amount of time for small reads and writes.
      For virtio it is a common case that the first iovec can satisfy the
      whole read or write.  In that case, and if bytes is a constant to
      avoid excessive growth of code, inline the first iteration
      into the caller.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 1450782213-14227-1-git-send-email-pbonzini@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      ad523bca
    • M
      error: Improve documentation some more · 10303f04
      Markus Armbruster 提交于
      Don't claim error_report_err() always reports to stderr.  It actually
      reports to the current monitor when we have one.
      
      Clarify intended use of error_abort and error_fatal.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <1454522628-28294-2-git-send-email-armbru@redhat.com>
      Reviewed-by: NLluís Vilanova <vilanova@ac.upc.edu>
      10303f04
    • E
      qapi: Drop unused error argument for list and implicit struct · 08f9541d
      Eric Blake 提交于
      No backend was setting an error when ending the visit of a list or
      implicit struct, or when moving to the next list node.  Make the
      callers a bit easier to follow by making this a part of the contract,
      and removing the errp argument - callers can then unconditionally end
      an object as part of cleanup without having to think about whether a
      second error is dominated by a first, because there is no second
      error.
      
      A later patch will then tackle the larger task of splitting
      visit_end_struct(), which can indeed set an error.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1454075341-13658-24-git-send-email-eblake@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      08f9541d
    • E
      qapi: Drop unused 'kind' for struct/enum visit · 337283df
      Eric Blake 提交于
      visit_start_struct() and visit_type_enum() had a 'kind' argument
      that was usually set to either the stringized version of the
      corresponding qapi type name, or to NULL (although some clients
      didn't even get that right).  But nothing ever used the argument.
      It's even hard to argue that it would be useful in a debugger,
      as a stack backtrace also tells which type is being visited.
      
      Therefore, drop the 'kind' argument as dead.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-Id: <1454075341-13658-22-git-send-email-eblake@redhat.com>
      [Harmless rebase mistake cleaned up]
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      337283df