[gem5-users] 答复: Fail to bootup with KVM in se.py on X86 arch

2021-05-11 Thread Liyichao via gem5-users
Hi Jason:

 I find that if I set �Cmem-size < 4GB, there is no error, but when I 
set �Cmem-size=4GB or more than 4GB, the error occurred.



发件人: Liyichao
发送时间: 2021年5月12日 0:26
收件人: Jason Lowe-Power 
抄送: gem5 users mailing list 
主题: RE: [gem5-users] Fail to bootup with KVM in se.py on X86 arch

Hi Jason:
 I make two tests:

1. I write a test code follow "open /dev/kvm” "create vm” "create vcpu”,it 
has no error;

2.  I put allocate pmem and create vcpu in create_vm function in gem5,not 
outside create_vm,it has no error.


so I suspect if the allocate pmem function in gem5 source has any wrongs?
发件人: Jason Lowe-Powermailto:ja...@lowepower.com>>
收件人: Liyichaomailto:liyic...@huawei.com>>
抄送: gem5 users mailing listmailto:gem5-users@gem5.org>>
主题: Re: [gem5-users] Fail to bootup with KVM in se.py on X86 arch
时间: 2021-05-11 22:47:19

Hello,

I wonder if you have a maximum number of vcpus set on your host system. 
Otherwise, I can't think of any specific limitation to creating vcpus.

Cheers,
Jason

On Tue, May 11, 2021 at 2:36 AM Liyichao 
mailto:liyic...@huawei.com>> wrote:
Hi Jason:

 I use strace to follow the call stack, I find that the ioctl() with 
KVM_CREATE_VCPU returned EEXIST errno, this means the vCPU exist.

   ioctl(5, KVM_CREATE_VCPU, 2)= -1 EEXIST (File exists)


发件人: Liyichao
发送时间: 2021年5月11日 12:54
收件人: 'Jason Lowe-Power' mailto:ja...@lowepower.com>>; gem5 
users mailing list mailto:gem5-users@gem5.org>>
主题: 答复: [gem5-users] Fail to bootup with KVM in se.py on X86 arch

Hi Jason:
 I have add a DPRINTF in line 559 of vm.cc , it showed “  0: 
system.kvm_vm: *debug vcpuID is 0”

 Any KVM use limitations in X86?


gem5 version 21.0.0.0
gem5 compiled May 11 2021 01:04:20
gem5 started May 11 2021 01:09:26
gem5 executing on ubuntu, pid 53534
command line: ./build/X86/gem5.opt --debug-flags=Kvm configs/example/se.py 
--cpu-type=X86KvmCPU --cpu-clock=2.6GHz --sys-clock=2.6GHz --caches 
--l1d_size=64kB --l1i_size=64kB --l2cache --l2_size=32MB --mem-size=32GB 
--num-cpus=1 -I 5000 -c ./test

warn: membus.slave is deprecated. `slave` is now called `cpu_side_ports`
warn: tol2bus.master is deprecated. `master` is now called `mem_side_ports`
warn: membus.slave is deprecated. `slave` is now called `cpu_side_ports`
warn: tol2bus.slave is deprecated. `slave` is now called `cpu_side_ports`
warn: tol2bus.slave is deprecated. `slave` is now called `cpu_side_ports`
warn: tol2bus.slave is deprecated. `slave` is now called `cpu_side_ports`
warn: tol2bus.slave is deprecated. `slave` is now called `cpu_side_ports`
warn: membus.master is deprecated. `master` is now called `mem_side_ports`
warn: membus.master is deprecated. `master` is now called `mem_side_ports`
warn: membus.slave is deprecated. `slave` is now called `cpu_side_ports`
Global frequency set at 1 ticks per second
warn: DRAM device capacity (8192 Mbytes) does not match the address range 
assigned (32768 Mbytes)
  0: system.cpu: vcpuID is 0
0: system.remote_gdb: listening for remote gdb on port 7000
  0: system.cpu: ActivateContext 0
 REAL SIMULATION 
  0: system.kvm_vm: Mapping 1 memory region(s)
  0: system.kvm_vm: Mapping region: 0x0x7f0b007b7000 -> 0x0 [size: 
0x8]
  0: system.kvm_vm: vmFD is 5, p1 is 140724538190576
  0: system.cpu: charlie, vcpuID is 0
  0: system.kvm_vm: vmFD is 5, p1 is 0
  0: system.kvm_vm: *debug vcpuID is 0
