[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-arm] [PATCH 11/27] Make address_space_get_iotlb_entry() take a Mem
From: |
Peter Maydell |
Subject: |
[Qemu-arm] [PATCH 11/27] Make address_space_get_iotlb_entry() take a MemTxAttrs argument |
Date: |
Mon, 21 May 2018 15:03:46 +0100 |
As part of plumbing MemTxAttrs down to the IOMMU translate method,
add MemTxAttrs as an argument to address_space_get_iotlb_entry().
Signed-off-by: Peter Maydell <address@hidden>
---
include/exec/memory.h | 2 +-
exec.c | 2 +-
hw/virtio/vhost.c | 3 ++-
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/include/exec/memory.h b/include/exec/memory.h
index 3980ab47ed..309fdfb89b 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -1896,7 +1896,7 @@ void address_space_cache_destroy(MemoryRegionCache
*cache);
* entry. Should be called from an RCU critical section.
*/
IOMMUTLBEntry address_space_get_iotlb_entry(AddressSpace *as, hwaddr addr,
- bool is_write);
+ bool is_write, MemTxAttrs attrs);
/* address_space_translate: translate an address range into an address space
* into a MemoryRegion and an address range into that section. Should be
diff --git a/exec.c b/exec.c
index b818ba87f4..84f2c21ecb 100644
--- a/exec.c
+++ b/exec.c
@@ -582,7 +582,7 @@ static MemoryRegionSection flatview_do_translate(FlatView
*fv,
/* Called from RCU critical section */
IOMMUTLBEntry address_space_get_iotlb_entry(AddressSpace *as, hwaddr addr,
- bool is_write)
+ bool is_write, MemTxAttrs attrs)
{
MemoryRegionSection section;
hwaddr xlat, page_mask;
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index 9d5850a7d7..48f4fd7cc9 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -895,7 +895,8 @@ int vhost_device_iotlb_miss(struct vhost_dev *dev, uint64_t
iova, int write)
rcu_read_lock();
iotlb = address_space_get_iotlb_entry(dev->vdev->dma_as,
- iova, write);
+ iova, write,
+ MEMTXATTRS_UNSPECIFIED);
if (iotlb.target_as != NULL) {
ret = vhost_memory_region_lookup(dev, iotlb.translated_addr,
&uaddr, &len);
--
2.17.0
- Re: [Qemu-arm] [Qemu-devel] [PATCH 01/27] memory.h: Improve IOMMU related documentation, (continued)
- [Qemu-arm] [PATCH 13/27] Make address_space_translate_iommu take a MemTxAttrs argument, Peter Maydell, 2018/05/21
- [Qemu-arm] [PATCH 07/27] Make memory_region_access_valid() take a MemTxAttrs argument, Peter Maydell, 2018/05/21
- [Qemu-arm] [PATCH 08/27] Make MemoryRegion valid.accepts callback take a MemTxAttrs argument, Peter Maydell, 2018/05/21
- [Qemu-arm] [PATCH 11/27] Make address_space_get_iotlb_entry() take a MemTxAttrs argument,
Peter Maydell <=
- [Qemu-arm] [PATCH 16/27] iommu: Add IOMMU index argument to translate method, Peter Maydell, 2018/05/21
- [Qemu-arm] [PATCH 14/27] iommu: Add IOMMU index concept to IOMMU API, Peter Maydell, 2018/05/21