1. 06 10月, 2015 1 次提交
    • D
      memory: Allow replay of IOMMU mapping notifications · a788f227
      David Gibson 提交于
      When we have guest visible IOMMUs, we allow notifiers to be registered
      which will be informed of all changes to IOMMU mappings.  This is used by
      vfio to keep the host IOMMU mappings in sync with guest IOMMU mappings.
      
      However, unlike with a memory region listener, an iommu notifier won't be
      told about any mappings which already exist in the (guest) IOMMU at the
      time it is registered.  This can cause problems if hotplugging a VFIO
      device onto a guest bus which had existing guest IOMMU mappings, but didn't
      previously have an VFIO devices (and hence no host IOMMU mappings).
      
      This adds a memory_region_iommu_replay() function to handle this case.  It
      replays any existing mappings in an IOMMU memory region to a specified
      notifier.  Because the IOMMU memory region doesn't internally remember the
      granularity of the guest IOMMU it has a small hack where the caller must
      specify a granularity at which to replay mappings.
      
      If there are finer mappings in the guest IOMMU these will be reported in
      the iotlb structures passed to the notifier which it must handle (probably
      causing it to flag an error).  This isn't new - the VFIO iommu notifier
      must already handle notifications about guest IOMMU mappings too short
      for it to represent in the host IOMMU.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Reviewed-by: NLaurent Vivier <lvivier@redhat.com>
      Acked-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      a788f227
  2. 11 9月, 2015 2 次提交
  3. 13 8月, 2015 1 次提交
  4. 24 7月, 2015 1 次提交
  5. 06 7月, 2015 1 次提交
    • P
      Stop including qemu-common.h in memory.h · fba0a593
      Peter Maydell 提交于
      Including qemu-common.h from other header files is generally a bad
      idea, because it means it's very easy to end up with a circular
      dependency. For instance, if we wanted to include memory.h from
      qom/cpu.h we'd end up with this loop:
       memory.h -> qemu-common.h -> cpu.h -> cpu-qom.h -> qom/cpu.h -> memory.h
      
      Remove the include from memory.h. This requires us to fix up a few
      other files which were inadvertently getting declarations indirectly
      through memory.h.
      
      The biggest change is splitting the fprintf_function typedef out
      into its own header so other headers can get at it without having
      to include qemu-common.h.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-Id: <1435933104-15216-1-git-send-email-peter.maydell@linaro.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      fba0a593
  6. 01 7月, 2015 1 次提交
  7. 05 6月, 2015 4 次提交
  8. 30 4月, 2015 1 次提交
  9. 28 4月, 2015 1 次提交
  10. 26 4月, 2015 4 次提交
  11. 02 2月, 2015 1 次提交
  12. 08 1月, 2015 2 次提交
  13. 23 11月, 2014 1 次提交
  14. 31 10月, 2014 1 次提交
  15. 09 9月, 2014 2 次提交
  16. 29 8月, 2014 1 次提交
  17. 20 8月, 2014 1 次提交
  18. 18 8月, 2014 3 次提交
  19. 01 7月, 2014 3 次提交
  20. 19 6月, 2014 5 次提交
  21. 18 6月, 2014 1 次提交
  22. 08 5月, 2014 1 次提交
  23. 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