panic: KVM: Failed to create virtual CPU
Memory Usage: 33838804 KBytes
Program aborted at tick 0
--- BEGIN LIBC BACKTRACE ---
./build/X86/gem5.opt(_Z15print_backtracev+0x2c)[0x5622a4c15f8c]
./build/X86/gem5.opt(_Z12abortHandleri+0x4a)[0x5622a4c30b6a]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12980)[0x7f1305ea6980]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7)[0x7f1304430fb7]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x141)[0x7f1304432921]
./build/X86/gem5.opt(+0x6e5cef)[0x5622a3f20cef]
./build/X86/gem5.opt(_ZN5KvmVM10createVCPUEl+0x9ff)[0x5622a4953b8f]
./build/X86/gem5.opt(_ZN10BaseKvmCPU7startupEv+0x9e)[0x5622a494bc8e]
./build/X86/gem5.opt(_ZN9X86KvmCPU7startupEv+0x9)[0x5622a4969509]



发件人: Jason Lowe-Power [mailto:ja...@lowepower.com]
发送时间: 2021年5月10日 23:56
收件人: gem5 users mailing list mailto:gem5-users@gem5.org>>
抄送: Liyichao mailto:liyic...@huawei.com>>
主题: Re: [gem5-users] Fail to bootup with KVM in se.py on X86 arch

Hmm, I don't immediately know what's going wrong. I would extend the panic on 
line 559 of vm.cc to also print the error code number so you can look it up. I 
believe you can use `errno` like normal after calling `ioctl`. For instance, 
you could add `strerror(errno)` to the panic.

Cheers,
Jason


On Mon, May 10, 2021 at 12:49 AM Liyichao via gem5-users 
mailto:gem5-users@gem5.org>> wrote:
Hi All:
 I use KVM CPU in se mode on X86 arch, but it showed a panic “KVM: 
Failed to create virtual CPU”.


My host is X86 server 

[gem5-users] gem5 ARM RealView Ctrl

2021-05-11 Thread Samuel Thomas via gem5-users
Hi all,

I am writing because I am trying to set up an existing project on a new 
machine. Unfortunately, when transferring the code over and setting up the 
environment, I’ve been running into an issue that I’ve never seen before. That 
is, the code doesn’t pass through the assertion in line 57 of the 
src/dev/arm/rv_ctrl.cc  code (pkt->getSize() == 4). It 
turns out the first packet has a size of 64.

I have a few suspects for what could be triggering the error, but I’m not 
exactly sure what it is. A first guess could be that the project requires 
building a new device tree buffer, but I’m getting the same error even with the 
pre-built dtb files.


The command line that I’m using to run the script is the following: 
…/gem5-workspace/gem5/build/ARM/gem5.opt 
…/gem5-workspace/gem5/configs/example/arm/fs_bigLITTLE.py —kernel 
…/gem5-workspace/gem5/dist/binaries/vmlinux.arm64 —kernel-init /init.gem5 
—cpu-type atomic —dtb 
…/gem5-workspace/gem5/system/arm/dt/armv8_gem5_v1_big_little_2_2.dtb —disk 
…/gem5-workspace/gem5/dist/disks/ubuntu-18.04-arm64-docker.img

Does anything stand out that I’m missing that could be triggering this?

I’ve tried reverting as many of the candidate changes as I can to the original, 
but it’s hard to say which it could be without having a real understanding of 
what the RealView Controller reads. Does anyone have any immediate inclinations 
as to what could be causing this? Otherwise, I’m happy to provide more details 
as necessary.

Best,
Sam___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-users] Dynamically Inserting lfence in decode

2021-05-11 Thread George Klimiashvili via gem5-users
Hello everyone,

Hope all is well. I am working on implementing an fsm that would dynamically 
insert lfence instruction during one of the state transitions. I’ve implemented 
the fsm in the decode stage.

Here is how I tried inserting the lfence instruction inside the decodeInsts 
function of o3 core:

// Line 680 in decode_impl.hh
// My code begins
DynInstPtr lfence_inst = buildInst(tid, StaticInst::nopStaticInstPtr,
NULL, inst->pcState(), inst->pcState(), 
false);
lfence_inst->staticInst->setFlag(IsReadBarrier);
lfence_inst->staticInst->setFlag(IsSerializeAfter);

toRename->insts[toRenameIndex] = lfence_inst;

++(toRename->size);
++toRenameIndex;
// My code ends

where buildInst function is similar to buildInst function defined in 
fetch_impl.hh:

template
typename Impl::DynInstPtr
DefaultDecode::buildInst(ThreadID tid, StaticInstPtr staticInst,
  StaticInstPtr curMacroop, TheISA::PCState thisPC,
  TheISA::PCState nextPC, bool trace)
{
// Get a sequence number.
InstSeqNum seq = cpu->getAndIncrementInstSeq();

// Create a new DynInst from the instruction fetched.
DynInstPtr instruction =
new DynInst(staticInst, curMacroop, thisPC, nextPC, seq, cpu);
instruction->setTid(tid);

instruction->setThreadState(cpu->thread[tid]);

DPRINTF(Decode, "[tid:%i] Instruction PC %#x (%d) created "
"[sn:%lli].\n", tid, thisPC.instAddr(),
thisPC.microPC(), seq);

DPRINTF(Decode, "[tid:%i] Instruction is: %s\n", tid,
instruction->staticInst->
disassemble(thisPC.instAddr()));

#if TRACING_ON
if (trace) {
instruction->traceData =
cpu->getTracer()->getInstRecord(curTick(), cpu->tcBase(tid),
instruction->staticInst, thisPC, curMacroop);
}
#else
instruction->traceData = NULL;
#endif

// Add instruction to the CPU's list of instructions.
instruction->setInstListIt(cpu->addInst(instruction));

return instruction;
}

When I try running it on a test program, I get segmentation fault:

info: Entering event queue @ 0.  Starting simulation...
gem5 has encountered a segmentation fault!

While there are obvious problems with this code (this and next PC being same 
and wrong), I was wondering if you could give some directions. Do I have the 
right idea? Or should I be doing something completely different?

Any type of feedback would be much appreciated.

Best regards,
George Klimiashvili

___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-users] Re: Fail to bootup with KVM in se.py on X86 arch

2021-05-11 Thread Liyichao via gem5-users
Hi Jason:
 I make two tests:

1. I write a test code follow "open /dev/kvm” "create vm” "create vcpu”,it 
has no error;

2.  I put allocate pmem and create vcpu in create_vm function in gem5,not 
outside create_vm,it has no error.


so I suspect if the allocate pmem function in gem5 source has any wrongs?
发件人: Jason Lowe-Powermailto:ja...@lowepower.com>>
收件人: Liyichaomailto:liyic...@huawei.com>>
抄送: gem5 users mailing listmailto:gem5-users@gem5.org>>
主题: Re: [gem5-users] Fail to bootup with KVM in se.py on X86 arch
时间: 2021-05-11 22:47:19

Hello,

I wonder if you have a maximum number of vcpus set on your host system. 
Otherwise, I can't think of any specific limitation to creating vcpus.

Cheers,
Jason

On Tue, May 11, 2021 at 2:36 AM Liyichao 
mailto:liyic...@huawei.com>> wrote:
Hi Jason:

 I use strace to follow the call stack, I find that the ioctl() with 
KVM_CREATE_VCPU returned EEXIST errno, this means the vCPU exist.

   ioctl(5, KVM_CREATE_VCPU, 2)= -1 EEXIST (File exists)


发件人: Liyichao
发送时间: 2021年5月11日 12:54
收件人: 'Jason Lowe-Power' mailto:ja...@lowepower.com>>; gem5 
users mailing list mailto:gem5-users@gem5.org>>
主题: 答复: [gem5-users] Fail to bootup with KVM in se.py on X86 arch

Hi Jason:
 I have add a DPRINTF in line 559 of vm.cc , it showed “  0: 
system.kvm_vm: *debug vcpuID is 0”

 Any KVM use limitations in X86?


gem5 version 21.0.0.0
gem5 compiled May 11 2021 01:04:20
gem5 started May 11 2021 01:09:26
gem5 executing on ubuntu, pid 53534
command line: ./build/X86/gem5.opt --debug-flags=Kvm configs/example/se.py 
--cpu-type=X86KvmCPU --cpu-clock=2.6GHz --sys-clock=2.6GHz --caches 
--l1d_size=64kB --l1i_size=64kB --l2cache --l2_size=32MB --mem-size=32GB 
--num-cpus=1 -I 5000 -c ./test

warn: membus.slave is deprecated. `slave` is now called `cpu_side_ports`
warn: tol2bus.master is deprecated. `master` is now called `mem_side_ports`
warn: membus.slave is deprecated. `slave` is now called `cpu_side_ports`
warn: tol2bus.slave is deprecated. `slave` is now called `cpu_side_ports`
warn: tol2bus.slave is deprecated. `slave` is now called `cpu_side_ports`
warn: tol2bus.slave is deprecated. `slave` is now called `cpu_side_ports`
warn: tol2bus.slave is deprecated. `slave` is now called `cpu_side_ports`
warn: membus.master is deprecated. `master` is now called `mem_side_ports`
warn: membus.master is deprecated. `master` is now called `mem_side_ports`
warn: membus.slave is deprecated. `slave` is now called `cpu_side_ports`
Global frequency set at 1 ticks per second
warn: DRAM device capacity (8192 Mbytes) does not match the address range 
assigned (32768 Mbytes)
  0: system.cpu: vcpuID is 0
