From 55c5b66ae48a3a20cf55bbe41048c0c2d217488c Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Thu, 24 Oct 2019 17:45:43 +0100 Subject: 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 Reviewed-by: Giacomo Travaglini Maintainer: Jason Lowe-Power Tested-by: kokoro --- configs/example/arm/fs_bigLITTLE.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'configs/example/arm') 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): -- cgit v1.2.3