docs: kvm: vfio: Require call KVM_DEV_VFIO_GROUP_ADD before VFIO_GROUP_GET_DEVICE_FD
Subsystems (2)
PATCH v2 1/1 docs: kvm: vfio: Require call KVM_DEV_VFIO_GROUP_ADD before VFIO_GROUP_GET_DEVICE_FD
as some vfio_device drivers require a kvm pointer to be set in their open_device and kvm pointer is set to VFIO in GROUP_ADD path.
---
v2:
- Adopt Alex's suggestion
v1: https://lore.kernel.org/kvm/[email protected]/
--- Documentation/virt/kvm/devices/vfio.rst | 7 +++++++ 1 file changed, 7 insertions(+)
Documentation/virt/kvm/devices/vfio.rst +7 -0
@@ -39,3 +39,10 @@ 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 7 lines
From: Liu, Yi L <[email protected]>
Sent: Wednesday, February 22, 2023 10:23 AMas some
vfio_devicedrivers require a kvm pointer to be set in theiropen_deviceand kvm pointer is set to VFIO inGROUP_ADDpath.Signed-off-by Yi Liu <[email protected]>
Paolo's mail address is wrong. Added the right one.
Quoted 34 lines
From: Liu, Yi L <[email protected]>
Sent: Wednesday, February 22, 2023 10:23 AMas some
vfio_devicedrivers require a kvm pointer to be set in theiropen_deviceand kvm pointer is set to VFIO inGROUP_ADDpath.Signed-off-by Yi Liu <[email protected]>---
v2:
- Adopt Alex's suggestion
v1: https://lore.kernel.org/kvm/20230221034114.135386-1-
[email protected]/--- Documentation/virt/kvm/devices/vfio.rst | 7 +++++++ 1 file changed, 7 insertions(+)Documentation/virt/kvm/devices/vfio.rst +7
-1@@ -39,3 +39,10 @@ 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. --2.34.1
Quoted 4 lines
From: Tian, Kevin <[email protected]>
Sent: Wednesday, February 22, 2023 10:33 AMPaolo's mail address is wrong. Added the right one.
Thanks. @Alex, do you want a new version or this one is ok?
Regards,
Yi Liu
Quoted 36 lines
Quoted 22 lines
From: Liu, Yi L <[email protected]>
Sent: Wednesday, February 22, 2023 10:23 AMas some
vfio_devicedrivers require a kvm pointer to be set in theiropen_deviceand kvm pointer is set to VFIO inGROUP_ADDpath.Signed-off-by Yi Liu <[email protected]>---
v2:
- Adopt Alex's suggestion
v1: https://lore.kernel.org/kvm/20230221034114.135386-1-
[email protected]/--- Documentation/virt/kvm/devices/vfio.rst | 7 +++++++ 1 file changed, 7 insertions(+)Documentation/virt/kvm/devices/vfio.rst +0
-0Documentation/virt/kvm/devices/vfio.rst KVM_DEV_VFIO_GROUP attributes: · line 45
Quoted 7 lines
Documentation/virt/kvm/devices/vfio.rst +4
-0@@ -39,3 +39,10 @@ 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 accessingthe
Documentation/virt/kvm/devices/vfio.rst KVM_DEV_VFIO_GROUP attributes: · line 46
Quoted 1 line
Documentation/virt/kvm/devices/vfio.rst +1
-0+device file descriptor via VFIO_GROUP_GET_DEVICE_FD in order tosupport
Quoted 4 lines
Documentation/virt/kvm/devices/vfio.rst +2
-1+drivers which require a kvm pointer to be set in their .open_device() +callback. --2.34.1
Quoted 6 lines · Yi L
Quoted 4 lines
From: Tian, Kevin <[email protected]>
Sent: Wednesday, February 22, 2023 10:33 AMPaolo's mail address is wrong. Added the right one.
Thanks. @Alex, do you want a new version or this one is ok?
This one is fine. Thanks,
Alex
Quoted 37 lines
Quoted 36 lines
Quoted 22 lines
From: Liu, Yi L <[email protected]>
Sent: Wednesday, February 22, 2023 10:23 AMas some
vfio_devicedrivers require a kvm pointer to be set in theiropen_deviceand kvm pointer is set to VFIO inGROUP_ADDpath.Signed-off-by Yi Liu <[email protected]>---
v2:
- Adopt Alex's suggestion
v1: https://lore.kernel.org/kvm/20230221034114.135386-1-
[email protected]/--- Documentation/virt/kvm/devices/vfio.rst | 7 +++++++ 1 file changed, 7 insertions(+)Documentation/virt/kvm/devices/vfio.rst +0
-0Documentation/virt/kvm/devices/vfio.rst KVM_DEV_VFIO_GROUP attributes: · line 45
Quoted 7 lines
Documentation/virt/kvm/devices/vfio.rst +4
-0@@ -39,3 +39,10 @@ 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 accessingthe
Documentation/virt/kvm/devices/vfio.rst KVM_DEV_VFIO_GROUP attributes: · line 46
Quoted 1 line
Documentation/virt/kvm/devices/vfio.rst +1
-0+device file descriptor via VFIO_GROUP_GET_DEVICE_FD in order tosupport
Quoted 4 lines
Documentation/virt/kvm/devices/vfio.rst +2
-1+drivers which require a kvm pointer to be set in their .open_device() +callback. --2.34.1
Quoted 17 lines · On Tue, 21 Feb 2023 18:22:31 -0800 Yi Liu <[email protected]> wrote:
as some
vfio_devicedrivers require a kvm pointer to be set in theiropen_deviceand kvm pointer is set to VFIO inGROUP_ADDpath.Signed-off-by Yi Liu <[email protected]>---
v2:
- Adopt Alex's suggestion
v1: https://lore.kernel.org/kvm/[email protected]/--- Documentation/virt/kvm/devices/vfio.rst | 7 +++++++ 1 file changed, 7 insertions(+)Documentation/virt/kvm/devices/vfio.rst +0
-0
Documentation/virt/kvm/devices/vfio.rst KVM_DEV_VFIO_GROUP attributes: · line 48
Quoted 10 lines
Documentation/virt/kvm/devices/vfio.rst +7
-0@@ -39,3 +39,10 @@ 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.
I updated the title and commit log so as not to further construe that documentation can impose a requirement, otherwise applied to vfio next branch for v6.4. Thanks,
Alex
Quoted 26 lines · On Tue, 11 Apr 2023 13:28:03 -0600 Alex Williamson…
Quoted 23 lines · On Tue, 21 Feb 2023 18:22:31 -0800 Yi Liu <[email protected]> wrote:
as some
vfio_devicedrivers require a kvm pointer to be set in theiropen_deviceand kvm pointer is set to VFIO inGROUP_ADDpath.Signed-off-by Yi Liu <[email protected]>---
v2:
- Adopt Alex's suggestion
v1: https://lore.kernel.org/kvm/[email protected]/--- Documentation/virt/kvm/devices/vfio.rst | 7 +++++++ 1 file changed, 7 insertions(+)Documentation/virt/kvm/devices/vfio.rst +3
-0@@ -39,3 +39,10 @@ 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. + +:: +
Quoted 8 lines
Documentation/virt/kvm/devices/vfio.rst KVM_DEV_VFIO_GROUP attributes: · line 48
Quoted 4 lines
Documentation/virt/kvm/devices/vfio.rst +4
-0+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.I updated the title and commit log so as not to further construe that documentation can impose a requirement, otherwise applied to vfio next branch for v6.4. Thanks,
Dropped
https://lore.kernel.org/all/[email protected]/
Please resubmit, resolving the warning and change the title since a requirement of some drivers does not equate to a requirement of the API. Thanks,
Alex
Quoted 41 lines
From: Alex Williamson <[email protected]>
Sent: Saturday, April 15, 2023 4:08 AMQuoted 15 lines · On Tue, 11 Apr 2023 13:28:03 -0600 Alex Williamson…
Quoted 12 lines · On Tue, 21 Feb 2023 18:22:31 -0800 Yi Liu <[email protected]> wrote:
as some
vfio_devicedrivers require a kvm pointer to be set in theiropen_deviceand kvm pointer is set to VFIO inGROUP_ADDpath.Signed-off-by Yi Liu <[email protected]>---
v2:
- Adopt Alex's suggestion
v1: https://lore.kernel.org/kvm/[email protected]/--- Documentation/virt/kvm/devices/vfio.rst | 7 +++++++ 1 file changed, 7 insertions(+)Quoted 1 line
Review
Quoted 1 line
(quoted diff) +0
-0
b/Documentation/virt/kvm/devices/vfio.rstQuoted 10 lines
Quoted 10 lines
index
2d20dc561069..79b6811bb4f3100644Documentation/virt/kvm/devices/vfio.rst +3
-0@@ -39,3 +39,10 @@ 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. + +:: +Quoted 8 lines
Documentation/virt/kvm/devices/vfio.rst KVM_DEV_VFIO_GROUP attributes: · line 48
Quoted 4 lines
Documentation/virt/kvm/devices/vfio.rst +4
-0+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.I updated the title and commit log so as not to further construe that documentation can impose a requirement, otherwise applied to vfio next branch for v6.4. Thanks,
Quoted 7 lines
Dropped
https://lore.kernel.org/all/[email protected]/
Please resubmit, resolving the warning and change the title since a requirement of some drivers does not equate to a requirement of the API. Thanks,
Sorry for it. May just remove the "::". So a version as below. Please let me know it is ok, then I'll submit it.
From abfc87425aa2977c08511b648a194bcfb072dcb8 Mon Sep 17 00:00:00 2001
From: Yi Liu <[email protected]>
Date: Thu, 16 Feb 2023 02:37:28 -0800
Subject: [PATCH] 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.
--- Documentation/virt/kvm/devices/vfio.rst | 7 +++++++ 1 file changed, 7 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 43 lines · Yi L
Quoted 43 lines
From: Alex Williamson <[email protected]>
Sent: Saturday, April 15, 2023 4:08 AMQuoted 15 lines · On Tue, 11 Apr 2023 13:28:03 -0600 Alex Williamson…
Quoted 12 lines · On Tue, 21 Feb 2023 18:22:31 -0800 Yi Liu <[email protected]> wrote:
as some
vfio_devicedrivers require a kvm pointer to be set in theiropen_deviceand kvm pointer is set to VFIO inGROUP_ADDpath.Signed-off-by Yi Liu <[email protected]>---
v2:
- Adopt Alex's suggestion
v1: https://lore.kernel.org/kvm/[email protected]/--- Documentation/virt/kvm/devices/vfio.rst | 7 +++++++ 1 file changed, 7 insertions(+)Quoted 1 line
Review
Quoted 1 line
(quoted diff) +0
-0
b/Documentation/virt/kvm/devices/vfio.rstQuoted 10 lines
Quoted 10 lines
index
2d20dc561069..79b6811bb4f3100644Documentation/virt/kvm/devices/vfio.rst +3
-0@@ -39,3 +39,10 @@ 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. + +:: +Quoted 8 lines
Documentation/virt/kvm/devices/vfio.rst KVM_DEV_VFIO_GROUP attributes: · line 46
Quoted 4 lines
Documentation/virt/kvm/devices/vfio.rst +4
-0+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.I updated the title and commit log so as not to further construe that documentation can impose a requirement, otherwise applied to vfio next branch for v6.4. Thanks,
Dropped
Quoted 8 lines
Quoted 5 lines
https://lore.kernel.org/all/[email protected]/
Please resubmit, resolving the warning and change the title since a requirement of some drivers does not equate to a requirement of the API. Thanks,
Sorry for it. May just remove the "::". So a version as below. Please let me know it is ok, then I'll submit it.
Sure, so long as the docs build warning is gone. I'll wait for a separate v3 posting. Thanks,
Alex
Quoted 26 lines
From
abfc87425aa2977c08511b648a194bcfb072dcb8Mon Sep 17 00:00:00 2001
From: Yi Liu <[email protected]>
Date: Thu, 16 Feb 2023 02:37:28 -0800
Subject: [PATCH] docs: kvm: vfio: SuggestKVM_DEV_VFIO_GROUP_ADDvsVFIO_GROUP_GET_DEVICE_FDorderingas some vfio_device's
open_deviceop requires kvm pointer and kvm pointer set is part ofGROUP_ADD.Signed-off-by Yi Liu <[email protected]>--- Documentation/virt/kvm/devices/vfio.rst | 7 +++++++ 1 file changed, 7 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.