0: system.remote_gdb: listening for remote gdb on port 7000
  0: system.cpu: ActivateContext 0
 REAL SIMULATION 
  0: system.kvm_vm: Mapping 1 memory region(s)
  0: system.kvm_vm: Mapping region: 0x0x7f0b007b7000 -> 0x0 [size: 
0x8]
  0: system.kvm_vm: vmFD is 5, p1 is 140724538190576
  0: system.cpu: charlie, vcpuID is 0
  0: system.kvm_vm: vmFD is 5, p1 is 0
  0: system.kvm_vm: *debug vcpuID is 0
panic: KVM: Failed to create virtual CPU
Memory Usage: 33838804 KBytes
Program aborted at tick 0
--- BEGIN LIBC BACKTRACE ---
./build/X86/gem5.opt(_Z15print_backtracev+0x2c)[0x5622a4c15f8c]
./build/X86/gem5.opt(_Z12abortHandleri+0x4a)[0x5622a4c30b6a]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12980)[0x7f1305ea6980]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7)[0x7f1304430fb7]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x141)[0x7f1304432921]
./build/X86/gem5.opt(+0x6e5cef)[0x5622a3f20cef]
./build/X86/gem5.opt(_ZN5KvmVM10createVCPUEl+0x9ff)[0x5622a4953b8f]
./build/X86/gem5.opt(_ZN10BaseKvmCPU7startupEv+0x9e)[0x5622a494bc8e]
./build/X86/gem5.opt(_ZN9X86KvmCPU7startupEv+0x9)[0x5622a4969509]



发件人: Jason Lowe-Power [mailto:ja...@lowepower.com]
发送时间: 2021年5月10日 23:56
收件人: gem5 users mailing list mailto:gem5-users@gem5.org>>
抄送: Liyichao mailto:liyic...@huawei.com>>
主题: Re: [gem5-users] Fail to bootup with KVM in se.py on X86 arch

Hmm, I don't immediately know what's going wrong. I would extend the panic on 
line 559 of vm.cc to also print the error code number so you can look it up. I 
believe you can use `errno` like normal after calling `ioctl`. For instance, 
you could add `strerror(errno)` to the panic.

Cheers,
Jason


On Mon, May 10, 2021 at 12:49 AM Liyichao via gem5-users 
mailto:gem5-users@gem5.org>> wrote:
Hi All:
 I use KVM CPU in se mode on X86 arch, but it showed a panic “KVM: 
Failed to create virtual CPU”.


My host is X86 server of Intel 6148 and it can support kvm:
lsmod |grep kvm
kvm_intel 172032  0
kvm   548864  1 kvm_intel
irqbypass  16384  1 kvm

ll /dev/kvm
crwxrwxrwx 1 root root 10, 232 Feb 16 20:40 /dev/kvm

   My GEM5 version is master(v21.0.0.0), 

[gem5-users] Re: Fail to bootup with KVM in se.py on X86 arch

2021-05-11 Thread Jason Lowe-Power via gem5-users
Hello,

I wonder if you have a maximum number of vcpus set on your host system.
Otherwise, I can't think of any specific limitation to creating vcpus.

Cheers,
Jason

On Tue, May 11, 2021 at 2:36 AM Liyichao  wrote:

