Hi,
This address range is located in KSEG3… Doesn’t seems to be a good location for userspace program. I think you have two options to make target_mmap work, the first would be rising TARGET_VIRT_ADDR_SPACE_BITS to 64 bit. That may break some user space applications storing pointer tags on higher bits. The second would be mask CVMSEG base with TARGET_VIRT_ADDR_SPACE_BITS before mmap, As higher VM address bits will be dropped when addressing guest VM, that should provide a similar behaviour. Though you’ll have multiple alias for CVMSEG in memory and application will be able to access CVMSEG with bits higher than TARGET_VIRT_ADDR_SPACE_BITS set to any value. Don’t know if it will break anything, AFAIK normal applications won't use this range. Thanks - Jiaxun > 2022年12月8日 15:08,Christopher Wrogg <cwr...@umich.edu> 写道: > > In userspace emulation how do I make a set of addresses always valid and > initialized to 0 even though the process does not map it in? In particular I > want to map the CVMSEG for Cavium qemu-mips64 and qemu-mipsn32. The addresses > would be 0xFFFFFFFFFFFF8000 - 0xFFFFFFFFFFFFBFFF. I've looked at target_mmap > but it can't handle addresses that large. The lack of an emulated mmu for 64 > bit guests is going to be a problem.