[gem5-users] Re: panic: KVM: Failed to set register (0x6030000000100042) value

2022-11-03 Thread 廖雄飛
Hi Giacomo,

Thanks a lot for your quick response. Your suggestion does help.

With the updates contained in the three files indicated by the two Jira 
tickets, I still saw some error as below. I guess there are some changes not 
included in these two tickets.

--
Global frequency set at 1 ticks per second
info: Simulated platform: VExpress_GEM5_V1
AttributeError: object 'ArmDefaultRelease' has no attribute 'remove'
  (C++ object is not yet constructed, so wrapped C++ methods are unavailable.)

At:
  build/ARM/python/m5/SimObject.py(795): __getattr__
  build/ARM/arch/arm/ArmSystem.py(113): for_kvm
  configs/example/arm/fs_bigLITTLE.py(313): _build_kvm
  configs/example/arm/fs_bigLITTLE.py(287): build
  configs/example/arm/fs_bigLITTLE.py(388): main
  configs/example/arm/fs_bigLITTLE.py(398): 
  build/ARM/python/m5/main.py(434): main

--

However, after I switched to develop branch, the fixes are working and the 
full-system simulation is up. Hopefully, it can run to the login terminal.

Thanks a lot again.

All the best,
Xiongfei

From: Giacomo Travaglini 
mailto:giacomo.travagl...@arm.com>>
Sent: Thursday, November 3, 2022 8:07 PM
To: The gem5 Users mailing list 
mailto:gem5-users@gem5.org>>
Cc: Xiongfei Liao (廖雄飛) 
mailto:xiongfei.l...@mediatek.com>>
Subject: Re: panic: KVM: Failed to set register (0x603000100042) value

Hello, it was a bug which got fixed by the following patches, which are merged 
in develop and will be part of next release

https://gem5-review.googlesource.com/c/public/gem5/+/64072/4
https://gem5-review.googlesource.com/c/public/gem5/+/64073/4

Let me know if it works

Kind Regards

Giacomo

From: Xiongfei Liao (廖雄飛) via gem5-users 
mailto:gem5-users@gem5.org>>
Date: Thursday, 3 November 2022 at 11:19
To: gem5-users@gem5.org 
mailto:gem5-users@gem5.org>>
Cc: Xiongfei Liao (廖雄飛) 
mailto:xiongfei.l...@mediatek.com>>
Subject: [gem5-users] panic: KVM: Failed to set register (0x603000100042) 
value
Hi,

We try to run a full-system simulation using ARMV8KvmCPU. The simulation cannot 
get started due to the below failure of setting register PSTATE.

-
… …
  0: system.kvm_vm: Mapping 8 memory region(s)
  0: system.kvm_vm: Mapping region: 0x0xaebcb000 -> 0x0 [size: 
0x400]
  0: system.kvm_vm: Mapping region: 0x0xbb027000 -> 0x400 [size: 
0x4]
  0: system.kvm_vm: Mapping region: 0x0xacbcb000 -> 0x600 [size: 
0x200]
  0: system.kvm_vm: Mapping region: 0x0xa8bcb000 -> 0x800 [size: 
0x400]
  0: system.kvm_vm: Mapping region: 0x0xa4bcb000 -> 0xc00 [size: 
0x400]
  0: system.kvm_vm: Mapping region: 0x0xa2bcb000 -> 0x1800 [size: 
0x200]
  0: system.kvm_vm: Mapping region: 0x0xbc1b4000 -> 0x2e00 [size: 
0x8000]
  0: system.kvm_vm: Mapping region: 0x0x22bcb000 -> 0x8000 [size: 
0x8000]
build/ARM/cpu/kvm/base.cc:150: info: KVM: Coalesced MMIO disabled by config.
  0: system.littleCluster.cpus:   MPIDR(EL1) := 0x8000
build/ARM/dev/arm/energy_ctrl.cc:252: warn: Existing EnergyCtrl, but no enabled 
DVFSHandler found.
build/ARM/sim/simulate.cc:194: info: Entering event queue @ 0.  Starting 
simulation...
  0: system.littleCluster.cpus: Attaching cycle counter...
  0: system.littleCluster.cpus: In updateKvmState():
  0: system.littleCluster.cpus:   PSTATE := 0x3cd
build/ARM/cpu/kvm/base.cc:863: panic: KVM: Failed to set register 
(0x603000100042) value (errno: 22)
Memory Usage: 2693544 KBytes
Program aborted at tick 0
… …
---

This register 0x603000100042 is legal and 64-bit based on the document at 
the link: 
https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt

What could be the reason for this? ARM CPU or software or anything else?

Any tips/suggestions are appreciated.

Thanks in advance.

All the best,
Xiongfei Liao

===

The environment settings are as below.
Host:
ARM ser

[gem5-users] Re: HPCG on RISCV

2022-11-03 Thread Hoa Nguyen via gem5-users
Hi Nikos,

The problem you ran into with the FS mode seems to be the same problem
described here [1] [2].
Can you try downloading the changes and let me know if it fixes the problem?

[1] https://gem5-review.googlesource.com/c/public/gem5/+/65272
[2] https://gem5-review.googlesource.com/c/public/gem5/+/65273

Regards,
Hoa Nguyen

On Tue, Nov 1, 2022 at 2:15 PM Hoa Nguyen  wrote:

> Hi all,
>
> I also ran into the same problem using another benchmark. I want to note
> that this problem also appears when using the AtomicCPU.
>
> Regards,
> Hoa Nguyen
>
> On Tue, Nov 1, 2022 at 3:02 AM Νικόλαος Ταμπουρατζής via gem5-users <
> gem5-users@gem5.org> wrote:
>
>> Dear Boddy,
>>
>> Thank you for the update! Please let me know when the accuracy issue
>> will be resolved because I cannot execute any benchmark in RISCV FS
>> mode (I am wondering if any other user faces the same problem).
>>
>> Best regards,
>> Nikos
>>
>>
>> Quoting Bobby Bruce via gem5-users :
>>
>> > You mean this bug? Unfortunately not, I've been very busy with the
>> upcoming
>> > gem5 release and haven't had time to investigate this further.
>> >
>> > --
>> > Dr. Bobby R. Bruce
>> > Room 3050,
>> > Kemper Hall, UC Davis
>> > Davis,
>> > CA, 95616
>> >
>> > web: https://www.bobbybruce.net
>> >
>> >
>> > On Mon, Oct 31, 2022 at 1:45 AM Νικόλαος Ταμπουρατζής via gem5-users <
>> > gem5-users@gem5.org> wrote:
>> >
>> >> Dear Bobby, Jason, all,
>> >>
>> >> Is there any update about the accuracy of RISC-V FS?
>> >>
>> >> Best regards,
>> >> Nikos
>> >>
>> >>
>> >> Quoting Bobby Bruce :
>> >>
>> >> > Jason and I had a theory that this may be due to the "Rounding Mode"
>> for
>> >> > floating pointing being set incorrectly in FS mode. That's set via a
>> >> macro
>> >> > here:
>> >> >
>> >>
>> https://gem5.googlesource.com/public/gem5/+/refs/tags/v22.0.0.2/src/arch/riscv/fp_inst.hh#36
>> >> >
>> >> > I manually expanded the macro here:
>> >> >
>> >>
>> https://gem5.googlesource.com/public/gem5/+/refs/tags/v22.0.0.2/src/arch/riscv/isa/decoder.isa#1495
>> >> ,
>> >> > inside the "fsqrt_d" definition then compiled "build/ALL/gem5.debug".
>> >> Then
>> >> > used gdb to add a breakpoint in the "Fsqrt_d::execute" function (in
>> the
>> >> > generated "build/ALL/arch/riscv/generated/exec-ns.cc.inc" file).
>> >> >
>> >> > ```
>> >> > gdb build/ALL/gem5.opt
>> >> > break Fsqrt_d::execute
>> >> > run bug-recreation/se-mode-run.py # or `run
>> >> bug-recreation/fs-mode-run.py`
>> >> > ```
>> >> >
>> >> > Stepping through with gdb I the rounding mode is `0` for SE mode and
>> `0`
>> >> > for FS mode as well. So, no luck with that theory.
>> >> >
>> >> > My new theory is that this bug has something to do with thread
>> context
>> >> > switching being implemented incorrectly in RISC-V somehow. I find it
>> >> > strange that the sqrt(1) works fine for a while (i.e. returns `1`)
>> then
>> >> > suddenly starts returning zero after a certain point in the
>> execution. In
>> >> > addition, it's odd that the loop is not returning the same value each
>> >> time
>> >> > despite executing the same code. It'd make sense to me that the
>> thread is
>> >> > being stored and then resumed with some corruption of the floating
>> point
>> >> > data. This would also explain why this bug only occurs in FS mode.
>> >> >
>> >> > I'll try to find time to figure out a good test for this. If anyone
>> has
>> >> any
>> >> > other theories or ideas then let me know.
>> >> >
>> >> > --
>> >> > Dr. Bobby R. Bruce
>> >> > Room 3050,
>> >> > Kemper Hall, UC Davis
>> >> > Davis,
>> >> > CA, 95616
>> >> >
>> >> > web: https://www.bobbybruce.net
>> >> >
>> >> >
>> >> > On Fri, Oct 7, 2022 at 12:50 PM Νικόλαος Ταμπουρατζής <
>> >> > ntampourat...@ece.auth.gr> wrote:
>> >> >>
>> >> >> Dear Jason & Boddy,
>> >> >>
>> >> >> Unfortunately, I have tried my simple example without the sqrt
>> >> >> function and the problem remains. Specifically, I have the following
>> >> >> simple code:
>> >> >>
>> >> >>
>> >> >> #include 
>> >> >> #include 
>> >> >>
>> >> >> int main(){
>> >> >>
>> >> >>  int dim = 1024;
>> >> >>
>> >> >>  double result;
>> >> >>
>> >> >>  for (int iter = 0; iter < 2; iter++){
>> >> >>  result = 0;
>> >> >>  for (int i = 0; i < dim; i++){
>> >> >>  for (int j = 0; j < dim; j++){
>> >> >>  result += i * j;
>> >> >>  }
>> >> >>  }
>> >> >>  printf("Final Result: %lf\n", result);
>> >> >>  }
>> >> >> }
>> >> >>
>> >> >>
>> >> >> In the above code, the correct result is 274341298176.00 (from
>> >> >> RISCV-SE mode and x86), while in FS mode I get sometimes the correct
>> >> >> result and other times a different number.
>> >> >>
>> >> >> Best regards,
>> >> >> Nikos
>> >> >>
>> >> >>
>> >> >> Quoting Jason Lowe-Power :
>> >> >>
>> >> >> > I have an idea...
>> >> >> >
>> >> >> > Have you put a breakpoint in the implementation of the fsqrt_d
>> >> > function? I
>> >> >> > would like to know if when runnin