> Hi Jason:
>
>
>
>  I use strace to follow the call stack, I find that the ioctl()
> with KVM_CREATE_VCPU returned EEXIST errno, this means the vCPU exist.
>
>
>
>ioctl(5, KVM_CREATE_VCPU, 2)= -1 EEXIST (File
> exists)
>
>
>
>
>
> *发件人:* Liyichao
> *发送时间:* 2021年5月11日 12:54
> *收件人:* 'Jason Lowe-Power' ; gem5 users mailing list <
> gem5-users@gem5.org>
> *主题:* 答复: [gem5-users] Fail to bootup with KVM in se.py on X86 arch
>
>
>
> Hi Jason:
>
>  I have add a DPRINTF in line 559 of vm.cc , it showed “  0:
> system.kvm_vm: *debug vcpuID is 0”
>
>
>
>  Any KVM use limitations in X86?
>
>
>
>
>
> gem5 version 21.0.0.0
>
> gem5 compiled May 11 2021 01:04:20
>
> gem5 started May 11 2021 01:09:26
>
> gem5 executing on ubuntu, pid 53534
>
> command line: ./build/X86/gem5.opt --debug-flags=Kvm configs/example/se.py
> --cpu-type=X86KvmCPU --cpu-clock=2.6GHz --sys-clock=2.6GHz --caches
> --l1d_size=64kB --l1i_size=64kB --l2cache --l2_size=32MB --mem-size=32GB
> --num-cpus=1 -I 5000 -c ./test
>
>
>
> warn: membus.slave is deprecated. `slave` is now called `cpu_side_ports`
>
> warn: tol2bus.master is deprecated. `master` is now called `mem_side_ports`
>
> warn: membus.slave is deprecated. `slave` is now called `cpu_side_ports`
>
> warn: tol2bus.slave is deprecated. `slave` is now called `cpu_side_ports`
>
> warn: tol2bus.slave is deprecated. `slave` is now called `cpu_side_ports`
>
> warn: tol2bus.slave is deprecated. `slave` is now called `cpu_side_ports`
>
> warn: tol2bus.slave is deprecated. `slave` is now called `cpu_side_ports`
>
> warn: membus.master is deprecated. `master` is now called `mem_side_ports`
>
> warn: membus.master is deprecated. `master` is now called `mem_side_ports`
>
> warn: membus.slave is deprecated. `slave` is now called `cpu_side_ports`
>
> Global frequency set at 1 ticks per second
>
> warn: DRAM device capacity (8192 Mbytes) does not match the address range
> assigned (32768 Mbytes)
>
>   0: system.cpu: vcpuID is 0
>
> 0: system.remote_gdb: listening for remote gdb on port 7000
>
>   0: system.cpu: ActivateContext 0
>
>  REAL SIMULATION 
>
>   0: system.kvm_vm: Mapping 1 memory region(s)
>
>   0: system.kvm_vm: Mapping region: 0x0x7f0b007b7000 -> 0x0 [size:
> 0x8]
>
>   0: system.kvm_vm: vmFD is 5, p1 is 140724538190576
>
>   0: system.cpu: charlie, vcpuID is 0
>
>   0: system.kvm_vm: vmFD is 5, p1 is 0
>
>   0: system.kvm_vm: *debug vcpuID is 0
>
> panic: KVM: Failed to create virtual CPU
>
> Memory Usage: 33838804 KBytes
>
> Program aborted at tick 0
>
> --- BEGIN LIBC BACKTRACE ---
>
> ./build/X86/gem5.opt(_Z15print_backtracev+0x2c)[0x5622a4c15f8c]
>
> ./build/X86/gem5.opt(_Z12abortHandleri+0x4a)[0x5622a4c30b6a]
>
> /lib/x86_64-linux-gnu/libpthread.so.0(+0x12980)[0x7f1305ea6980]
>
> /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7)[0x7f1304430fb7]
>
> /lib/x86_64-linux-gnu/libc.so.6(abort+0x141)[0x7f1304432921]
>
> ./build/X86/gem5.opt(+0x6e5cef)[0x5622a3f20cef]
>
> ./build/X86/gem5.opt(_ZN5KvmVM10createVCPUEl+0x9ff)[0x5622a4953b8f]
>
> ./build/X86/gem5.opt(_ZN10BaseKvmCPU7startupEv+0x9e)[0x5622a494bc8e]
>
> ./build/X86/gem5.opt(_ZN9X86KvmCPU7startupEv+0x9)[0x5622a4969509]
>
>
> --
>
>
>
> *发件人:* Jason Lowe-Power [mailto:ja...@lowepower.com ]
>
> *发送时间:* 2021年5月10日 23:56
> *收件人:* gem5 users mailing list 
> *抄送:* Liyichao 
> *主题:* Re: [gem5-users] Fail to bootup with KVM in se.py on X86 arch
>
>
>
> Hmm, I don't immediately know what's going wrong. I would extend the panic
> on line 559 of vm.cc to also print the error code number so you can look it
> up. I believe you can use `errno` like normal after calling `ioctl`. For
> instance, you could add `strerror(errno)` to the panic.
>
>
>
> Cheers,
>
> Jason
>
>
>
>
>
> On Mon, May 10, 2021 at 12:49 AM Liyichao via gem5-users <
> gem5-users@gem5.org> wrote:
>
> Hi All:
>
>  I use KVM CPU in se mode on X86 arch, but it showed a panic “KVM:
> Failed to create virtual CPU”.
>
>
>
>
>
> My host is X86 server of Intel 6148 and it can support kvm:
>
> lsmod |grep kvm
>
> kvm_intel 172032  0
>
> kvm   548864  1 kvm_intel
>
> irqbypass  16384  1 kvm
>
>
>
> ll /dev/kvm
>
> crwxrwxrwx 1 root root 10, 232 Feb 16 20:40 /dev/kvm
>
>
>
>My GEM5 version is master(v21.0.0.0),
> ea7d012c00e857ef999b88a8ec2bde801a1f
>
>
>
>
>
> ./build/X86/gem5.opt configs/example/se.py --cpu-type=X86KvmCPU
> --cpu-clock=2.6GHz --sys-clock=2.6GHz --caches --l1d_size=64kB
> --l1i_size=64kB --l2cache --l2_size=32MB --mem-size=32GB --num-cpus=1 -I
> 5000 -c "./test"
>
> gem5 Simulator System.  http://gem5.org
>
> gem5 is copyrighted software; use the 

