docs: kvm: vfio: Suggest KVM_DEV_VFIO_GROUP_ADD vs VFIO_GROUP_GET_DEVICE_FD ordering
Subsystems (2)
PATCH v3 1/1 docs: kvm: vfio: Suggest KVM_DEV_VFIO_GROUP_ADD vs VFIO_GROUP_GET_DEVICE_FD ordering
as some vfio_device's open_device op requires kvm pointer and kvm pointer set is part of GROUP_ADD.
---
v3:
- Add r-b from Kevin
- Remove "::" to fix "WARNING: Literal block expected; none found." "make htmldocs" looks good.
- Rename the subject per Alex's suggestion
v2: https://lore.kernel.org/kvm/[email protected]/
- Adopt Alex's suggestion
v1: https://lore.kernel.org/kvm/[email protected]/
--- Documentation/virt/kvm/devices/vfio.rst | 5 +++++ 1 file changed, 5 insertions(+)
Documentation/virt/kvm/devices/vfio.rst +5 -0
@@ -39,3 +39,8 @@ KVM_DEV_VFIO_GROUP attributes: - @groupfd is a file descriptor for a VFIO group; - @tablefd is a file descriptor for a TCE table allocated via KVM_CREATE_SPAPR_TCE. + +The GROUP_ADD operation above should be invoked prior to accessing the +device file descriptor via VFIO_GROUP_GET_DEVICE_FD in order to support +drivers which require a kvm pointer to be set in their .open_device() +callback.
Signature · 1 line
2.34.1
Quoted 12 lines · Yi Liu
as some vfio_device's
open_deviceop requires kvm pointer and kvm pointer set is part ofGROUP_ADD.Reviewed-by Kevin Tian <[email protected]>Signed-off-by Yi Liu <[email protected]>---
v3:
- Add r-b from Kevin
- Remove "::" to fix "WARNING: Literal block expected; none found." "make htmldocs" looks good.
- Rename the subject per Alex's suggestion
Quoted 7 lines
v2: https://lore.kernel.org/kvm/[email protected]/
- Adopt Alex's suggestionv1: https://lore.kernel.org/kvm/[email protected]/
--- Documentation/virt/kvm/devices/vfio.rst | 5 +++++ 1 file changed, 5 insertions(+)
Jason
Alex Williamson
AppliedQuoted 25 lines · On Thu, 20 Apr 2023 22:36:11 -0700 Yi Liu <[email protected]> wrote:
as some vfio_device's
open_deviceop requires kvm pointer and kvm pointer set is part ofGROUP_ADD.Reviewed-by Kevin Tian <[email protected]>Signed-off-by Yi Liu <[email protected]>---
v3:
- Add r-b from Kevin
- Remove "::" to fix "WARNING: Literal block expected; none found." "make htmldocs" looks good.
- Rename the subject per Alex's suggestionv2: https://lore.kernel.org/kvm/[email protected]/
- Adopt Alex's suggestionv1: https://lore.kernel.org/kvm/[email protected]/
--- Documentation/virt/kvm/devices/vfio.rst | 5 +++++ 1 file changed, 5 insertions(+)Documentation/virt/kvm/devices/vfio.rst +0
-0
Documentation/virt/kvm/devices/vfio.rst KVM_DEV_VFIO_GROUP attributes: · line 46
Quoted 8 lines
Documentation/virt/kvm/devices/vfio.rst +5
-0@@ -39,3 +39,8 @@ KVM_DEV_VFIO_GROUP attributes: - @groupfd is a file descriptor for a VFIO group; - @tablefd is a file descriptor for a TCE table allocated via KVM_CREATE_SPAPR_TCE. + +The GROUP_ADD operation above should be invoked prior to accessing the +device file descriptor via VFIO_GROUP_GET_DEVICE_FD in order to support +drivers which require a kvm pointer to be set in their .open_device() +callback.
Applied to vfio next branch for v6.4. Thanks,
Alex