> -Original Message-
> From: Intel-gfx On Behalf Of Mika
> Kahola
> Sent: Thursday, April 20, 2023 6:11 PM
> To: intel-gfx@lists.freedesktop.org
> Subject: [Intel-gfx] [PATCH 06/13] drm/i915/mtl: For DP2.0 10G and 20G rates
> use MPLLA
>
> Use MPLLA for DP2.0 rates 20G and 20G, when ssc
> -Original Message-
> From: Intel-gfx On Behalf Of Mika
> Kahola
> Sent: Thursday, April 20, 2023 6:11 PM
> To: intel-gfx@lists.freedesktop.org
> Subject: [Intel-gfx] [PATCH 05/13] drm/i915/mtl: Add voltage swing sequence
> for C20
>
> DP1.4 and DP20 voltage swing sequence for C20
On 4/26/2023 6:13 PM, Patchwork wrote:
Project List - Patchwork *Patch Details*
*Series:* series starting with [v6,1/2] drm/i915/guc/slpc: Provide
sysfs for efficient freq (rev2)
*URL:* https://patchwork.freedesktop.org/series/116957/
*State:*failure
*Details:*
> -Original Message-
> From: Intel-gfx On Behalf Of Mika
> Kahola
> Sent: Thursday, April 20, 2023 6:11 PM
> To: intel-gfx@lists.freedesktop.org
> Subject: [Intel-gfx] [PATCH 04/13] drm/i915/mtl: C20 port clock calculation
>
> Calculate port clock with C20 phy.
>
> BSpec: 64568
>
> -Original Message-
> From: Intel-gfx On Behalf Of Mika
> Kahola
> Sent: Thursday, April 20, 2023 6:11 PM
> To: intel-gfx@lists.freedesktop.org
> Subject: [Intel-gfx] [PATCH 03/13] drm/i915/mtl: Dump C20 pll hw state
>
> As we already do with C10 chip, let's dump the pll hw state for
> -Original Message-
> From: Kahola, Mika
> Sent: Thursday, April 20, 2023 6:11 PM
> To: intel-gfx@lists.freedesktop.org
> Cc: Kahola, Mika ; Murthy, Arun R
> ; Nautiyal, Ankit K
> Subject: [PATCH 02/13] drm/i915/mtl: C20 HW readout
>
> Create a table for C20 DP1.4, DP2.0 and HDMI2.1
> -Original Message-
> From: Kahola, Mika
> Sent: Thursday, April 20, 2023 6:11 PM
> To: intel-gfx@lists.freedesktop.org
> Cc: Kahola, Mika ; Souza, Jose
> ; Modem, Bhanuprakash
> ; Deak, Imre ;
> Murthy, Arun R
> Subject: [PATCH 01/13] drm/i915/mtl: C20 PLL programming
>
> C20 phy PLL
== Series Details ==
Series: series starting with [v6,1/2] drm/i915/guc/slpc: Provide sysfs for
efficient freq (rev2)
URL : https://patchwork.freedesktop.org/series/116957/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_13066 -> Patchwork_116957v2
== Series Details ==
Series: series starting with [v6,1/2] drm/i915/guc/slpc: Provide sysfs for
efficient freq (rev2)
URL : https://patchwork.freedesktop.org/series/116957/
State : warning
== Summary ==
Error: dim sparse failed
Sparse version: v0.6.2
Fast mode used, each commit won't be
On Wed, 26 Apr 2023 17:11:27 -0700, Umesh Nerlige Ramappa wrote:
>
Hi Umesh,
> On Mon, Apr 24, 2023 at 10:41:41AM -0700, Dixit, Ashutosh wrote:
> > On Tue, 04 Apr 2023 17:14:32 -0700, Umesh Nerlige Ramappa wrote:
> >
> >> GPU accumulates the context runtime in a 32 bit counter - CTX_TIMESTAMP
>
On Mon, Apr 24, 2023 at 10:41:41AM -0700, Dixit, Ashutosh wrote:
On Tue, 04 Apr 2023 17:14:32 -0700, Umesh Nerlige Ramappa wrote:
Hi Umesh,
GPU accumulates the context runtime in a 32 bit counter - CTX_TIMESTAMP
in the context image. This value is saved/restored on context switches.
KMD
On 2023-04-26 11:17:16, Teres Alexis, Alan Previn wrote:
> alan: Hi Jordan, Tvrtko, Daniel Vetter and Lionel,...
> how to proceed on this series (which have required Rb/Ack's) in light of
> the recent discussion on the other series here:
>
== Series Details ==
Series: drm/i915: Hugepage manager and test for MTL (rev2)
URL : https://patchwork.freedesktop.org/series/116995/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_13065 -> Patchwork_116995v2
Summary
== Series Details ==
Series: drm/i915/tc: Add a workaround for an IOM/TCSS firmware hang issue
URL : https://patchwork.freedesktop.org/series/117004/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_13064_full -> Patchwork_117004v1_full
On Tue, Apr 25, 2023 at 11:30:11AM -0700, Radhakrishna Sripada wrote:
> Enable strict RAR to prevent spurious GPU hangs.
>
> v1.1: Rebase
>
Bspec: 51762
> Cc: Rodrigo Vivi
> Cc: Umesh Nerlige Ramappa
> Signed-off-by: Radhakrishna Sripada
> ---
> drivers/gpu/drm/i915/gt/intel_gt_regs.h |
On Tue, 25 Apr 2023 13:19:25 -0700, john.c.harri...@intel.com wrote:
>
> @@ -3623,7 +3624,17 @@ decode_3d_965(struct intel_decode *ctx)
> return len;
>
> case 0x7a00:
> - if (IS_GEN6(devid) || IS_GEN7(devid)) {
> + if (IS_GEN12(devid)) {
> +
On Tue, 25 Apr 2023 13:19:26 -0700, john.c.harri...@intel.com wrote:
>
> From: John Harrison
>
> The buffer decoding code doesn't cope well with unknown buffers. So
> add an entry for the GuC CTB so that it gets decoded correctly.
Reviewed-by: Ashutosh Dixit
>
> Signed-off-by: John Harrison
>
-Original Message-
From: Hajda, Andrzej
Sent: Wednesday, April 26, 2023 2:37 PM
To: Cavitt, Jonathan ;
intel-gfx@lists.freedesktop.org; linux-ker...@vger.kernel.org; Auld, Matthew
Subject: Re: [PATCH v7 0/2] drm/i915: Hugepage manager and test for MTL
>
>On 26.04.2023 17:31, Cavitt,
On 26.04.2023 17:31, Cavitt, Jonathan wrote:
-Original Message-
From: Hajda, Andrzej
Sent: Wednesday, April 26, 2023 8:14 AM
To: intel-gfx@lists.freedesktop.org; linux-ker...@vger.kernel.org; Cavitt, Jonathan
; Hajda, Andrzej ; Auld, Matthew
Subject: [PATCH v7 0/2] drm/i915:
From: Jonathan Cavitt
MTL currently uses gen8_ppgtt_insert_huge when managing huge pages.
This is because MTL reports as not supporting 64K pages, or more
accurately, the system that reports whether a platform has 64K pages
reports false for MTL. This is only half correct, as the 64K page
From: Jonathan Cavitt
Convert the igt_mock_ppgtt_huge_fill and igt_mock_ppgtt_64K mock selftests
into live selftests as their requirements have recently become
platform-dependent. Additionally, apply necessary platform dependency
checks to these tests.
v8:
- handle properly 64K and 2M pages
v9:
This patchset patches sent by Jonathan and Andi, with
addressed CI failures:
1. Fixed checking alignment of 64K pages on both Pre-Gen12 and Gen12.
2. Fixed start alignment of 2M pages.
Regards
Andrzej
Jonathan Cavitt (2):
drm/i915: Migrate platform-dependent mock hugepage selftests to live
On Wed, 2023-04-26 at 11:24 -0700, john.c.harri...@intel.com wrote:
> From: John Harrison
>
> Rename the 'default_' register list prefix to 'gen8_' as that is the
> more accurate name.
>
> Signed-off-by: John Harrison
Reviewed-by: Alan Previn
On Wed, 2023-04-26 at 10:23 -0700, Harrison, John C wrote:
> On 4/25/2023 10:55, Teres Alexis, Alan Previn wrote:
> > On Thu, 2023-04-06 at 15:26 -0700, Harrison, John C wrote:
> > > From: John Harrison
> > >
> > > A pair of pre-Xe registers were being included in the Xe capture list.
> > > GuC
On Tue, 25 Apr 2023 09:24:04 -0700, Vinay Belgaumkar wrote:
>
> diff --git a/tests/i915/i915_pm_freq_api.c b/tests/i915/i915_pm_freq_api.c
> new file mode 100644
> index ..17adacbc
> --- /dev/null
> +++ b/tests/i915/i915_pm_freq_api.c
> @@ -0,0 +1,153 @@
> +// SPDX-License-Identifier: MIT
== Series Details ==
Series: drm/syncobj: Add deadline support for syncobj waits
URL : https://patchwork.freedesktop.org/series/117007/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_13064 -> Patchwork_117007v1
Summary
== Series Details ==
Series: drm/syncobj: Add deadline support for syncobj waits
URL : https://patchwork.freedesktop.org/series/117007/
State : warning
== Summary ==
Error: dim sparse failed
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.
== Series Details ==
Series: drm/syncobj: Add deadline support for syncobj waits
URL : https://patchwork.freedesktop.org/series/117007/
State : warning
== Summary ==
Error: dim checkpatch failed
7f9a8376197d drm/syncobj: Add deadline support for syncobj waits
-:42: CHECK:PREFER_KERNEL_TYPES:
On 2023-04-26 04:52:43, Daniel Vetter wrote:
>
> Joonas asked me to put my thoughts here:
>
> - in general the "feature discovery by trying it out" approach is most
> robust and hence preferred, but it's also not something that's required
> when there's good reasons against it
More robust
== Series Details ==
Series: drm/i915/tc: Add a workaround for an IOM/TCSS firmware hang issue
URL : https://patchwork.freedesktop.org/series/117004/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_13064 -> Patchwork_117004v1
On Wed, Apr 26, 2023 at 08:48:57PM +0300, Ville Syrjälä wrote:
> On Wed, Apr 26, 2023 at 07:52:56PM +0300, Imre Deak wrote:
> > intel_crtc_free_hw_state() frees all the Intel specific CSC blobs in the
> > CRTC state, but the next memset() will only clear the corresponding
> > pointers for the ones
== Series Details ==
Series: drm/i915/guc: Set wedged if enable guc communication failed
URL : https://patchwork.freedesktop.org/series/117000/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_13063_full -> Patchwork_117000v1_full
== Series Details ==
Series: drm/i915/tc: Add a workaround for an IOM/TCSS firmware hang issue
URL : https://patchwork.freedesktop.org/series/117004/
State : warning
== Summary ==
Error: dim checkpatch failed
95dbb1a42869 drm/i915: Fix PIPEDMC disabling for a bigjoiner configuration
Quoting Gustavo Sousa (2023-04-26 09:48:09)
>Quoting Radhakrishna Sripada (2023-04-20 19:12:47)
>>CPU transcoder mask is used to iterate over the available
>>CPU transcoders in the macro for_each_cpu_transcoder().
>>
>>The macro is broken on MTL and got highlighted when audio
>>state was being
From: Rob Clark
Add a new flag to let userspace provide a deadline as a hint for syncobj
and timeline waits. This gives a hint to the driver signaling the
backing fences about how soon userspace needs it to compete work, so it
can addjust GPU frequency accordingly. An immediate deadline can be
From: John Harrison
Rename the 'default_' register list prefix to 'gen8_' as that is the
more accurate name.
Signed-off-by: John Harrison
---
drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git
On Thu, 2023-04-20 at 22:34 -0700, Teres Alexis, Alan Previn wrote:
> Because of the additional firmware, component-driver and
> initialization depedencies required on MTL platform before a
> PXP context can be created, UMD calling for PXP creation as a
> way to get-caps can take a long time. An
On 4/26/2023 9:48 AM, Teres Alexis, Alan Previn wrote:
On Wed, 2023-04-26 at 13:52 +0200, Daniel Vetter wrote:
On Tue, Apr 25, 2023 at 04:41:54PM +0300, Joonas Lahtinen wrote:
(+ Faith and Daniel as they have been involved in previous discussions)
Quoting Jordan Justen (2023-04-24 20:13:00)
== Series Details ==
Series: drm/i915/guc: Set wedged if enable guc communication failed
URL : https://patchwork.freedesktop.org/series/117000/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_13063 -> Patchwork_117000v1
On 4/25/2023 11:54, Teres Alexis, Alan Previn wrote:
On Thu, 2023-04-06 at 15:26 -0700, john.c.harri...@intel.com wrote:
From: John Harrison
Don't use 'xe_lp*' prefixes for register lists that are common with
Gen8.
alan:snip
@@ -177,32 +177,32 @@ static const struct
== Series Details ==
Series: drm/i915/guc: Set wedged if enable guc communication failed
URL : https://patchwork.freedesktop.org/series/117000/
State : warning
== Summary ==
Error: dim sparse failed
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.
== Series Details ==
Series: drm/i915/guc: Set wedged if enable guc communication failed
URL : https://patchwork.freedesktop.org/series/117000/
State : warning
== Summary ==
Error: dim checkpatch failed
48debe4a6caa drm/i915/guc: Set wedged if enable guc communication failed
-:6:
On Wed, Apr 26, 2023 at 07:52:56PM +0300, Imre Deak wrote:
> intel_crtc_free_hw_state() frees all the Intel specific CSC blobs in the
> CRTC state, but the next memset() will only clear the corresponding
> pointers for the ones stored in intel_crtc_state:hw. Clear the ones
> stored in
On 4/26/2023 10:29, John Harrison wrote:
On 4/25/2023 12:05, Teres Alexis, Alan Previn wrote:
On Thu, 2023-04-06 at 15:26 -0700,john.c.harri...@intel.com wrote:
From: John Harrison
Fix Xe_LP name.
Signed-off-by: John Harrison
alan:snip
-/* GEN9/XE_LPD - Render / Compute
On 4/25/2023 12:05, Teres Alexis, Alan Previn wrote:
On Thu, 2023-04-06 at 15:26 -0700,john.c.harri...@intel.com wrote:
From: John Harrison
Fix Xe_LP name.
Signed-off-by: John Harrison
alan:snip
-/* GEN9/XE_LPD - Render / Compute Per-Engine-Instance */
+/* GEN8+ Render / Compute
On 4/25/2023 10:55, Teres Alexis, Alan Previn wrote:
On Thu, 2023-04-06 at 15:26 -0700, Harrison, John C wrote:
From: John Harrison
A pair of pre-Xe registers were being included in the Xe capture list.
GuC was rejecting those as being invalid and logging errors about
them. So, stop doing it.
On 4/25/2023 10:55, Teres Alexis, Alan Previn wrote:
On Thu, 2023-04-06 at 15:26 -0700, Harrison, John C wrote:
From: John Harrison
A pair of pre-Xe registers were being included in the Xe capture list.
GuC was rejecting those as being invalid and logging errors about
them. So, stop doing it.
On 4/26/2023 9:41 PM, Sripada, Radhakrishna wrote:
-Original Message-
From: Kalvala, Haridhar
Sent: Wednesday, April 26, 2023 5:36 AM
To: Sripada, Radhakrishna ; intel-
g...@lists.freedesktop.org
Cc: Vivi, Rodrigo
Subject: Re: [Intel-gfx] [PATCH v1.1] drm/i915/mtl: Implement
On Tue, Apr 25, 2023 at 11:30:11AM -0700, Radhakrishna Sripada wrote:
Enable strict RAR to prevent spurious GPU hangs.
v1.1: Rebase
Cc: Rodrigo Vivi
Cc: Umesh Nerlige Ramappa
Signed-off-by: Radhakrishna Sripada
---
drivers/gpu/drm/i915/gt/intel_gt_regs.h | 5 +
Add functions for printing link training debug and error messages, both
to prepare for the next patch, which downgrades an error to debug if the
sink is disconnected and to remove some code duplication.
Signed-off-by: Imre Deak
---
.../drm/i915/display/intel_dp_link_training.c | 376
If the output on a DP-alt link is kept enabled for too long (about 20
sec), then some IOM/TCSS firmware timeout will cause havoc on the PCI
bus, at least for other GFX devices on it which will stop powering up.
Since user space is not guaranteed to do a disabling modeset in time,
switch such
Factor out a helper to call a function with the atomic locks held,
required by a follow-up patch resetting an active DP link.
No functional changes.
Signed-off-by: Imre Deak
---
drivers/gpu/drm/i915/display/intel_ddi.c | 53 ++--
1 file changed, 31 insertions(+), 22
Factor out a helper used by a follow up patch to reset an active DP
link.
No functional changes.
Signed-off-by: Imre Deak
---
drivers/gpu/drm/i915/display/intel_dp.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git
During HW readout/sanitization CRTCs can be disabled only if they don't
have an attached encoder (and so the encoder disable hooks don't need to
be called). An upcoming patch will need to disable CRTCs also with an
attached an encoder, so add support for this.
For bigjoiner configs the encoder
Prevent downgrading the link training maximum lane count/rate if the
sink is disconnected - and so the link training failure is expected. In
such cases modeset failures due to the reduced max link params would be
just confusing for user space (instead of which the correct thing it
should act on is
For a bigjoiner configuration display->crtc_disable() will be called
first for the slave CRTCs and then for the master CRTC. However slave
CRTCs will be actually disabled only after the master CRTC is disabled
(from the encoder disable hooks called with the master CRTC state).
Hence the slave
If a sink is disconnected it's expected that link training actions will
fail on it, so downgrade the error messages about such actions to be a
debug message. Such - expected - link training failures are more
frequent after a follow up patch, after which an active TypeC link is
reset after the sink
Factor out a function setting the encoder and CRTC in the connector
atomic state, required by a follow up patch.
No functional changes.
Signed-off-by: Imre Deak
---
.../drm/i915/display/intel_modeset_setup.c| 28 +--
1 file changed, 19 insertions(+), 9 deletions(-)
diff
intel_crtc_free_hw_state() frees all the Intel specific CSC blobs in the
CRTC state, but the next memset() will only clear the corresponding
pointers for the ones stored in intel_crtc_state:hw. Clear the ones
stored in intel_crtc_state as well. Also sync the UAPI state with the HW
state after the
During HW state readout/sanitization an up-to-date connector atomic
state will be required by a follow-up patch, which can disable CRTCs
with an encoder (and calling the correct encoder hooks happens via the
connector atomic state encoder pointer). So update the connector state
already before the
If a TypeC/DP-alt output is not disabled in time some IOM/TCSS firmware
component will time-out and block at least the PCI power management
operations for other PCI GFX devices. This patchset adds a workaround
that performs an in-kernel modeset (either disabling or switching to
TBT-alt mode) on
On Wed, 2023-04-26 at 13:52 +0200, Daniel Vetter wrote:
> On Tue, Apr 25, 2023 at 04:41:54PM +0300, Joonas Lahtinen wrote:
> > (+ Faith and Daniel as they have been involved in previous discussions)
> > Quoting Jordan Justen (2023-04-24 20:13:00)
> > > On 2023-04-24 02:08:43, Tvrtko Ursulin wrote:
== Series Details ==
Series: drm/i915: Scaler/pfit stuff (rev3)
URL : https://patchwork.freedesktop.org/series/116661/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_13063_full -> Patchwork_116661v3_full
Summary
---
Hi,
On Wed, Apr 19, 2023 at 8:43 AM Mark Yacoub wrote:
>
> Hi all,
> This is v10 of the HDCP patches. The patches are authored by Sean Paul.
> I rebased and addressed the review comments in v6-v10.
>
> Main change in v10 is handling the kernel test bot warnings.
>
> Patches 1-4 focus on moving
Add err code check for enable_communication on resume path. When resume failed,
we can no longer use the GPU, marking the GPU as wedged.
Signed-off-by: Zhanjun Dong
---
drivers/gpu/drm/i915/gt/intel_gt_pm.c | 7 ++-
drivers/gpu/drm/i915/gt/intel_reset.c | 19 ---
> -Original Message-
> From: Kalvala, Haridhar
> Sent: Wednesday, April 26, 2023 5:36 AM
> To: Sripada, Radhakrishna ; intel-
> g...@lists.freedesktop.org
> Cc: Vivi, Rodrigo
> Subject: Re: [Intel-gfx] [PATCH v1.1] drm/i915/mtl: Implement
> Wa_14019141245
>
>
> On 4/26/2023 12:00 AM,
== Series Details ==
Series: drm/i915: Hugepage manager and test for MTL
URL : https://patchwork.freedesktop.org/series/116995/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_13063 -> Patchwork_116995v1
Summary
---
== Series Details ==
Series: mtl: add support for pmdemand (rev3)
URL : https://patchwork.freedesktop.org/series/116949/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_13063_full -> Patchwork_116949v3_full
Summary
---
== Series Details ==
Series: drm/i915: Hugepage manager and test for MTL
URL : https://patchwork.freedesktop.org/series/116995/
State : warning
== Summary ==
Error: dim checkpatch failed
9bf11bf936fc drm/i915: Migrate platform-dependent mock hugepage selftests to
live
-:7:
> On 26/04/2023 07:24, fei.y...@intel.com wrote:
>> From: Fei Yang
>>
>> The first three patches in this series are taken from
>> https://patchwork.freedesktop.org/series/116868/
>> These patches are included here because the last patch
>> has dependency on the pat_index refactor.
>>
>> This
-Original Message-
From: Hajda, Andrzej
Sent: Wednesday, April 26, 2023 8:14 AM
To: intel-gfx@lists.freedesktop.org; linux-ker...@vger.kernel.org; Cavitt,
Jonathan ; Hajda, Andrzej ;
Auld, Matthew
Subject: [PATCH v7 0/2] drm/i915: Hugepage manager and test for MTL
>
>This patchset
== Series Details ==
Series: Add vfio_device cdev for iommufd support (rev12)
URL : https://patchwork.freedesktop.org/series/113696/
State : failure
== Summary ==
Error: patch
https://patchwork.freedesktop.org/api/1.0/series/113696/revisions/12/mbox/ not
applied
Applying: vfio: Allocate per
== Series Details ==
Series: Enhance vfio PCI hot reset for vfio cdev device
URL : https://patchwork.freedesktop.org/series/116991/
State : failure
== Summary ==
Error: patch
https://patchwork.freedesktop.org/api/1.0/series/116991/revisions/1/mbox/ not
applied
Applying: vfio: Determine
From: Jonathan Cavitt
MTL currently uses gen8_ppgtt_insert_huge when managing huge pages. This is
because
MTL reports as not supporting 64K pages, or more accurately, the system that
reports
whether a platform has 64K pages reports false for MTL. This is only half
correct,
as the 64K page
From: Jonathan Cavitt
Convert the igt_mock_ppgtt_huge_fill and igt_mock_ppgtt_64K mock selftests into
live selftests as their requirements have recently become platform-dependent.
Additionally, apply necessary platform dependency checks to these tests.
v8:
- handle properly 64K and 2M pages
This patchset patches sent by Jonathan and Andi, with
addressed CI failures:
1. Fixed checking alignment of 64K pages on both Pre-Gen12 and Gen12.
2. Fixed start alignment of 2M pages.
Regards
Andrzej
Jonathan Cavitt (2):
drm/i915: Migrate platform-dependent mock hugepage selftests to live
> From: Alex Williamson
> Sent: Wednesday, April 26, 2023 9:20 PM
>
> On Wed, 26 Apr 2023 07:22:17 +
> "Liu, Yi L" wrote:
>
> > > From: Alex Williamson
> > > Sent: Thursday, April 20, 2023 10:09 PM
> > [...]
> > > > > Whereas dev-id < 0
> > > > > (== -1) is an affected device which
> From: Liu, Yi L
> Sent: Wednesday, April 26, 2023 10:54 PM
>
> VFIO_DEVICE_PCI_HOT_RESET requires user to pass an array of group fds
> to prove that it owns all devices affected by resetting the calling
> device. While for cdev devices, user can use an iommufd-based ownership
> checking model
group code is not needed for vfio device cdev, so with vfio device cdev
introduced, the group infrastructures can be compiled out if only cdev
is needed.
Signed-off-by: Yi Liu
---
drivers/iommu/iommufd/Kconfig| 4 +-
drivers/vfio/Kconfig | 14 +
drivers/vfio/Makefile
This gives notes for userspace applications on device cdev usage.
Reviewed-by: Kevin Tian
Signed-off-by: Yi Liu
---
Documentation/driver-api/vfio.rst | 132 ++
1 file changed, 132 insertions(+)
diff --git a/Documentation/driver-api/vfio.rst
this prepares for adding DETACH ioctl for physical VFIO devices.
Reviewed-by: Kevin Tian
Tested-by: Terrence Xu
Tested-by: Nicolin Chen
Tested-by: Matthew Rosato
Tested-by: Yanting Jiang
Signed-off-by: Yi Liu
---
Documentation/driver-api/vfio.rst | 8 +---
This adds ioctl for userspace to bind device cdev fd to iommufd.
VFIO_DEVICE_BIND_IOMMUFD: bind device to an iommufd, hence gain DMA
control provided by the iommufd. open_device
op is called after bind_iommufd op.
Signed-off-by: Yi
This adds ioctl for userspace to attach device cdev fd to and detach
from IOAS/hw_pagetable managed by iommufd.
VFIO_DEVICE_ATTACH_IOMMUFD_PT: attach vfio device to IOAS, hw_pagetable
managed by iommufd. Attach can be
undo
This can avoid endless vfio_device refcount increasement by userspace,
which would keep blocking the vfio_unregister_group_dev().
Signed-off-by: Yi Liu
---
drivers/vfio/vfio_main.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/vfio/vfio_main.c
From: Nicolin Chen
Previously, the detach routine is only done by the destroy(). And it was
called by vfio_iommufd_emulated_unbind() when the device runs close(), so
all the mappings in iopt were cleaned in that setup, when the call trace
reaches this detach() routine.
Now, there's a need of a
This allows user to directly open a vfio device w/o using the legacy
container/group interface, as a prerequisite for supporting new iommu
features like nested translation.
The device fd opened in this manner doesn't have the capability to access
the device as the fops open() doesn't open the
to align with the coming vfio device cdev support.
Reviewed-by: Kevin Tian
Tested-by: Terrence Xu
Tested-by: Nicolin Chen
Tested-by: Yanting Jiang
Signed-off-by: Yi Liu
---
drivers/vfio/group.c | 18 ++
drivers/vfio/iommufd.c | 37 ++---
This avoids passing too much parameters in multiple functions.
Reviewed-by: Kevin Tian
Reviewed-by: Jason Gunthorpe
Reviewed-by: Eric Auger
Tested-by: Terrence Xu
Tested-by: Nicolin Chen
Tested-by: Matthew Rosato
Tested-by: Yanting Jiang
Signed-off-by: Yi Liu
---
drivers/vfio/group.c
.bind_iommufd() will generate an ID to represent this bond, which is
needed by userspace for further usage. Store devid in vfio_device_file
to avoid passing the pointer in multiple places.
Reviewed-by: Kevin Tian
Tested-by: Terrence Xu
Tested-by: Nicolin Chen
Tested-by: Yanting Jiang
this prepares for adding DETACH ioctl for emulated VFIO devices.
Reviewed-by: Kevin Tian
Tested-by: Terrence Xu
Tested-by: Nicolin Chen
Tested-by: Matthew Rosato
Tested-by: Yanting Jiang
Signed-off-by: Yi Liu
---
drivers/gpu/drm/i915/gvt/kvmgt.c | 1 +
drivers/s390/cio/vfio_ccw_ops.c |
For noiommu device, vfio core names the cdev node with prefix "noiommu-".
Reviewed-by: Kevin Tian
Tested-by: Nicolin Chen
Tested-by: Yanting Jiang
Signed-off-by: Yi Liu
---
drivers/vfio/vfio_main.c | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git
into vfio_device_group_open(). This is more consistent with what will
be done in vfio device cdev path.
Reviewed-by: Kevin Tian
Tested-by: Terrence Xu
Tested-by: Nicolin Chen
Tested-by: Yanting Jiang
Signed-off-by: Yi Liu
---
drivers/vfio/group.c | 6 ++
drivers/vfio/iommufd.c | 32
VFIO group has historically allowed multi-open of the device FD. This
was made secure because the "open" was executed via an ioctl to the
group FD which is itself only single open.
However, no known use of multiple device FDs today. It is kind of a
strange thing to do because new device FDs can
This defines KVM_DEV_VFIO_FILE* and make alias with KVM_DEV_VFIO_GROUP*.
Old userspace uses KVM_DEV_VFIO_GROUP* works as well.
Reviewed-by: Jason Gunthorpe
Reviewed-by: Kevin Tian
Tested-by: Terrence Xu
Tested-by: Nicolin Chen
Tested-by: Matthew Rosato
Tested-by: Yanting Jiang
for counting the devices that are opened via the cdev path. This count
is increased and decreased by the cdev path. The group path checks it
to achieve exclusion with the cdev path. With this, only one path (group
path or cdev path) will claim DMA ownership. This avoids scenarios in
which devices
This prepares for making the below kAPIs to accept both group file
and device file instead of only vfio group file.
bool vfio_file_enforced_coherent(struct file *file);
void vfio_file_set_kvm(struct file *file, struct kvm *kvm);
Reviewed-by: Kevin Tian
Reviewed-by: Eric Auger
Reviewed-by:
Allow the vfio_device file to be in a state where the device FD is
opened but the device cannot be used by userspace (i.e. its .open_device()
hasn't been called). This inbetween state is not used when the device
FD is spawned from the group FD, however when we create the device FD
directly by
Meanwhile, rename related helpers. No functional change is intended.
Reviewed-by: Kevin Tian
Reviewed-by: Eric Auger
Reviewed-by: Jason Gunthorpe
Tested-by: Terrence Xu
Tested-by: Nicolin Chen
Tested-by: Matthew Rosato
Tested-by: Yanting Jiang
Signed-off-by: Yi Liu
---
virt/kvm/vfio.c |
This makes the vfio file kAPIs to accept vfio device files, also a
preparation for vfio device cdev support.
For the kvm set with vfio device file, kvm pointer is stored in struct
vfio_device_file, and use kvm_ref_lock to protect kvm set and kvm
pointer usage within VFIO. This kvm pointer will be
Existing VFIO provides group-centric user APIs for userspace. Userspace
opens the /dev/vfio/$group_id first before getting device fd and hence
getting access to device. This is not the desired model for iommufd. Per
the conclusion of community discussion[1], iommufd provides device-centric
kAPIs
1 - 100 of 164 matches
Mail list logo