hw/intc/arm_gicv3_its: Fix return codes in process_mapd()
Fix process_mapd() to consistently return CMD_STALL for memory errors and CMD_CONTINUE for parameter errors, as we claim in the comments that we do. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20220111171048.3545974-11-peter.maydell@linaro.org
This commit is contained in:
parent
f667519614
commit
00d46e72e9
|
@ -597,7 +597,6 @@ static ItsCmdResult process_mapd(GICv3ITSState *s, uint64_t value,
|
||||||
uint64_t itt_addr;
|
uint64_t itt_addr;
|
||||||
bool valid;
|
bool valid;
|
||||||
MemTxResult res = MEMTX_OK;
|
MemTxResult res = MEMTX_OK;
|
||||||
ItsCmdResult result = CMD_STALL;
|
|
||||||
|
|
||||||
devid = ((value & DEVID_MASK) >> DEVID_SHIFT);
|
devid = ((value & DEVID_MASK) >> DEVID_SHIFT);
|
||||||
|
|
||||||
|
@ -606,7 +605,7 @@ static ItsCmdResult process_mapd(GICv3ITSState *s, uint64_t value,
|
||||||
MEMTXATTRS_UNSPECIFIED, &res);
|
MEMTXATTRS_UNSPECIFIED, &res);
|
||||||
|
|
||||||
if (res != MEMTX_OK) {
|
if (res != MEMTX_OK) {
|
||||||
return result;
|
return CMD_STALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
size = (value & SIZE_MASK);
|
size = (value & SIZE_MASK);
|
||||||
|
@ -616,7 +615,7 @@ static ItsCmdResult process_mapd(GICv3ITSState *s, uint64_t value,
|
||||||
MEMTXATTRS_UNSPECIFIED, &res);
|
MEMTXATTRS_UNSPECIFIED, &res);
|
||||||
|
|
||||||
if (res != MEMTX_OK) {
|
if (res != MEMTX_OK) {
|
||||||
return result;
|
return CMD_STALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
itt_addr = (value & ITTADDR_MASK) >> ITTADDR_SHIFT;
|
itt_addr = (value & ITTADDR_MASK) >> ITTADDR_SHIFT;
|
||||||
|
@ -633,11 +632,10 @@ static ItsCmdResult process_mapd(GICv3ITSState *s, uint64_t value,
|
||||||
* we ignore this command and move onto the next
|
* we ignore this command and move onto the next
|
||||||
* command in the queue
|
* command in the queue
|
||||||
*/
|
*/
|
||||||
} else {
|
return CMD_CONTINUE;
|
||||||
result = update_dte(s, devid, valid, size, itt_addr) ? CMD_CONTINUE : CMD_STALL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return update_dte(s, devid, valid, size, itt_addr) ? CMD_CONTINUE : CMD_STALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue