Kevin Loughlin has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/41602 )

Change subject: configs: Updates for SMP X86KvmCPU boot
......................................................................

configs: Updates for SMP X86KvmCPU boot

The prior example config for FS fails SMP boot on the KVMX86CPU.
These updates incorporate logic x86-boot-tests/system/
[system.py|run_exit.py] as well as configs/example/arm/
fs_bigLITTLE.py to enable both single processor and SMP boot.
Each KVM VM now uses its own eventq and a non-zero sim_quantum.

Change-Id: I9c73a2f6f2ca604aecd31f45570423c58f85020f
Signed-off-by: Kevin Loughlin <kevlo...@umich.edu>
---
M configs/example/fs.py
1 file changed, 22 insertions(+), 4 deletions(-)



diff --git a/configs/example/fs.py b/configs/example/fs.py
index f388503..32e7471 100644
--- a/configs/example/fs.py
+++ b/configs/example/fs.py
@@ -144,10 +144,6 @@
test_sys.cpu = [TestCPUClass(clk_domain=test_sys.cpu_clk_domain, cpu_id=i)
                     for i in range(np)]

-    if ObjectList.is_kvm_cpu(TestCPUClass) or \
-        ObjectList.is_kvm_cpu(FutureClass):
-        test_sys.kvm_vm = KvmVM()
-
     if options.ruby:
         bootmem = getattr(test_sys, '_bootmem', None)
         Ruby.create_system(options, True, test_sys, test_sys.iobus,
@@ -220,6 +216,20 @@

         MemConfig.config_mem(options, test_sys)

+    if ObjectList.is_kvm_cpu(TestCPUClass) or \
+        ObjectList.is_kvm_cpu(FutureClass):
+        # Assign KVM CPUs to their own event queues / threads. This
+        # has to be done after creating caches and other child objects
+        # since these mustn't inherit the CPU event queue.
+        for i,cpu in enumerate(test_sys.cpu):
+            # Child objects usually inherit the parent's event
+            # queue. Override that and use the same event queue for
+            # all devices.
+            for obj in cpu.descendants():
+                obj.eventq_index = 0
+            cpu.eventq_index = i + 1
+        test_sys.kvm_vm = KvmVM()
+
     return test_sys

 def build_drive_system(np):
@@ -324,6 +334,7 @@
 np = options.num_cpus

 test_sys = build_test_system(np)
+
 if len(bm) == 2:
     drive_sys = build_drive_system(np)
     root = makeDualRoot(True, test_sys, drive_sys, options.etherdump)
@@ -345,6 +356,13 @@
     print("Error I don't know how to create more than 2 systems.")
     sys.exit(1)

+if ObjectList.is_kvm_cpu(TestCPUClass) or \
+    ObjectList.is_kvm_cpu(FutureClass):
+    # Required for running kvm on multiple host cores.
+    # Uses gem5's parallel event queue feature
+    # Note: The simulator is quite picky about this number!
+    root.sim_quantum = int(1e9) # 1 ms
+
 if options.timesync:
     root.time_sync_enable = True


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/41602
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: I9c73a2f6f2ca604aecd31f45570423c58f85020f
Gerrit-Change-Number: 41602
Gerrit-PatchSet: 1
Gerrit-Owner: Kevin Loughlin <kevlo...@umich.edu>
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