qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 375f74: vhost: generalize iommu memory region


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 375f74: vhost: generalize iommu memory region
Date: Thu, 30 Mar 2017 11:15:08 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 375f74f473cfcb0c73a64088a6a5880829c155da
      
https://github.com/qemu/qemu/commit/375f74f473cfcb0c73a64088a6a5880829c155da
  Author: Jason Wang <address@hidden>
  Date:   2017-03-30 (Thu, 30 Mar 2017)

  Changed paths:
    M hw/virtio/vhost.c
    M include/hw/virtio/vhost.h

  Log Message:
  -----------
  vhost: generalize iommu memory region

We assumes the iommu_ops were attached to the root region of address
space. This may not be true for all kinds of IOMMU implementation and
especially after commit 3716d5902d74 ("pci: introduce a bus master
container"). So fix this by not assuming as->root has iommu_ops,
instead depending on the regions reported by memory listener through:

- register a memory listener to dma_as
- during region_add, if it's a region of IOMMU, register a specific
  IOMMU notifier, and store all notifiers in a list.
- during region_del, compare and delete the IOMMU notifier from the list

This is also a must for making vhost device IOTLB works for all types
of IOMMUs. Note, since we register one notifier during each
.region_add, the IOTLB may be flushed more than one times, this is
suboptimal and could be optimized in the future.

Reported-by: Maxime Coquelin <address@hidden>
Fixes: 3716d5902d74 ("pci: introduce a bus master container")
Cc: Peter Xu <address@hidden>
Signed-off-by: Jason Wang <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Peter Xu <address@hidden>
Tested-by: Maxime Coquelin <address@hidden>


  Commit: 0d876080a394993a8dea494ebf2d806dc0983107
      
https://github.com/qemu/qemu/commit/0d876080a394993a8dea494ebf2d806dc0983107
  Author: Michael S. Tsirkin <address@hidden>
  Date:   2017-03-30 (Thu, 30 Mar 2017)

  Changed paths:
    M tests/acpi-utils.h

  Log Message:
  -----------
  tests/acpi: don't pack a structure

There's no reason to pack structures where we don't care about size or
padding, this applies to AcpiStdTable in tests/acpi-utils.h.

OTOH bios-tables-test happens to be passing the address of a field in
this  struct to a function that expects a pointer to normally aligned
data which results in a SIGBUS on architectures like SPARC that have
strict alignment requirements.

Fixes: 9e8458c02 ("acpi unit-test: compare DSDT and SSDT tables against 
expected values")
Reported-by: Peter Maydell <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Tested-by: Peter Maydell <address@hidden>


  Commit: ddc2c3a57e0752c0650fdb735a8b8322542d4248
      
https://github.com/qemu/qemu/commit/ddc2c3a57e0752c0650fdb735a8b8322542d4248
  Author: Peter Maydell <address@hidden>
  Date:   2017-03-30 (Thu, 30 Mar 2017)

  Changed paths:
    M hw/virtio/vhost.c
    M include/hw/virtio/vhost.h
    M tests/acpi-utils.h

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging

vhost, pc: fixes

More fixes for 2.9. Region caching is still causing
issues around reset, but we seem to be getting there.

Signed-off-by: Michael S. Tsirkin <address@hidden>

# gpg: Signature made Thu 30 Mar 2017 17:14:45 BST
# gpg:                using RSA key 0x281F0DB8D28D5469
# gpg: Good signature from "Michael S. Tsirkin <address@hidden>"
# gpg:                 aka "Michael S. Tsirkin <address@hidden>"
# Primary key fingerprint: 0270 606B 6F3C DF3D 0B17  0970 C350 3912 AFBE 8E67
#      Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA  8A0D 281F 0DB8 D28D 5469

* remotes/mst/tags/for_upstream:
  tests/acpi: don't pack a structure
  vhost: generalize iommu memory region

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/e839001d5bb6...ddc2c3a57e07

reply via email to

[Prev in Thread] Current Thread [Next in Thread]