1/* SPDX-License-Identifier: MIT */
2/*
3 * Copyright © 2025 Intel Corporation
4 */
5
6#ifndef _XE_SRIOV_PF_MIGRATION_TYPES_H_
7#define _XE_SRIOV_PF_MIGRATION_TYPES_H_
8
9#include <linux/types.h>
10#include <linux/mutex_types.h>
11#include <linux/wait.h>
12
13/**
14 * struct xe_sriov_pf_migration - Xe device level VF migration data
15 */
16struct xe_sriov_pf_migration {
17 /** @disabled: indicates whether VF migration feature is disabled */
18 bool disabled;
19};
20
21/**
22 * struct xe_sriov_migration_state - Per VF device-level migration related data
23 */
24struct xe_sriov_migration_state {
25 /** @wq: waitqueue used to avoid busy-waiting for snapshot production/consumption */
26 wait_queue_head_t wq;
27 /** @lock: Mutex protecting the migration data */
28 struct mutex lock;
29 /** @pending: currently processed data packet of VF resource */
30 struct xe_sriov_packet *pending;
31 /** @trailer: data packet used to indicate the end of stream */
32 struct xe_sriov_packet *trailer;
33 /** @descriptor: data packet containing the metadata describing the device */
34 struct xe_sriov_packet *descriptor;
35};
36
37#endif
38

source code of linux/drivers/gpu/drm/xe/xe_sriov_pf_migration_types.h