Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
00a1517e
Commit
00a1517e
authored
Sep 22, 2022
by
Antoine Kaufmann
Browse files
experiments: support appending to kcmdline from node config
parent
d851fb5f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
2 deletions
+12
-2
experiments/simbricks/orchestration/nodeconfig.py
experiments/simbricks/orchestration/nodeconfig.py
+2
-0
experiments/simbricks/orchestration/simulators.py
experiments/simbricks/orchestration/simulators.py
+9
-1
sims/external/gem5
sims/external/gem5
+1
-1
No files found.
experiments/simbricks/orchestration/nodeconfig.py
View file @
00a1517e
...
...
@@ -70,6 +70,8 @@ class NodeConfig(object):
"""Do not make checkpoint in Gem5."""
self
.
app
:
tp
.
Optional
[
AppConfig
]
=
None
"""App to be run on simulated host."""
self
.
kcmd_append
=
''
"""String to be appended to kernel command line."""
def
config_str
(
self
):
if
self
.
sim
==
'qemu'
:
...
...
experiments/simbricks/orchestration/simulators.py
View file @
00a1517e
...
...
@@ -332,6 +332,11 @@ class QemuHost(HostSim):
def
run_cmd
(
self
,
env
):
accel
=
',accel=kvm:tcg'
if
not
self
.
sync
else
''
if
self
.
node_config
.
kcmd_append
:
kcmd_append
=
' '
+
self
.
node_config
.
kcmd_append
else
:
kcmd_append
=
''
cmd
=
(
f
'
{
env
.
qemu_path
}
-machine q35
{
accel
}
-serial mon:stdio '
'-cpu Skylake-Server -display none -nic none '
...
...
@@ -340,7 +345,7 @@ class QemuHost(HostSim):
f
'-drive file=
{
env
.
cfgtar_path
(
self
)
}
,if=ide,index=1,media=disk,'
'driver=raw '
'-append "earlyprintk=ttyS0 console=ttyS0 root=/dev/sda1 '
'init=/home/ubuntu/guestinit.sh rw" '
'init=/home/ubuntu/guestinit.sh rw
{kcmd_append}
" '
f
'-m
{
self
.
node_config
.
memory
}
-smp
{
self
.
node_config
.
cores
}
'
)
...
...
@@ -418,6 +423,9 @@ class Gem5Host(HostSim):
'--ddio-enabled --ddio-way-part=8 --mem-type=DDR4_2400_16x4 '
)
if
self
.
node_config
.
kcmd_append
:
cmd
+=
f
'--command-line-append="
{
self
.
node_config
.
kcmd_append
}
" '
if
env
.
create_cp
:
cmd
+=
'--max-checkpoints=1 '
...
...
gem5
@
72b0af42
Compare
21d7cb6c
...
72b0af42
Subproject commit
21d7cb6c58969bf2a0915bac06efa35adfe96a02
Subproject commit
72b0af4256b131e0fc9c66377404b093cf7ef793
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment