All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] test-runner: fix testhome mounting for QEMU
@ 2022-06-03 22:02 James Prestwood
  0 siblings, 0 replies; 2+ messages in thread
From: James Prestwood @ 2022-06-03 22:02 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 1273 bytes --]

This was lazily copied from UML but really made no sense in the context
of QEMU. First QEMU needs the virtfs option to define the mount tag and
in addition a 9p mount should be used rather than 'hostfs'.
---
 tools/runner.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/tools/runner.py b/tools/runner.py
index bf28d9ad..ccc931ff 100644
--- a/tools/runner.py
+++ b/tools/runner.py
@@ -434,6 +434,11 @@ class QemuRunner(RunnerAbstract):
 			for addr in pci_adapters:
 				qemu_cmdline.extend(['-device', 'vfio-pci,host=%s' % addr])
 
+		qemu_cmdline.extend([
+			'-virtfs',
+			'local,path=%s,%s' % (args.testhome, mount_options('homedir'))
+		])
+
 		if args.log:
 			#
 			# Creates a virtfs device that can be mounted. This mount
@@ -466,8 +471,8 @@ class QemuRunner(RunnerAbstract):
 	def prepare_environment(self):
 		mounts = [ MountInfo('debugfs', 'debugfs', '/sys/kernel/debug', '', 0) ]
 
-		mounts.append(MountInfo('hostfs', 'hostfs', self.args.testhome,
-					self.args.testhome, 0))
+		mounts.append(MountInfo('9p', 'homedir', self.args.testhome,
+					'trans=virtio,version=9p2000.L,msize=10240', 0))
 
 		if self.args.log:
 			mounts.append(MountInfo('9p', 'logdir', self.args.log,
-- 
2.34.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] test-runner: fix testhome mounting for QEMU
@ 2022-06-03 23:21 Denis Kenzior
  0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2022-06-03 23:21 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 406 bytes --]

Hi James,

On 6/3/22 17:02, James Prestwood wrote:
> This was lazily copied from UML but really made no sense in the context
> of QEMU. First QEMU needs the virtfs option to define the mount tag and
> in addition a 9p mount should be used rather than 'hostfs'.
> ---
>   tools/runner.py | 9 +++++++--
>   1 file changed, 7 insertions(+), 2 deletions(-)
> 

Applied, thanks.

Regards,
-Denis

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-03 23:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-03 22:02 [PATCH] test-runner: fix testhome mounting for QEMU James Prestwood
2022-06-03 23:21 Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.