-
Notifications
You must be signed in to change notification settings - Fork 3
/
0049-xengt-fix-shutdown-failures.patch
52 lines (43 loc) · 1.42 KB
/
0049-xengt-fix-shutdown-failures.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
From 9595f48d93d293cea35d8148e3bbf6d58a0d4018 Mon Sep 17 00:00:00 2001
From: Ivan Kardykov <[email protected]>
Date: Wed, 26 Jan 2022 23:32:15 +0300
Subject: [PATCH 49/56] xengt: fix shutdown failures
Based on XCP-NG kernel patchset
https://github.com/xcp-ng-rpms/kernel
---
drivers/gpu/drm/i915/gvt/xengt.c | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/i915/gvt/xengt.c b/drivers/gpu/drm/i915/gvt/xengt.c
index 2b086acc2720..1e85ced0d5ff 100644
--- a/drivers/gpu/drm/i915/gvt/xengt.c
+++ b/drivers/gpu/drm/i915/gvt/xengt.c
@@ -1414,23 +1414,22 @@ static void xengt_logd_destroy(struct xengt_hvm_dev *info)
void xengt_instance_destroy(struct intel_vgpu *vgpu)
{
- struct xengt_hvm_dev *info = NULL;
+ struct xengt_hvm_dev *info = (struct xengt_hvm_dev *)vgpu->handle;
int vcpu;
- if (vgpu) {
- info = (struct xengt_hvm_dev *)vgpu->handle;
- intel_gvt_ops->vgpu_deactivate(vgpu);
- intel_gvt_ops->vgpu_destroy(vgpu);
+ if (info) {
+ info->vgpu = NULL;
+ info->on_destroy = true;
+ if (info->emulation_thread != NULL)
+ kthread_stop(info->emulation_thread);
}
+ intel_gvt_ops->vgpu_release(vgpu);
+ intel_gvt_ops->vgpu_destroy(vgpu);
+
if (info == NULL)
return;
- info->vgpu = NULL;
- info->on_destroy = true;
- if (info->emulation_thread != NULL)
- kthread_stop(info->emulation_thread);
-
if (!info->nr_vcpu || info->evtchn_irq == NULL)
goto out1;
--
2.34.1