From 28b081b34844b3e393219a8dd5f5d38662bf9af3 Mon Sep 17 00:00:00 2001 From: Kaustav Goswami <39310478+kaustav-goswami@users.noreply.github.com> Date: Wed, 3 Apr 2024 03:48:24 -0700 Subject: [PATCH] arch-arm,stdlib: ARM release for_kvm is moved to configs (#986) This change sets the `release` of the ARM board at the config file instead of overriding the release on the ArmBoard. This change partially solves issue 932 as the system taking and restoring the checkpoint is consistent across KVM and timing CPUs respectively. Signed-off-by: Kaustav Goswami --- configs/example/gem5_library/arm-ubuntu-run-with-kvm.py | 6 +++--- src/python/gem5/components/boards/arm_board.py | 7 +------ 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/configs/example/gem5_library/arm-ubuntu-run-with-kvm.py b/configs/example/gem5_library/arm-ubuntu-run-with-kvm.py index f6c9164396..3d1435e866 100644 --- a/configs/example/gem5_library/arm-ubuntu-run-with-kvm.py +++ b/configs/example/gem5_library/arm-ubuntu-run-with-kvm.py @@ -87,9 +87,9 @@ processor = SimpleSwitchableProcessor( ) # The ArmBoard requires a `release` to be specified. This adds all the -# extensions or features to the system. We are setting this to Armv8 -# (ArmDefaultRelease) in this example config script. -release = ArmDefaultRelease() +# extensions or features to the system. We are setting this to for_kvm() +# to enable KVM simulation. +release = ArmDefaultRelease.for_kvm() # The platform sets up the memory ranges of all the on-chip and off-chip # devices present on the ARM system. ARM KVM only works with VExpress_GEM5_V1 diff --git a/src/python/gem5/components/boards/arm_board.py b/src/python/gem5/components/boards/arm_board.py index d4028e4d71..0a0cd2fa28 100644 --- a/src/python/gem5/components/boards/arm_board.py +++ b/src/python/gem5/components/boards/arm_board.py @@ -113,13 +113,8 @@ class ArmBoard(ArmSystem, AbstractBoard, KernelDiskWorkload): requires(isa_required=ISA.ARM) # Setting up ARM release here. We use the ARM default release, which - # corresponds to an ARMv8 system. The default release is updated if - # the user is using any KVM cores. + # corresponds to an ARMv8 system. self.release = release - if any(core.is_kvm_core() for core in processor.get_cores()): - # KVM cores only work with VExpress_GEM5_V1() - if isinstance(platform, VExpress_GEM5_V1): - self.release = ArmDefaultRelease.for_kvm() # Setting multi_proc of ArmSystem by counting the number of processors. if processor.get_num_cores() == 1: