CVMSEG Emulation

2022-12-14 Thread Christopher Wrogg
Was wondering if there was a follow up to this. Just a recap but I am trying to map 0x8000 - 0xBFFF into a userspace process's virtual address space. It falls squarely in KSEG3. Here is what I have tried Attempt 1 What I did: #undef TARGET_VIRT_ADDR_SPACE_BITS

Re: CVMSEG Emulation

2022-12-12 Thread Christopher Wrogg
I am getting the 48 bits value on 64 bit hosts. Having said that, I still have the two problems above with the suggested fixes. On Mon, Dec 12, 2022 at 7:03 AM Peter Maydell wrote: > On Fri, 9 Dec 2022 at 21:03, Jiaxun Yang wrote: > > > > > > > > > 2022年12月9日 17:44,Christopher Wrogg 写道: > > >

Re: CVMSEG Emulation

2022-12-12 Thread Peter Maydell
On Fri, 9 Dec 2022 at 21:03, Jiaxun Yang wrote: > > > > > 2022年12月9日 17:44,Christopher Wrogg 写道: > > > > I tried both. > > > > Option 1 > > What I did: > > #undef TARGET_VIRT_ADDR_SPACE_BITS and #define > > TARGET_VIRT_ADDR_SPACE_BITS 64 > > The Result: > > perror reports

Re: CVMSEG Emulation

2022-12-09 Thread Jiaxun Yang
> 2022年12月9日 17:44,Christopher Wrogg 写道: > > I tried both. > > Option 1 > What I did: > #undef TARGET_VIRT_ADDR_SPACE_BITS and #define > TARGET_VIRT_ADDR_SPACE_BITS 64 > The Result: > perror reports "Cannot allocate memory" > Option 2: > What I did: > TA

Re: CVMSEG Emulation

2022-12-09 Thread Christopher Wrogg
I tried both. Option 1 What I did: #undef TARGET_VIRT_ADDR_SPACE_BITS and #define TARGET_VIRT_ADDR_SPACE_BITS 64 The Result: perror reports "Cannot allocate memory" Option 2: What I did: TARGET_VIRT_ADDR_SPACE_BITS for me is 30 so I masked by 0x3FFF The

Re: CVMSEG Emulation

2022-12-08 Thread Jiaxun Yang
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 high

CVMSEG Emulation

2022-12-08 Thread Christopher Wrogg
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