1. 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
  2. 02 2月, 2015 1 次提交
  3. 08 1月, 2015 2 次提交
  4. 23 11月, 2014 1 次提交
  5. 31 10月, 2014 1 次提交
  6. 09 9月, 2014 2 次提交
  7. 29 8月, 2014 1 次提交
  8. 20 8月, 2014 1 次提交
  9. 18 8月, 2014 3 次提交
  10. 01 7月, 2014 3 次提交
  11. 19 6月, 2014 5 次提交
  12. 18 6月, 2014 1 次提交
  13. 08 5月, 2014 1 次提交
  14. 10 3月, 2014 1 次提交
    • I
      memory_region_present: return false if address is not found in child MemoryRegion · 8e46bbf3
      Igor Mammedov 提交于
      Windows XP shows COM2 port as non functional in
      "Device Manager" although no COM2 port backing device
      is present in QEMU.
      
      This regression is really due to
      3bb28b72?
          memory: Provide separate handling of unassigned io ports accesses
      
      That is caused by the fact that QEMU reports to
      OSPM that device is present by setting 5th bit in
      PII4XPM.pci_conf[0x67] register when COM2 doesn't
      exist.
      
      It happens due to memory_region_present(io_as, 0x2f8)
      returning false positive since 0x2f8 address eventually
      translates into catchall io_as address space.
      
      Fix memory_region_present(parent, addr) by returning
      true only if addr maps into a MemoryRegion within
      parent (excluding parent itself), to match its
      doc comment.
      
      While at it fix copy/paste error in
      memory_region_present() doc comment.
      
      Note: this is a temporary hack: we really need better handling for
      unassigned regions, we should avoid fallback regions since they are bad
      for performance (breaking radix tree assumption that the data structure
      is sparsely populated); for memory we need to fix this to implement PCI
      master abort properly, anyway.
      
      Cc: Jan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      8e46bbf3
  15. 11 2月, 2014 1 次提交
  16. 13 1月, 2014 3 次提交
  17. 14 10月, 2013 1 次提交
  18. 04 7月, 2013 10 次提交