* [PATCH v2 1/4] drm/xe/vf: React to MIGRATED interrupt
2024-09-24 20:25 [PATCH v2 0/4] drm/xe/vf: Post-migration recovery worker basis Tomasz Lis
@ 2024-09-24 20:25 ` Tomasz Lis
2024-09-26 14:05 ` Michal Wajdeczko
2024-09-24 20:25 ` [PATCH v2 2/4] drm/xe/vf: Send RESFIX_DONE message at end of VF restore Tomasz Lis
` (6 subsequent siblings)
7 siblings, 1 reply; 15+ messages in thread
From: Tomasz Lis @ 2024-09-24 20:25 UTC (permalink / raw)
To: intel-xe; +Cc: Michał Winiarski, Michał Wajdeczko
To properly support VF Save/Restore procedure, fixups need to be
applied after PF driver finishes its part of VF Restore. Those
fixups are applied by the VF driver within a VM.
A VF driver gets informed that it was migrated by receiving an
interrupt from each GuC. That should be the trigger for fixups.
The VF can safely do post-migration fixups on resources associated
to each GuC only after that GuC issued the MIGRATED interrupt.
This change introduces a worker to be used for post-migration fixups,
and a mechanism to schedule said worker when all GuCs sent the irq.
v2: renamed and moved functions, updated logged messages, removed
unused includes, used anon struct (mwajdeczko)
Signed-off-by: Tomasz Lis <tomasz.lis@intel.com>
---
drivers/gpu/drm/xe/Makefile | 1 +
drivers/gpu/drm/xe/xe_device_types.h | 2 +
drivers/gpu/drm/xe/xe_gt_sriov_vf.c | 11 +++++
drivers/gpu/drm/xe/xe_gt_sriov_vf.h | 2 +
drivers/gpu/drm/xe/xe_guc.c | 11 +++++
drivers/gpu/drm/xe/xe_memirq.c | 3 ++
drivers/gpu/drm/xe/xe_sriov.c | 4 ++
drivers/gpu/drm/xe/xe_sriov_types.h | 10 ++++
drivers/gpu/drm/xe/xe_sriov_vf.c | 73 ++++++++++++++++++++++++++++
drivers/gpu/drm/xe/xe_sriov_vf.h | 14 ++++++
10 files changed, 131 insertions(+)
create mode 100644 drivers/gpu/drm/xe/xe_sriov_vf.c
create mode 100644 drivers/gpu/drm/xe/xe_sriov_vf.h
diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile
index 8f1c5c329f79..1f07983bb865 100644
--- a/drivers/gpu/drm/xe/Makefile
+++ b/drivers/gpu/drm/xe/Makefile
@@ -123,6 +123,7 @@ xe-y += \
xe_gt_sriov_vf.o \
xe_guc_relay.o \
xe_memirq.o \
+ xe_sriov_vf.o \
xe_sriov.o
xe-$(CONFIG_PCI_IOV) += \
diff --git a/drivers/gpu/drm/xe/xe_device_types.h b/drivers/gpu/drm/xe/xe_device_types.h
index 484fb34dde98..07ff7554fc3e 100644
--- a/drivers/gpu/drm/xe/xe_device_types.h
+++ b/drivers/gpu/drm/xe/xe_device_types.h
@@ -374,6 +374,8 @@ struct xe_device {
/** @sriov.pf: PF specific data */
struct xe_device_pf pf;
+ /** @sriov.vf: VF specific data */
+ struct xe_device_vf vf;
/** @sriov.wq: workqueue used by the virtualization workers */
struct workqueue_struct *wq;
diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_vf.c b/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
index d3baba50f085..489ace57c2a1 100644
--- a/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
+++ b/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
@@ -27,6 +27,7 @@
#include "xe_guc_relay.h"
#include "xe_mmio.h"
#include "xe_sriov.h"
+#include "xe_sriov_vf.h"
#include "xe_uc_fw.h"
#include "xe_wopcm.h"
@@ -692,6 +693,16 @@ int xe_gt_sriov_vf_connect(struct xe_gt *gt)
return err;
}
+void xe_gt_sriov_vf_migrated_event_handler(struct xe_gt *gt)
+{
+ struct xe_device *xe = gt_to_xe(gt);
+
+ set_bit(gt->info.id, &xe->sriov.vf.migration.gt_flags);
+ smp_mb__after_atomic();
+ xe_gt_sriov_info(gt, "VF migration recovery ready\n");
+ xe_sriov_vf_start_migration_recovery(xe);
+}
+
static bool vf_is_negotiated(struct xe_gt *gt, u16 major, u16 minor)
{
xe_gt_assert(gt, IS_SRIOV_VF(gt_to_xe(gt)));
diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_vf.h b/drivers/gpu/drm/xe/xe_gt_sriov_vf.h
index e541ce57bec2..544e913b8465 100644
--- a/drivers/gpu/drm/xe/xe_gt_sriov_vf.h
+++ b/drivers/gpu/drm/xe/xe_gt_sriov_vf.h
@@ -18,6 +18,8 @@ int xe_gt_sriov_vf_connect(struct xe_gt *gt);
int xe_gt_sriov_vf_query_runtime(struct xe_gt *gt);
int xe_gt_sriov_vf_prepare_ggtt(struct xe_gt *gt);
+void xe_gt_sriov_vf_migrated_event_handler(struct xe_gt *gt);
+
u32 xe_gt_sriov_vf_gmdid(struct xe_gt *gt);
u16 xe_gt_sriov_vf_guc_ids(struct xe_gt *gt);
u64 xe_gt_sriov_vf_lmem(struct xe_gt *gt);
diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
index b6cd5e941f19..05aa93070e5a 100644
--- a/drivers/gpu/drm/xe/xe_guc.c
+++ b/drivers/gpu/drm/xe/xe_guc.c
@@ -1092,10 +1092,21 @@ int xe_guc_self_cfg64(struct xe_guc *guc, u16 key, u64 val)
return guc_self_cfg(guc, key, 2, val);
}
+static void xe_guc_sw_0_irq_handler(struct xe_guc *guc)
+{
+ struct xe_gt *gt = guc_to_gt(guc);
+
+ if (IS_SRIOV_VF(gt_to_xe(gt)))
+ xe_gt_sriov_vf_migrated_event_handler(gt);
+}
+
void xe_guc_irq_handler(struct xe_guc *guc, const u16 iir)
{
if (iir & GUC_INTR_GUC2HOST)
xe_guc_ct_irq_handler(&guc->ct);
+
+ if (iir & GUC_INTR_SW_INT_0)
+ xe_guc_sw_0_irq_handler(guc);
}
void xe_guc_sanitize(struct xe_guc *guc)
diff --git a/drivers/gpu/drm/xe/xe_memirq.c b/drivers/gpu/drm/xe/xe_memirq.c
index 3f8d4ca64302..2d2f40378942 100644
--- a/drivers/gpu/drm/xe/xe_memirq.c
+++ b/drivers/gpu/drm/xe/xe_memirq.c
@@ -435,6 +435,9 @@ static void memirq_dispatch_guc(struct xe_memirq *memirq, struct iosys_map *stat
if (memirq_received(memirq, status, ilog2(GUC_INTR_GUC2HOST), name))
xe_guc_irq_handler(guc, GUC_INTR_GUC2HOST);
+
+ if (memirq_received(memirq, status, ilog2(GUC_INTR_SW_INT_0), name))
+ xe_guc_irq_handler(guc, GUC_INTR_SW_INT_0);
}
/**
diff --git a/drivers/gpu/drm/xe/xe_sriov.c b/drivers/gpu/drm/xe/xe_sriov.c
index 69a066ef20c0..2f4c3ae24f6e 100644
--- a/drivers/gpu/drm/xe/xe_sriov.c
+++ b/drivers/gpu/drm/xe/xe_sriov.c
@@ -12,6 +12,7 @@
#include "xe_mmio.h"
#include "xe_sriov.h"
#include "xe_sriov_pf.h"
+#include "xe_sriov_vf.h"
/**
* xe_sriov_mode_to_string - Convert enum value to string.
@@ -112,6 +113,9 @@ int xe_sriov_init(struct xe_device *xe)
return err;
}
+ if (IS_SRIOV_VF(xe))
+ xe_sriov_vf_init_early(xe);
+
xe_assert(xe, !xe->sriov.wq);
xe->sriov.wq = alloc_workqueue("xe-sriov-wq", 0, 0);
if (!xe->sriov.wq)
diff --git a/drivers/gpu/drm/xe/xe_sriov_types.h b/drivers/gpu/drm/xe/xe_sriov_types.h
index c7b7ad4af5c8..8c518e68d33a 100644
--- a/drivers/gpu/drm/xe/xe_sriov_types.h
+++ b/drivers/gpu/drm/xe/xe_sriov_types.h
@@ -56,4 +56,14 @@ struct xe_device_pf {
struct mutex master_lock;
};
+struct xe_device_vf {
+ /** @migration: VF Migration state data */
+ struct {
+ /** @migration.worker: VF migration recovery worker */
+ struct work_struct worker;
+ /** @migration.gt_flags: Per-GT request flags for VF migration recovery */
+ unsigned long gt_flags;
+ } migration;
+};
+
#endif
diff --git a/drivers/gpu/drm/xe/xe_sriov_vf.c b/drivers/gpu/drm/xe/xe_sriov_vf.c
new file mode 100644
index 000000000000..0e332bb215fd
--- /dev/null
+++ b/drivers/gpu/drm/xe/xe_sriov_vf.c
@@ -0,0 +1,73 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2023-2024 Intel Corporation
+ */
+
+#include <drm/drm_managed.h>
+
+#include "xe_assert.h"
+#include "xe_device.h"
+#include "xe_sriov.h"
+#include "xe_sriov_vf.h"
+#include "xe_sriov_printk.h"
+
+static void migration_worker_func(struct work_struct *w);
+
+/**
+ * xe_sriov_vf_init_early - Initialize SR-IOV VF specific data.
+ * @xe: the &xe_device to initialize
+ */
+void xe_sriov_vf_init_early(struct xe_device *xe)
+{
+ INIT_WORK(&xe->sriov.vf.migration.worker, migration_worker_func);
+}
+
+static void vf_post_migration_recovery(struct xe_device *xe)
+{
+ drm_dbg(&xe->drm, "migration recovery in progress\n");
+ /* FIXME: add the recovery steps */
+ drm_notice(&xe->drm, "migration recovery ended\n");
+}
+
+static void migration_worker_func(struct work_struct *w)
+{
+ struct xe_device *xe = container_of(w, struct xe_device,
+ sriov.vf.migration.worker);
+
+ vf_post_migration_recovery(xe);
+}
+
+static bool vf_ready_to_recovery_on_all_tiles(struct xe_device *xe)
+{
+ struct xe_gt *gt;
+ unsigned int id;
+
+ for_each_gt(gt, xe, id) {
+ if (!test_bit(id, &xe->sriov.vf.migration.gt_flags))
+ return false;
+ }
+ return true;
+}
+
+/**
+ * xe_sriov_vf_start_migration_recovery - Start VF migration recovery.
+ * @xe: the &xe_device to start recovery on
+ *
+ * This function shall be called only by VF.
+ */
+void xe_sriov_vf_start_migration_recovery(struct xe_device *xe)
+{
+ bool started;
+
+ xe_assert(xe, IS_SRIOV_VF(xe));
+
+ if (!vf_ready_to_recovery_on_all_tiles(xe))
+ return;
+
+ WRITE_ONCE(xe->sriov.vf.migration.gt_flags, 0);
+ smp_mb();
+
+ started = queue_work(xe->sriov.wq, &xe->sriov.vf.migration.worker);
+ drm_info(&xe->drm, "VF migration recovery %s\n", started ?
+ "scheduled" : "already in progress");
+}
diff --git a/drivers/gpu/drm/xe/xe_sriov_vf.h b/drivers/gpu/drm/xe/xe_sriov_vf.h
new file mode 100644
index 000000000000..7b8622cff2b7
--- /dev/null
+++ b/drivers/gpu/drm/xe/xe_sriov_vf.h
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2023-2024 Intel Corporation
+ */
+
+#ifndef _XE_SRIOV_VF_H_
+#define _XE_SRIOV_VF_H_
+
+struct xe_device;
+
+void xe_sriov_vf_init_early(struct xe_device *xe);
+void xe_sriov_vf_start_migration_recovery(struct xe_device *xe);
+
+#endif
--
2.25.1
^ permalink raw reply related [flat|nested] 15+ messages in thread* Re: [PATCH v2 1/4] drm/xe/vf: React to MIGRATED interrupt
2024-09-24 20:25 ` [PATCH v2 1/4] drm/xe/vf: React to MIGRATED interrupt Tomasz Lis
@ 2024-09-26 14:05 ` Michal Wajdeczko
2024-09-26 21:22 ` Lis, Tomasz
0 siblings, 1 reply; 15+ messages in thread
From: Michal Wajdeczko @ 2024-09-26 14:05 UTC (permalink / raw)
To: Tomasz Lis, intel-xe; +Cc: Michał Winiarski
On 24.09.2024 22:25, Tomasz Lis wrote:
> To properly support VF Save/Restore procedure, fixups need to be
> applied after PF driver finishes its part of VF Restore. Those
> fixups are applied by the VF driver within a VM.
>
> A VF driver gets informed that it was migrated by receiving an
> interrupt from each GuC. That should be the trigger for fixups.
>
> The VF can safely do post-migration fixups on resources associated
> to each GuC only after that GuC issued the MIGRATED interrupt.
>
> This change introduces a worker to be used for post-migration fixups,
> and a mechanism to schedule said worker when all GuCs sent the irq.
>
> v2: renamed and moved functions, updated logged messages, removed
> unused includes, used anon struct (mwajdeczko)
>
> Signed-off-by: Tomasz Lis <tomasz.lis@intel.com>
> ---
> drivers/gpu/drm/xe/Makefile | 1 +
> drivers/gpu/drm/xe/xe_device_types.h | 2 +
> drivers/gpu/drm/xe/xe_gt_sriov_vf.c | 11 +++++
> drivers/gpu/drm/xe/xe_gt_sriov_vf.h | 2 +
> drivers/gpu/drm/xe/xe_guc.c | 11 +++++
> drivers/gpu/drm/xe/xe_memirq.c | 3 ++
> drivers/gpu/drm/xe/xe_sriov.c | 4 ++
> drivers/gpu/drm/xe/xe_sriov_types.h | 10 ++++
> drivers/gpu/drm/xe/xe_sriov_vf.c | 73 ++++++++++++++++++++++++++++
> drivers/gpu/drm/xe/xe_sriov_vf.h | 14 ++++++
> 10 files changed, 131 insertions(+)
> create mode 100644 drivers/gpu/drm/xe/xe_sriov_vf.c
> create mode 100644 drivers/gpu/drm/xe/xe_sriov_vf.h
>
> diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile
> index 8f1c5c329f79..1f07983bb865 100644
> --- a/drivers/gpu/drm/xe/Makefile
> +++ b/drivers/gpu/drm/xe/Makefile
> @@ -123,6 +123,7 @@ xe-y += \
> xe_gt_sriov_vf.o \
> xe_guc_relay.o \
> xe_memirq.o \
> + xe_sriov_vf.o \
wrong order
> xe_sriov.o
>
> xe-$(CONFIG_PCI_IOV) += \
> diff --git a/drivers/gpu/drm/xe/xe_device_types.h b/drivers/gpu/drm/xe/xe_device_types.h
> index 484fb34dde98..07ff7554fc3e 100644
> --- a/drivers/gpu/drm/xe/xe_device_types.h
> +++ b/drivers/gpu/drm/xe/xe_device_types.h
> @@ -374,6 +374,8 @@ struct xe_device {
>
> /** @sriov.pf: PF specific data */
> struct xe_device_pf pf;
> + /** @sriov.vf: VF specific data */
> + struct xe_device_vf vf;
>
> /** @sriov.wq: workqueue used by the virtualization workers */
> struct workqueue_struct *wq;
> diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_vf.c b/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
> index d3baba50f085..489ace57c2a1 100644
> --- a/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
> +++ b/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
> @@ -27,6 +27,7 @@
> #include "xe_guc_relay.h"
> #include "xe_mmio.h"
> #include "xe_sriov.h"
> +#include "xe_sriov_vf.h"
> #include "xe_uc_fw.h"
> #include "xe_wopcm.h"
>
> @@ -692,6 +693,16 @@ int xe_gt_sriov_vf_connect(struct xe_gt *gt)
> return err;
> }
>
> +void xe_gt_sriov_vf_migrated_event_handler(struct xe_gt *gt)
this is public function, so you should add kernel-doc for it
> +{
> + struct xe_device *xe = gt_to_xe(gt);
> +
since below you are accessing VF specific fields, you may want to add:
xe_gt_assert(gt, IS_SRIOV_VF(xe));
> + set_bit(gt->info.id, &xe->sriov.vf.migration.gt_flags);
> + smp_mb__after_atomic();
> + xe_gt_sriov_info(gt, "VF migration recovery ready\n");
the xe_gt_sriov_info() will already add "VF:" prefix for you:
xe_gt_sriov_info(gt, "ready for recovery after migration\n");
[ ] xe 0000:00:02.0: [drm] GT0: VF: ready for recovery after migration
> + xe_sriov_vf_start_migration_recovery(xe);
> +}
> +
> static bool vf_is_negotiated(struct xe_gt *gt, u16 major, u16 minor)
> {
> xe_gt_assert(gt, IS_SRIOV_VF(gt_to_xe(gt)));
> diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_vf.h b/drivers/gpu/drm/xe/xe_gt_sriov_vf.h
> index e541ce57bec2..544e913b8465 100644
> --- a/drivers/gpu/drm/xe/xe_gt_sriov_vf.h
> +++ b/drivers/gpu/drm/xe/xe_gt_sriov_vf.h
> @@ -18,6 +18,8 @@ int xe_gt_sriov_vf_connect(struct xe_gt *gt);
> int xe_gt_sriov_vf_query_runtime(struct xe_gt *gt);
> int xe_gt_sriov_vf_prepare_ggtt(struct xe_gt *gt);
>
> +void xe_gt_sriov_vf_migrated_event_handler(struct xe_gt *gt);
> +
> u32 xe_gt_sriov_vf_gmdid(struct xe_gt *gt);
> u16 xe_gt_sriov_vf_guc_ids(struct xe_gt *gt);
> u64 xe_gt_sriov_vf_lmem(struct xe_gt *gt);
> diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
> index b6cd5e941f19..05aa93070e5a 100644
> --- a/drivers/gpu/drm/xe/xe_guc.c
> +++ b/drivers/gpu/drm/xe/xe_guc.c
> @@ -1092,10 +1092,21 @@ int xe_guc_self_cfg64(struct xe_guc *guc, u16 key, u64 val)
> return guc_self_cfg(guc, key, 2, val);
> }
>
> +static void xe_guc_sw_0_irq_handler(struct xe_guc *guc)
> +{
> + struct xe_gt *gt = guc_to_gt(guc);
> +
> + if (IS_SRIOV_VF(gt_to_xe(gt)))
> + xe_gt_sriov_vf_migrated_event_handler(gt);
> +}
> +
> void xe_guc_irq_handler(struct xe_guc *guc, const u16 iir)
> {
> if (iir & GUC_INTR_GUC2HOST)
> xe_guc_ct_irq_handler(&guc->ct);
> +
> + if (iir & GUC_INTR_SW_INT_0)
> + xe_guc_sw_0_irq_handler(guc);
> }
>
> void xe_guc_sanitize(struct xe_guc *guc)
> diff --git a/drivers/gpu/drm/xe/xe_memirq.c b/drivers/gpu/drm/xe/xe_memirq.c
> index 3f8d4ca64302..2d2f40378942 100644
> --- a/drivers/gpu/drm/xe/xe_memirq.c
> +++ b/drivers/gpu/drm/xe/xe_memirq.c
> @@ -435,6 +435,9 @@ static void memirq_dispatch_guc(struct xe_memirq *memirq, struct iosys_map *stat
>
> if (memirq_received(memirq, status, ilog2(GUC_INTR_GUC2HOST), name))
> xe_guc_irq_handler(guc, GUC_INTR_GUC2HOST);
> +
> + if (memirq_received(memirq, status, ilog2(GUC_INTR_SW_INT_0), name))
> + xe_guc_irq_handler(guc, GUC_INTR_SW_INT_0);
> }
>
> /**
> diff --git a/drivers/gpu/drm/xe/xe_sriov.c b/drivers/gpu/drm/xe/xe_sriov.c
> index 69a066ef20c0..2f4c3ae24f6e 100644
> --- a/drivers/gpu/drm/xe/xe_sriov.c
> +++ b/drivers/gpu/drm/xe/xe_sriov.c
> @@ -12,6 +12,7 @@
> #include "xe_mmio.h"
> #include "xe_sriov.h"
> #include "xe_sriov_pf.h"
> +#include "xe_sriov_vf.h"
>
> /**
> * xe_sriov_mode_to_string - Convert enum value to string.
> @@ -112,6 +113,9 @@ int xe_sriov_init(struct xe_device *xe)
> return err;
> }
>
> + if (IS_SRIOV_VF(xe))
> + xe_sriov_vf_init_early(xe);
> +
> xe_assert(xe, !xe->sriov.wq);
> xe->sriov.wq = alloc_workqueue("xe-sriov-wq", 0, 0);
> if (!xe->sriov.wq)
> diff --git a/drivers/gpu/drm/xe/xe_sriov_types.h b/drivers/gpu/drm/xe/xe_sriov_types.h
> index c7b7ad4af5c8..8c518e68d33a 100644
> --- a/drivers/gpu/drm/xe/xe_sriov_types.h
> +++ b/drivers/gpu/drm/xe/xe_sriov_types.h
> @@ -56,4 +56,14 @@ struct xe_device_pf {
> struct mutex master_lock;
> };
>
> +struct xe_device_vf {
you need to add kernel-doc for the struct, otherwise below doc will be
ignored (now) or wrongly interpreted (in near future)
> + /** @migration: VF Migration state data */
> + struct {
> + /** @migration.worker: VF migration recovery worker */
> + struct work_struct worker;
> + /** @migration.gt_flags: Per-GT request flags for VF migration recovery */
hmm, if something is per-GT then maybe it should be defined under struct
xe_gt in the xe_gt_sriov_vf_types.h as
struct xe_gt_sriov_vf {
/** @migration.ready: ready for VF migration recovery */
bool ready;
> + unsigned long gt_flags;
> + } migration;
> +};
> +
> #endif
> diff --git a/drivers/gpu/drm/xe/xe_sriov_vf.c b/drivers/gpu/drm/xe/xe_sriov_vf.c
> new file mode 100644
> index 000000000000..0e332bb215fd
> --- /dev/null
> +++ b/drivers/gpu/drm/xe/xe_sriov_vf.c
> @@ -0,0 +1,73 @@
> +// SPDX-License-Identifier: MIT
> +/*
> + * Copyright © 2023-2024 Intel Corporation
> + */
> +
> +#include <drm/drm_managed.h>
> +
> +#include "xe_assert.h"
> +#include "xe_device.h"
> +#include "xe_sriov.h"
> +#include "xe_sriov_vf.h"
> +#include "xe_sriov_printk.h"
> +
> +static void migration_worker_func(struct work_struct *w);
> +
> +/**
> + * xe_sriov_vf_init_early - Initialize SR-IOV VF specific data.
> + * @xe: the &xe_device to initialize
> + */
> +void xe_sriov_vf_init_early(struct xe_device *xe)
> +{
> + INIT_WORK(&xe->sriov.vf.migration.worker, migration_worker_func);
> +}
> +
> +static void vf_post_migration_recovery(struct xe_device *xe)
> +{
> + drm_dbg(&xe->drm, "migration recovery in progress\n");
> + /* FIXME: add the recovery steps */
> + drm_notice(&xe->drm, "migration recovery ended\n");
> +}
> +
> +static void migration_worker_func(struct work_struct *w)
> +{
> + struct xe_device *xe = container_of(w, struct xe_device,
> + sriov.vf.migration.worker);
> +
> + vf_post_migration_recovery(xe);
> +}
> +
> +static bool vf_ready_to_recovery_on_all_tiles(struct xe_device *xe)
you likely want to mean "on all GTs", right?
> +{
> + struct xe_gt *gt;
> + unsigned int id;
> +
> + for_each_gt(gt, xe, id) {
> + if (!test_bit(id, &xe->sriov.vf.migration.gt_flags))
if (!gt->sriov.vf.migration.ready) ?
> + return false;
as you're testing each GT separately, then maybe it's worth to add
xe_gt_sriov_dbg_verbose(gt, "still not ready to recover\n");
> + }
> + return true;
> +}
> +
> +/**
> + * xe_sriov_vf_start_migration_recovery - Start VF migration recovery.
> + * @xe: the &xe_device to start recovery on
> + *
> + * This function shall be called only by VF.
> + */
> +void xe_sriov_vf_start_migration_recovery(struct xe_device *xe)
> +{
> + bool started;
> +
> + xe_assert(xe, IS_SRIOV_VF(xe));
> +
> + if (!vf_ready_to_recovery_on_all_tiles(xe))
> + return;
> +
> + WRITE_ONCE(xe->sriov.vf.migration.gt_flags, 0);
> + smp_mb();
IIRC each use of mb requires documentation of "why"
> +
> + started = queue_work(xe->sriov.wq, &xe->sriov.vf.migration.worker);
> + drm_info(&xe->drm, "VF migration recovery %s\n", started ?
> + "scheduled" : "already in progress");
> +}
> diff --git a/drivers/gpu/drm/xe/xe_sriov_vf.h b/drivers/gpu/drm/xe/xe_sriov_vf.h
> new file mode 100644
> index 000000000000..7b8622cff2b7
> --- /dev/null
> +++ b/drivers/gpu/drm/xe/xe_sriov_vf.h
> @@ -0,0 +1,14 @@
> +/* SPDX-License-Identifier: MIT */
> +/*
> + * Copyright © 2023-2024 Intel Corporation
> + */
> +
> +#ifndef _XE_SRIOV_VF_H_
> +#define _XE_SRIOV_VF_H_
> +
> +struct xe_device;
> +
> +void xe_sriov_vf_init_early(struct xe_device *xe);
> +void xe_sriov_vf_start_migration_recovery(struct xe_device *xe);
> +
> +#endif
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [PATCH v2 1/4] drm/xe/vf: React to MIGRATED interrupt
2024-09-26 14:05 ` Michal Wajdeczko
@ 2024-09-26 21:22 ` Lis, Tomasz
0 siblings, 0 replies; 15+ messages in thread
From: Lis, Tomasz @ 2024-09-26 21:22 UTC (permalink / raw)
To: Michal Wajdeczko, intel-xe; +Cc: Michał Winiarski
On 26.09.2024 16:05, Michal Wajdeczko wrote:
>
> On 24.09.2024 22:25, Tomasz Lis wrote:
>> To properly support VF Save/Restore procedure, fixups need to be
>> applied after PF driver finishes its part of VF Restore. Those
>> fixups are applied by the VF driver within a VM.
>>
>> A VF driver gets informed that it was migrated by receiving an
>> interrupt from each GuC. That should be the trigger for fixups.
>>
>> The VF can safely do post-migration fixups on resources associated
>> to each GuC only after that GuC issued the MIGRATED interrupt.
>>
>> This change introduces a worker to be used for post-migration fixups,
>> and a mechanism to schedule said worker when all GuCs sent the irq.
>>
>> v2: renamed and moved functions, updated logged messages, removed
>> unused includes, used anon struct (mwajdeczko)
>>
>> Signed-off-by: Tomasz Lis <tomasz.lis@intel.com>
>> ---
>> drivers/gpu/drm/xe/Makefile | 1 +
>> drivers/gpu/drm/xe/xe_device_types.h | 2 +
>> drivers/gpu/drm/xe/xe_gt_sriov_vf.c | 11 +++++
>> drivers/gpu/drm/xe/xe_gt_sriov_vf.h | 2 +
>> drivers/gpu/drm/xe/xe_guc.c | 11 +++++
>> drivers/gpu/drm/xe/xe_memirq.c | 3 ++
>> drivers/gpu/drm/xe/xe_sriov.c | 4 ++
>> drivers/gpu/drm/xe/xe_sriov_types.h | 10 ++++
>> drivers/gpu/drm/xe/xe_sriov_vf.c | 73 ++++++++++++++++++++++++++++
>> drivers/gpu/drm/xe/xe_sriov_vf.h | 14 ++++++
>> 10 files changed, 131 insertions(+)
>> create mode 100644 drivers/gpu/drm/xe/xe_sriov_vf.c
>> create mode 100644 drivers/gpu/drm/xe/xe_sriov_vf.h
>>
>> diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile
>> index 8f1c5c329f79..1f07983bb865 100644
>> --- a/drivers/gpu/drm/xe/Makefile
>> +++ b/drivers/gpu/drm/xe/Makefile
>> @@ -123,6 +123,7 @@ xe-y += \
>> xe_gt_sriov_vf.o \
>> xe_guc_relay.o \
>> xe_memirq.o \
>> + xe_sriov_vf.o \
> wrong order
ack
>
>> xe_sriov.o
>>
>> xe-$(CONFIG_PCI_IOV) += \
>> diff --git a/drivers/gpu/drm/xe/xe_device_types.h b/drivers/gpu/drm/xe/xe_device_types.h
>> index 484fb34dde98..07ff7554fc3e 100644
>> --- a/drivers/gpu/drm/xe/xe_device_types.h
>> +++ b/drivers/gpu/drm/xe/xe_device_types.h
>> @@ -374,6 +374,8 @@ struct xe_device {
>>
>> /** @sriov.pf: PF specific data */
>> struct xe_device_pf pf;
>> + /** @sriov.vf: VF specific data */
>> + struct xe_device_vf vf;
>>
>> /** @sriov.wq: workqueue used by the virtualization workers */
>> struct workqueue_struct *wq;
>> diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_vf.c b/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
>> index d3baba50f085..489ace57c2a1 100644
>> --- a/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
>> +++ b/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
>> @@ -27,6 +27,7 @@
>> #include "xe_guc_relay.h"
>> #include "xe_mmio.h"
>> #include "xe_sriov.h"
>> +#include "xe_sriov_vf.h"
>> #include "xe_uc_fw.h"
>> #include "xe_wopcm.h"
>>
>> @@ -692,6 +693,16 @@ int xe_gt_sriov_vf_connect(struct xe_gt *gt)
>> return err;
>> }
>>
>> +void xe_gt_sriov_vf_migrated_event_handler(struct xe_gt *gt)
> this is public function, so you should add kernel-doc for it
ack
>
>> +{
>> + struct xe_device *xe = gt_to_xe(gt);
>> +
> since below you are accessing VF specific fields, you may want to add:
>
> xe_gt_assert(gt, IS_SRIOV_VF(xe));
ack
>
>> + set_bit(gt->info.id, &xe->sriov.vf.migration.gt_flags);
>> + smp_mb__after_atomic();
>> + xe_gt_sriov_info(gt, "VF migration recovery ready\n");
> the xe_gt_sriov_info() will already add "VF:" prefix for you:
>
> xe_gt_sriov_info(gt, "ready for recovery after migration\n");
>
> [ ] xe 0000:00:02.0: [drm] GT0: VF: ready for recovery after migration
ok
>
>> + xe_sriov_vf_start_migration_recovery(xe);
>> +}
>> +
>> static bool vf_is_negotiated(struct xe_gt *gt, u16 major, u16 minor)
>> {
>> xe_gt_assert(gt, IS_SRIOV_VF(gt_to_xe(gt)));
>> diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_vf.h b/drivers/gpu/drm/xe/xe_gt_sriov_vf.h
>> index e541ce57bec2..544e913b8465 100644
>> --- a/drivers/gpu/drm/xe/xe_gt_sriov_vf.h
>> +++ b/drivers/gpu/drm/xe/xe_gt_sriov_vf.h
>> @@ -18,6 +18,8 @@ int xe_gt_sriov_vf_connect(struct xe_gt *gt);
>> int xe_gt_sriov_vf_query_runtime(struct xe_gt *gt);
>> int xe_gt_sriov_vf_prepare_ggtt(struct xe_gt *gt);
>>
>> +void xe_gt_sriov_vf_migrated_event_handler(struct xe_gt *gt);
>> +
>> u32 xe_gt_sriov_vf_gmdid(struct xe_gt *gt);
>> u16 xe_gt_sriov_vf_guc_ids(struct xe_gt *gt);
>> u64 xe_gt_sriov_vf_lmem(struct xe_gt *gt);
>> diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
>> index b6cd5e941f19..05aa93070e5a 100644
>> --- a/drivers/gpu/drm/xe/xe_guc.c
>> +++ b/drivers/gpu/drm/xe/xe_guc.c
>> @@ -1092,10 +1092,21 @@ int xe_guc_self_cfg64(struct xe_guc *guc, u16 key, u64 val)
>> return guc_self_cfg(guc, key, 2, val);
>> }
>>
>> +static void xe_guc_sw_0_irq_handler(struct xe_guc *guc)
>> +{
>> + struct xe_gt *gt = guc_to_gt(guc);
>> +
>> + if (IS_SRIOV_VF(gt_to_xe(gt)))
>> + xe_gt_sriov_vf_migrated_event_handler(gt);
>> +}
>> +
>> void xe_guc_irq_handler(struct xe_guc *guc, const u16 iir)
>> {
>> if (iir & GUC_INTR_GUC2HOST)
>> xe_guc_ct_irq_handler(&guc->ct);
>> +
>> + if (iir & GUC_INTR_SW_INT_0)
>> + xe_guc_sw_0_irq_handler(guc);
>> }
>>
>> void xe_guc_sanitize(struct xe_guc *guc)
>> diff --git a/drivers/gpu/drm/xe/xe_memirq.c b/drivers/gpu/drm/xe/xe_memirq.c
>> index 3f8d4ca64302..2d2f40378942 100644
>> --- a/drivers/gpu/drm/xe/xe_memirq.c
>> +++ b/drivers/gpu/drm/xe/xe_memirq.c
>> @@ -435,6 +435,9 @@ static void memirq_dispatch_guc(struct xe_memirq *memirq, struct iosys_map *stat
>>
>> if (memirq_received(memirq, status, ilog2(GUC_INTR_GUC2HOST), name))
>> xe_guc_irq_handler(guc, GUC_INTR_GUC2HOST);
>> +
>> + if (memirq_received(memirq, status, ilog2(GUC_INTR_SW_INT_0), name))
>> + xe_guc_irq_handler(guc, GUC_INTR_SW_INT_0);
>> }
>>
>> /**
>> diff --git a/drivers/gpu/drm/xe/xe_sriov.c b/drivers/gpu/drm/xe/xe_sriov.c
>> index 69a066ef20c0..2f4c3ae24f6e 100644
>> --- a/drivers/gpu/drm/xe/xe_sriov.c
>> +++ b/drivers/gpu/drm/xe/xe_sriov.c
>> @@ -12,6 +12,7 @@
>> #include "xe_mmio.h"
>> #include "xe_sriov.h"
>> #include "xe_sriov_pf.h"
>> +#include "xe_sriov_vf.h"
>>
>> /**
>> * xe_sriov_mode_to_string - Convert enum value to string.
>> @@ -112,6 +113,9 @@ int xe_sriov_init(struct xe_device *xe)
>> return err;
>> }
>>
>> + if (IS_SRIOV_VF(xe))
>> + xe_sriov_vf_init_early(xe);
>> +
>> xe_assert(xe, !xe->sriov.wq);
>> xe->sriov.wq = alloc_workqueue("xe-sriov-wq", 0, 0);
>> if (!xe->sriov.wq)
>> diff --git a/drivers/gpu/drm/xe/xe_sriov_types.h b/drivers/gpu/drm/xe/xe_sriov_types.h
>> index c7b7ad4af5c8..8c518e68d33a 100644
>> --- a/drivers/gpu/drm/xe/xe_sriov_types.h
>> +++ b/drivers/gpu/drm/xe/xe_sriov_types.h
>> @@ -56,4 +56,14 @@ struct xe_device_pf {
>> struct mutex master_lock;
>> };
>>
>> +struct xe_device_vf {
> you need to add kernel-doc for the struct, otherwise below doc will be
> ignored (now) or wrongly interpreted (in near future)
will do
>
>> + /** @migration: VF Migration state data */
>> + struct {
>> + /** @migration.worker: VF migration recovery worker */
>> + struct work_struct worker;
>> + /** @migration.gt_flags: Per-GT request flags for VF migration recovery */
> hmm, if something is per-GT then maybe it should be defined under struct
> xe_gt in the xe_gt_sriov_vf_types.h as
>
> struct xe_gt_sriov_vf {
>
> /** @migration.ready: ready for VF migration recovery */
> bool ready;
So there seem to be two ways of doing this: keeping the flags together,
or distributing between GTs.
Keeping together restricts the amount of supported GTs, but that's a
lesser argument.
Separating consumes more space, but that's also a lesser argument.
There is no strong reason to go either way. I kept the flags together to
allow atomic clearing of all of them.
-Tomasz
>
>> + unsigned long gt_flags;
>> + } migration;
>> +};
>> +
>> #endif
>> diff --git a/drivers/gpu/drm/xe/xe_sriov_vf.c b/drivers/gpu/drm/xe/xe_sriov_vf.c
>> new file mode 100644
>> index 000000000000..0e332bb215fd
>> --- /dev/null
>> +++ b/drivers/gpu/drm/xe/xe_sriov_vf.c
>> @@ -0,0 +1,73 @@
>> +// SPDX-License-Identifier: MIT
>> +/*
>> + * Copyright © 2023-2024 Intel Corporation
>> + */
>> +
>> +#include <drm/drm_managed.h>
>> +
>> +#include "xe_assert.h"
>> +#include "xe_device.h"
>> +#include "xe_sriov.h"
>> +#include "xe_sriov_vf.h"
>> +#include "xe_sriov_printk.h"
>> +
>> +static void migration_worker_func(struct work_struct *w);
>> +
>> +/**
>> + * xe_sriov_vf_init_early - Initialize SR-IOV VF specific data.
>> + * @xe: the &xe_device to initialize
>> + */
>> +void xe_sriov_vf_init_early(struct xe_device *xe)
>> +{
>> + INIT_WORK(&xe->sriov.vf.migration.worker, migration_worker_func);
>> +}
>> +
>> +static void vf_post_migration_recovery(struct xe_device *xe)
>> +{
>> + drm_dbg(&xe->drm, "migration recovery in progress\n");
>> + /* FIXME: add the recovery steps */
>> + drm_notice(&xe->drm, "migration recovery ended\n");
>> +}
>> +
>> +static void migration_worker_func(struct work_struct *w)
>> +{
>> + struct xe_device *xe = container_of(w, struct xe_device,
>> + sriov.vf.migration.worker);
>> +
>> + vf_post_migration_recovery(xe);
>> +}
>> +
>> +static bool vf_ready_to_recovery_on_all_tiles(struct xe_device *xe)
> you likely want to mean "on all GTs", right?
ack
>
>> +{
>> + struct xe_gt *gt;
>> + unsigned int id;
>> +
>> + for_each_gt(gt, xe, id) {
>> + if (!test_bit(id, &xe->sriov.vf.migration.gt_flags))
> if (!gt->sriov.vf.migration.ready) ?
I'm not that sure about changing the flags into separated bools (see
earlier comment).
>
>> + return false;
> as you're testing each GT separately, then maybe it's worth to add
>
> xe_gt_sriov_dbg_verbose(gt, "still not ready to recover\n");
ack. Yeah, I originally had a message there.
>
>> + }
>> + return true;
>> +}
>> +
>> +/**
>> + * xe_sriov_vf_start_migration_recovery - Start VF migration recovery.
>> + * @xe: the &xe_device to start recovery on
>> + *
>> + * This function shall be called only by VF.
>> + */
>> +void xe_sriov_vf_start_migration_recovery(struct xe_device *xe)
>> +{
>> + bool started;
>> +
>> + xe_assert(xe, IS_SRIOV_VF(xe));
>> +
>> + if (!vf_ready_to_recovery_on_all_tiles(xe))
>> + return;
>> +
>> + WRITE_ONCE(xe->sriov.vf.migration.gt_flags, 0);
>> + smp_mb();
> IIRC each use of mb requires documentation of "why"
That's true, but I don't really know how to comment that other than
citing the mb docs, ie:
/* make sure all workers see the flags change */
-Tomasz
>
>> +
>> + started = queue_work(xe->sriov.wq, &xe->sriov.vf.migration.worker);
>> + drm_info(&xe->drm, "VF migration recovery %s\n", started ?
>> + "scheduled" : "already in progress");
>> +}
>> diff --git a/drivers/gpu/drm/xe/xe_sriov_vf.h b/drivers/gpu/drm/xe/xe_sriov_vf.h
>> new file mode 100644
>> index 000000000000..7b8622cff2b7
>> --- /dev/null
>> +++ b/drivers/gpu/drm/xe/xe_sriov_vf.h
>> @@ -0,0 +1,14 @@
>> +/* SPDX-License-Identifier: MIT */
>> +/*
>> + * Copyright © 2023-2024 Intel Corporation
>> + */
>> +
>> +#ifndef _XE_SRIOV_VF_H_
>> +#define _XE_SRIOV_VF_H_
>> +
>> +struct xe_device;
>> +
>> +void xe_sriov_vf_init_early(struct xe_device *xe);
>> +void xe_sriov_vf_start_migration_recovery(struct xe_device *xe);
>> +
>> +#endif
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 2/4] drm/xe/vf: Send RESFIX_DONE message at end of VF restore
2024-09-24 20:25 [PATCH v2 0/4] drm/xe/vf: Post-migration recovery worker basis Tomasz Lis
2024-09-24 20:25 ` [PATCH v2 1/4] drm/xe/vf: React to MIGRATED interrupt Tomasz Lis
@ 2024-09-24 20:25 ` Tomasz Lis
2024-09-24 20:25 ` [PATCH v2 3/4] drm/xe/vf: Start post-migration fixups with provisinoning query Tomasz Lis
` (5 subsequent siblings)
7 siblings, 0 replies; 15+ messages in thread
From: Tomasz Lis @ 2024-09-24 20:25 UTC (permalink / raw)
To: intel-xe; +Cc: Michał Winiarski, Michał Wajdeczko
After restore, GuC will not answer to any messages from VF KMD until
fixups are applied. When that is done, VF KMD sends RESFIX_DONE
message to GuC, at which point GuC resumes normal operation.
This patch implements sending the RESFIX_DONE message at end of
post-migration recovery.
v2: keep pm ref during whole recovery, style fixes (mwajdeczko)
Signed-off-by: Tomasz Lis <tomasz.lis@intel.com>
---
.../gpu/drm/xe/abi/guc_actions_sriov_abi.h | 38 +++++++++++++++++++
drivers/gpu/drm/xe/xe_gt_sriov_vf.c | 36 ++++++++++++++++++
drivers/gpu/drm/xe/xe_gt_sriov_vf.h | 1 +
drivers/gpu/drm/xe/xe_sriov_vf.c | 23 +++++++++++
4 files changed, 98 insertions(+)
diff --git a/drivers/gpu/drm/xe/abi/guc_actions_sriov_abi.h b/drivers/gpu/drm/xe/abi/guc_actions_sriov_abi.h
index b6a1852749dd..0b28659d94e9 100644
--- a/drivers/gpu/drm/xe/abi/guc_actions_sriov_abi.h
+++ b/drivers/gpu/drm/xe/abi/guc_actions_sriov_abi.h
@@ -501,6 +501,44 @@
#define VF2GUC_VF_RESET_RESPONSE_MSG_LEN GUC_HXG_RESPONSE_MSG_MIN_LEN
#define VF2GUC_VF_RESET_RESPONSE_MSG_0_MBZ GUC_HXG_RESPONSE_MSG_0_DATA0
+/**
+ * DOC: VF2GUC_NOTIFY_RESFIX_DONE
+ *
+ * This action is used by VF to notify the GuC that the VF KMD has completed
+ * post-migration recovery steps.
+ *
+ * This message must be sent as `MMIO HXG Message`_.
+ *
+ * +---+-------+--------------------------------------------------------------+
+ * | | Bits | Description |
+ * +===+=======+==============================================================+
+ * | 0 | 31 | ORIGIN = GUC_HXG_ORIGIN_HOST_ |
+ * | +-------+--------------------------------------------------------------+
+ * | | 30:28 | TYPE = GUC_HXG_TYPE_REQUEST_ |
+ * | +-------+--------------------------------------------------------------+
+ * | | 27:16 | DATA0 = MBZ |
+ * | +-------+--------------------------------------------------------------+
+ * | | 15:0 | ACTION = _`GUC_ACTION_VF2GUC_NOTIFY_RESFIX_DONE` = 0x5508 |
+ * +---+-------+--------------------------------------------------------------+
+ *
+ * +---+-------+--------------------------------------------------------------+
+ * | | Bits | Description |
+ * +===+=======+==============================================================+
+ * | 0 | 31 | ORIGIN = GUC_HXG_ORIGIN_GUC_ |
+ * | +-------+--------------------------------------------------------------+
+ * | | 30:28 | TYPE = GUC_HXG_TYPE_RESPONSE_SUCCESS_ |
+ * | +-------+--------------------------------------------------------------+
+ * | | 27:0 | DATA0 = MBZ |
+ * +---+-------+--------------------------------------------------------------+
+ */
+#define GUC_ACTION_VF2GUC_NOTIFY_RESFIX_DONE 0x5508u
+
+#define VF2GUC_NOTIFY_RESFIX_DONE_REQUEST_MSG_LEN GUC_HXG_REQUEST_MSG_MIN_LEN
+#define VF2GUC_NOTIFY_RESFIX_DONE_REQUEST_MSG_0_MBZ GUC_HXG_REQUEST_MSG_0_DATA0
+
+#define VF2GUC_NOTIFY_RESFIX_DONE_RESPONSE_MSG_LEN GUC_HXG_RESPONSE_MSG_MIN_LEN
+#define VF2GUC_NOTIFY_RESFIX_DONE_RESPONSE_MSG_0_MBZ GUC_HXG_RESPONSE_MSG_0_DATA0
+
/**
* DOC: VF2GUC_QUERY_SINGLE_KLV
*
diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_vf.c b/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
index 489ace57c2a1..6f7a1c92d541 100644
--- a/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
+++ b/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
@@ -224,6 +224,42 @@ int xe_gt_sriov_vf_bootstrap(struct xe_gt *gt)
return 0;
}
+static int guc_action_vf_notify_resfix_done(struct xe_guc *guc)
+{
+ u32 request[GUC_HXG_REQUEST_MSG_MIN_LEN] = {
+ FIELD_PREP(GUC_HXG_MSG_0_ORIGIN, GUC_HXG_ORIGIN_HOST) |
+ FIELD_PREP(GUC_HXG_MSG_0_TYPE, GUC_HXG_TYPE_REQUEST) |
+ FIELD_PREP(GUC_HXG_REQUEST_MSG_0_ACTION, GUC_ACTION_VF2GUC_NOTIFY_RESFIX_DONE),
+ };
+ int ret;
+
+ ret = xe_guc_mmio_send(guc, request, ARRAY_SIZE(request));
+
+ return ret > 0 ? -EPROTO : ret;
+}
+
+/**
+ * xe_gt_sriov_vf_notify_resfix_done - Notify GuC about resource fixups apply completed.
+ * @gt: the &xe_gt struct instance linked to target GuC
+ *
+ * Returns: 0 if the operation completed successfully, or a negative error
+ * code otherwise.
+ */
+int xe_gt_sriov_vf_notify_resfix_done(struct xe_gt *gt)
+{
+ struct xe_guc *guc = >->uc.guc;
+ int err;
+
+ xe_gt_assert(gt, IS_SRIOV_VF(gt_to_xe(gt)));
+
+ err = guc_action_vf_notify_resfix_done(guc);
+ if (unlikely(err))
+ xe_gt_sriov_err(gt, "Failed to notify GuC about resource fixup done (%pe)\n",
+ ERR_PTR(err));
+
+ return err;
+}
+
static int guc_action_query_single_klv(struct xe_guc *guc, u32 key,
u32 *value, u32 value_len)
{
diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_vf.h b/drivers/gpu/drm/xe/xe_gt_sriov_vf.h
index 544e913b8465..b62432271a6d 100644
--- a/drivers/gpu/drm/xe/xe_gt_sriov_vf.h
+++ b/drivers/gpu/drm/xe/xe_gt_sriov_vf.h
@@ -17,6 +17,7 @@ int xe_gt_sriov_vf_query_config(struct xe_gt *gt);
int xe_gt_sriov_vf_connect(struct xe_gt *gt);
int xe_gt_sriov_vf_query_runtime(struct xe_gt *gt);
int xe_gt_sriov_vf_prepare_ggtt(struct xe_gt *gt);
+int xe_gt_sriov_vf_notify_resfix_done(struct xe_gt *gt);
void xe_gt_sriov_vf_migrated_event_handler(struct xe_gt *gt);
diff --git a/drivers/gpu/drm/xe/xe_sriov_vf.c b/drivers/gpu/drm/xe/xe_sriov_vf.c
index 0e332bb215fd..d0c5a0b7e170 100644
--- a/drivers/gpu/drm/xe/xe_sriov_vf.c
+++ b/drivers/gpu/drm/xe/xe_sriov_vf.c
@@ -7,6 +7,8 @@
#include "xe_assert.h"
#include "xe_device.h"
+#include "xe_gt_sriov_vf.h"
+#include "xe_pm.h"
#include "xe_sriov.h"
#include "xe_sriov_vf.h"
#include "xe_sriov_printk.h"
@@ -22,10 +24,31 @@ void xe_sriov_vf_init_early(struct xe_device *xe)
INIT_WORK(&xe->sriov.vf.migration.worker, migration_worker_func);
}
+/*
+ * vf_post_migration_notify_resfix_done - Notify all GuCs about resource fixups apply finished.
+ * @xe: the &xe_device struct instance
+ */
+static void vf_post_migration_notify_resfix_done(struct xe_device *xe)
+{
+ struct xe_gt *gt;
+ unsigned int id;
+ int err, num_sent = 0;
+
+ for_each_gt(gt, xe, id) {
+ err = xe_gt_sriov_vf_notify_resfix_done(gt);
+ if (!err)
+ num_sent++;
+ }
+ drm_dbg(&xe->drm, "sent %d VF resource fixups done notifications\n", num_sent);
+}
+
static void vf_post_migration_recovery(struct xe_device *xe)
{
drm_dbg(&xe->drm, "migration recovery in progress\n");
+ xe_pm_runtime_get(xe);
/* FIXME: add the recovery steps */
+ vf_post_migration_notify_resfix_done(xe);
+ xe_pm_runtime_put(xe);
drm_notice(&xe->drm, "migration recovery ended\n");
}
--
2.25.1
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH v2 3/4] drm/xe/vf: Start post-migration fixups with provisinoning query
2024-09-24 20:25 [PATCH v2 0/4] drm/xe/vf: Post-migration recovery worker basis Tomasz Lis
2024-09-24 20:25 ` [PATCH v2 1/4] drm/xe/vf: React to MIGRATED interrupt Tomasz Lis
2024-09-24 20:25 ` [PATCH v2 2/4] drm/xe/vf: Send RESFIX_DONE message at end of VF restore Tomasz Lis
@ 2024-09-24 20:25 ` Tomasz Lis
2024-09-26 14:27 ` Michal Wajdeczko
2024-09-24 20:25 ` [PATCH v2 4/4] drm/xe/vf: Defer fixups if migrated twice fast Tomasz Lis
` (4 subsequent siblings)
7 siblings, 1 reply; 15+ messages in thread
From: Tomasz Lis @ 2024-09-24 20:25 UTC (permalink / raw)
To: intel-xe; +Cc: Michał Winiarski, Michał Wajdeczko
During post-migration recovery, only MMIO communication to GuC is
allowed. The VF KMD needs to use that channel to ask for the new
provisioning, which includes a new GGTT range assigned to the VF.
v2: query config only instead of handshake; no need to get pm ref as
it's now kept through whole recovery (mwajdeczko)
Signed-off-by: Tomasz Lis <tomasz.lis@intel.com>
---
drivers/gpu/drm/xe/xe_sriov_vf.c | 39 ++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_sriov_vf.c b/drivers/gpu/drm/xe/xe_sriov_vf.c
index d0c5a0b7e170..fe5eefa736c8 100644
--- a/drivers/gpu/drm/xe/xe_sriov_vf.c
+++ b/drivers/gpu/drm/xe/xe_sriov_vf.c
@@ -24,6 +24,34 @@ void xe_sriov_vf_init_early(struct xe_device *xe)
INIT_WORK(&xe->sriov.vf.migration.worker, migration_worker_func);
}
+/**
+ * vf_post_migration_requery_guc - Re-initialize GuC communication.
+ * @xe: the &xe_device struct instance
+ *
+ * After migration, we need to reestablish communication with GuC and
+ * re-query all VF configuration to make sure they match previous
+ * provisioning. Note that most of VF provisioning shall be the same,
+ * except GGTT range, since GGTT is not virtualized per-VF.
+ *
+ * Returns: 0 if the operation completed successfully, or a negative error
+ * code otherwise.
+ */
+static int vf_post_migration_requery_guc(struct xe_device *xe)
+{
+ struct xe_gt *gt;
+ unsigned int id;
+ int err, ret;
+
+ err = 0;
+ for_each_gt(gt, xe, id) {
+ ret = xe_gt_sriov_vf_query_config(gt);
+ if (!err)
+ err = ret;
+ }
+
+ return err;
+}
+
/*
* vf_post_migration_notify_resfix_done - Notify all GuCs about resource fixups apply finished.
* @xe: the &xe_device struct instance
@@ -44,12 +72,23 @@ static void vf_post_migration_notify_resfix_done(struct xe_device *xe)
static void vf_post_migration_recovery(struct xe_device *xe)
{
+ int err;
+
drm_dbg(&xe->drm, "migration recovery in progress\n");
xe_pm_runtime_get(xe);
+ err = vf_post_migration_requery_guc(xe);
+ if (unlikely(err))
+ goto fail;
+
/* FIXME: add the recovery steps */
vf_post_migration_notify_resfix_done(xe);
xe_pm_runtime_put(xe);
drm_notice(&xe->drm, "migration recovery ended\n");
+ return;
+fail:
+ xe_pm_runtime_put(xe);
+ drm_err(&xe->drm, "migration recovery failed (%pe)\n", ERR_PTR(err));
+ xe_device_declare_wedged(xe);
}
static void migration_worker_func(struct work_struct *w)
--
2.25.1
^ permalink raw reply related [flat|nested] 15+ messages in thread* Re: [PATCH v2 3/4] drm/xe/vf: Start post-migration fixups with provisinoning query
2024-09-24 20:25 ` [PATCH v2 3/4] drm/xe/vf: Start post-migration fixups with provisinoning query Tomasz Lis
@ 2024-09-26 14:27 ` Michal Wajdeczko
2024-09-26 21:32 ` Lis, Tomasz
0 siblings, 1 reply; 15+ messages in thread
From: Michal Wajdeczko @ 2024-09-26 14:27 UTC (permalink / raw)
To: Tomasz Lis, intel-xe; +Cc: Michał Winiarski
On 24.09.2024 22:25, Tomasz Lis wrote:
> During post-migration recovery, only MMIO communication to GuC is
> allowed. The VF KMD needs to use that channel to ask for the new
> provisioning, which includes a new GGTT range assigned to the VF.
you likely need first to remove below assert from the
xe_guc_mmio_send_recv()
xe_assert(xe, !xe_guc_ct_enabled(&guc->ct));
>
> v2: query config only instead of handshake; no need to get pm ref as
> it's now kept through whole recovery (mwajdeczko)
>
> Signed-off-by: Tomasz Lis <tomasz.lis@intel.com>
> ---
> drivers/gpu/drm/xe/xe_sriov_vf.c | 39 ++++++++++++++++++++++++++++++++
> 1 file changed, 39 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_sriov_vf.c b/drivers/gpu/drm/xe/xe_sriov_vf.c
> index d0c5a0b7e170..fe5eefa736c8 100644
> --- a/drivers/gpu/drm/xe/xe_sriov_vf.c
> +++ b/drivers/gpu/drm/xe/xe_sriov_vf.c
> @@ -24,6 +24,34 @@ void xe_sriov_vf_init_early(struct xe_device *xe)
> INIT_WORK(&xe->sriov.vf.migration.worker, migration_worker_func);
> }
>
> +/**
> + * vf_post_migration_requery_guc - Re-initialize GuC communication.
> + * @xe: the &xe_device struct instance
> + *
> + * After migration, we need to reestablish communication with GuC and
> + * re-query all VF configuration to make sure they match previous
> + * provisioning. Note that most of VF provisioning shall be the same,
> + * except GGTT range, since GGTT is not virtualized per-VF.
> + *
> + * Returns: 0 if the operation completed successfully, or a negative error
> + * code otherwise.
> + */
> +static int vf_post_migration_requery_guc(struct xe_device *xe)
> +{
> + struct xe_gt *gt;
> + unsigned int id;
> + int err, ret;
int err, ret = 0;
> +
> + err = 0;
> + for_each_gt(gt, xe, id) {
> + ret = xe_gt_sriov_vf_query_config(gt);
err = xe_gt_sriov_vf_query_config(gt);
> + if (!err)
> + err = ret;
ret = ret ?: err;
> + }
> +
> + return err;
return ret;
> +}
> +
> /*
> * vf_post_migration_notify_resfix_done - Notify all GuCs about resource fixups apply finished.
> * @xe: the &xe_device struct instance
> @@ -44,12 +72,23 @@ static void vf_post_migration_notify_resfix_done(struct xe_device *xe)
>
> static void vf_post_migration_recovery(struct xe_device *xe)
> {
> + int err;
> +
> drm_dbg(&xe->drm, "migration recovery in progress\n");
> xe_pm_runtime_get(xe);
> + err = vf_post_migration_requery_guc(xe);
> + if (unlikely(err))
> + goto fail;
shouldn't all this be below "add the recovery steps" line ?
> +
> /* FIXME: add the recovery steps */
> vf_post_migration_notify_resfix_done(xe);
> xe_pm_runtime_put(xe);
> drm_notice(&xe->drm, "migration recovery ended\n");
> + return;
> +fail:
> + xe_pm_runtime_put(xe);
> + drm_err(&xe->drm, "migration recovery failed (%pe)\n", ERR_PTR(err));
> + xe_device_declare_wedged(xe);
> }
>
> static void migration_worker_func(struct work_struct *w)
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [PATCH v2 3/4] drm/xe/vf: Start post-migration fixups with provisinoning query
2024-09-26 14:27 ` Michal Wajdeczko
@ 2024-09-26 21:32 ` Lis, Tomasz
0 siblings, 0 replies; 15+ messages in thread
From: Lis, Tomasz @ 2024-09-26 21:32 UTC (permalink / raw)
To: Michal Wajdeczko, intel-xe; +Cc: Michał Winiarski
On 26.09.2024 16:27, Michal Wajdeczko wrote:
>
> On 24.09.2024 22:25, Tomasz Lis wrote:
>> During post-migration recovery, only MMIO communication to GuC is
>> allowed. The VF KMD needs to use that channel to ask for the new
>> provisioning, which includes a new GGTT range assigned to the VF.
> you likely need first to remove below assert from the
> xe_guc_mmio_send_recv()
>
> xe_assert(xe, !xe_guc_ct_enabled(&guc->ct));
>
>> v2: query config only instead of handshake; no need to get pm ref as
>> it's now kept through whole recovery (mwajdeczko)
>>
>> Signed-off-by: Tomasz Lis <tomasz.lis@intel.com>
>> ---
>> drivers/gpu/drm/xe/xe_sriov_vf.c | 39 ++++++++++++++++++++++++++++++++
>> 1 file changed, 39 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_sriov_vf.c b/drivers/gpu/drm/xe/xe_sriov_vf.c
>> index d0c5a0b7e170..fe5eefa736c8 100644
>> --- a/drivers/gpu/drm/xe/xe_sriov_vf.c
>> +++ b/drivers/gpu/drm/xe/xe_sriov_vf.c
>> @@ -24,6 +24,34 @@ void xe_sriov_vf_init_early(struct xe_device *xe)
>> INIT_WORK(&xe->sriov.vf.migration.worker, migration_worker_func);
>> }
>>
>> +/**
>> + * vf_post_migration_requery_guc - Re-initialize GuC communication.
>> + * @xe: the &xe_device struct instance
>> + *
>> + * After migration, we need to reestablish communication with GuC and
>> + * re-query all VF configuration to make sure they match previous
>> + * provisioning. Note that most of VF provisioning shall be the same,
>> + * except GGTT range, since GGTT is not virtualized per-VF.
>> + *
>> + * Returns: 0 if the operation completed successfully, or a negative error
>> + * code otherwise.
>> + */
>> +static int vf_post_migration_requery_guc(struct xe_device *xe)
>> +{
>> + struct xe_gt *gt;
>> + unsigned int id;
>> + int err, ret;
> int err, ret = 0;
>
>> +
>> + err = 0;
>> + for_each_gt(gt, xe, id) {
>> + ret = xe_gt_sriov_vf_query_config(gt);
> err = xe_gt_sriov_vf_query_config(gt);
>
>> + if (!err)
>> + err = ret;
> ret = ret ?: err;
>
>> + }
>> +
>> + return err;
> return ret;
ok, will do. But that doesn't seem any better than it was before.
Well, maybe except the ternary operator, that does look better (though
it's not a part of c89).
>
>> +}
>> +
>> /*
>> * vf_post_migration_notify_resfix_done - Notify all GuCs about resource fixups apply finished.
>> * @xe: the &xe_device struct instance
>> @@ -44,12 +72,23 @@ static void vf_post_migration_notify_resfix_done(struct xe_device *xe)
>>
>> static void vf_post_migration_recovery(struct xe_device *xe)
>> {
>> + int err;
>> +
>> drm_dbg(&xe->drm, "migration recovery in progress\n");
>> xe_pm_runtime_get(xe);
>> + err = vf_post_migration_requery_guc(xe);
>> + if (unlikely(err))
>> + goto fail;
> shouldn't all this be below "add the recovery steps" line ?
If requery failed, why would we continue with fixups? We don't know the
new GGTT range in that case.
-Tomasz
>
>> +
>> /* FIXME: add the recovery steps */
>> vf_post_migration_notify_resfix_done(xe);
>> xe_pm_runtime_put(xe);
>> drm_notice(&xe->drm, "migration recovery ended\n");
>> + return;
>> +fail:
>> + xe_pm_runtime_put(xe);
>> + drm_err(&xe->drm, "migration recovery failed (%pe)\n", ERR_PTR(err));
>> + xe_device_declare_wedged(xe);
>> }
>>
>> static void migration_worker_func(struct work_struct *w)
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 4/4] drm/xe/vf: Defer fixups if migrated twice fast
2024-09-24 20:25 [PATCH v2 0/4] drm/xe/vf: Post-migration recovery worker basis Tomasz Lis
` (2 preceding siblings ...)
2024-09-24 20:25 ` [PATCH v2 3/4] drm/xe/vf: Start post-migration fixups with provisinoning query Tomasz Lis
@ 2024-09-24 20:25 ` Tomasz Lis
2024-09-26 14:35 ` Michal Wajdeczko
2024-09-26 5:16 ` ✓ CI.Patch_applied: success for drm/xe/vf: Post-migration recovery worker basis (rev2) Patchwork
` (3 subsequent siblings)
7 siblings, 1 reply; 15+ messages in thread
From: Tomasz Lis @ 2024-09-24 20:25 UTC (permalink / raw)
To: intel-xe; +Cc: Michał Winiarski, Michał Wajdeczko
If another VF migration happened during post-migration recovery,
then the current worker should be finished to allow the next
one start swiftly and cleanly.
Check for defer in two places: before fixups, and before
sending RESFIX_DONE.
Signed-off-by: Tomasz Lis <tomasz.lis@intel.com>
---
drivers/gpu/drm/xe/xe_sriov_vf.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_sriov_vf.c b/drivers/gpu/drm/xe/xe_sriov_vf.c
index fe5eefa736c8..f326e507d73e 100644
--- a/drivers/gpu/drm/xe/xe_sriov_vf.c
+++ b/drivers/gpu/drm/xe/xe_sriov_vf.c
@@ -52,6 +52,19 @@ static int vf_post_migration_requery_guc(struct xe_device *xe)
return err;
}
+/*
+ * vf_post_migration_imminent - Check if post-restore recovery is coming.
+ * @xe: the &xe_device struct instance
+ *
+ * Return: True if migration recovery worker will soon be running. Any worker currently
+ * executing does not affect the result.
+ */
+static bool vf_post_migration_imminent(struct xe_device *xe)
+{
+ return xe->sriov.vf.migration.gt_flags != 0 ||
+ work_pending(&xe->sriov.vf.migration.worker);
+}
+
/*
* vf_post_migration_notify_resfix_done - Notify all GuCs about resource fixups apply finished.
* @xe: the &xe_device struct instance
@@ -63,11 +76,17 @@ static void vf_post_migration_notify_resfix_done(struct xe_device *xe)
int err, num_sent = 0;
for_each_gt(gt, xe, id) {
+ if (vf_post_migration_imminent(xe))
+ goto skip;
err = xe_gt_sriov_vf_notify_resfix_done(gt);
if (!err)
num_sent++;
}
drm_dbg(&xe->drm, "sent %d VF resource fixups done notifications\n", num_sent);
+ return;
+
+skip:
+ drm_dbg(&xe->drm, "another recovery imminent, skipping notifications\n");
}
static void vf_post_migration_recovery(struct xe_device *xe)
@@ -77,6 +96,8 @@ static void vf_post_migration_recovery(struct xe_device *xe)
drm_dbg(&xe->drm, "migration recovery in progress\n");
xe_pm_runtime_get(xe);
err = vf_post_migration_requery_guc(xe);
+ if (vf_post_migration_imminent(xe))
+ goto defer;
if (unlikely(err))
goto fail;
@@ -85,6 +106,10 @@ static void vf_post_migration_recovery(struct xe_device *xe)
xe_pm_runtime_put(xe);
drm_notice(&xe->drm, "migration recovery ended\n");
return;
+defer:
+ xe_pm_runtime_put(xe);
+ drm_dbg(&xe->drm, "migration recovery deferred\n");
+ return;
fail:
xe_pm_runtime_put(xe);
drm_err(&xe->drm, "migration recovery failed (%pe)\n", ERR_PTR(err));
--
2.25.1
^ permalink raw reply related [flat|nested] 15+ messages in thread* Re: [PATCH v2 4/4] drm/xe/vf: Defer fixups if migrated twice fast
2024-09-24 20:25 ` [PATCH v2 4/4] drm/xe/vf: Defer fixups if migrated twice fast Tomasz Lis
@ 2024-09-26 14:35 ` Michal Wajdeczko
2024-09-26 21:48 ` Lis, Tomasz
0 siblings, 1 reply; 15+ messages in thread
From: Michal Wajdeczko @ 2024-09-26 14:35 UTC (permalink / raw)
To: Tomasz Lis, intel-xe; +Cc: Michał Winiarski
On 24.09.2024 22:25, Tomasz Lis wrote:
> If another VF migration happened during post-migration recovery,
> then the current worker should be finished to allow the next
> one start swiftly and cleanly.
>
> Check for defer in two places: before fixups, and before
> sending RESFIX_DONE.
>
> Signed-off-by: Tomasz Lis <tomasz.lis@intel.com>
> ---
> drivers/gpu/drm/xe/xe_sriov_vf.c | 25 +++++++++++++++++++++++++
> 1 file changed, 25 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_sriov_vf.c b/drivers/gpu/drm/xe/xe_sriov_vf.c
> index fe5eefa736c8..f326e507d73e 100644
> --- a/drivers/gpu/drm/xe/xe_sriov_vf.c
> +++ b/drivers/gpu/drm/xe/xe_sriov_vf.c
> @@ -52,6 +52,19 @@ static int vf_post_migration_requery_guc(struct xe_device *xe)
> return err;
> }
>
> +/*
> + * vf_post_migration_imminent - Check if post-restore recovery is coming.
> + * @xe: the &xe_device struct instance
> + *
> + * Return: True if migration recovery worker will soon be running. Any worker currently
> + * executing does not affect the result.
> + */
> +static bool vf_post_migration_imminent(struct xe_device *xe)
> +{
> + return xe->sriov.vf.migration.gt_flags != 0 ||
> + work_pending(&xe->sriov.vf.migration.worker);
make sure scripts/checkpatch.pl --strict is not complaining
> +}
> +
> /*
> * vf_post_migration_notify_resfix_done - Notify all GuCs about resource fixups apply finished.
> * @xe: the &xe_device struct instance
> @@ -63,11 +76,17 @@ static void vf_post_migration_notify_resfix_done(struct xe_device *xe)
> int err, num_sent = 0;
>
> for_each_gt(gt, xe, id) {
> + if (vf_post_migration_imminent(xe))
> + goto skip;
hmm, what if new migration happen right here? this is still racy and
likely needs to be solved at GUC-VF protocol level, not by adding more
check points in the driver
> err = xe_gt_sriov_vf_notify_resfix_done(gt);
> if (!err)
> num_sent++;
> }
> drm_dbg(&xe->drm, "sent %d VF resource fixups done notifications\n", num_sent);
> + return;
> +
> +skip:
> + drm_dbg(&xe->drm, "another recovery imminent, skipping notifications\n");
> }
>
> static void vf_post_migration_recovery(struct xe_device *xe)
> @@ -77,6 +96,8 @@ static void vf_post_migration_recovery(struct xe_device *xe)
> drm_dbg(&xe->drm, "migration recovery in progress\n");
> xe_pm_runtime_get(xe);
> err = vf_post_migration_requery_guc(xe);
> + if (vf_post_migration_imminent(xe))
> + goto defer;
> if (unlikely(err))
> goto fail;
>
> @@ -85,6 +106,10 @@ static void vf_post_migration_recovery(struct xe_device *xe)
> xe_pm_runtime_put(xe);
> drm_notice(&xe->drm, "migration recovery ended\n");
> return;
> +defer:
> + xe_pm_runtime_put(xe);
> + drm_dbg(&xe->drm, "migration recovery deferred\n");
> + return;
> fail:
> xe_pm_runtime_put(xe);
> drm_err(&xe->drm, "migration recovery failed (%pe)\n", ERR_PTR(err));
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [PATCH v2 4/4] drm/xe/vf: Defer fixups if migrated twice fast
2024-09-26 14:35 ` Michal Wajdeczko
@ 2024-09-26 21:48 ` Lis, Tomasz
0 siblings, 0 replies; 15+ messages in thread
From: Lis, Tomasz @ 2024-09-26 21:48 UTC (permalink / raw)
To: Michal Wajdeczko, intel-xe; +Cc: Michał Winiarski
On 26.09.2024 16:35, Michal Wajdeczko wrote:
>
> On 24.09.2024 22:25, Tomasz Lis wrote:
>> If another VF migration happened during post-migration recovery,
>> then the current worker should be finished to allow the next
>> one start swiftly and cleanly.
>>
>> Check for defer in two places: before fixups, and before
>> sending RESFIX_DONE.
>>
>> Signed-off-by: Tomasz Lis <tomasz.lis@intel.com>
>> ---
>> drivers/gpu/drm/xe/xe_sriov_vf.c | 25 +++++++++++++++++++++++++
>> 1 file changed, 25 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_sriov_vf.c b/drivers/gpu/drm/xe/xe_sriov_vf.c
>> index fe5eefa736c8..f326e507d73e 100644
>> --- a/drivers/gpu/drm/xe/xe_sriov_vf.c
>> +++ b/drivers/gpu/drm/xe/xe_sriov_vf.c
>> @@ -52,6 +52,19 @@ static int vf_post_migration_requery_guc(struct xe_device *xe)
>> return err;
>> }
>>
>> +/*
>> + * vf_post_migration_imminent - Check if post-restore recovery is coming.
>> + * @xe: the &xe_device struct instance
>> + *
>> + * Return: True if migration recovery worker will soon be running. Any worker currently
>> + * executing does not affect the result.
>> + */
>> +static bool vf_post_migration_imminent(struct xe_device *xe)
>> +{
>> + return xe->sriov.vf.migration.gt_flags != 0 ||
>> + work_pending(&xe->sriov.vf.migration.worker);
> make sure scripts/checkpatch.pl --strict is not complaining
ok
>
>> +}
>> +
>> /*
>> * vf_post_migration_notify_resfix_done - Notify all GuCs about resource fixups apply finished.
>> * @xe: the &xe_device struct instance
>> @@ -63,11 +76,17 @@ static void vf_post_migration_notify_resfix_done(struct xe_device *xe)
>> int err, num_sent = 0;
>>
>> for_each_gt(gt, xe, id) {
>> + if (vf_post_migration_imminent(xe))
>> + goto skip;
> hmm, what if new migration happen right here? this is still racy and
> likely needs to be solved at GUC-VF protocol level, not by adding more
> check points in the driver
This is how the current spec works.
"At the end of patching, check if a new MIGRATED interrupt has been
received"
We cannot guarantee no issues if the 2nd migration happens in this short
period. It would be a really bad luck if someone actually ran into the
issue where one of GuCs slips through the checks here, and that would
cause engine hang. Even then, everything would continue after skipping
the one job.
For the check points, there are exactly 2: before fixups and before
RESFIX_DONE. we're not adding more.
-Tomasz
>
>> err = xe_gt_sriov_vf_notify_resfix_done(gt);
>> if (!err)
>> num_sent++;
>> }
>> drm_dbg(&xe->drm, "sent %d VF resource fixups done notifications\n", num_sent);
>> + return;
>> +
>> +skip:
>> + drm_dbg(&xe->drm, "another recovery imminent, skipping notifications\n");
>> }
>>
>> static void vf_post_migration_recovery(struct xe_device *xe)
>> @@ -77,6 +96,8 @@ static void vf_post_migration_recovery(struct xe_device *xe)
>> drm_dbg(&xe->drm, "migration recovery in progress\n");
>> xe_pm_runtime_get(xe);
>> err = vf_post_migration_requery_guc(xe);
>> + if (vf_post_migration_imminent(xe))
>> + goto defer;
>> if (unlikely(err))
>> goto fail;
>>
>> @@ -85,6 +106,10 @@ static void vf_post_migration_recovery(struct xe_device *xe)
>> xe_pm_runtime_put(xe);
>> drm_notice(&xe->drm, "migration recovery ended\n");
>> return;
>> +defer:
>> + xe_pm_runtime_put(xe);
>> + drm_dbg(&xe->drm, "migration recovery deferred\n");
>> + return;
>> fail:
>> xe_pm_runtime_put(xe);
>> drm_err(&xe->drm, "migration recovery failed (%pe)\n", ERR_PTR(err));
^ permalink raw reply [flat|nested] 15+ messages in thread
* ✓ CI.Patch_applied: success for drm/xe/vf: Post-migration recovery worker basis (rev2)
2024-09-24 20:25 [PATCH v2 0/4] drm/xe/vf: Post-migration recovery worker basis Tomasz Lis
` (3 preceding siblings ...)
2024-09-24 20:25 ` [PATCH v2 4/4] drm/xe/vf: Defer fixups if migrated twice fast Tomasz Lis
@ 2024-09-26 5:16 ` Patchwork
2024-09-26 5:16 ` ✗ CI.checkpatch: warning " Patchwork
` (2 subsequent siblings)
7 siblings, 0 replies; 15+ messages in thread
From: Patchwork @ 2024-09-26 5:16 UTC (permalink / raw)
To: Tomasz Lis; +Cc: intel-xe
== Series Details ==
Series: drm/xe/vf: Post-migration recovery worker basis (rev2)
URL : https://patchwork.freedesktop.org/series/138935/
State : success
== Summary ==
=== Applying kernel patches on branch 'drm-tip' with base: ===
Base commit: 88d592f72f7b drm-tip: 2024y-09m-25d-19h-23m-21s UTC integration manifest
=== git am output follows ===
Applying: drm/xe/vf: React to MIGRATED interrupt
Applying: drm/xe/vf: Send RESFIX_DONE message at end of VF restore
Applying: drm/xe/vf: Start post-migration fixups with provisinoning query
Applying: drm/xe/vf: Defer fixups if migrated twice fast
^ permalink raw reply [flat|nested] 15+ messages in thread* ✗ CI.checkpatch: warning for drm/xe/vf: Post-migration recovery worker basis (rev2)
2024-09-24 20:25 [PATCH v2 0/4] drm/xe/vf: Post-migration recovery worker basis Tomasz Lis
` (4 preceding siblings ...)
2024-09-26 5:16 ` ✓ CI.Patch_applied: success for drm/xe/vf: Post-migration recovery worker basis (rev2) Patchwork
@ 2024-09-26 5:16 ` Patchwork
2024-09-26 5:18 ` ✓ CI.KUnit: success " Patchwork
2024-09-26 5:23 ` ✗ CI.Build: failure " Patchwork
7 siblings, 0 replies; 15+ messages in thread
From: Patchwork @ 2024-09-26 5:16 UTC (permalink / raw)
To: Tomasz Lis; +Cc: intel-xe
== Series Details ==
Series: drm/xe/vf: Post-migration recovery worker basis (rev2)
URL : https://patchwork.freedesktop.org/series/138935/
State : warning
== Summary ==
+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt
Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master
30ab6715fc09baee6cc14cb3c89ad8858688d474
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit 65b292b9fa19f83762b8fd0fd5e9350071768cad
Author: Tomasz Lis <tomasz.lis@intel.com>
Date: Tue Sep 24 22:25:53 2024 +0200
drm/xe/vf: Defer fixups if migrated twice fast
If another VF migration happened during post-migration recovery,
then the current worker should be finished to allow the next
one start swiftly and cleanly.
Check for defer in two places: before fixups, and before
sending RESFIX_DONE.
Signed-off-by: Tomasz Lis <tomasz.lis@intel.com>
+ /mt/dim checkpatch 88d592f72f7bc508d6a027b1f96aa2e53f803e1b drm-intel
947e4ff1cda6 drm/xe/vf: React to MIGRATED interrupt
-:70: WARNING:MEMORY_BARRIER: memory barrier without comment
#70: FILE: drivers/gpu/drm/xe/xe_gt_sriov_vf.c:701:
+ smp_mb__after_atomic();
-:173: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#173:
new file mode 100644
-:245: WARNING:MEMORY_BARRIER: memory barrier without comment
#245: FILE: drivers/gpu/drm/xe/xe_sriov_vf.c:68:
+ smp_mb();
total: 0 errors, 3 warnings, 0 checks, 193 lines checked
0e1f10841245 drm/xe/vf: Send RESFIX_DONE message at end of VF restore
1b2d305266f5 drm/xe/vf: Start post-migration fixups with provisinoning query
65b292b9fa19 drm/xe/vf: Defer fixups if migrated twice fast
^ permalink raw reply [flat|nested] 15+ messages in thread* ✓ CI.KUnit: success for drm/xe/vf: Post-migration recovery worker basis (rev2)
2024-09-24 20:25 [PATCH v2 0/4] drm/xe/vf: Post-migration recovery worker basis Tomasz Lis
` (5 preceding siblings ...)
2024-09-26 5:16 ` ✗ CI.checkpatch: warning " Patchwork
@ 2024-09-26 5:18 ` Patchwork
2024-09-26 5:23 ` ✗ CI.Build: failure " Patchwork
7 siblings, 0 replies; 15+ messages in thread
From: Patchwork @ 2024-09-26 5:18 UTC (permalink / raw)
To: Tomasz Lis; +Cc: intel-xe
== Series Details ==
Series: drm/xe/vf: Post-migration recovery worker basis (rev2)
URL : https://patchwork.freedesktop.org/series/138935/
State : success
== Summary ==
+ trap cleanup EXIT
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/xe/.kunitconfig
[05:16:57] Configuring KUnit Kernel ...
Generating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[05:17:01] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make ARCH=um O=.kunit --jobs=48
../lib/iomap.c:156:5: warning: no previous prototype for ‘ioread64_lo_hi’ [-Wmissing-prototypes]
156 | u64 ioread64_lo_hi(const void __iomem *addr)
| ^~~~~~~~~~~~~~
../lib/iomap.c:163:5: warning: no previous prototype for ‘ioread64_hi_lo’ [-Wmissing-prototypes]
163 | u64 ioread64_hi_lo(const void __iomem *addr)
| ^~~~~~~~~~~~~~
../lib/iomap.c:170:5: warning: no previous prototype for ‘ioread64be_lo_hi’ [-Wmissing-prototypes]
170 | u64 ioread64be_lo_hi(const void __iomem *addr)
| ^~~~~~~~~~~~~~~~
../lib/iomap.c:178:5: warning: no previous prototype for ‘ioread64be_hi_lo’ [-Wmissing-prototypes]
178 | u64 ioread64be_hi_lo(const void __iomem *addr)
| ^~~~~~~~~~~~~~~~
../lib/iomap.c:264:6: warning: no previous prototype for ‘iowrite64_lo_hi’ [-Wmissing-prototypes]
264 | void iowrite64_lo_hi(u64 val, void __iomem *addr)
| ^~~~~~~~~~~~~~~
../lib/iomap.c:272:6: warning: no previous prototype for ‘iowrite64_hi_lo’ [-Wmissing-prototypes]
272 | void iowrite64_hi_lo(u64 val, void __iomem *addr)
| ^~~~~~~~~~~~~~~
../lib/iomap.c:280:6: warning: no previous prototype for ‘iowrite64be_lo_hi’ [-Wmissing-prototypes]
280 | void iowrite64be_lo_hi(u64 val, void __iomem *addr)
| ^~~~~~~~~~~~~~~~~
../lib/iomap.c:288:6: warning: no previous prototype for ‘iowrite64be_hi_lo’ [-Wmissing-prototypes]
288 | void iowrite64be_hi_lo(u64 val, void __iomem *addr)
| ^~~~~~~~~~~~~~~~~
[05:17:28] Starting KUnit Kernel (1/1)...
[05:17:28] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[05:17:29] =================== guc_dbm (7 subtests) ===================
[05:17:29] [PASSED] test_empty
[05:17:29] [PASSED] test_default
[05:17:29] ======================== test_size ========================
[05:17:29] [PASSED] 4
[05:17:29] [PASSED] 8
[05:17:29] [PASSED] 32
[05:17:29] [PASSED] 256
[05:17:29] ==================== [PASSED] test_size ====================
[05:17:29] ======================= test_reuse ========================
[05:17:29] [PASSED] 4
[05:17:29] [PASSED] 8
[05:17:29] [PASSED] 32
[05:17:29] [PASSED] 256
[05:17:29] =================== [PASSED] test_reuse ====================
[05:17:29] =================== test_range_overlap ====================
[05:17:29] [PASSED] 4
[05:17:29] [PASSED] 8
[05:17:29] [PASSED] 32
[05:17:29] [PASSED] 256
[05:17:29] =============== [PASSED] test_range_overlap ================
[05:17:29] =================== test_range_compact ====================
[05:17:29] [PASSED] 4
[05:17:29] [PASSED] 8
[05:17:29] [PASSED] 32
[05:17:29] [PASSED] 256
[05:17:29] =============== [PASSED] test_range_compact ================
[05:17:29] ==================== test_range_spare =====================
[05:17:29] [PASSED] 4
[05:17:29] [PASSED] 8
[05:17:29] [PASSED] 32
[05:17:29] [PASSED] 256
[05:17:29] ================ [PASSED] test_range_spare =================
[05:17:29] ===================== [PASSED] guc_dbm =====================
[05:17:29] =================== guc_idm (6 subtests) ===================
[05:17:29] [PASSED] bad_init
[05:17:29] [PASSED] no_init
[05:17:29] [PASSED] init_fini
[05:17:29] [PASSED] check_used
[05:17:29] [PASSED] check_quota
[05:17:29] [PASSED] check_all
[05:17:29] ===================== [PASSED] guc_idm =====================
[05:17:29] ================== no_relay (3 subtests) ===================
[05:17:29] [PASSED] xe_drops_guc2pf_if_not_ready
[05:17:29] [PASSED] xe_drops_guc2vf_if_not_ready
[05:17:29] [PASSED] xe_rejects_send_if_not_ready
[05:17:29] ==================== [PASSED] no_relay =====================
[05:17:29] ================== pf_relay (14 subtests) ==================
[05:17:29] [PASSED] pf_rejects_guc2pf_too_short
[05:17:29] [PASSED] pf_rejects_guc2pf_too_long
[05:17:29] [PASSED] pf_rejects_guc2pf_no_payload
[05:17:29] [PASSED] pf_fails_no_payload
[05:17:29] [PASSED] pf_fails_bad_origin
[05:17:29] [PASSED] pf_fails_bad_type
[05:17:29] [PASSED] pf_txn_reports_error
[05:17:29] [PASSED] pf_txn_sends_pf2guc
[05:17:29] [PASSED] pf_sends_pf2guc
[05:17:29] [SKIPPED] pf_loopback_nop
[05:17:29] [SKIPPED] pf_loopback_echo
[05:17:29] [SKIPPED] pf_loopback_fail
[05:17:29] [SKIPPED] pf_loopback_busy
[05:17:29] [SKIPPED] pf_loopback_retry
[05:17:29] ==================== [PASSED] pf_relay =====================
[05:17:29] ================== vf_relay (3 subtests) ===================
[05:17:29] [PASSED] vf_rejects_guc2vf_too_short
[05:17:29] [PASSED] vf_rejects_guc2vf_too_long
[05:17:29] [PASSED] vf_rejects_guc2vf_no_payload
[05:17:29] ==================== [PASSED] vf_relay =====================
[05:17:29] ================= pf_service (11 subtests) =================
[05:17:29] [PASSED] pf_negotiate_any
[05:17:29] [PASSED] pf_negotiate_base_match
[05:17:29] [PASSED] pf_negotiate_base_newer
[05:17:29] [PASSED] pf_negotiate_base_next
[05:17:29] [SKIPPED] pf_negotiate_base_older
[05:17:29] [PASSED] pf_negotiate_base_prev
[05:17:29] [PASSED] pf_negotiate_latest_match
[05:17:29] [PASSED] pf_negotiate_latest_newer
[05:17:29] [PASSED] pf_negotiate_latest_next
[05:17:29] [SKIPPED] pf_negotiate_latest_older
[05:17:29] [SKIPPED] pf_negotiate_latest_prev
[05:17:29] =================== [PASSED] pf_service ====================
[05:17:29] ===================== lmtt (1 subtest) =====================
[05:17:29] ======================== test_ops =========================
[05:17:29] [PASSED] 2-level
[05:17:29] [PASSED] multi-level
[05:17:29] ==================== [PASSED] test_ops =====================
[05:17:29] ====================== [PASSED] lmtt =======================
[05:17:29] =================== xe_mocs (2 subtests) ===================
[05:17:29] ================ xe_live_mocs_kernel_kunit ================
[05:17:29] =========== [SKIPPED] xe_live_mocs_kernel_kunit ============
[05:17:29] ================ xe_live_mocs_reset_kunit =================
[05:17:29] ============ [SKIPPED] xe_live_mocs_reset_kunit ============
[05:17:29] ==================== [SKIPPED] xe_mocs =====================
[05:17:29] ================= xe_migrate (2 subtests) ==================
[05:17:29] ================= xe_migrate_sanity_kunit =================
[05:17:29] ============ [SKIPPED] xe_migrate_sanity_kunit =============
[05:17:29] ================== xe_validate_ccs_kunit ==================
[05:17:29] ============= [SKIPPED] xe_validate_ccs_kunit ==============
[05:17:29] =================== [SKIPPED] xe_migrate ===================
[05:17:29] ================== xe_dma_buf (1 subtest) ==================
[05:17:29] ==================== xe_dma_buf_kunit =====================
[05:17:29] ================ [SKIPPED] xe_dma_buf_kunit ================
[05:17:29] =================== [SKIPPED] xe_dma_buf ===================
[05:17:29] ==================== xe_bo (3 subtests) ====================
[05:17:29] ================== xe_ccs_migrate_kunit ===================
[05:17:29] ============== [SKIPPED] xe_ccs_migrate_kunit ==============
[05:17:29] ==================== xe_bo_evict_kunit ====================
[05:17:29] =============== [SKIPPED] xe_bo_evict_kunit ================
[05:17:29] =================== xe_bo_shrink_kunit ====================
[05:17:29] =============== [SKIPPED] xe_bo_shrink_kunit ===============
[05:17:29] ===================== [SKIPPED] xe_bo ======================
[05:17:29] ==================== args (11 subtests) ====================
[05:17:29] [PASSED] count_args_test
[05:17:29] [PASSED] call_args_example
[05:17:29] [PASSED] call_args_test
[05:17:29] [PASSED] drop_first_arg_example
[05:17:29] [PASSED] drop_first_arg_test
[05:17:29] [PASSED] first_arg_example
[05:17:29] [PASSED] first_arg_test
[05:17:29] [PASSED] last_arg_example
[05:17:29] [PASSED] last_arg_test
[05:17:29] [PASSED] pick_arg_example
[05:17:29] [PASSED] sep_comma_example
stty: 'standard input': Inappropriate ioctl for device
[05:17:29] ====================== [PASSED] args =======================
[05:17:29] =================== xe_pci (2 subtests) ====================
[05:17:29] [PASSED] xe_gmdid_graphics_ip
[05:17:29] [PASSED] xe_gmdid_media_ip
[05:17:29] ===================== [PASSED] xe_pci ======================
[05:17:29] =================== xe_rtp (2 subtests) ====================
[05:17:29] =============== xe_rtp_process_to_sr_tests ================
[05:17:29] [PASSED] coalesce-same-reg
[05:17:29] [PASSED] no-match-no-add
[05:17:29] [PASSED] match-or
[05:17:29] [PASSED] match-or-xfail
[05:17:29] [PASSED] no-match-no-add-multiple-rules
[05:17:29] [PASSED] two-regs-two-entries
[05:17:29] [PASSED] clr-one-set-other
[05:17:29] [PASSED] set-field
[05:17:29] [PASSED] conflict-duplicate
[05:17:29] [PASSED] conflict-not-disjoint
[05:17:29] [PASSED] conflict-reg-type
[05:17:29] =========== [PASSED] xe_rtp_process_to_sr_tests ============
[05:17:29] ================== xe_rtp_process_tests ===================
[05:17:29] [PASSED] active1
[05:17:29] [PASSED] active2
[05:17:29] [PASSED] active-inactive
[05:17:29] [PASSED] inactive-active
[05:17:29] [PASSED] inactive-1st_or_active-inactive
[05:17:29] [PASSED] inactive-2nd_or_active-inactive
[05:17:29] [PASSED] inactive-last_or_active-inactive
[05:17:29] [PASSED] inactive-no_or_active-inactive
[05:17:29] ============== [PASSED] xe_rtp_process_tests ===============
[05:17:29] ===================== [PASSED] xe_rtp ======================
[05:17:29] ==================== xe_wa (1 subtest) =====================
[05:17:29] ======================== xe_wa_gt =========================
[05:17:29] [PASSED] TIGERLAKE (B0)
[05:17:29] [PASSED] DG1 (A0)
[05:17:29] [PASSED] DG1 (B0)
[05:17:29] [PASSED] ALDERLAKE_S (A0)
[05:17:29] [PASSED] ALDERLAKE_S (B0)
[05:17:29] [PASSED] ALDERLAKE_S (C0)
[05:17:29] [PASSED] ALDERLAKE_S (D0)
[05:17:29] [PASSED] ALDERLAKE_P (A0)
[05:17:29] [PASSED] ALDERLAKE_P (B0)
[05:17:29] [PASSED] ALDERLAKE_P (C0)
[05:17:29] [PASSED] ALDERLAKE_S_RPLS (D0)
[05:17:29] [PASSED] ALDERLAKE_P_RPLU (E0)
[05:17:29] [PASSED] DG2_G10 (C0)
[05:17:29] [PASSED] DG2_G11 (B1)
[05:17:29] [PASSED] DG2_G12 (A1)
[05:17:29] [PASSED] METEORLAKE (g:A0, m:A0)
[05:17:29] [PASSED] METEORLAKE (g:A0, m:A0)
[05:17:29] [PASSED] METEORLAKE (g:A0, m:A0)
[05:17:29] [PASSED] LUNARLAKE (g:A0, m:A0)
[05:17:29] [PASSED] LUNARLAKE (g:B0, m:A0)
[05:17:29] [PASSED] BATTLEMAGE (g:A0, m:A1)
[05:17:29] ==================== [PASSED] xe_wa_gt =====================
[05:17:29] ====================== [PASSED] xe_wa ======================
[05:17:29] ============================================================
[05:17:29] Testing complete. Ran 122 tests: passed: 106, skipped: 16
[05:17:29] Elapsed time: 31.707s total, 4.090s configuring, 27.400s building, 0.205s running
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/tests/.kunitconfig
[05:17:29] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[05:17:30] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make ARCH=um O=.kunit --jobs=48
../lib/iomap.c:156:5: warning: no previous prototype for ‘ioread64_lo_hi’ [-Wmissing-prototypes]
156 | u64 ioread64_lo_hi(const void __iomem *addr)
| ^~~~~~~~~~~~~~
../lib/iomap.c:163:5: warning: no previous prototype for ‘ioread64_hi_lo’ [-Wmissing-prototypes]
163 | u64 ioread64_hi_lo(const void __iomem *addr)
| ^~~~~~~~~~~~~~
../lib/iomap.c:170:5: warning: no previous prototype for ‘ioread64be_lo_hi’ [-Wmissing-prototypes]
170 | u64 ioread64be_lo_hi(const void __iomem *addr)
| ^~~~~~~~~~~~~~~~
../lib/iomap.c:178:5: warning: no previous prototype for ‘ioread64be_hi_lo’ [-Wmissing-prototypes]
178 | u64 ioread64be_hi_lo(const void __iomem *addr)
| ^~~~~~~~~~~~~~~~
../lib/iomap.c:264:6: warning: no previous prototype for ‘iowrite64_lo_hi’ [-Wmissing-prototypes]
264 | void iowrite64_lo_hi(u64 val, void __iomem *addr)
| ^~~~~~~~~~~~~~~
../lib/iomap.c:272:6: warning: no previous prototype for ‘iowrite64_hi_lo’ [-Wmissing-prototypes]
272 | void iowrite64_hi_lo(u64 val, void __iomem *addr)
| ^~~~~~~~~~~~~~~
../lib/iomap.c:280:6: warning: no previous prototype for ‘iowrite64be_lo_hi’ [-Wmissing-prototypes]
280 | void iowrite64be_lo_hi(u64 val, void __iomem *addr)
| ^~~~~~~~~~~~~~~~~
../lib/iomap.c:288:6: warning: no previous prototype for ‘iowrite64be_hi_lo’ [-Wmissing-prototypes]
288 | void iowrite64be_hi_lo(u64 val, void __iomem *addr)
| ^~~~~~~~~~~~~~~~~
[05:17:52] Starting KUnit Kernel (1/1)...
[05:17:52] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[05:17:53] ============ drm_test_pick_cmdline (2 subtests) ============
[05:17:53] [PASSED] drm_test_pick_cmdline_res_1920_1080_60
[05:17:53] =============== drm_test_pick_cmdline_named ===============
[05:17:53] [PASSED] NTSC
[05:17:53] [PASSED] NTSC-J
[05:17:53] [PASSED] PAL
[05:17:53] [PASSED] PAL-M
[05:17:53] =========== [PASSED] drm_test_pick_cmdline_named ===========
[05:17:53] ============== [PASSED] drm_test_pick_cmdline ==============
[05:17:53] ================== drm_buddy (7 subtests) ==================
[05:17:53] [PASSED] drm_test_buddy_alloc_limit
[05:17:53] [PASSED] drm_test_buddy_alloc_optimistic
[05:17:53] [PASSED] drm_test_buddy_alloc_pessimistic
[05:17:53] [PASSED] drm_test_buddy_alloc_pathological
[05:17:53] [PASSED] drm_test_buddy_alloc_contiguous
[05:17:53] [PASSED] drm_test_buddy_alloc_clear
[05:17:53] [PASSED] drm_test_buddy_alloc_range_bias
[05:17:53] ==================== [PASSED] drm_buddy ====================
[05:17:53] ============= drm_cmdline_parser (40 subtests) =============
[05:17:53] [PASSED] drm_test_cmdline_force_d_only
[05:17:53] [PASSED] drm_test_cmdline_force_D_only_dvi
[05:17:53] [PASSED] drm_test_cmdline_force_D_only_hdmi
[05:17:53] [PASSED] drm_test_cmdline_force_D_only_not_digital
[05:17:53] [PASSED] drm_test_cmdline_force_e_only
[05:17:53] [PASSED] drm_test_cmdline_res
[05:17:53] [PASSED] drm_test_cmdline_res_vesa
[05:17:53] [PASSED] drm_test_cmdline_res_vesa_rblank
[05:17:53] [PASSED] drm_test_cmdline_res_rblank
[05:17:53] [PASSED] drm_test_cmdline_res_bpp
[05:17:53] [PASSED] drm_test_cmdline_res_refresh
[05:17:53] [PASSED] drm_test_cmdline_res_bpp_refresh
[05:17:53] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced
[05:17:53] [PASSED] drm_test_cmdline_res_bpp_refresh_margins
[05:17:53] [PASSED] drm_test_cmdline_res_bpp_refresh_force_off
[05:17:53] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on
[05:17:53] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_analog
[05:17:53] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_digital
[05:17:53] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on
[05:17:53] [PASSED] drm_test_cmdline_res_margins_force_on
[05:17:53] [PASSED] drm_test_cmdline_res_vesa_margins
[05:17:53] [PASSED] drm_test_cmdline_name
[05:17:53] [PASSED] drm_test_cmdline_name_bpp
[05:17:53] [PASSED] drm_test_cmdline_name_option
[05:17:53] [PASSED] drm_test_cmdline_name_bpp_option
[05:17:53] [PASSED] drm_test_cmdline_rotate_0
[05:17:53] [PASSED] drm_test_cmdline_rotate_90
[05:17:53] [PASSED] drm_test_cmdline_rotate_180
[05:17:53] [PASSED] drm_test_cmdline_rotate_270
[05:17:53] [PASSED] drm_test_cmdline_hmirror
[05:17:53] [PASSED] drm_test_cmdline_vmirror
[05:17:53] [PASSED] drm_test_cmdline_margin_options
[05:17:53] [PASSED] drm_test_cmdline_multiple_options
[05:17:53] [PASSED] drm_test_cmdline_bpp_extra_and_option
[05:17:53] [PASSED] drm_test_cmdline_extra_and_option
[05:17:53] [PASSED] drm_test_cmdline_freestanding_options
[05:17:53] [PASSED] drm_test_cmdline_freestanding_force_e_and_options
[05:17:53] [PASSED] drm_test_cmdline_panel_orientation
[05:17:53] ================ drm_test_cmdline_invalid =================
[05:17:53] [PASSED] margin_only
[05:17:53] [PASSED] interlace_only
[05:17:53] [PASSED] res_missing_x
[05:17:53] [PASSED] res_missing_y
[05:17:53] [PASSED] res_bad_y
[05:17:53] [PASSED] res_missing_y_bpp
[05:17:53] [PASSED] res_bad_bpp
[05:17:53] [PASSED] res_bad_refresh
[05:17:53] [PASSED] res_bpp_refresh_force_on_off
[05:17:53] [PASSED] res_invalid_mode
[05:17:53] [PASSED] res_bpp_wrong_place_mode
[05:17:53] [PASSED] name_bpp_refresh
[05:17:53] [PASSED] name_refresh
[05:17:53] [PASSED] name_refresh_wrong_mode
[05:17:53] [PASSED] name_refresh_invalid_mode
[05:17:53] [PASSED] rotate_multiple
[05:17:53] [PASSED] rotate_invalid_val
[05:17:53] [PASSED] rotate_truncated
[05:17:53] [PASSED] invalid_option
[05:17:53] [PASSED] invalid_tv_option
[05:17:53] [PASSED] truncated_tv_option
[05:17:53] ============ [PASSED] drm_test_cmdline_invalid =============
[05:17:53] =============== drm_test_cmdline_tv_options ===============
[05:17:53] [PASSED] NTSC
[05:17:53] [PASSED] NTSC_443
[05:17:53] [PASSED] NTSC_J
[05:17:53] [PASSED] PAL
[05:17:53] [PASSED] PAL_M
[05:17:53] [PASSED] PAL_N
[05:17:53] [PASSED] SECAM
[05:17:53] [PASSED] MONO_525
[05:17:53] [PASSED] MONO_625
[05:17:53] =========== [PASSED] drm_test_cmdline_tv_options ===========
[05:17:53] =============== [PASSED] drm_cmdline_parser ================
[05:17:53] ========== drmm_connector_hdmi_init (19 subtests) ==========
[05:17:53] [PASSED] drm_test_connector_hdmi_init_valid
[05:17:53] [PASSED] drm_test_connector_hdmi_init_bpc_8
[05:17:53] [PASSED] drm_test_connector_hdmi_init_bpc_10
[05:17:53] [PASSED] drm_test_connector_hdmi_init_bpc_12
[05:17:53] [PASSED] drm_test_connector_hdmi_init_bpc_invalid
[05:17:53] [PASSED] drm_test_connector_hdmi_init_bpc_null
[05:17:53] [PASSED] drm_test_connector_hdmi_init_formats_empty
[05:17:53] [PASSED] drm_test_connector_hdmi_init_formats_no_rgb
[05:17:53] [PASSED] drm_test_connector_hdmi_init_null_ddc
[05:17:53] [PASSED] drm_test_connector_hdmi_init_null_product
[05:17:53] [PASSED] drm_test_connector_hdmi_init_null_vendor
[05:17:53] [PASSED] drm_test_connector_hdmi_init_product_length_exact
[05:17:53] [PASSED] drm_test_connector_hdmi_init_product_length_too_long
[05:17:53] [PASSED] drm_test_connector_hdmi_init_product_valid
[05:17:53] [PASSED] drm_test_connector_hdmi_init_vendor_length_exact
[05:17:53] [PASSED] drm_test_connector_hdmi_init_vendor_length_too_long
[05:17:53] [PASSED] drm_test_connector_hdmi_init_vendor_valid
[05:17:53] ========= drm_test_connector_hdmi_init_type_valid =========
[05:17:53] [PASSED] HDMI-A
[05:17:53] [PASSED] HDMI-B
[05:17:53] ===== [PASSED] drm_test_connector_hdmi_init_type_valid =====
[05:17:53] ======== drm_test_connector_hdmi_init_type_invalid ========
[05:17:53] [PASSED] Unknown
[05:17:53] [PASSED] VGA
[05:17:53] [PASSED] DVI-I
[05:17:53] [PASSED] DVI-D
[05:17:53] [PASSED] DVI-A
[05:17:53] [PASSED] Composite
[05:17:53] [PASSED] SVIDEO
[05:17:53] [PASSED] LVDS
[05:17:53] [PASSED] Component
[05:17:53] [PASSED] DIN
[05:17:53] [PASSED] DP
[05:17:53] [PASSED] TV
[05:17:53] [PASSED] eDP
[05:17:53] [PASSED] Virtual
[05:17:53] [PASSED] DSI
[05:17:53] [PASSED] DPI
[05:17:53] [PASSED] Writeback
[05:17:53] [PASSED] SPI
[05:17:53] [PASSED] USB
[05:17:53] ==== [PASSED] drm_test_connector_hdmi_init_type_invalid ====
[05:17:53] ============ [PASSED] drmm_connector_hdmi_init =============
[05:17:53] ============= drmm_connector_init (3 subtests) =============
[05:17:53] [PASSED] drm_test_drmm_connector_init
[05:17:53] [PASSED] drm_test_drmm_connector_init_null_ddc
[05:17:53] ========= drm_test_drmm_connector_init_type_valid =========
[05:17:53] [PASSED] Unknown
[05:17:53] [PASSED] VGA
[05:17:53] [PASSED] DVI-I
[05:17:53] [PASSED] DVI-D
[05:17:53] [PASSED] DVI-A
[05:17:53] [PASSED] Composite
[05:17:53] [PASSED] SVIDEO
[05:17:53] [PASSED] LVDS
[05:17:53] [PASSED] Component
[05:17:53] [PASSED] DIN
[05:17:53] [PASSED] DP
[05:17:53] [PASSED] HDMI-A
[05:17:53] [PASSED] HDMI-B
[05:17:53] [PASSED] TV
[05:17:53] [PASSED] eDP
[05:17:53] [PASSED] Virtual
[05:17:53] [PASSED] DSI
[05:17:53] [PASSED] DPI
[05:17:53] [PASSED] Writeback
[05:17:53] [PASSED] SPI
[05:17:53] [PASSED] USB
[05:17:53] ===== [PASSED] drm_test_drmm_connector_init_type_valid =====
[05:17:53] =============== [PASSED] drmm_connector_init ===============
[05:17:53] = drm_connector_attach_broadcast_rgb_property (2 subtests) =
[05:17:53] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property
[05:17:53] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property_hdmi_connector
[05:17:53] === [PASSED] drm_connector_attach_broadcast_rgb_property ===
[05:17:53] ========== drm_get_tv_mode_from_name (2 subtests) ==========
[05:17:53] ========== drm_test_get_tv_mode_from_name_valid ===========
[05:17:53] [PASSED] NTSC
[05:17:53] [PASSED] NTSC-443
[05:17:53] [PASSED] NTSC-J
[05:17:53] [PASSED] PAL
[05:17:53] [PASSED] PAL-M
[05:17:53] [PASSED] PAL-N
[05:17:53] [PASSED] SECAM
[05:17:53] [PASSED] Mono
[05:17:53] ====== [PASSED] drm_test_get_tv_mode_from_name_valid =======
[05:17:53] [PASSED] drm_test_get_tv_mode_from_name_truncated
[05:17:53] ============ [PASSED] drm_get_tv_mode_from_name ============
[05:17:53] = drm_test_connector_hdmi_compute_mode_clock (12 subtests) =
[05:17:53] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb
[05:17:53] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc
[05:17:53] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc_vic_1
[05:17:53] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc
[05:17:53] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc_vic_1
[05:17:53] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_double
[05:17:53] = drm_test_connector_hdmi_compute_mode_clock_yuv420_valid =
[05:17:53] [PASSED] VIC 96
[05:17:53] [PASSED] VIC 97
[05:17:53] [PASSED] VIC 101
[05:17:53] [PASSED] VIC 102
[05:17:53] [PASSED] VIC 106
[05:17:53] [PASSED] VIC 107
[05:17:53] === [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_valid ===
[05:17:53] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_10_bpc
[05:17:53] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_12_bpc
[05:17:53] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_8_bpc
[05:17:53] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_10_bpc
[05:17:53] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_12_bpc
[05:17:53] === [PASSED] drm_test_connector_hdmi_compute_mode_clock ====
[05:17:53] == drm_hdmi_connector_get_broadcast_rgb_name (2 subtests) ==
[05:17:53] === drm_test_drm_hdmi_connector_get_broadcast_rgb_name ====
[05:17:53] [PASSED] Automatic
[05:17:53] [PASSED] Full
[05:17:53] [PASSED] Limited 16:235
[05:17:53] === [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name ===
[05:17:53] [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name_invalid
[05:17:53] ==== [PASSED] drm_hdmi_connector_get_broadcast_rgb_name ====
[05:17:53] == drm_hdmi_connector_get_output_format_name (2 subtests) ==
[05:17:53] === drm_test_drm_hdmi_connector_get_output_format_name ====
[05:17:53] [PASSED] RGB
[05:17:53] [PASSED] YUV 4:2:0
[05:17:53] [PASSED] YUV 4:2:2
[05:17:53] [PASSED] YUV 4:4:4
[05:17:53] === [PASSED] drm_test_drm_hdmi_connector_get_output_format_name ===
[05:17:53] [PASSED] drm_test_drm_hdmi_connector_get_output_format_name_invalid
[05:17:53] ==== [PASSED] drm_hdmi_connector_get_output_format_name ====
[05:17:53] ============= drm_damage_helper (21 subtests) ==============
[05:17:53] [PASSED] drm_test_damage_iter_no_damage
[05:17:53] [PASSED] drm_test_damage_iter_no_damage_fractional_src
[05:17:53] [PASSED] drm_test_damage_iter_no_damage_src_moved
[05:17:53] [PASSED] drm_test_damage_iter_no_damage_fractional_src_moved
[05:17:53] [PASSED] drm_test_damage_iter_no_damage_not_visible
[05:17:53] [PASSED] drm_test_damage_iter_no_damage_no_crtc
[05:17:53] [PASSED] drm_test_damage_iter_no_damage_no_fb
[05:17:53] [PASSED] drm_test_damage_iter_simple_damage
[05:17:53] [PASSED] drm_test_damage_iter_single_damage
[05:17:53] [PASSED] drm_test_damage_iter_single_damage_intersect_src
[05:17:53] [PASSED] drm_test_damage_iter_single_damage_outside_src
[05:17:53] [PASSED] drm_test_damage_iter_single_damage_fractional_src
[05:17:53] [PASSED] drm_test_damage_iter_single_damage_intersect_fractional_src
[05:17:53] [PASSED] drm_test_damage_iter_single_damage_outside_fractional_src
[05:17:53] [PASSED] drm_test_damage_iter_single_damage_src_moved
[05:17:53] [PASSED] drm_test_damage_iter_single_damage_fractional_src_moved
[05:17:53] [PASSED] drm_test_damage_iter_damage
[05:17:53] [PASSED] drm_test_damage_iter_damage_one_intersect
[05:17:53] [PASSED] drm_test_damage_iter_damage_one_outside
[05:17:53] [PASSED] drm_test_damage_iter_damage_src_moved
[05:17:53] [PASSED] drm_test_damage_iter_damage_not_visible
[05:17:53] ================ [PASSED] drm_damage_helper ================
[05:17:53] ============== drm_dp_mst_helper (3 subtests) ==============
[05:17:53] ============== drm_test_dp_mst_calc_pbn_mode ==============
[05:17:53] [PASSED] Clock 154000 BPP 30 DSC disabled
[05:17:53] [PASSED] Clock 234000 BPP 30 DSC disabled
[05:17:53] [PASSED] Clock 297000 BPP 24 DSC disabled
[05:17:53] [PASSED] Clock 332880 BPP 24 DSC enabled
[05:17:53] [PASSED] Clock 324540 BPP 24 DSC enabled
[05:17:53] ========== [PASSED] drm_test_dp_mst_calc_pbn_mode ==========
[05:17:53] ============== drm_test_dp_mst_calc_pbn_div ===============
[05:17:53] [PASSED] Link rate 2000000 lane count 4
[05:17:53] [PASSED] Link rate 2000000 lane count 2
[05:17:53] [PASSED] Link rate 2000000 lane count 1
[05:17:53] [PASSED] Link rate 1350000 lane count 4
[05:17:53] [PASSED] Link rate 1350000 lane count 2
[05:17:53] [PASSED] Link rate 1350000 lane count 1
[05:17:53] [PASSED] Link rate 1000000 lane count 4
[05:17:53] [PASSED] Link rate 1000000 lane count 2
[05:17:53] [PASSED] Link rate 1000000 lane count 1
[05:17:53] [PASSED] Link rate 810000 lane count 4
[05:17:53] [PASSED] Link rate 810000 lane count 2
[05:17:53] [PASSED] Link rate 810000 lane count 1
[05:17:53] [PASSED] Link rate 540000 lane count 4
[05:17:53] [PASSED] Link rate 540000 lane count 2
[05:17:53] [PASSED] Link rate 540000 lane count 1
[05:17:53] [PASSED] Link rate 270000 lane count 4
[05:17:53] [PASSED] Link rate 270000 lane count 2
[05:17:53] [PASSED] Link rate 270000 lane count 1
[05:17:53] [PASSED] Link rate 162000 lane count 4
[05:17:53] [PASSED] Link rate 162000 lane count 2
[05:17:53] [PASSED] Link rate 162000 lane count 1
[05:17:53] ========== [PASSED] drm_test_dp_mst_calc_pbn_div ===========
[05:17:53] ========= drm_test_dp_mst_sideband_msg_req_decode =========
[05:17:53] [PASSED] DP_ENUM_PATH_RESOURCES with port number
[05:17:53] [PASSED] DP_POWER_UP_PHY with port number
[05:17:53] [PASSED] DP_POWER_DOWN_PHY with port number
[05:17:53] [PASSED] DP_ALLOCATE_PAYLOAD with SDP stream sinks
[05:17:53] [PASSED] DP_ALLOCATE_PAYLOAD with port number
[05:17:53] [PASSED] DP_ALLOCATE_PAYLOAD with VCPI
[05:17:53] [PASSED] DP_ALLOCATE_PAYLOAD with PBN
[05:17:53] [PASSED] DP_QUERY_PAYLOAD with port number
[05:17:53] [PASSED] DP_QUERY_PAYLOAD with VCPI
[05:17:53] [PASSED] DP_REMOTE_DPCD_READ with port number
[05:17:53] [PASSED] DP_REMOTE_DPCD_READ with DPCD address
[05:17:53] [PASSED] DP_REMOTE_DPCD_READ with max number of bytes
[05:17:53] [PASSED] DP_REMOTE_DPCD_WRITE with port number
[05:17:53] [PASSED] DP_REMOTE_DPCD_WRITE with DPCD address
[05:17:53] [PASSED] DP_REMOTE_DPCD_WRITE with data array
[05:17:53] [PASSED] DP_REMOTE_I2C_READ with port number
[05:17:53] [PASSED] DP_REMOTE_I2C_READ with I2C device ID
[05:17:53] [PASSED] DP_REMOTE_I2C_READ with transactions array
[05:17:53] [PASSED] DP_REMOTE_I2C_WRITE with port number
[05:17:53] [PASSED] DP_REMOTE_I2C_WRITE with I2C device ID
[05:17:53] [PASSED] DP_REMOTE_I2C_WRITE with data array
[05:17:53] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream ID
[05:17:53] [PASSED] DP_QUERY_STREAM_ENC_STATUS with client ID
[05:17:53] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream event
[05:17:53] [PASSED] DP_QUERY_STREAM_ENC_STATUS with valid stream event
[05:17:53] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream behavior
[05:17:53] [PASSED] DP_QUERY_STREAM_ENC_STATUS with a valid stream behavior
[05:17:53] ===== [PASSED] drm_test_dp_mst_sideband_msg_req_decode =====
[05:17:53] ================ [PASSED] drm_dp_mst_helper ================
[05:17:53] ================== drm_exec (7 subtests) ===================
[05:17:53] [PASSED] sanitycheck
[05:17:53] [PASSED] test_lock
[05:17:53] [PASSED] test_lock_unlock
[05:17:53] [PASSED] test_duplicates
[05:17:53] [PASSED] test_prepare
[05:17:53] [PASSED] test_prepare_array
[05:17:53] [PASSED] test_multiple_loops
[05:17:53] ==================== [PASSED] drm_exec =====================
[05:17:53] =========== drm_format_helper_test (17 subtests) ===========
[05:17:53] ============== drm_test_fb_xrgb8888_to_gray8 ==============
[05:17:53] [PASSED] single_pixel_source_buffer
[05:17:53] [PASSED] single_pixel_clip_rectangle
[05:17:53] [PASSED] well_known_colors
[05:17:53] [PASSED] destination_pitch
[05:17:53] ========== [PASSED] drm_test_fb_xrgb8888_to_gray8 ==========
[05:17:53] ============= drm_test_fb_xrgb8888_to_rgb332 ==============
[05:17:53] [PASSED] single_pixel_source_buffer
[05:17:53] [PASSED] single_pixel_clip_rectangle
[05:17:53] [PASSED] well_known_colors
[05:17:53] [PASSED] destination_pitch
[05:17:53] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb332 ==========
[05:17:53] ============= drm_test_fb_xrgb8888_to_rgb565 ==============
[05:17:53] [PASSED] single_pixel_source_buffer
[05:17:53] [PASSED] single_pixel_clip_rectangle
[05:17:53] [PASSED] well_known_colors
[05:17:53] [PASSED] destination_pitch
[05:17:53] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb565 ==========
[05:17:53] ============ drm_test_fb_xrgb8888_to_xrgb1555 =============
[05:17:53] [PASSED] single_pixel_source_buffer
[05:17:53] [PASSED] single_pixel_clip_rectangle
[05:17:53] [PASSED] well_known_colors
[05:17:53] [PASSED] destination_pitch
[05:17:53] ======== [PASSED] drm_test_fb_xrgb8888_to_xrgb1555 =========
[05:17:53] ============ drm_test_fb_xrgb8888_to_argb1555 =============
[05:17:53] [PASSED] single_pixel_source_buffer
[05:17:53] [PASSED] single_pixel_clip_rectangle
[05:17:53] [PASSED] well_known_colors
[05:17:53] [PASSED] destination_pitch
[05:17:53] ======== [PASSED] drm_test_fb_xrgb8888_to_argb1555 =========
[05:17:53] ============ drm_test_fb_xrgb8888_to_rgba5551 =============
[05:17:53] [PASSED] single_pixel_source_buffer
[05:17:53] [PASSED] single_pixel_clip_rectangle
[05:17:53] [PASSED] well_known_colors
[05:17:53] [PASSED] destination_pitch
[05:17:53] ======== [PASSED] drm_test_fb_xrgb8888_to_rgba5551 =========
[05:17:53] ============= drm_test_fb_xrgb8888_to_rgb888 ==============
[05:17:53] [PASSED] single_pixel_source_buffer
[05:17:53] [PASSED] single_pixel_clip_rectangle
[05:17:53] [PASSED] well_known_colors
[05:17:53] [PASSED] destination_pitch
[05:17:53] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb888 ==========
[05:17:53] ============ drm_test_fb_xrgb8888_to_argb8888 =============
[05:17:53] [PASSED] single_pixel_source_buffer
[05:17:53] [PASSED] single_pixel_clip_rectangle
[05:17:53] [PASSED] well_known_colors
[05:17:53] [PASSED] destination_pitch
[05:17:53] ======== [PASSED] drm_test_fb_xrgb8888_to_argb8888 =========
[05:17:53] =========== drm_test_fb_xrgb8888_to_xrgb2101010 ===========
[05:17:53] [PASSED] single_pixel_source_buffer
[05:17:53] [PASSED] single_pixel_clip_rectangle
[05:17:53] [PASSED] well_known_colors
[05:17:53] [PASSED] destination_pitch
[05:17:53] ======= [PASSED] drm_test_fb_xrgb8888_to_xrgb2101010 =======
[05:17:53] =========== drm_test_fb_xrgb8888_to_argb2101010 ===========
[05:17:53] [PASSED] single_pixel_source_buffer
[05:17:53] [PASSED] single_pixel_clip_rectangle
[05:17:53] [PASSED] well_known_colors
[05:17:53] [PASSED] destination_pitch
[05:17:53] ======= [PASSED] drm_test_fb_xrgb8888_to_argb2101010 =======
[05:17:53] ============== drm_test_fb_xrgb8888_to_mono ===============
[05:17:53] [PASSED] single_pixel_source_buffer
[05:17:53] [PASSED] single_pixel_clip_rectangle
[05:17:53] [PASSED] well_known_colors
[05:17:53] [PASSED] destination_pitch
[05:17:53] ========== [PASSED] drm_test_fb_xrgb8888_to_mono ===========
[05:17:53] ==================== drm_test_fb_swab =====================
[05:17:53] [PASSED] single_pixel_source_buffer
[05:17:53] [PASSED] single_pixel_clip_rectangle
[05:17:53] [PASSED] well_known_colors
[05:17:53] [PASSED] destination_pitch
[05:17:53] ================ [PASSED] drm_test_fb_swab =================
[05:17:53] ============ drm_test_fb_xrgb8888_to_xbgr8888 =============
[05:17:53] [PASSED] single_pixel_source_buffer
[05:17:53] [PASSED] single_pixel_clip_rectangle
[05:17:53] [PASSED] well_known_colors
[05:17:53] [PASSED] destination_pitch
[05:17:53] ======== [PASSED] drm_test_fb_xrgb8888_to_xbgr8888 =========
[05:17:53] ============ drm_test_fb_xrgb8888_to_abgr8888 =============
[05:17:53] [PASSED] single_pixel_source_buffer
[05:17:53] [PASSED] single_pixel_clip_rectangle
[05:17:53] [PASSED] well_known_colors
[05:17:53] [PASSED] destination_pitch
[05:17:53] ======== [PASSED] drm_test_fb_xrgb8888_to_abgr8888 =========
[05:17:53] ================= drm_test_fb_clip_offset =================
[05:17:53] [PASSED] pass through
[05:17:53] [PASSED] horizontal offset
[05:17:53] [PASSED] vertical offset
[05:17:53] [PASSED] horizontal and vertical offset
[05:17:53] [PASSED] horizontal offset (custom pitch)
[05:17:53] [PASSED] vertical offset (custom pitch)
[05:17:53] [PASSED] horizontal and vertical offset (custom pitch)
[05:17:53] ============= [PASSED] drm_test_fb_clip_offset =============
[05:17:53] ============== drm_test_fb_build_fourcc_list ==============
[05:17:53] [PASSED] no native formats
[05:17:53] [PASSED] XRGB8888 as native format
[05:17:53] [PASSED] remove duplicates
[05:17:53] [PASSED] convert alpha formats
[05:17:53] [PASSED] random formats
[05:17:53] ========== [PASSED] drm_test_fb_build_fourcc_list ==========
[05:17:53] =================== drm_test_fb_memcpy ====================
[05:17:53] [PASSED] single_pixel_source_buffer: XR24 little-endian (0x34325258)
[05:17:53] [PASSED] single_pixel_source_buffer: XRA8 little-endian (0x38415258)
[05:17:53] [PASSED] single_pixel_source_buffer: YU24 little-endian (0x34325559)
[05:17:53] [PASSED] single_pixel_clip_rectangle: XB24 little-endian (0x34324258)
[05:17:53] [PASSED] single_pixel_clip_rectangle: XRA8 little-endian (0x38415258)
[05:17:53] [PASSED] single_pixel_clip_rectangle: YU24 little-endian (0x34325559)
[05:17:53] [PASSED] well_known_colors: XB24 little-endian (0x34324258)
[05:17:53] [PASSED] well_known_colors: XRA8 little-endian (0x38415258)
[05:17:53] [PASSED] well_known_colors: YU24 little-endian (0x34325559)
[05:17:53] [PASSED] destination_pitch: XB24 little-endian (0x34324258)
[05:17:53] [PASSED] destination_pitch: XRA8 little-endian (0x38415258)
[05:17:53] [PASSED] destination_pitch: YU24 little-endian (0x34325559)
[05:17:53] =============== [PASSED] drm_test_fb_memcpy ================
[05:17:53] ============= [PASSED] drm_format_helper_test ==============
[05:17:53] ================= drm_format (18 subtests) =================
[05:17:53] [PASSED] drm_test_format_block_width_invalid
[05:17:53] [PASSED] drm_test_format_block_width_one_plane
[05:17:53] [PASSED] drm_test_format_block_width_two_plane
[05:17:53] [PASSED] drm_test_format_block_width_three_plane
[05:17:53] [PASSED] drm_test_format_block_width_tiled
[05:17:53] [PASSED] drm_test_format_block_height_invalid
[05:17:53] [PASSED] drm_test_format_block_height_one_plane
[05:17:53] [PASSED] drm_test_format_block_height_two_plane
[05:17:53] [PASSED] drm_test_format_block_height_three_plane
[05:17:53] [PASSED] drm_test_format_block_height_tiled
[05:17:53] [PASSED] drm_test_format_min_pitch_invalid
[05:17:53] [PASSED] drm_test_format_min_pitch_one_plane_8bpp
[05:17:53] [PASSED] drm_test_format_min_pitch_one_plane_16bpp
[05:17:53] [PASSED] drm_test_format_min_pitch_one_plane_24bpp
[05:17:53] [PASSED] drm_test_format_min_pitch_one_plane_32bpp
[05:17:53] [PASSED] drm_test_format_min_pitch_two_plane
[05:17:53] [PASSED] drm_test_format_min_pitch_three_plane_8bpp
[05:17:53] [PASSED] drm_test_format_min_pitch_tiled
[05:17:53] =================== [PASSED] drm_format ====================
[05:17:53] ============== drm_framebuffer (10 subtests) ===============
[05:17:53] ========== drm_test_framebuffer_check_src_coords ==========
[05:17:53] [PASSED] Success: source fits into fb
[05:17:53] [PASSED] Fail: overflowing fb with x-axis coordinate
[05:17:53] [PASSED] Fail: overflowing fb with y-axis coordinate
[05:17:53] [PASSED] Fail: overflowing fb with source width
[05:17:53] [PASSED] Fail: overflowing fb with source height
[05:17:53] ====== [PASSED] drm_test_framebuffer_check_src_coords ======
[05:17:53] [PASSED] drm_test_framebuffer_cleanup
[05:17:53] =============== drm_test_framebuffer_create ===============
[05:17:53] [PASSED] ABGR8888 normal sizes
[05:17:53] [PASSED] ABGR8888 max sizes
[05:17:53] [PASSED] ABGR8888 pitch greater than min required
[05:17:53] [PASSED] ABGR8888 pitch less than min required
[05:17:53] [PASSED] ABGR8888 Invalid width
[05:17:53] [PASSED] ABGR8888 Invalid buffer handle
[05:17:53] [PASSED] No pixel format
[05:17:53] [PASSED] ABGR8888 Width 0
[05:17:53] [PASSED] ABGR8888 Height 0
[05:17:53] [PASSED] ABGR8888 Out of bound height * pitch combination
[05:17:53] [PASSED] ABGR8888 Large buffer offset
[05:17:53] [PASSED] ABGR8888 Buffer offset for inexistent plane
[05:17:53] [PASSED] ABGR8888 Invalid flag
[05:17:53] [PASSED] ABGR8888 Set DRM_MODE_FB_MODIFIERS without modifiers
[05:17:53] [PASSED] ABGR8888 Valid buffer modifier
[05:17:53] [PASSED] ABGR8888 Invalid buffer modifier(DRM_FORMAT_MOD_SAMSUNG_64_32_TILE)
[05:17:53] [PASSED] ABGR8888 Extra pitches without DRM_MODE_FB_MODIFIERS
[05:17:53] [PASSED] ABGR8888 Extra pitches with DRM_MODE_FB_MODIFIERS
[05:17:53] [PASSED] NV12 Normal sizes
[05:17:53] [PASSED] NV12 Max sizes
[05:17:53] [PASSED] NV12 Invalid pitch
[05:17:53] [PASSED] NV12 Invalid modifier/missing DRM_MODE_FB_MODIFIERS flag
[05:17:53] [PASSED] NV12 different modifier per-plane
[05:17:53] [PASSED] NV12 with DRM_FORMAT_MOD_SAMSUNG_64_32_TILE
[05:17:53] [PASSED] NV12 Valid modifiers without DRM_MODE_FB_MODIFIERS
[05:17:53] [PASSED] NV12 Modifier for inexistent plane
[05:17:53] [PASSED] NV12 Handle for inexistent plane
[05:17:53] [PASSED] NV12 Handle for inexistent plane without DRM_MODE_FB_MODIFIERS
[05:17:53] [PASSED] YVU420 DRM_MODE_FB_MODIFIERS set without modifier
[05:17:53] [PASSED] YVU420 Normal sizes
[05:17:53] [PASSED] YVU420 Max sizes
[05:17:53] [PASSED] YVU420 Invalid pitch
[05:17:53] [PASSED] YVU420 Different pitches
[05:17:53] [PASSED] YVU420 Different buffer offsets/pitches
[05:17:53] [PASSED] YVU420 Modifier set just for plane 0, without DRM_MODE_FB_MODIFIERS
[05:17:53] [PASSED] YVU420 Modifier set just for planes 0, 1, without DRM_MODE_FB_MODIFIERS
[05:17:53] [PASSED] YVU420 Modifier set just for plane 0, 1, with DRM_MODE_FB_MODIFIERS
[05:17:53] [PASSED] YVU420 Valid modifier
[05:17:53] [PASSED] YVU420 Different modifiers per plane
[05:17:53] [PASSED] YVU420 Modifier for inexistent plane
[05:17:53] [PASSED] YUV420_10BIT Invalid modifier(DRM_FORMAT_MOD_LINEAR)
[05:17:53] [PASSED] X0L2 Normal sizes
[05:17:53] [PASSED] X0L2 Max sizes
[05:17:53] [PASSED] X0L2 Invalid pitch
[05:17:53] [PASSED] X0L2 Pitch greater than minimum required
[05:17:53] [PASSED] X0L2 Handle for inexistent plane
[05:17:53] [PASSED] X0L2 Offset for inexistent plane, without DRM_MODE_FB_MODIFIERS set
[05:17:53] [PASSED] X0L2 Modifier without DRM_MODE_FB_MODIFIERS set
[05:17:53] [PASSED] X0L2 Valid modifier
[05:17:53] [PASSED] X0L2 Modifier for inexistent plane
[05:17:53] =========== [PASSED] drm_test_framebuffer_create ===========
[05:17:53] [PASSED] drm_test_framebuffer_free
[05:17:53] [PASSED] drm_test_framebuffer_init
[05:17:53] [PASSED] drm_test_framebuffer_init_bad_format
[05:17:53] [PASSED] drm_test_framebuffer_init_dev_mismatch
[05:17:53] [PASSED] drm_test_framebuffer_lookup
[05:17:53] [PASSED] drm_test_framebuffer_lookup_inexistent
[05:17:53] [PASSED] drm_test_framebuffer_modifiers_not_supported
[05:17:53] ================= [PASSED] drm_framebuffer =================
[05:17:53] ================ drm_gem_shmem (8 subtests) ================
[05:17:53] [PASSED] drm_gem_shmem_test_obj_create
[05:17:53] [PASSED] drm_gem_shmem_test_obj_create_private
[05:17:53] [PASSED] drm_gem_shmem_test_pin_pages
[05:17:53] [PASSED] drm_gem_shmem_test_vmap
[05:17:53] [PASSED] drm_gem_shmem_test_get_pages_sgt
[05:17:53] [PASSED] drm_gem_shmem_test_get_sg_table
[05:17:53] [PASSED] drm_gem_shmem_test_madvise
[05:17:53] [PASSED] drm_gem_shmem_test_purge
[05:17:53] ================== [PASSED] drm_gem_shmem ==================
[05:17:53] === drm_atomic_helper_connector_hdmi_check (22 subtests) ===
[05:17:53] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode
[05:17:53] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode_vic_1
[05:17:53] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode
[05:17:53] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode_vic_1
[05:17:53] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode
[05:17:53] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode_vic_1
[05:17:53] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_changed
[05:17:53] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_not_changed
[05:17:53] [PASSED] drm_test_check_hdmi_funcs_reject_rate
[05:17:53] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback
[05:17:53] [PASSED] drm_test_check_max_tmds_rate_format_fallback
[05:17:53] [PASSED] drm_test_check_output_bpc_crtc_mode_changed
[05:17:53] [PASSED] drm_test_check_output_bpc_crtc_mode_not_changed
[05:17:53] [PASSED] drm_test_check_output_bpc_dvi
[05:17:53] [PASSED] drm_test_check_output_bpc_format_vic_1
[05:17:53] [PASSED] drm_test_check_output_bpc_format_display_8bpc_only
[05:17:53] [PASSED] drm_test_check_output_bpc_format_display_rgb_only
[05:17:53] [PASSED] drm_test_check_output_bpc_format_driver_8bpc_only
[05:17:53] [PASSED] drm_test_check_output_bpc_format_driver_rgb_only
[05:17:53] [PASSED] drm_test_check_tmds_char_rate_rgb_8bpc
[05:17:53] [PASSED] drm_test_check_tmds_char_rate_rgb_10bpc
[05:17:53] [PASSED] drm_test_check_tmds_char_rate_rgb_12bpc
[05:17:53] ===== [PASSED] drm_atomic_helper_connector_hdmi_check ======
[05:17:53] === drm_atomic_helper_connector_hdmi_reset (6 subtests) ====
[05:17:53] [PASSED] drm_test_check_broadcast_rgb_value
[05:17:53] [PASSED] drm_test_check_bpc_8_value
[05:17:53] [PASSED] drm_test_check_bpc_10_value
[05:17:53] [PASSED] drm_test_check_bpc_12_value
[05:17:53] [PASSED] drm_test_check_format_value
[05:17:53] [PASSED] drm_test_check_tmds_char_value
[05:17:53] ===== [PASSED] drm_atomic_helper_connector_hdmi_reset ======
[05:17:53] ================= drm_managed (2 subtests) =================
[05:17:53] [PASSED] drm_test_managed_release_action
[05:17:53] [PASSED] drm_test_managed_run_action
[05:17:53] =================== [PASSED] drm_managed ===================
[05:17:53] =================== drm_mm (6 subtests) ====================
[05:17:53] [PASSED] drm_test_mm_init
[05:17:53] [PASSED] drm_test_mm_debug
[05:17:53] [PASSED] drm_test_mm_align32
[05:17:53] [PASSED] drm_test_mm_align64
[05:17:53] [PASSED] drm_test_mm_lowest
[05:17:53] [PASSED] drm_test_mm_highest
[05:17:53] ===================== [PASSED] drm_mm ======================
[05:17:53] ============= drm_modes_analog_tv (5 subtests) =============
stty: 'standard input': Inappropriate ioctl for device
[05:17:53] [PASSED] drm_test_modes_analog_tv_mono_576i
[05:17:53] [PASSED] drm_test_modes_analog_tv_ntsc_480i
[05:17:53] [PASSED] drm_test_modes_analog_tv_ntsc_480i_inlined
[05:17:53] [PASSED] drm_test_modes_analog_tv_pal_576i
[05:17:53] [PASSED] drm_test_modes_analog_tv_pal_576i_inlined
[05:17:53] =============== [PASSED] drm_modes_analog_tv ===============
[05:17:53] ============== drm_plane_helper (2 subtests) ===============
[05:17:53] =============== drm_test_check_plane_state ================
[05:17:53] [PASSED] clipping_simple
[05:17:53] [PASSED] clipping_rotate_reflect
[05:17:53] [PASSED] positioning_simple
[05:17:53] [PASSED] upscaling
[05:17:53] [PASSED] downscaling
[05:17:53] [PASSED] rounding1
[05:17:53] [PASSED] rounding2
[05:17:53] [PASSED] rounding3
[05:17:53] [PASSED] rounding4
[05:17:53] =========== [PASSED] drm_test_check_plane_state ============
[05:17:53] =========== drm_test_check_invalid_plane_state ============
[05:17:53] [PASSED] positioning_invalid
[05:17:53] [PASSED] upscaling_invalid
[05:17:53] [PASSED] downscaling_invalid
[05:17:53] ======= [PASSED] drm_test_check_invalid_plane_state ========
[05:17:53] ================ [PASSED] drm_plane_helper =================
[05:17:53] ====== drm_connector_helper_tv_get_modes (1 subtest) =======
[05:17:53] ====== drm_test_connector_helper_tv_get_modes_check =======
[05:17:53] [PASSED] None
[05:17:53] [PASSED] PAL
[05:17:53] [PASSED] NTSC
[05:17:53] [PASSED] Both, NTSC Default
[05:17:53] [PASSED] Both, PAL Default
[05:17:53] [PASSED] Both, NTSC Default, with PAL on command-line
[05:17:53] [PASSED] Both, PAL Default, with NTSC on command-line
[05:17:53] == [PASSED] drm_test_connector_helper_tv_get_modes_check ===
[05:17:53] ======== [PASSED] drm_connector_helper_tv_get_modes ========
[05:17:53] ================== drm_rect (9 subtests) ===================
[05:17:53] [PASSED] drm_test_rect_clip_scaled_div_by_zero
[05:17:53] [PASSED] drm_test_rect_clip_scaled_not_clipped
[05:17:53] [PASSED] drm_test_rect_clip_scaled_clipped
[05:17:53] [PASSED] drm_test_rect_clip_scaled_signed_vs_unsigned
[05:17:53] ================= drm_test_rect_intersect =================
[05:17:53] [PASSED] top-left x bottom-right: 2x2+1+1 x 2x2+0+0
[05:17:53] [PASSED] top-right x bottom-left: 2x2+0+0 x 2x2+1-1
[05:17:53] [PASSED] bottom-left x top-right: 2x2+1-1 x 2x2+0+0
[05:17:53] [PASSED] bottom-right x top-left: 2x2+0+0 x 2x2+1+1
[05:17:53] [PASSED] right x left: 2x1+0+0 x 3x1+1+0
[05:17:53] [PASSED] left x right: 3x1+1+0 x 2x1+0+0
[05:17:53] [PASSED] up x bottom: 1x2+0+0 x 1x3+0-1
[05:17:53] [PASSED] bottom x up: 1x3+0-1 x 1x2+0+0
[05:17:53] [PASSED] touching corner: 1x1+0+0 x 2x2+1+1
[05:17:53] [PASSED] touching side: 1x1+0+0 x 1x1+1+0
[05:17:53] [PASSED] equal rects: 2x2+0+0 x 2x2+0+0
[05:17:53] [PASSED] inside another: 2x2+0+0 x 1x1+1+1
[05:17:53] [PASSED] far away: 1x1+0+0 x 1x1+3+6
[05:17:53] [PASSED] points intersecting: 0x0+5+10 x 0x0+5+10
[05:17:53] [PASSED] points not intersecting: 0x0+0+0 x 0x0+5+10
[05:17:53] ============= [PASSED] drm_test_rect_intersect =============
[05:17:53] ================ drm_test_rect_calc_hscale ================
[05:17:53] [PASSED] normal use
[05:17:53] [PASSED] out of max range
[05:17:53] [PASSED] out of min range
[05:17:53] [PASSED] zero dst
[05:17:53] [PASSED] negative src
[05:17:53] [PASSED] negative dst
[05:17:53] ============ [PASSED] drm_test_rect_calc_hscale ============
[05:17:53] ================ drm_test_rect_calc_vscale ================
[05:17:53] [PASSED] normal use
[05:17:53] [PASSED] out of max range
[05:17:53] [PASSED] out of min range
[05:17:53] [PASSED] zero dst
[05:17:53] [PASSED] negative src
[05:17:53] [PASSED] negative dst
[05:17:53] ============ [PASSED] drm_test_rect_calc_vscale ============
[05:17:53] ================== drm_test_rect_rotate ===================
[05:17:53] [PASSED] reflect-x
[05:17:53] [PASSED] reflect-y
[05:17:53] [PASSED] rotate-0
[05:17:53] [PASSED] rotate-90
[05:17:53] [PASSED] rotate-180
[05:17:53] [PASSED] rotate-270
[05:17:53] ============== [PASSED] drm_test_rect_rotate ===============
[05:17:53] ================ drm_test_rect_rotate_inv =================
[05:17:53] [PASSED] reflect-x
[05:17:53] [PASSED] reflect-y
[05:17:53] [PASSED] rotate-0
[05:17:53] [PASSED] rotate-90
[05:17:53] [PASSED] rotate-180
[05:17:53] [PASSED] rotate-270
[05:17:53] ============ [PASSED] drm_test_rect_rotate_inv =============
[05:17:53] ==================== [PASSED] drm_rect =====================
[05:17:53] ============================================================
[05:17:53] Testing complete. Ran 531 tests: passed: 531
[05:17:53] Elapsed time: 23.875s total, 1.350s configuring, 22.352s building, 0.170s running
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/ttm/tests/.kunitconfig
[05:17:53] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[05:17:54] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make ARCH=um O=.kunit --jobs=48
[05:18:01] Starting KUnit Kernel (1/1)...
[05:18:01] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[05:18:01] ================= ttm_device (5 subtests) ==================
[05:18:01] [PASSED] ttm_device_init_basic
[05:18:01] [PASSED] ttm_device_init_multiple
[05:18:01] [PASSED] ttm_device_fini_basic
[05:18:01] [PASSED] ttm_device_init_no_vma_man
[05:18:01] ================== ttm_device_init_pools ==================
[05:18:01] [PASSED] No DMA allocations, no DMA32 required
[05:18:01] [PASSED] DMA allocations, DMA32 required
[05:18:01] [PASSED] No DMA allocations, DMA32 required
[05:18:01] [PASSED] DMA allocations, no DMA32 required
[05:18:01] ============== [PASSED] ttm_device_init_pools ==============
[05:18:01] =================== [PASSED] ttm_device ====================
[05:18:01] ================== ttm_pool (8 subtests) ===================
[05:18:01] ================== ttm_pool_alloc_basic ===================
[05:18:01] [PASSED] One page
[05:18:01] [PASSED] More than one page
[05:18:01] [PASSED] Above the allocation limit
[05:18:01] [PASSED] One page, with coherent DMA mappings enabled
[05:18:01] [PASSED] Above the allocation limit, with coherent DMA mappings enabled
[05:18:01] ============== [PASSED] ttm_pool_alloc_basic ===============
[05:18:01] ============== ttm_pool_alloc_basic_dma_addr ==============
[05:18:01] [PASSED] One page
[05:18:01] [PASSED] More than one page
[05:18:01] [PASSED] Above the allocation limit
[05:18:01] [PASSED] One page, with coherent DMA mappings enabled
[05:18:01] [PASSED] Above the allocation limit, with coherent DMA mappings enabled
[05:18:01] ========== [PASSED] ttm_pool_alloc_basic_dma_addr ==========
[05:18:01] [PASSED] ttm_pool_alloc_order_caching_match
[05:18:01] [PASSED] ttm_pool_alloc_caching_mismatch
[05:18:01] [PASSED] ttm_pool_alloc_order_mismatch
[05:18:01] [PASSED] ttm_pool_free_dma_alloc
[05:18:01] [PASSED] ttm_pool_free_no_dma_alloc
[05:18:01] [PASSED] ttm_pool_fini_basic
[05:18:01] ==================== [PASSED] ttm_pool =====================
[05:18:01] ================ ttm_resource (8 subtests) =================
[05:18:01] ================= ttm_resource_init_basic =================
[05:18:01] [PASSED] Init resource in TTM_PL_SYSTEM
[05:18:01] [PASSED] Init resource in TTM_PL_VRAM
[05:18:01] [PASSED] Init resource in a private placement
[05:18:01] [PASSED] Init resource in TTM_PL_SYSTEM, set placement flags
[05:18:01] ============= [PASSED] ttm_resource_init_basic =============
[05:18:01] [PASSED] ttm_resource_init_pinned
[05:18:01] [PASSED] ttm_resource_fini_basic
[05:18:01] [PASSED] ttm_resource_manager_init_basic
[05:18:01] [PASSED] ttm_resource_manager_usage_basic
[05:18:01] [PASSED] ttm_resource_manager_set_used_basic
[05:18:01] [PASSED] ttm_sys_man_alloc_basic
[05:18:01] [PASSED] ttm_sys_man_free_basic
[05:18:01] ================== [PASSED] ttm_resource ===================
[05:18:01] =================== ttm_tt (15 subtests) ===================
[05:18:01] ==================== ttm_tt_init_basic ====================
[05:18:01] [PASSED] Page-aligned size
[05:18:01] [PASSED] Extra pages requested
[05:18:01] ================ [PASSED] ttm_tt_init_basic ================
[05:18:01] [PASSED] ttm_tt_init_misaligned
[05:18:01] [PASSED] ttm_tt_fini_basic
[05:18:01] [PASSED] ttm_tt_fini_sg
[05:18:01] [PASSED] ttm_tt_fini_shmem
[05:18:01] [PASSED] ttm_tt_create_basic
[05:18:01] [PASSED] ttm_tt_create_invalid_bo_type
[05:18:01] [PASSED] ttm_tt_create_ttm_exists
[05:18:01] [PASSED] ttm_tt_create_failed
[05:18:01] [PASSED] ttm_tt_destroy_basic
[05:18:01] [PASSED] ttm_tt_populate_null_ttm
[05:18:01] [PASSED] ttm_tt_populate_populated_ttm
[05:18:01] [PASSED] ttm_tt_unpopulate_basic
[05:18:01] [PASSED] ttm_tt_unpopulate_empty_ttm
[05:18:01] [PASSED] ttm_tt_swapin_basic
[05:18:01] ===================== [PASSED] ttm_tt ======================
[05:18:01] =================== ttm_bo (14 subtests) ===================
[05:18:01] =========== ttm_bo_reserve_optimistic_no_ticket ===========
[05:18:01] [PASSED] Cannot be interrupted and sleeps
[05:18:01] [PASSED] Cannot be interrupted, locks straight away
[05:18:01] [PASSED] Can be interrupted, sleeps
[05:18:01] ======= [PASSED] ttm_bo_reserve_optimistic_no_ticket =======
[05:18:01] [PASSED] ttm_bo_reserve_locked_no_sleep
[05:18:01] [PASSED] ttm_bo_reserve_no_wait_ticket
[05:18:02] [PASSED] ttm_bo_reserve_double_resv
[05:18:02] [PASSED] ttm_bo_reserve_interrupted
[05:18:02] [PASSED] ttm_bo_reserve_deadlock
[05:18:02] [PASSED] ttm_bo_unreserve_basic
[05:18:02] [PASSED] ttm_bo_unreserve_pinned
[05:18:02] [PASSED] ttm_bo_unreserve_bulk
[05:18:02] [PASSED] ttm_bo_put_basic
[05:18:02] [PASSED] ttm_bo_put_shared_resv
[05:18:02] [PASSED] ttm_bo_pin_basic
[05:18:02] [PASSED] ttm_bo_pin_unpin_resource
[05:18:02] [PASSED] ttm_bo_multiple_pin_one_unpin
[05:18:02] ===================== [PASSED] ttm_bo ======================
[05:18:02] ============== ttm_bo_validate (22 subtests) ===============
[05:18:02] ============== ttm_bo_init_reserved_sys_man ===============
[05:18:02] [PASSED] Buffer object for userspace
[05:18:02] [PASSED] Kernel buffer object
[05:18:02] [PASSED] Shared buffer object
[05:18:02] ========== [PASSED] ttm_bo_init_reserved_sys_man ===========
[05:18:02] ============== ttm_bo_init_reserved_mock_man ==============
[05:18:02] [PASSED] Buffer object for userspace
[05:18:02] [PASSED] Kernel buffer object
[05:18:02] [PASSED] Shared buffer object
[05:18:02] ========== [PASSED] ttm_bo_init_reserved_mock_man ==========
[05:18:02] [PASSED] ttm_bo_init_reserved_resv
[05:18:02] ================== ttm_bo_validate_basic ==================
[05:18:02] [PASSED] Buffer object for userspace
[05:18:02] [PASSED] Kernel buffer object
[05:18:02] [PASSED] Shared buffer object
[05:18:02] ============== [PASSED] ttm_bo_validate_basic ==============
[05:18:02] [PASSED] ttm_bo_validate_invalid_placement
[05:18:02] ============= ttm_bo_validate_same_placement ==============
[05:18:02] [PASSED] System manager
[05:18:02] [PASSED] VRAM manager
[05:18:02] ========= [PASSED] ttm_bo_validate_same_placement ==========
[05:18:02] [PASSED] ttm_bo_validate_failed_alloc
[05:18:02] [PASSED] ttm_bo_validate_pinned
[05:18:02] [PASSED] ttm_bo_validate_busy_placement
[05:18:02] ================ ttm_bo_validate_multihop =================
[05:18:02] [PASSED] Buffer object for userspace
[05:18:02] [PASSED] Kernel buffer object
[05:18:02] [PASSED] Shared buffer object
[05:18:02] ============ [PASSED] ttm_bo_validate_multihop =============
[05:18:02] ========== ttm_bo_validate_no_placement_signaled ==========
[05:18:02] [PASSED] Buffer object in system domain, no page vector
[05:18:02] [PASSED] Buffer object in system domain with an existing page vector
[05:18:02] ====== [PASSED] ttm_bo_validate_no_placement_signaled ======
[05:18:02] ======== ttm_bo_validate_no_placement_not_signaled ========
[05:18:02] [PASSED] Buffer object for userspace
[05:18:02] [PASSED] Kernel buffer object
[05:18:02] [PASSED] Shared buffer object
[05:18:02] ==== [PASSED] ttm_bo_validate_no_placement_not_signaled ====
[05:18:02] [PASSED] ttm_bo_validate_move_fence_signaled
[05:18:02] ========= ttm_bo_validate_move_fence_not_signaled =========
[05:18:02] [PASSED] Waits for GPU
[05:18:02] [PASSED] Tries to lock straight away
[05:18:02] ===== [PASSED] ttm_bo_validate_move_fence_not_signaled =====
[05:18:02] [PASSED] ttm_bo_validate_swapout
[05:18:02] [PASSED] ttm_bo_validate_happy_evict
[05:18:02] [PASSED] ttm_bo_validate_all_pinned_evict
[05:18:02] [PASSED] ttm_bo_validate_allowed_only_evict
[05:18:02] [PASSED] ttm_bo_validate_deleted_evict
[05:18:02] [PASSED] ttm_bo_validate_busy_domain_evict
[05:18:02] [PASSED] ttm_bo_validate_evict_gutting
[05:18:02] [PASSED] ttm_bo_validate_recrusive_evict
stty: 'standard input': Inappropriate ioctl for device
[05:18:02] ================= [PASSED] ttm_bo_validate =================
[05:18:02] ============================================================
[05:18:02] Testing complete. Ran 102 tests: passed: 102
[05:18:02] Elapsed time: 9.354s total, 1.426s configuring, 7.211s building, 0.613s running
+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel
^ permalink raw reply [flat|nested] 15+ messages in thread* ✗ CI.Build: failure for drm/xe/vf: Post-migration recovery worker basis (rev2)
2024-09-24 20:25 [PATCH v2 0/4] drm/xe/vf: Post-migration recovery worker basis Tomasz Lis
` (6 preceding siblings ...)
2024-09-26 5:18 ` ✓ CI.KUnit: success " Patchwork
@ 2024-09-26 5:23 ` Patchwork
7 siblings, 0 replies; 15+ messages in thread
From: Patchwork @ 2024-09-26 5:23 UTC (permalink / raw)
To: Tomasz Lis; +Cc: intel-xe
== Series Details ==
Series: drm/xe/vf: Post-migration recovery worker basis (rev2)
URL : https://patchwork.freedesktop.org/series/138935/
State : failure
== Summary ==
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml2_dc_resource_mgmt.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml2_mall_phantom.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml_display_rq_dlg_calc.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_top/dml_top.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_top/dml_top_mcache.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_top/dml2_top_optimization.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/inc/dml2_debug.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_core/dml2_core_factory.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_factory.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_mcg/dml2_mcg_dcn4.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_mcg/dml2_mcg_factory.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn3.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_factory.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_standalone_libraries/lib_float_math.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/dml21_translation_helper.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/dml21_wrapper.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/dml21_utils.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dce120/dce120_timing_generator.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dce112/dce112_compressor.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_timing_generator.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_compressor.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_opp_regamma_v.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_opp_csc_v.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_timing_generator_v.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_mem_input_v.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_opp_v.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_transform_v.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dce80/dce80_timing_generator.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_timing_generator.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_hw_sequencer.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dce60/dce60_resource.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/hdcp/hdcp_msg.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/spl/dc_spl.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/spl/dc_spl_scl_filters.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/spl/dc_spl_scl_easf_filters.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/spl/dc_spl_isharp_filters.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/spl/dc_spl_filters.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/spl/spl_fixpt31_32.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/spl/spl_custom_float.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stat.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_resource.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_hw_sequencer.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_sink.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_surface.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_debug.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_enc_cfg.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_exports.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_state.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_vm_helper.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dc_helper.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dmub_srv.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dc_edid_parser.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dc/dc_spl_translate.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/modules/freesync/freesync.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/modules/color/color_gamma.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/modules/color/color_table.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/modules/info_packet/info_packet.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/modules/power/power_helpers.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_srv.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_srv_stat.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_reg.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn20.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn21.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn30.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn301.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn302.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn303.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn31.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn314.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn315.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn316.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn32.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn35.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn351.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/dmub/src/dmub_dcn401.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp_ddc.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp_log.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp_psp.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp1_execution.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp1_transition.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp2_execution.o
CC [M] drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp2_transition.o
LD [M] drivers/gpu/drm/amd/amdgpu/amdgpu.o
make[5]: *** [../scripts/Makefile.build:485: drivers/gpu/drm] Error 2
make[4]: *** [../scripts/Makefile.build:485: drivers/gpu] Error 2
make[3]: *** [../scripts/Makefile.build:485: drivers] Error 2
make[2]: *** [/kernel/Makefile:1926: .] Error 2
make[1]: *** [/kernel/Makefile:224: __sub-make] Error 2
make[1]: Leaving directory '/kernel/build64-default'
make: *** [Makefile:224: __sub-make] Error 2
+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel
^ permalink raw reply [flat|nested] 15+ messages in thread