605a606,611
> // a data cache maintenance instruction that operates by MVA does
> // not generate a Data Abort exeception due to a Permission fault
> if (req->isCacheMaintenance()) {
> return NoFault;
> }
>
780a787,795
> // A data cache maintenance instruction that operates by VA does
> // not generate a Permission fault unless:
> // * It is a data cache invalidate (dc ivac) which requires write
> // permissions to the VA, or
> // * It is executed from EL0
> if (req->isCacheClean() && aarch64EL != EL0 && !isStage2) {
> return NoFault;
> }
>
786c801,802
< bool is_write = (mode == Write);
---
> // Cache clean operations require read permissions to the specified VA
> bool is_write = !req->isCacheClean() && mode == Write;
1531c1547,1548
< if (!test || !req->hasSize() || req->getSize() == 0) {
---
> if (!test || !req->hasSize() || req->getSize() == 0 ||
> req->isCacheMaintenance()) {