[gem5-users] Re: panic: KVM: Failed to set register (0x6030000000100042) value

2022-11-03 Thread Giacomo Travaglini via gem5-users
Hello, it was a bug which got fixed by the following patches, which are merged 
in develop and will be part of next release

https://gem5-review.googlesource.com/c/public/gem5/+/64072/4
https://gem5-review.googlesource.com/c/public/gem5/+/64073/4

Let me know if it works

Kind Regards

Giacomo

From: Xiongfei Liao (廖雄飛) via gem5-users 
Date: Thursday, 3 November 2022 at 11:19
To: gem5-users@gem5.org 
Cc: Xiongfei Liao (廖雄飛) 
Subject: [gem5-users] panic: KVM: Failed to set register (0x603000100042) 
value
Hi,

We try to run a full-system simulation using ARMV8KvmCPU. The simulation cannot 
get started due to the below failure of setting register PSTATE.

-
… …
  0: system.kvm_vm: Mapping 8 memory region(s)
  0: system.kvm_vm: Mapping region: 0x0xaebcb000 -> 0x0 [size: 
0x400]
  0: system.kvm_vm: Mapping region: 0x0xbb027000 -> 0x400 [size: 
0x4]
  0: system.kvm_vm: Mapping region: 0x0xacbcb000 -> 0x600 [size: 
0x200]
  0: system.kvm_vm: Mapping region: 0x0xa8bcb000 -> 0x800 [size: 
0x400]
  0: system.kvm_vm: Mapping region: 0x0xa4bcb000 -> 0xc00 [size: 
0x400]
  0: system.kvm_vm: Mapping region: 0x0xa2bcb000 -> 0x1800 [size: 
0x200]
  0: system.kvm_vm: Mapping region: 0x0xbc1b4000 -> 0x2e00 [size: 
0x8000]
  0: system.kvm_vm: Mapping region: 0x0x22bcb000 -> 0x8000 [size: 
0x8000]
build/ARM/cpu/kvm/base.cc:150: info: KVM: Coalesced MMIO disabled by config.
  0: system.littleCluster.cpus:   MPIDR(EL1) := 0x8000
build/ARM/dev/arm/energy_ctrl.cc:252: warn: Existing EnergyCtrl, but no enabled 
DVFSHandler found.
build/ARM/sim/simulate.cc:194: info: Entering event queue @ 0.  Starting 
simulation...
  0: system.littleCluster.cpus: Attaching cycle counter...
  0: system.littleCluster.cpus: In updateKvmState():
  0: system.littleCluster.cpus:   PSTATE := 0x3cd
build/ARM/cpu/kvm/base.cc:863: panic: KVM: Failed to set register 
(0x603000100042) value (errno: 22)
Memory Usage: 2693544 KBytes
Program aborted at tick 0
… …
---

This register 0x603000100042 is legal and 64-bit based on the document at 
the link: https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt

What could be the reason for this? ARM CPU or software or anything else?

Any tips/suggestions are appreciated.

Thanks in advance.

All the best,
Xiongfei Liao

===

The environment settings are as below.
Host:
ARM server: Ampere eMag 2019
OS & Kernel: Ubuntu 20.04.5 LTS (GNU/Linux 5.4.0-131-generic aarch64)

Simulator:
gem5: cloned on Oct 27, 2022
bootloader: gem5 binaries 20220707/binaries/boot.arm64
kernel: gem5 binaries 20220707/binaries/vmlinux.arm64
disk: gem5 binaries ubuntu-18.04-arm64-docker.img


* MEDIATEK Confidentiality Notice

 

The information contained in this e-mail message (including any

attachments) may be confidential, proprietary, privileged, or otherwise

exempt from disclosure under applicable laws. It is intended to be

conveyed only to the designated recipient(s). Any use, dissemination,

distribution, printing, retaining or copying of this e-mail (including its

attachments) by unintended recipient(s) is strictly prohibited and may

be unlawful. If you are not an intended recipient of this e-mail, or believe



that you have received this e-mail in error, please notify the sender

immediately (by replying to this e-mail), delete any and all copies of

this e-mail (including any attachments) from your system, and do not

disclose the content of this e-mail to any other person. Thank you!

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


[gem5-users] panic: KVM: Failed to set register (0x6030000000100042) value

2022-11-03 Thread 廖雄飛
Hi,

We try to run a full-system simulation using ARMV8KvmCPU. The simulation cannot 
get started due to the below failure of setting register PSTATE.

-
… …
  0: system.kvm_vm: Mapping 8 memory region(s)
  0: system.kvm_vm: Mapping region: 0x0xaebcb000 -> 0x0 [size: 
0x400]
  0: system.kvm_vm: Mapping region: 0x0xbb027000 -> 0x400 [size: 
0x4]
  0: system.kvm_vm: Mapping region: 0x0xacbcb000 -> 0x600 [size: 
0x200]
  0: system.kvm_vm: Mapping region: 0x0xa8bcb000 -> 0x800 [size: 
0x400]
  0: system.kvm_vm: Mapping region: 0x0xa4bcb000 -> 0xc00 [size: 
0x400]
  0: system.kvm_vm: Mapping region: 0x0xa2bcb000 -> 0x1800 [size: 
0x200]
  0: system.kvm_vm: Mapping region: 0x0xbc1b4000 -> 0x2e00 [size: 
0x8000]
  0: system.kvm_vm: Mapping region: 0x0x22bcb000 -> 0x8000 [size: 
0x8000]
build/ARM/cpu/kvm/base.cc:150: info: KVM: Coalesced MMIO disabled by config.
  0: system.littleCluster.cpus:   MPIDR(EL1) := 0x8000
build/ARM/dev/arm/energy_ctrl.cc:252: warn: Existing EnergyCtrl, but no enabled 
DVFSHandler found.
build/ARM/sim/simulate.cc:194: info: Entering event queue @ 0.  Starting 
simulation...
  0: system.littleCluster.cpus: Attaching cycle counter...
  0: system.littleCluster.cpus: In updateKvmState():
  0: system.littleCluster.cpus:   PSTATE := 0x3cd
build/ARM/cpu/kvm/base.cc:863: panic: KVM: Failed to set register 
(0x603000100042) value (errno: 22)
Memory Usage: 2693544 KBytes
Program aborted at tick 0
… …
---

This register 0x603000100042 is legal and 64-bit based on the document at 
the link: https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt

What could be the reason for this? ARM CPU or software or anything else?

Any tips/suggestions are appreciated.

Thanks in advance.

All the best,
Xiongfei Liao

===

The environment settings are as below.
Host:
ARM server: Ampere eMag 2019
OS & Kernel: Ubuntu 20.04.5 LTS (GNU/Linux 5.4.0-131-generic aarch64)

Simulator:
gem5: cloned on Oct 27, 2022
bootloader: gem5 binaries 20220707/binaries/boot.arm64
kernel: gem5 binaries 20220707/binaries/vmlinux.arm64
disk: gem5 binaries ubuntu-18.04-arm64-docker.img

___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org