[gem5-users] error in building simobject

2021-05-11 Thread abhijeeth modi via gem5-users
Hello everyone

I am beginner to this gem5 community. I wanted to create a sim object by
following the official documentation. I created a header file, python file
and .cc file of HelloObject along with SConscript. When I tried to build
the thing, I am getting an error that " no declaration mathes the
HelloObject". When I tried to build the examples provided in the gem5
directory itself, it is working fine. I cannot find where the error is and
I mentioned the error below. Please help me with this thing.


Warning: Couldn't find any HDF5 C++ libraries. Disabling HDF5 support.
Checking whether __i386__ is declared... (cached) no
Checking whether __x86_64__ is declared... (cached) yes
Building in /home/abhi/gem5/build/X86
Using saved variables file /home/abhi/gem5/build/variables/X86
scons: done reading SConscript files.
scons: Building targets ...
 [ CXX] X86/hpca_tutorial/hello_object.cc -> .o
*build/X86/hpca_tutorial/hello_object.cc:12:1: error: no declaration
matches 'HelloObject* HelloObjectParams::create()'*
*   12 | HelloObjectParams::create()*
*  | ^*
In file included from build/X86/hpca_tutorial/hello_object.hh:4,
 from build/X86/hpca_tutorial/hello_object.cc:1:
build/X86/params/HelloObject.hh:17:19: note: candidate is: 'HelloObject*
HelloObjectParams::create() const'
   17 | HelloObject * create() const;
  | ^~
build/X86/params/HelloObject.hh:14:8: note: 'struct HelloObjectParams'
defined here
   14 | struct HelloObjectParams
  | ^
scons: *** [build/X86/hpca_tutorial/hello_object.o] Error 1
scons: building terminated because of errors.
*** Summary of Warnings ***
Warning: Header file  not found.
 This host has no libpng library.
 Disabling support for PNG framebuffers.
Warning: Couldn't find any HDF5 C++ libraries. Disabling HDF5 support.



Best regards
Abhijeeth
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-users] Re: Qemu equivalent command/simulation to Gem5

2021-05-11 Thread Eliot Moss via gem5-users

On 5/11/2021 8:33 AM, Đức Anh via gem5-users wrote:

Dear all,

I have a Linux kernel v5.10.27 build for arm64 architecture that is runnable on Gem5. Now I want to 
run it on Qemu-system-aarch64, but I haven't figure out the proper command and parameters yet. Here 
is the few things I have tried:

- qemu-system-aarch64 -M vexpress-a15 --cpu cortex-a15 -m 2048 --kernel 
output/vmlinux
 From the Gem5 source code, I know Gem5 implements Arm CoreTile Express A15x2 (V2P-CA15) (from the 
comment in src/dev/arm/RealView.py). It has Cortex-A15. So I chose the parameters like above. 
However, it showed the following error:


qemu-system-aarch64: Trying to execute code outside RAM or ROM at 
0x0400

The reason I think is vexpress-a15 and cortex-a15 are arm architecture, not arm64. I tried a few 
other parameters like cortex-a53, cortex-a57, versatileab, versatilepb, but all of them do not work.


So how can I run the kernel on Qemu?

And besides, I wonder how Gem5 implements Arm CoreTile Express A15x2 (ARM arch) and supports ARMv8 
(arm64 arch) at the same time?


Maybe post to the qemu mailing lists?   EM
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-users] Re: Qemu equivalent command/simulation to Gem5

2021-05-11 Thread Giacomo Travaglini via gem5-users
Hi

> -Original Message-
> From: Đức Anh via gem5-users 
> Sent: 11 May 2021 13:34
> To: gem5 users mailing list 
> Cc: Đức Anh 
> Subject: [gem5-users] Qemu equivalent command/simulation to Gem5
>
> Dear all,
>
> I have a Linux kernel v5.10.27 build for arm64 architecture that is runnable 
> on
> Gem5. Now I want to run it on Qemu-system-aarch64, but I haven't figure
> out the proper command and parameters yet. Here is the few things I have
> tried:
> - qemu-system-aarch64 -M vexpress-a15 --cpu cortex-a15 -m 2048 --kernel
> output/vmlinux From the Gem5 source code, I know Gem5 implements Arm
> CoreTile Express A15x2 (V2P-CA15) (from the comment in
> src/dev/arm/RealView.py). It has Cortex-A15. So I chose the parameters like
> above. However, it showed the following error:

