On 4/27/20 11:38 AM, Peter Maydell wrote: > I would suggest something like: > > + * From this point on, all memory operations are MemSingleNF. > + * > + * Per the MemSingleNF pseudocode, a no-fault load from Device memory > + * must not actually hit the bus -- it returns (UNKNOWN, FAULT) instead. > + * > + * Unfortuately we do not have access to the memory attributes from the > PTE > + * to tell Device memory from Normal memory. So we make a mostly > + * correct check, and indicate (UNKNOWN, FAULT) for any MMIO. > + * This gives the right answer for the common cases of "Normal memory, > + * backed by host RAM" and "Device memory, backed by MMIO". > + * The architecture allows us to suppress an NF load and return > + * (UNKNOWN, FAULT) for any reason), so our behaviour (indicate > + * fault) for the corner case of "Normal memory, backed by MMIO" is > + * permitted. The case we get wrong is "Device memory, backed by > + * host RAM", which we should return (UNKNOWN, FAULT) for but do not. > + * > + * Similarly, CPU_BP breakpoints would raise exceptions, and so > + * return (UNKNOWN, FAULT). For simplicity, we consider gdb and > + * architectural breakpoints the same. > > assuming my understanding is correct...
Yep, thanks. I'll merge this text. r~