Comments (6)
It's doesn't surprise me too much that the SimpleSwitchableProcessor
doesn't work well. This was never meant to be used for anything except the absolute simplest use cases.
What happens if you use just the KVM processor to take the checkpoint and then restore with atomic or the simple timing?
from gem5.
Hi Jason,
Thank you very much for your reply.
I have tested the same experiments with simpleProcessor(), using the same repo and run script.
Here are the results for testing:
- To generate the checkpoint, one should use this command:
Note: we use a simpleProcessor(KVM) to take the checkpoint.
build/ARM/gem5.opt --outdir=m5out_chkpt_kvm_simpleProcessor configs/example/gem5_library/arm-ubuntu-run-with-kvm.py --take-chkpt=True --chkpt-cpu-switchable=False
- To restore the checkpoint with a simpleProcessor(Timing), use the command below:
build/ARM/gem5.opt --outdir=m5out_rstr_simpleTiming --debug-flags=ExecAll configs/example/gem5_library/arm-ubuntu-run-with-kvm.py --take-chkpt=False --chkpt-dir=m5out_chkpt_kvm_simpleProcessor/checkpoint --rstr-cpu-switchable=False
Here's the terminals output:
info: Using default config
Reading the checkpoint.
warn: Setting the checkpoint path via the Simulator constructor is deprecated and will be removed in future releases of gem5. Please set this through via the appropriate workload function (i.e., `set_se_binary_workload` or `set_kernel_disk_workload`). If both are set the workload function set takes precedence.
Global frequency set at 1000000000000 ticks per second
warn: No dot file generated. Please install pydot to generate the dot file and pdf.
src/mem/dram_interface.cc:690: warn: DRAM device capacity (16384 Mbytes) does not match the address range assigned (1024 Mbytes)
src/mem/dram_interface.cc:690: warn: DRAM device capacity (16384 Mbytes) does not match the address range assigned (1024 Mbytes)
src/sim/kernel_workload.cc:46: info: kernel located at: /home/babaie/.cache/gem5/arm64-linux-kernel-5.4.49
src/base/loader/symtab.cc:95: warn: Cannot insert a new symbol table due to name collisions. Adding prefix to each symbol's name can resolve this issue.
src/base/statistics.hh:279: warn: One of the stats is a legacy stat. Legacy stat is a stat that does not belong to any statistics::Group. Legacy stat is deprecated.
board.vncserver: Listening for connections on port 5913
board.terminal: Listening for connections on port 3508
board.realview.uart1.device: Listening for connections on port 3509
board.realview.uart2.device: Listening for connections on port 3510
board.realview.uart3.device: Listening for connections on port 3511
board.remote_gdb: Listening for connections on port 7013
src/arch/arm/isa.cc:1559: warn: Checkpoint value for register id_pfr1 does not match current configuration (checkpointed: 0x1, current: 0x1011)
src/arch/arm/isa.cc:1559: warn: Checkpoint value for register id_aa64pfr0_el1 does not match current configuration (checkpointed: 0x1100000022, current: 0x1100002222)
src/arch/arm/isa.cc:1559: warn: Checkpoint value for register id_pfr1 does not match current configuration (checkpointed: 0x1, current: 0x1011)
src/arch/arm/isa.cc:1559: warn: Checkpoint value for register id_aa64pfr0_el1 does not match current configuration (checkpointed: 0x1100000022, current: 0x1100002222)
src/dev/arm/energy_ctrl.cc:252: warn: Existing EnergyCtrl, but no enabled DVFSHandler found.
src/sim/simulate.cc:199: info: Entering event queue @ 1317305722654. Starting simulation...
While using the debug-flags=ExecAll
that should print all committed instructions by the cores, nothing is printed. The simulation also does not end. Using debug-flags=Event
shows some events keep being rescheduled and executed:
...
1317305924784: board.processor.cores1.core.wrapped_function_event: EventFunctionWrapped 288 rescheduled @ 1317305924784
1317305924784: board.processor.cores1.core.wrapped_function_event: EventFunctionWrapped 288 executed @ 1317305924784
1317305924784: board.processor.cores1.core.wrapped_function_event: EventFunctionWrapped 288 rescheduled @ 1317305924784
1317305924784: board.processor.cores1.core.wrapped_function_event: EventFunctionWrapped 288 executed @ 1317305924784
1317305924784: board.processor.cores1.core.wrapped_function_event: EventFunctionWrapped 288 rescheduled @ 1317305924784
1317305924784: board.processor.cores1.core.wrapped_function_event: EventFunctionWrapped 288 executed @ 1317305924784
1317305924784: board.processor.cores1.core.wrapped_function_event: EventFunctionWrapped 288 rescheduled @ 1317305924784
1317305924784: board.processor.cores1.core.wrapped_function_event: EventFunctionWrapped 288 executed @ 1317305924784
1317305924784: board.processor.cores1.core.wrapped_function_event: EventFunctionWrapped 288 rescheduled @ 1317305924784
1317305924784: board.processor.cores1.core.wrapped_function_event: EventFunctionWrapped 288 executed @ 1317305924784
1317305924784: board.processor.cores1.core.wrapped_function_event: EventFunctionWrapped 288 rescheduled @ 1317305924784
1317305924784: board.processor.cores1.core.wrapped_function_event: EventFunctionWrapped 288 executed @ 1317305924784
1317305924784: board.processor.cores1.core.wrapped_function_event: EventFunctionWrapped 288 rescheduled @ 1317305924784
...
from gem5.
@giactra do you have any hints as to how to debug taking a checkpoint with Arm KVM and restoring?
from gem5.
Hi, for the SimpleProcessor case, ARM KVM uses ArmDefaultRelease.for_kvm()
as the release
for the ArmBoard
. This removes SECURITY
and VIRTUALIZATION
extensions from ArmDefaultRelease()
. When restoring the system using anything other than KVM CPUs, the ArmBoard
uses release=ArmDefaultRelease()
. Therefore the warn
for id_pfr1
and id_aa64pfr0_el1
were shown during restore. The simulation starts but it gets stuck at gem5::ArmISA::ISA while reading the wrong register value. The ArmBoard
has an init param release=
which can be used to get around this problem. I'll document this case, and, add checks within the board and open a new PR.
from gem5.
I don't know if changing the release will fix the issue, but IMHO we shouldn't just document things better, we should provide a less obscure platform.
I think we should remove complexity from the ArmBoard:
https://github.com/gem5/gem5/blob/develop/src/python/gem5/components/boards/arm_board.py#L119
Which is changing the release secretly to make it work with KVM depending on the CPUs in use.
We already have a KVM specific config, which is arm-ubuntu-run-with-kvm.py. It means that if you want to use KVM, you should use that platform. We should move the ArmRelease.for_kvm from the ArmBoard to that config.
You want to boot linux without KVM?
Use arm-ubuntu-run.py
You want to use KVM?
Use arm-ubuntu-run-with-kvm.py
from gem5.
Okay, I'll open a new PR fixing the release
.
from gem5.
Related Issues (20)
- LoongArch porting
- How can I specify in the configuration file or command line that my simulation can wait for remote GDB connections before starting simulation HOT 4
- Fix daily tests failing due to removing gcn3_x86 HOT 7
- RISCV RVV vfredmax.vs and vfredmin.vs implementation is incorrect HOT 2
- RVV instruction vmem faults caused by incorrect vl HOT 1
- CLFLUSH causes TLB assertion error HOT 1
- X86KvmCPU + se.py + mem-size ≥4 GB causes crash
- X86KvmCPU floating point exceptions when executing x87 FPU instructions
- arch-riscv: return values of m5 pseudo instructions in 32 bit systems HOT 8
- CHI (Arm) near/far atomic operation causes deadlock HOT 10
- Replace bitmanip test cases of asmtest resources with upstream one HOT 1
- arch-riscv: remove branching from `vset{i}vl{i}` instruction and allow registers `vl` and `vtype` to be renamed HOT 6
- arch-x86: bug in movss instruction HOT 5
- Test support for Ubuntu 24.04 HOT 3
- arch-x86,O3,KVM switching to full simulation bug HOT 4
- Simple question about custom instruction implementation HOT 1
- Linking Error when enable AddressSanitizer HOT 6
- gem5::statistics::Counter are 52-bit not 64-bit HOT 3
- Immediate crash when running KVM CPU in SE mode HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gem5.