Austin Harris has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/50229 )

Change subject: python: Fix switchable processor event queues
......................................................................

python: Fix switchable processor event queues

This fixes the event queues added to the switchable processor in
ade8c08 to only be added to the KVM cores.

Change-Id: I74ebc4aa52a44662602b9512c23c8fb8a40101d0
---
M components_library/processors/switchable_processor.py
1 file changed, 9 insertions(+), 1 deletion(-)



diff --git a/components_library/processors/switchable_processor.py b/components_library/processors/switchable_processor.py
index e764717..3495a27 100644
--- a/components_library/processors/switchable_processor.py
+++ b/components_library/processors/switchable_processor.py
@@ -73,6 +73,11 @@
         ]

         if self._prepare_kvm:
+            if all_cores[0].get_type() != CPUTypes.KVM:
+                raise Exception(
+                    "When using KVM, the switchable processor must start "
+                    "with the KVM cores."
+                )
             from m5.objects import KvmVM

             self.kvm_vm = KvmVM()
@@ -93,7 +98,10 @@

             # To get the KVM CPUs to run on different host CPUs
             # Specify a different event queue for each CPU
-            for i, core in enumerate(self.cores):
+            kvm_cores = [
+ core for core in self.cores if core.get_type() == CPUTypes.KVM
+            ]
+            for i, core in enumerate(kvm_cores):
                 for obj in core.get_simobject().descendants():
                     obj.eventq_index = 0
                 core.get_simobject().eventq_index = i + 1

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/50229
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I74ebc4aa52a44662602b9512c23c8fb8a40101d0
Gerrit-Change-Number: 50229
Gerrit-PatchSet: 1
Gerrit-Owner: Austin Harris <austin.dane.har...@gmail.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to