On 8/21/19 3:31 PM, Richard Henderson wrote: >> Yes, that's what I mean, TARGET_PAGE_SIZE, but eventually crossing a >> page boundary. The longer I stare at the MVCL code, the more broken it >> is. There are more nice things buried in the PoP. MVCL does not detect >> access exceptions beyond the next 2k. So we have to limit it there >> differently. > That language is indeed odd. > > The only reading of that paragraph that makes sense to me is that the hardware > *must* interrupt MVCL after every 2k bytes processed. The idea that the user > can magically write to a read-only page simply by providing length = 2MB and > page that is initially writable is dumb. I cannot imagine that is a correct > reading. > > Getting clarification from an IBM engineer on that would be good; otherwise I > would just ignore that and proceed as if all access checks are performed. >
FWIW, splitting the operation at every aligned 2k boundary is exactly what the Hercules emulator does: len3 = NOCROSS2KL(addr1,len1) ? len1 : (int)(0x800 - (addr1 & 0x7FF)); len4 = NOCROSS2KL(addr2,len2) ? len2 : (int)(0x800 - (addr2 & 0x7FF)); len = len3 < len4 ? len3 : len4; /* Use concpy to ensure Concurrent block update consistency */ concpy (regs, dest, source, len); After this it writes back the lengths and addresses to the register file, and then if necessary loops back to the address translation step. r~