That is actually  the name of the daughterboard. It is named after the A15 as 
it should contain the dual core A15 cluster in a *test chip* (Cortex-A15_A7 
MPCore [1])  we don't emulate in gem5.
That doesn't mean your application processor will be an A15.

>
> qemu-system-aarch64: Trying to execute code outside RAM or ROM at
> 0x0400
>
>
> The reason I think is vexpress-a15 and cortex-a15 are arm architecture, not
> arm64. I tried a few other parameters like cortex-a53, cortex-a57, 
> versatileab,
> versatilepb, but all of them do not work.

I am not a QEMU expert, but I have successfully used the virt platform in the 
past.

>
> So how can I run the kernel on Qemu?
>
> And besides, I wonder how Gem5 implements Arm CoreTile Express A15x2
> (ARM arch) and supports ARMv8 (arm64 arch) at the same time?

As I mentioned earlier, we don't simulate any A15 processor within the Arm 
CoreTile Express A15x2 daughterboard.
So the execution mode of your gem5 simulation will automatically be 
arm64/aarch64 (it will be automatically detected by the workload object) 
regardless of the CPU model (microarchitecture) being modelled.

>
> Best regards,
> Duc Anh

Kind Regards

Giacomo

[1]: 
https://developer.arm.com/documentation/ddi0503/i/hardware-description/coretile-express-a15-2-a7-3-daughterboard-architecture
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
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-users] Qemu equivalent command/simulation to Gem5

2021-05-11 Thread Đức Anh via gem5-users
Dear all,

I have a Linux kernel v5.10.27 build for arm64 architecture that is
runnable on Gem5. Now I want to run it on Qemu-system-aarch64, but I
haven't figure out the proper command and parameters yet. Here is the few
things I have tried:
- qemu-system-aarch64 -M vexpress-a15 --cpu cortex-a15 -m 2048 --kernel
output/vmlinux
>From the Gem5 source code, I know Gem5 implements Arm CoreTile Express
A15x2 (V2P-CA15) (from the comment in src/dev/arm/RealView.py). It has
Cortex-A15. So I chose the parameters like above. However, it showed the
following error:

qemu-system-aarch64: Trying to execute code outside RAM or ROM at
0x0400

The reason I think is vexpress-a15 and cortex-a15 are arm architecture, not
arm64. I tried a few other parameters like cortex-a53, cortex-a57,
versatileab, versatilepb, but all of them do not work.

So how can I run the kernel on Qemu?

And besides, I wonder how Gem5 implements Arm CoreTile Express A15x2 (ARM
arch) and supports ARMv8 (arm64 arch) at the same time?

Best regards,
Duc Anh
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-users] 答复: Fail to bootup with KVM in se.py on X86 arch

2021-05-11 Thread Liyichao via gem5-users
Hi Jason:

 I use strace to follow the call stack, I find that the ioctl() with 
KVM_CREATE_VCPU returned EEXIST errno, this means the vCPU exist.

   ioctl(5, KVM_CREATE_VCPU, 2)= -1 EEXIST (File exists)


发件人: Liyichao
发送时间: 2021年5月11日 12:54
收件人: 'Jason Lowe-Power' ; gem5 users mailing list 

主题: 答复: [gem5-users] Fail to bootup with KVM in se.py on X86 arch

Hi Jason:
 I have add a DPRINTF in line 559 of vm.cc , it showed “  0: 
system.kvm_vm: *debug vcpuID is 0”

 Any KVM use limitations in X86?


gem5 version 21.0.0.0
gem5 compiled May 11 2021 01:04:20
gem5 started May 11 2021 01:09:26
gem5 executing on ubuntu, pid 53534
command line: ./build/X86/gem5.opt --debug-flags=Kvm configs/example/se.py 
--cpu-type=X86KvmCPU --cpu-clock=2.6GHz --sys-clock=2.6GHz --caches 
--l1d_size=64kB --l1i_size=64kB --l2cache --l2_size=32MB --mem-size=32GB 
--num-cpus=1 -I 5000 -c ./test

warn: membus.slave is deprecated. `slave` is now called `cpu_side_ports`
warn: tol2bus.master is deprecated. `master` is now called `mem_side_ports`
warn: membus.slave is deprecated. `slave` is now called `cpu_side_ports`
warn: tol2bus.slave is deprecated. `slave` is now called `cpu_side_ports`
warn: tol2bus.slave is deprecated. `slave` is now called `cpu_side_ports`
warn: tol2bus.slave is deprecated. `slave` is now called `cpu_side_ports`
warn: tol2bus.slave is deprecated. `slave` is now called `cpu_side_ports`
warn: membus.master is deprecated. `master` is now called `mem_side_ports`
warn: membus.master is deprecated. `master` is now called `mem_side_ports`
warn: membus.slave is deprecated. `slave` is now called `cpu_side_ports`
Global frequency set at 1 ticks per second
warn: DRAM device capacity (8192 Mbytes) does not match the address range 
assigned (32768 Mbytes)
  0: system.cpu: vcpuID is 0
0: system.remote_gdb: listening for remote gdb on port 7000
  0: system.cpu: ActivateContext 0
 REAL SIMULATION 
  0: system.kvm_vm: Mapping 1 memory region(s)
  0: system.kvm_vm: Mapping region: 0x0x7f0b007b7000 -> 0x0 [size: 
0x8]
  0: system.kvm_vm: vmFD is 5, p1 is 140724538190576
  0: system.cpu: charlie, vcpuID is 0
  0: system.kvm_vm: vmFD is 5, p1 is 0
  0: system.kvm_vm: *debug vcpuID is 0
panic: KVM: Failed to create virtual CPU
Memory Usage: 33838804 KBytes
Program aborted at tick 0
--- BEGIN LIBC BACKTRACE ---
./build/X86/gem5.opt(_Z15print_backtracev+0x2c)[0x5622a4c15f8c]
./build/X86/gem5.opt(_Z12abortHandleri+0x4a)[0x5622a4c30b6a]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12980)[0x7f1305ea6980]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7)[0x7f1304430fb7]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x141)[0x7f1304432921]
./build/X86/gem5.opt(+0x6e5cef)[0x5622a3f20cef]
./build/X86/gem5.opt(_ZN5KvmVM10createVCPUEl+0x9ff)[0x5622a4953b8f]
./build/X86/gem5.opt(_ZN10BaseKvmCPU7startupEv+0x9e)[0x5622a494bc8e]
./build/X86/gem5.opt(_ZN9X86KvmCPU7startupEv+0x9)[0x5622a4969509]



发件人: Jason Lowe-Power [mailto:ja...@lowepower.com]
发送时间: 2021年5月10日 23:56
收件人: gem5 users mailing list mailto:gem5-users@gem5.org>>
抄送: Liyichao mailto:liyic...@huawei.com>>
主题: Re: [gem5-users] Fail to bootup with KVM in se.py on X86 arch

Hmm, I don't immediately know what's going wrong. I would extend the panic on 
line 559 of vm.cc to also print the error code number so you can look it up. I 
believe you can use `errno` like normal after calling `ioctl`. For instance, 
you could add `strerror(errno)` to the panic.

Cheers,
Jason


On Mon, May 10, 2021 at 12:49 AM Liyichao via gem5-users 
mailto:gem5-users@gem5.org>> wrote:
Hi All:
 I use KVM CPU in se mode on X86 arch, but it showed a panic “KVM: 
Failed to create virtual CPU”.


My host is X86 server of Intel 6148 and it can support kvm:
lsmod |grep kvm
kvm_intel 172032  0
kvm   548864  1 kvm_intel
irqbypass  16384  1 kvm

ll /dev/kvm
crwxrwxrwx 1 root root 10, 232 Feb 16 20:40 /dev/kvm

   My GEM5 version is master(v21.0.0.0), 
ea7d012c00e857ef999b88a8ec2bde801a1f


./build/X86/gem5.opt configs/example/se.py --cpu-type=X86KvmCPU 
--cpu-clock=2.6GHz --sys-clock=2.6GHz --caches --l1d_size=64kB --l1i_size=64kB 
--l2cache --l2_size=32MB --mem-size=32GB --num-cpus=1 -I 5000 -c "./test"
gem5 Simulator System.  http://gem5.org
gem5 is copyrighted software; use the --copyright option for details.

gem5 version 21.0.0.0
gem5 compiled May 10 2021 03:39:51
gem5 started May 10 2021 03:57:48
gem5 executing on ubuntu, pid 112188
command line: ./build/X86/gem5.opt configs/example/se.py --cpu-type=X86KvmCPU 
--cpu-clock=2.6GHz --sys-clock=2.6GHz --caches --l1d_size=64kB --l1i_size=64kB 
--l2cache --l2_size=32MB --mem-size=32GB --num-cpus=1 -I 5000 -c ./test

warn: membus.slave is deprecated. `slave` is now called `cpu_side_ports`
warn: tol2bus.master is deprecated. `master` is now called `mem_side_ports`
warn: 

[gem5-users] Re: Committing loads

2021-05-11 Thread Jiayi Huang via gem5-users
The instToCommit() basically marks the instruction as completed and ready to be 
committed if there is no faults. If there is misspeculation on either branch or 
memory, or memory consistency issue, the dynamic instruction will be marked  as 
squash and it will be eventually squashed from the pipeline.

Later it may be executed again if the earlier squash was not due to branch 
misspeculation.
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s