diff options
author | Ciro Santilli <ciro.santilli@arm.com> | 2019-10-24 17:45:43 +0100 |
---|---|---|
committer | Ciro Santilli <ciro.santilli@arm.com> | 2019-12-13 16:51:06 +0000 |
commit | 55c5b66ae48a3a20cf55bbe41048c0c2d217488c (patch) | |
tree | edde05bed7b67c410b9b168e528638e4d6f1e106 /configs/example/arm | |
parent | e53051c88962b84f5a07e679e1c3be1e953d2741 (diff) | |
download | gem5-55c5b66ae48a3a20cf55bbe41048c0c2d217488c.tar.xz |
dev-virtio,configs: expose 9p diod virtio on ARM
9p allows the guest Linux kernel to mount a host directory into the guest.
This allows to very easily modify test programs after a run at the end of
boot, without the need to re-insert the changes into a disk image.
It is enabled on both fs.py and fs_bigLITTLE.py with the --vio-9p
option.
Adapted from code originally present on the wiki: http://gem5.org/WA-gem5
As documented in the CLI option help, the current setup requires the guest
to know the full path to the host share, which is annoying, but overcoming
that would require actually parsing a bit of the protocol rather than just
forwarding everything to diod.
Change-Id: Iaeb1ed185dccfa8332fe6657a54e7550f64230eb
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22831
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'configs/example/arm')
-rw-r--r-- | configs/example/arm/fs_bigLITTLE.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/configs/example/arm/fs_bigLITTLE.py b/configs/example/arm/fs_bigLITTLE.py index 94e28461f..4645d9ee8 100644 --- a/configs/example/arm/fs_bigLITTLE.py +++ b/configs/example/arm/fs_bigLITTLE.py @@ -52,8 +52,10 @@ from m5.objects import * m5.util.addToPath("../../") +from common import FSConfig from common import SysPaths from common import ObjectList +from common import Options from common.cores.arm import ex5_big, ex5_LITTLE import devices @@ -209,6 +211,8 @@ def addOptions(parser): "sets max_insts_all_threads for cpus 0, 1, 3, 5 and 7 " "Direct parameters of the root object are not accessible, " "only parameters of its children.") + parser.add_argument("--vio-9p", action="store_true", + help=Options.vio_9p_help) return parser def build(options): @@ -296,6 +300,9 @@ def build(options): m5.tlm.tlm_global_quantum_instance().set( sc.sc_time(10000.0 / 100000000.0, sc.sc_time.SC_SEC)) + if options.vio_9p: + FSConfig.attach_9p(system.realview, system.iobus) + return root def _build_kvm(system, cpus): |