1. 13 8月, 2015 1 次提交
  2. 28 7月, 2015 1 次提交
    • P
      memory: do not add a reference to the owner of aliased regions · 52c91dac
      Paolo Bonzini 提交于
      Very often the owner of the aliased region is the same as the owner of the alias
      region itself.  When this happens, the reference count can never go back to 0 and
      the owner is leaked.  This is for example breaking hot-unplug of virtio-pci
      devices (the device cannot be plugged back again with the same id).
      
      Another common use for alias is to transform the system I/O address space
      into an MMIO regions; in this case the aliased region never dies, so there
      is no problem.  Otherwise the owner is always the same for aliasing
      and aliased region.
      
      I checked all calls to memory_region_init_alias introduced after commit
      dfde4e6e (memory: add ref/unref calls, 2013-05-06) and they do not need the
      reference in order to keep the owner of the aliased region alive.
      Reported-by: NMichael S. Tsirkin <mst@redhat.com>
      Tested-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      52c91dac
  3. 24 7月, 2015 1 次提交
  4. 17 7月, 2015 1 次提交
    • P
      memory: fix refcount leak in memory_region_present · c6742b14
      Paolo Bonzini 提交于
      memory_region_present() leaks a reference to a MemoryRegion in the
      case "mr == container".  While fixing it, avoid reference counting
      altogether for memory_region_present(), by using RCU only.
      
      The return value could in principle be already invalid immediately
      after memory_region_present returns, but presumably the caller knows
      that and it's using memory_region_present to probe for devices that
      are unpluggable, or something like that.  The RCU critical section
      is needed anyway, because it protects as->current_map.
      Reported-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      c6742b14
  5. 01 7月, 2015 2 次提交
  6. 05 6月, 2015 8 次提交
  7. 30 4月, 2015 2 次提交
  8. 28 4月, 2015 1 次提交
  9. 26 4月, 2015 2 次提交
    • P
      memory: Replace io_mem_read/write with memory_region_dispatch_read/write · 3b643495
      Peter Maydell 提交于
      Rather than retaining io_mem_read/write as simple wrappers around
      the memory_region_dispatch_read/write functions, make the latter
      public and change all the callers to use them, since we need to
      touch all the callsites anyway to add MemTxAttrs and MemTxResult
      support. Delete io_mem_read and io_mem_write entirely.
      
      (All the callers currently pass MEMTXATTRS_UNSPECIFIED
      and convert the return value back to bool or ignore it.)
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
      3b643495
    • P
      memory: Define API for MemoryRegionOps to take attrs and return status · cc05c43a
      Peter Maydell 提交于
      Define an API so that devices can register MemoryRegionOps whose read
      and write callback functions are passed an arbitrary pointer to some
      transaction attributes and can return a success-or-failure status code.
      This will allow us to model devices which:
       * behave differently for ARM Secure/NonSecure memory accesses
       * behave differently for privileged/unprivileged accesses
       * may return a transaction failure (causing a guest exception)
         for erroneous accesses
      
      This patch defines the new API and plumbs the attributes parameter through
      to the memory.c public level functions io_mem_read() and io_mem_write(),
      where it is currently dummied out.
      
      The success/failure response indication is also propagated out to
      io_mem_read() and io_mem_write(), which retain the old-style
      boolean true-for-error return.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Acked-by: NPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
      cc05c43a
  10. 17 3月, 2015 1 次提交
  11. 12 2月, 2015 1 次提交
  12. 11 2月, 2015 1 次提交
  13. 02 2月, 2015 3 次提交
  14. 08 1月, 2015 2 次提交
  15. 23 11月, 2014 1 次提交
  16. 31 10月, 2014 1 次提交
  17. 09 9月, 2014 3 次提交
  18. 04 9月, 2014 1 次提交
  19. 28 8月, 2014 1 次提交
  20. 20 8月, 2014 1 次提交
  21. 18 8月, 2014 5 次提交