You copied the Doc URL to your clipboard.

VirtioP9Device component

This section describes the VirtioP9Device component.

VirtioP9Device component - about

This C++ component is a model of r0p0 of a virtio P9 server. It implements a subset of the Plan 9 File Protocol over a virtio transport.

This component accesses a directory on the host filesystem within Linux (and other operating systems that implement the protocol) running on a model.

The component implements a subset of the Linux 9P2000.L protocol. It has limitations:

  • You can mount only one host directory per instance of the component.
  • It supports a subset of 9P2000.L message types: Tversion, Tlopen, Tlcreate, Tgetattr, Tsetattr, Treaddir, Tmkdir, Tattach, Twalk, Tread, Twrite, Tclunk, Tremove, Trename. On Linux hosts, it also supports: Treadlink, Tsymlink.
  • On Windows hosts, it ignores Unix permissions when writing files.
  • On Windows hosts, it performs a simple mapping from Windows to Unix permissions when reading.
  • On Windows hosts, symbolic links appear as regular files.
  • On Windows hosts, it does not perform operations (writing, deleting, renaming) on a file that another process has open.

VirtioP9Device component - setting up

This section describes how to set up the component in a virtual platform.

To use this component:


Use a version of Linux that supports v9fs over virtio and virtio-mmio devices.


  1. Add the VirtioP9Device component to the platform.
  2. Update the device tree to include the VirtioP9Device component, or specify it on the kernel command line.
    Do this step in the same way as for the VirtioBlockDevice component.
  3. Set the parameter <component>.root_path to the host path to the directory to mount in the model.
  4. Mount the directory inside the model with this command:
    mount -t 9p -o trans=virtio,version=9p2000.L FM /mnt/host
    where /mnt/host is the path to where to mount the directory in the model.
    Unmount the directory, if necessary, with:
    umount /mnt/host
    Fast Models can now access the Plan 9 filesystem of a host using the VirtioP9Device component.

VirtioP9Device component - ports

This section describes the ports.

Table 4-172 VirtioP9Device ports

Name Protocol Type Description
intr Signal Master Virtio device sets interrupt to signal completion.
pvbus PVBus Slave Virtio MMIO control/config/status registers.
virtio_m PVBus Master Virtio device performs DMA accesses via master.

VirtioP9Device component - parameters

This section describes the parameters.

Table 4-173 VirtioP9Device parameters

Name Type Allowed values Default value Description
mount_tag string - FM Mount tag.
quiet bool true, false false Do not print warnings on malformed commands or descriptors.
root_path string - - Root directory path.
secure_accesses bool true, false false Make device generate transactions with NS=0.