Hi Jason,

Sadly removing that flag didn't make a difference. I'm still getting an
mmap warning (when running it with sudo). I also tried removing the flag
(-DM5OP_ADDR=0xFFFF0000) from util/m5/Makefile.x86, but it made no
difference. I'm gonna post my changes in case someone is interested.

This is the microbenchmark.
https://filebin.net/cb5jsu1fakpdo163/gem5_array.pdf?t=d6gmvy5e

This are the instructions I'm following (heavily based on the blogpost)
https://filebin.net/cb5jsu1fakpdo163/instructions.pdf?t=d6gmvy5e

And finally these are the changes (diff) that I made in gem5 for
implementing the pseudo instructions. (I know the pseudo instructions don't
do anything currently. I'm just trying to get them to work before
implementing any functionality.)
https://filebin.net/cb5jsu1fakpdo163/diff.pdf?t=d6gmvy5e

Thanks.

On Thu, 13 Jun 2019 at 11:40, Jason Lowe-Power <ja...@lowepower.com> wrote:

> Hi Victor,
>
> Drop the -DM5OP_ADDR define when you're compiling. That will force the
> m5ops to use the pseudo instruction implementation instead of the MMIO
> implementation. MMIO is required when using KVM, but no other time.
>
> Cheers,
> Jason
>
> On Wed, Jun 12, 2019 at 2:38 PM Victor Kariofillis <
> vickariofil...@gmail.com> wrote:
>
>> Hi Andrea,
>>
>> I can't get my microbenchmark to run with gem5. If I execute it without
>> sudo, I get a "Can't open /dev/mem: Permission denied". If I execute it
>> with sudo on its own, it seems to finish fine. But when I want to execute
>> it with gem5, I get a segfault.
>>
>> "warn: mmap: writing to shared mmap region is currently unsupported. The
>> write succeeds on the target, but it will not be propagated to the host or
>> shared mappings
>> warn: mmap: failed to map file into host address space
>> panic: Tried to read unmapped address 0x55ff.
>> PC: 0x400879, Instr:   MOV_R_M : ld   rax, DS:[rax + r11]
>> Memory Usage: 678516 KBytes
>> Program aborted at tick 86427000"
>>
>> I built my microbenchmark like this:
>>
>> 1) gcc -O2 -DM5OP_ADDR=0xFFFF0000 -Ipath/to/gem5/include -c
>> gem5_array.cpp -o gem5_array.o
>> 2) gcc gem5_array.o -o gem5_array path/to/gem5/util/m5/m5op_x86.o
>> path/to/gem5/util/m5/m5_mmap.o
>>
>> I don't only want to get the stats for the ROI in the stats file. I'm
>> using some debug flags, so in the output of gem5, I want to see only the
>> printouts from inside the ROI. I'm not sure I would achieve that.
>>
>> Thanks,
>> Victor
>> _______________________________________________
>> gem5-users mailing list
>> gem5-users@gem5.org
>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
> _______________________________________________
> gem5-users mailing list
> gem5-users@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to