On 1/3/26 15:11, Roman Bogorodskiy wrote:
> Document the CTL device type in formatdomain.rst and
> the virtio-scsi device in drvbhyve.rst.
> 
> Signed-off-by: Roman Bogorodskiy <[email protected]>
> ---
>  docs/drvbhyve.rst     | 19 +++++++++++++++++++
>  docs/formatdomain.rst |  5 +++++
>  2 files changed, 24 insertions(+)
> 
> diff --git a/docs/drvbhyve.rst b/docs/drvbhyve.rst
> index dfcdb011d2..5a45e9056f 100644
> --- a/docs/drvbhyve.rst
> +++ b/docs/drvbhyve.rst
> @@ -718,6 +718,25 @@ any configuration on the host.
>     Unfortunately, there is no (easy) way to probe its support in libvirt,
>     so please consult the ``bhyve(8)`` manual page to make sure it is 
> available.
>  
> +virtio-scsi
> +~~~~~~~~~~~
> +:since:`Since 12:0.0`, it is possible to use ``virtio-scsi`` devices.
> +It uses CAM Target layer (CTL) as a source.
> +
> +Example:
> +
> +::
> +
> +  ...
> +    <disk type='ctl'>
> +      <source dev='/dev/cam/ctl'/>
> +      <target dev='sda' bus='scsi'/>
> +    </disk>
> +  ...
> +
> +Please refer to ``cam(4)``, ``ctl(4)``, and ``ctld(8)`` manual pages
> +for more details on CAM and CTL.
> +
>  Guest-specific considerations
>  -----------------------------
>  

Starting from here ... [1]

> diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
> index 1467fc7e10..bcb354a9d6 100644
> --- a/docs/formatdomain.rst
> +++ b/docs/formatdomain.rst
> @@ -3085,6 +3085,11 @@ paravirtualized driver is specified via the ``disk`` 
> element.
>        the fully-qualified path to the vhost-vdpa character device (e.g.
>        ``/dev/vhost-vdpa-0``).
>  
> +   ``ctl``
> +      Enables the hypervisor to connect to the FreeBSD CAM Target Layer 
> (CTL),
> +      where CAM is a Common Access Method Storage subsystem.
> +      :since:`Since 12.0.0, bhyve`.

You'll also need to document the 'dev' attribute.

> +
>     With "file", "block", and "volume", one or more optional sub-elements
>     ``seclabel`` (See `Security label`_) can be used to override the domain
>     security labeling policy for just that source file.

[1] ... this hunk should go into patch 1/3 where XML parser/formater and
RNG schema is changed. Not only it is semantically closer to that
change, we also like NEWS.rst change to be isolated (lessens chance of a
conflict for eventual backports).

Please squash in the following:

diff --git i/docs/formatdomain.rst w/docs/formatdomain.rst
index bcb354a9d6..04ef319a73 100644
--- i/docs/formatdomain.rst
+++ w/docs/formatdomain.rst
@@ -2826,6 +2826,10 @@ paravirtualized driver is specified via the ``disk`` 
element.
        <source dev='/dev/vhost-vdpa-0' />
        <target dev='vdg' bus='virtio'/>
      </disk>
+     <disk type='ctl' device='disk'>
+       <source dev='/dev/cam/ctl'/>
+       <target dev='sda' bus='scsi'/>
+     </disk>
      <disk type='file' device='disk'>
        <driver name='qemu' type='qcow2'/>
        <source file='/path/to/datastore.qcow2'>
@@ -2865,8 +2869,9 @@ paravirtualized driver is specified via the ``disk`` 
element.
       Valid values are "file", "block", "dir" ( :since:`since 0.7.5` ),
       "network" ( :since:`since 0.8.7` ), or "volume" ( :since:`since 1.0.5` ),
       or "nvme" ( :since:`since 6.0.0` ), or "vhostuser" ( :since:`since 
7.1.0` ),
-      or "vhostvdpa" ( :since:`since 9.8.0 (QEMU 8.1.0)`) and refer to the
-      underlying source for the disk. :since:`Since 0.0.3`
+      or "vhostvdpa" ( :since:`since 9.8.0 (QEMU 8.1.0)`), or "ctl" (
+      :since:`since 12.0.0` ) and refer to the underlying source for the disk.
+      :since:`Since 0.0.3`
    ``device``
       Indicates how the disk is to be exposed to the guest OS. Possible values
       for this attribute are "floppy", "disk", "cdrom", and "lun", defaulting 
to
@@ -3090,6 +3095,9 @@ paravirtualized driver is specified via the ``disk`` 
element.
       where CAM is a Common Access Method Storage subsystem.
       :since:`Since 12.0.0, bhyve`.
 
+      The ``source`` element has a mandatory attribute ``dev`` that specifies
+      the fully-qualified path to the CTL device (e.g. ``/dev/cam/ctl``).
+
    With "file", "block", and "volume", one or more optional sub-elements
    ``seclabel`` (See `Security label`_) can be used to override the domain
    security labeling policy for just that source file.


Michal

Reply via email to