[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [Qemu-devel] [PATCH v2 05/13] hw/misc/tz-mpc.c: Implement
From: |
Peter Maydell |
Subject: |
Re: [Qemu-arm] [Qemu-devel] [PATCH v2 05/13] hw/misc/tz-mpc.c: Implement the Arm TrustZone Memory Protection Controller |
Date: |
Fri, 15 Jun 2018 09:53:06 +0100 |
On 15 June 2018 at 08:10, Auger Eric <address@hidden> wrote:
> after reading 8/13, I have a doubt here about the ret.perm value that
> stays IOMMU_RW independently on the translation success. Usually if the
> translation failn perm is set to IOMMU_NONE. In your case you also play
> with the output address space which switches to the blocked one in case
> of failure and you handle access failure through that means. So maybe
> the end result is the same but I am not sure.
The end result is different, which is why we have to return RW here.
If we return NONE we are telling the caller that this will be
a memory transaction failure, so the CPU emulation will generate
a bus-error kind of exception. By returning RW we tell the caller
that it should make transactions for this address. We can then
handle them in the MPC with the correct behaviour for a blocked
access (generating an interrupt, and configurably either completing
the access as RAZ/WI or returning MEMTX_ERROR to cause a busfault.)
thanks
-- PMM
[Qemu-arm] [PATCH v2 05/13] hw/misc/tz-mpc.c: Implement the Arm TrustZone Memory Protection Controller, Peter Maydell, 2018/06/04
[Qemu-arm] [PATCH v2 09/13] hw/core/or-irq: Support more than 16 inputs to an OR gate, Peter Maydell, 2018/06/04
[Qemu-arm] [PATCH v2 13/13] hw/arm/mps2-tz.c: Instantiate MPCs, Peter Maydell, 2018/06/04
[Qemu-arm] [PATCH v2 10/13] hw/misc/iotkit-secctl.c: Implement SECMPCINTSTATUS, Peter Maydell, 2018/06/04
[Qemu-arm] [PATCH v2 11/13] hw/arm/iotkit: Instantiate MPC, Peter Maydell, 2018/06/04
[Qemu-arm] [PATCH v2 12/13] hw/arm/iotkit: Wire up MPC interrupt lines, Peter Maydell, 2018/06/04
Re: [Qemu-arm] [Qemu-devel] [PATCH v2 00/13] iommu: support txattrs, support TCG execution, implement TZ MPC, no-reply, 2018/06/04
Re: [Qemu-arm] [PATCH v2 00/13] iommu: support txattrs, support TCG execution, implement TZ MPC, Peter Xu, 2018/06/05