Hi Andreas,

Thank you for the detailed reply.

I have added myself to the kvm group, so that I don’t need to use the sudo. I 
have also tried the ARM big.Little configuration example, but I still get Errno 
19.

Now will try to update the Kernel so and will also try to run VM with KVM so to 
check if the KVM is working on the machine or not. I will keep posted on how it 
goes.

Thank you again.

Regards
Yasir

From: gem5-users [mailto:gem5-users-boun...@gem5.org] On Behalf Of Andreas 
Sandberg
Sent: 25 October 2017 16:04
To: gem5 users mailing list <gem5-users@gem5.org>
Subject: Re: [gem5-users] ARM v8 KVM - GEM5

Hi Yasir,

The reason you have to sudo to get access to the device is because most Linux 
distributions restrict access to /dev/kvm. You can change the permissions 
manually or add yourself to the relevant groups (the group is probably called 
kvm or something along those lines).

Errno 19 corresponds to ENODEV. I'm not sure why you'd get that when you try to 
create a VM, it might be because KVM isn't supported properly on your platform. 
I'd suggest that you try to get qemu or virt-tools to work with KVM on your 
system before you try to run gem5 with KVM. You'll most likely have to update 
your host kernel since 4.4 is too old to work reliably with KVM, you probably 
need at least 4.9 to get it to work at all.

Also, please keep in mind that example/fs.py doesn't support mutli-core KVM. If 
you need that, you have to use the bL example configuration in example/arm/. 
Another limitation is that you can't (easily) use gem5's GIC extensions, so you 
are currently limited to 8 CPUs.

Cheers,
Andreas

On 19/10/2017 17:23, Qureshi Yasir Mahmood wrote:
Hi All,

Any idea why the ARM KVM model is not running in the following, please ? If I 
need to debug this, can someone suggest what debug flags should I be looking 
out for ?

Thank you

Regards
Yasir

From: gem5-users [mailto:gem5-users-boun...@gem5.org] On Behalf Of Qureshi 
Yasir Mahmood
Sent: 18 October 2017 16:07
To: gem5-users@gem5.org<mailto:gem5-users@gem5.org>
Subject: [gem5-users] ARM v8 KVM - GEM5

Hi All,

I am trying to use the ARMv8 KVM CPU model in FS mode. My gem5 is compiled and 
running on Cavium ThunderX machine (ARMv8 architecture). When I run the 
following without any sudo,

./build/ARM/gem5.fast  --remote-gdb-port=0 -d kvzr/kvzr_base 
configs/example/fs.py --kernel=vmlinux --machine-type=VExpress_GEM5_V1 
--dtb-file=/home/epfl/gem5/system/arm/dt/armv8_gem5_v1_16cpu.dtb 
--disk-image=test_kvzr.img -n 16 --cpu-clock=2GHz --caches --l2cache 
--l1i_size=64kB --l1d_size=32kB --l1i_assoc=2 --l1d_assoc=2 --l2_size=16MB 
--l2_assoc=16 --mem-type=DDR4_2400_4x16 --mem-ranks=4 --mem-size=16GB 
--sys-clock=1600MHz --cpu-type=ArmV8KvmCPU

fatal: KVM: Failed to open /dev/kvm
Memory Usage: 87808 Kbytes

If I put a sudo just at the start of the command, the error is as follows

Global frequency set at 1000000000000 ticks per second
info: kernel located at: /home/epfl/full_system_images/binaries/vmlinux
warn: Highest ARM exception-level set to AArch32 but bootloader is for AArch64. 
Assuming you wanted these to match.
panic: KVM: Failed to create device (errno: 19)
Memory Usage: 17142380 KBytes
Program aborted at tick 0
--- BEGIN LIBC BACKTRACE ---
./build/ARM/gem5.fast(_Z15print_backtracev+0x38)[0x18f1498]
./build/ARM/gem5.fast(_Z12abortHandleri+0x5c)[0x18fe8d4]
[0xffff9b0ec510]
/lib/aarch64-linux-gnu/libc.so.6(gsignal+0x38)[0xffff9a7e94e8]
--- END LIBC BACKTRACE ---
Aborted

I ran kvm-ok, and the output was the following

INFO: /dev/kvm exists
KVM acceleration can be used

My host kernel version is 4.4 and the simulated kernel version is 4.3

Any ideas, why KVM CPU model is not running on for ARM FS ?

Regards
Yasir




_______________________________________________

gem5-users mailing list

gem5-users@gem5.org<mailto:gem5-users@gem5.org>

http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.
_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to