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. It enables accessing a directory on the host's filesystem within Linux, or another operating system that implements the protocol, running on a platform model.

VirtioP9Device contains the following CADI targets:

  • VirtioP9Device

VirtioP9Device contains the following MTI components:

The component implements a subset of the Linux 9P2000.L protocol. It has the following 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.

Take the following steps to use this component:

  • Use a version of Linux that supports v9fs over virtio and virtio-mmio devices.
  • Update the device tree to include the VirtioP9Device component, or specify it on the kernel command-line, as shown below. The address range for both VE and Base platforms is 0x1C140000-0x1C14FFFF.

    The interrupt number is 43, or IRQ 75, for both VE and Base platforms.

  • Set the following parameter to the directory on the host that you want to mount in the model:

  • On Linux, mount the host directory by using the following command in the model:
    $ mount -t 9p -o trans=virtio,version=9p2000.L FM <mount point>

Example kernel command-line argument:


Example entries for DTS files:

  • Add this entry next to the corresponding virtio_block entry:

    virtio_p9@0140000 { 
           compatible = "virtio,mmio"; 
           reg = <0x140000 0x1000>; 
           interrupts = <0x2b>; 
  • Add this entry to the interrupt map:

    <0 0 43 &gic 0 43 4>;

VirtioP9Device component - ports

This section describes the ports.

Table 4-214 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-215 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.
Was this page helpful? Yes No