diff options
author | Xiang Chen <chenxiang66@hisilicon.com> | 2022-04-16 15:38:15 +0800 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2022-04-22 14:44:55 +0100 |
commit | c3ca7d56c4790c2223122f7e84b71161cd36dbce (patch) | |
tree | a202fba93720aeb621e086d0282478a1160ec9f1 /hw/arm/smmuv3.c | |
parent | 2c2c65c01ecc474410688f4524e6fd22d2934905 (diff) | |
download | qemu-c3ca7d56c4790c2223122f7e84b71161cd36dbce.zip qemu-c3ca7d56c4790c2223122f7e84b71161cd36dbce.tar.gz qemu-c3ca7d56c4790c2223122f7e84b71161cd36dbce.tar.bz2 |
hw/arm/smmuv3: Pass the actual perm to returned IOMMUTLBEntry in smmuv3_translate()
It always calls the IOMMU MR translate() callback with flag=IOMMU_NONE in
memory_region_iommu_replay(). Currently, smmuv3_translate() return an
IOMMUTLBEntry with perm set to IOMMU_NONE even if the translation success,
whereas it is expected to return the actual permission set in the table
entry.
So pass the actual perm to returned IOMMUTLBEntry in the table entry.
Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Message-id: 1650094695-121918-1-git-send-email-chenxiang66@hisilicon.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm/smmuv3.c')
-rw-r--r-- | hw/arm/smmuv3.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c index 674623a..707eb43 100644 --- a/hw/arm/smmuv3.c +++ b/hw/arm/smmuv3.c @@ -760,7 +760,7 @@ epilogue: qemu_mutex_unlock(&s->mutex); switch (status) { case SMMU_TRANS_SUCCESS: - entry.perm = flag; + entry.perm = cached_entry->entry.perm; entry.translated_addr = cached_entry->entry.translated_addr + (addr & cached_entry->entry.addr_mask); entry.addr_mask = cached_entry->entry.addr_mask; |