All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915: Don't deballoon unused ggtt drm_mm_node in linux guest
@ 2019-08-20  5:46 ` Xiong Zhang
  0 siblings, 0 replies; 12+ messages in thread
From: Xiong Zhang @ 2019-08-20  5:46 UTC (permalink / raw)
  To: intel-gfx, intel-gvt-dev; +Cc: Xiong Zhang, stable

The following call trace may exist in linux guest dmesg when guest i915
driver is unloaded.
[   90.776610] [drm:vgt_deballoon_space.isra.0 [i915]] deballoon space: range [0x0 - 0x0] 0 KiB.
[   90.776621] BUG: unable to handle kernel NULL pointer dereference at 00000000000000c0
[   90.776691] IP: drm_mm_remove_node+0x4d/0x320 [drm]
[   90.776718] PGD 800000012c7d0067 P4D 800000012c7d0067 PUD 138e4c067 PMD 0
[   90.777091] task: ffff9adab60f2f00 task.stack: ffffaf39c0fe0000
[   90.777142] RIP: 0010:drm_mm_remove_node+0x4d/0x320 [drm]
[   90.777573] Call Trace:
[   90.777653]  intel_vgt_deballoon+0x4c/0x60 [i915]
[   90.777729]  i915_ggtt_cleanup_hw+0x121/0x190 [i915]
[   90.777792]  i915_driver_unload+0x145/0x180 [i915]
[   90.777856]  i915_pci_remove+0x15/0x20 [i915]
[   90.777890]  pci_device_remove+0x3b/0xc0
[   90.777916]  device_release_driver_internal+0x157/0x220
[   90.777945]  driver_detach+0x39/0x70
[   90.777967]  bus_remove_driver+0x51/0xd0
[   90.777990]  pci_unregister_driver+0x23/0x90
[   90.778019]  SyS_delete_module+0x1da/0x240
[   90.778045]  entry_SYSCALL_64_fastpath+0x24/0x87
[   90.778072] RIP: 0033:0x7f34312af067
[   90.778092] RSP: 002b:00007ffdea3da0d8 EFLAGS: 00000206
[   90.778297] RIP: drm_mm_remove_node+0x4d/0x320 [drm] RSP: ffffaf39c0fe3dc0
[   90.778344] ---[ end trace f4b1bc8305fc59dd ]---

Four drm_mm_node are used to reserve guest ggtt space, but some of them
may be skipped and not initialised due to space constraints in
intel_vgt_balloon(). If drm_mm_remove_node() is called with
uninitialized drm_mm_node, the above call trace occurs.

This patch check drm_mm_node's validity before calling
drm_mm_remove_node().

Fixes: ff8f797557c7("drm/i915: return the correct usable aperture size under gvt environment")
Cc: stable@vger.kernel.org
Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com>
---
 drivers/gpu/drm/i915/i915_vgpu.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_vgpu.c b/drivers/gpu/drm/i915/i915_vgpu.c
index bf2b837..d2fd66f 100644
--- a/drivers/gpu/drm/i915/i915_vgpu.c
+++ b/drivers/gpu/drm/i915/i915_vgpu.c
@@ -119,6 +119,9 @@ static struct _balloon_info_ bl_info;
 static void vgt_deballoon_space(struct i915_ggtt *ggtt,
 				struct drm_mm_node *node)
 {
+	if (!node->allocated)
+		return;
+
 	DRM_DEBUG_DRIVER("deballoon space: range [0x%llx - 0x%llx] %llu KiB.\n",
 			 node->start,
 			 node->start + node->size,
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 1/2] drm/i915: Don't deballoon unused ggtt drm_mm_node in linux guest
@ 2019-08-20  5:46 ` Xiong Zhang
  0 siblings, 0 replies; 12+ messages in thread
From: Xiong Zhang @ 2019-08-20  5:46 UTC (permalink / raw)
  To: intel-gfx, intel-gvt-dev; +Cc: stable

The following call trace may exist in linux guest dmesg when guest i915
driver is unloaded.
[   90.776610] [drm:vgt_deballoon_space.isra.0 [i915]] deballoon space: range [0x0 - 0x0] 0 KiB.
[   90.776621] BUG: unable to handle kernel NULL pointer dereference at 00000000000000c0
[   90.776691] IP: drm_mm_remove_node+0x4d/0x320 [drm]
[   90.776718] PGD 800000012c7d0067 P4D 800000012c7d0067 PUD 138e4c067 PMD 0
[   90.777091] task: ffff9adab60f2f00 task.stack: ffffaf39c0fe0000
[   90.777142] RIP: 0010:drm_mm_remove_node+0x4d/0x320 [drm]
[   90.777573] Call Trace:
[   90.777653]  intel_vgt_deballoon+0x4c/0x60 [i915]
[   90.777729]  i915_ggtt_cleanup_hw+0x121/0x190 [i915]
[   90.777792]  i915_driver_unload+0x145/0x180 [i915]
[   90.777856]  i915_pci_remove+0x15/0x20 [i915]
[   90.777890]  pci_device_remove+0x3b/0xc0
[   90.777916]  device_release_driver_internal+0x157/0x220
[   90.777945]  driver_detach+0x39/0x70
[   90.777967]  bus_remove_driver+0x51/0xd0
[   90.777990]  pci_unregister_driver+0x23/0x90
[   90.778019]  SyS_delete_module+0x1da/0x240
[   90.778045]  entry_SYSCALL_64_fastpath+0x24/0x87
[   90.778072] RIP: 0033:0x7f34312af067
[   90.778092] RSP: 002b:00007ffdea3da0d8 EFLAGS: 00000206
[   90.778297] RIP: drm_mm_remove_node+0x4d/0x320 [drm] RSP: ffffaf39c0fe3dc0
[   90.778344] ---[ end trace f4b1bc8305fc59dd ]---

Four drm_mm_node are used to reserve guest ggtt space, but some of them
may be skipped and not initialised due to space constraints in
intel_vgt_balloon(). If drm_mm_remove_node() is called with
uninitialized drm_mm_node, the above call trace occurs.

This patch check drm_mm_node's validity before calling
drm_mm_remove_node().

Fixes: ff8f797557c7("drm/i915: return the correct usable aperture size under gvt environment")
Cc: stable@vger.kernel.org
Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com>
---
 drivers/gpu/drm/i915/i915_vgpu.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_vgpu.c b/drivers/gpu/drm/i915/i915_vgpu.c
index bf2b837..d2fd66f 100644
--- a/drivers/gpu/drm/i915/i915_vgpu.c
+++ b/drivers/gpu/drm/i915/i915_vgpu.c
@@ -119,6 +119,9 @@ static struct _balloon_info_ bl_info;
 static void vgt_deballoon_space(struct i915_ggtt *ggtt,
 				struct drm_mm_node *node)
 {
+	if (!node->allocated)
+		return;
+
 	DRM_DEBUG_DRIVER("deballoon space: range [0x%llx - 0x%llx] %llu KiB.\n",
 			 node->start,
 			 node->start + node->size,
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/2] drm/i915: Move vgpu balloon info into i915_virtual_gpu struct
  2019-08-20  5:46 ` Xiong Zhang
  (?)
@ 2019-08-20  5:46 ` Xiong Zhang
  2019-08-21  3:23   ` [PATCH v2] " Xiong Zhang
  -1 siblings, 1 reply; 12+ messages in thread
From: Xiong Zhang @ 2019-08-20  5:46 UTC (permalink / raw)
  To: intel-gfx, intel-gvt-dev

vgpu ballon info consists of four drm_mm_node which is used to reserve
ggtt space, then linux guest won't use these reserved ggtt space.

Each vgpu has its own ballon info, so move ballon info into
i915_virtual_gpu structure.

Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.h  | 14 ++++++++++++
 drivers/gpu/drm/i915/i915_vgpu.c | 49 ++++++++++++++++++++--------------------
 2 files changed, 38 insertions(+), 25 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 18be8b2..9c14095 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1024,6 +1024,20 @@ struct i915_frontbuffer_tracking {
 struct i915_virtual_gpu {
 	bool active;
 	u32 caps;
+
+	struct balloon_info {
+		/*
+		 * There are up to 2 regions per mappable/unmappable graphic
+		 * memory that might be ballooned. Here, index 0/1 is for
+		 * mappable graphic memory, 2/3 for unmappable graphic memory.
+		 */
+#define VGPU_MAPPABLE_BALLOON_LOW     0
+#define VGPU_MAPPABLE_BALLOON_HIGH    1
+#define VGPU_UNMAPPABLE_BALLOON_LOW   2
+#define VGPU_UNMAPPABLE_BALLOON_HIGH  3
+#define VGPU_MAX_BALLOON_NUM          4
+		struct drm_mm_node space[VGPU_MAX_BALLOON_NUM];
+	} bl_info;
 };
 
 /* used in computing the new watermarks state */
diff --git a/drivers/gpu/drm/i915/i915_vgpu.c b/drivers/gpu/drm/i915/i915_vgpu.c
index d2fd66f..3cc53e6 100644
--- a/drivers/gpu/drm/i915/i915_vgpu.c
+++ b/drivers/gpu/drm/i915/i915_vgpu.c
@@ -105,17 +105,6 @@ bool intel_vgpu_has_full_ppgtt(struct drm_i915_private *dev_priv)
 	return dev_priv->vgpu.caps & VGT_CAPS_FULL_PPGTT;
 }
 
-struct _balloon_info_ {
-	/*
-	 * There are up to 2 regions per mappable/unmappable graphic
-	 * memory that might be ballooned. Here, index 0/1 is for mappable
-	 * graphic memory, 2/3 for unmappable graphic memory.
-	 */
-	struct drm_mm_node space[4];
-};
-
-static struct _balloon_info_ bl_info;
-
 static void vgt_deballoon_space(struct i915_ggtt *ggtt,
 				struct drm_mm_node *node)
 {
@@ -140,15 +129,16 @@ static void vgt_deballoon_space(struct i915_ggtt *ggtt,
  */
 void intel_vgt_deballoon(struct i915_ggtt *ggtt)
 {
+	struct drm_i915_private *dev_priv = ggtt->vm.i915;
 	int i;
 
-	if (!intel_vgpu_active(ggtt->vm.i915))
+	if (!intel_vgpu_active(dev_priv))
 		return;
 
 	DRM_DEBUG("VGT deballoon.\n");
 
-	for (i = 0; i < 4; i++)
-		vgt_deballoon_space(ggtt, &bl_info.space[i]);
+	for (i = 0; i < VGPU_MAX_BALLOON_NUM; i++)
+		vgt_deballoon_space(ggtt, &dev_priv->vgpu.bl_info.space[i]);
 }
 
 static int vgt_balloon_space(struct i915_ggtt *ggtt,
@@ -219,6 +209,7 @@ static int vgt_balloon_space(struct i915_ggtt *ggtt,
 int intel_vgt_balloon(struct i915_ggtt *ggtt)
 {
 	struct intel_uncore *uncore = &ggtt->vm.i915->uncore;
+	struct balloon_info *bl_info;
 	unsigned long ggtt_end = ggtt->vm.total;
 
 	unsigned long mappable_base, mappable_size, mappable_end;
@@ -253,34 +244,39 @@ int intel_vgt_balloon(struct i915_ggtt *ggtt)
 		return -EINVAL;
 	}
 
+	bl_info = &ggtt->vm.i915->vgpu.bl_info;
 	/* Unmappable graphic memory ballooning */
 	if (unmappable_base > ggtt->mappable_end) {
-		ret = vgt_balloon_space(ggtt, &bl_info.space[2],
-					ggtt->mappable_end, unmappable_base);
+		ret = vgt_balloon_space(ggtt,
+			&bl_info->space[VGPU_UNMAPPABLE_BALLOON_LOW],
+			ggtt->mappable_end, unmappable_base);
 
 		if (ret)
 			goto err;
 	}
 
 	if (unmappable_end < ggtt_end) {
-		ret = vgt_balloon_space(ggtt, &bl_info.space[3],
-					unmappable_end, ggtt_end);
+		ret = vgt_balloon_space(ggtt,
+			&bl_info->space[VGPU_UNMAPPABLE_BALLOON_HIGH],
+			unmappable_end, ggtt_end);
 		if (ret)
 			goto err_upon_mappable;
 	}
 
 	/* Mappable graphic memory ballooning */
 	if (mappable_base) {
-		ret = vgt_balloon_space(ggtt, &bl_info.space[0],
-					0, mappable_base);
+		ret = vgt_balloon_space(ggtt,
+			&bl_info->space[VGPU_MAPPABLE_BALLOON_LOW],
+			0, mappable_base);
 
 		if (ret)
 			goto err_upon_unmappable;
 	}
 
 	if (mappable_end < ggtt->mappable_end) {
-		ret = vgt_balloon_space(ggtt, &bl_info.space[1],
-					mappable_end, ggtt->mappable_end);
+		ret = vgt_balloon_space(ggtt,
+			&bl_info->space[VGPU_MAPPABLE_BALLOON_HIGH],
+			mappable_end, ggtt->mappable_end);
 
 		if (ret)
 			goto err_below_mappable;
@@ -290,11 +286,14 @@ int intel_vgt_balloon(struct i915_ggtt *ggtt)
 	return 0;
 
 err_below_mappable:
-	vgt_deballoon_space(ggtt, &bl_info.space[0]);
+	vgt_deballoon_space(ggtt,
+		&bl_info->space[VGPU_MAPPABLE_BALLOON_LOW]);
 err_upon_unmappable:
-	vgt_deballoon_space(ggtt, &bl_info.space[3]);
+	vgt_deballoon_space(ggtt,
+		&bl_info->space[VGPU_UNMAPPABLE_BALLOON_HIGH]);
 err_upon_mappable:
-	vgt_deballoon_space(ggtt, &bl_info.space[2]);
+	vgt_deballoon_space(ggtt,
+		&bl_info->space[VGPU_UNMAPPABLE_BALLOON_LOW]);
 err:
 	DRM_ERROR("VGT balloon fail\n");
 	return ret;
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/i915: Don't deballoon unused ggtt drm_mm_node in linux guest
  2019-08-20  5:46 ` Xiong Zhang
  (?)
  (?)
@ 2019-08-20  5:53 ` Patchwork
  -1 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2019-08-20  5:53 UTC (permalink / raw)
  To: Xiong Zhang; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/2] drm/i915: Don't deballoon unused ggtt drm_mm_node in linux guest
URL   : https://patchwork.freedesktop.org/series/65450/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
7d059cfb5e5c drm/i915: Don't deballoon unused ggtt drm_mm_node in linux guest
b19362df5230 drm/i915: Move vgpu balloon info into i915_virtual_gpu struct
-:99: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#99: FILE: drivers/gpu/drm/i915/i915_vgpu.c:251:
+		ret = vgt_balloon_space(ggtt,
+			&bl_info->space[VGPU_UNMAPPABLE_BALLOON_LOW],

-:110: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#110: FILE: drivers/gpu/drm/i915/i915_vgpu.c:260:
+		ret = vgt_balloon_space(ggtt,
+			&bl_info->space[VGPU_UNMAPPABLE_BALLOON_HIGH],

-:121: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#121: FILE: drivers/gpu/drm/i915/i915_vgpu.c:269:
+		ret = vgt_balloon_space(ggtt,
+			&bl_info->space[VGPU_MAPPABLE_BALLOON_LOW],

-:132: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#132: FILE: drivers/gpu/drm/i915/i915_vgpu.c:278:
+		ret = vgt_balloon_space(ggtt,
+			&bl_info->space[VGPU_MAPPABLE_BALLOON_HIGH],

-:143: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#143: FILE: drivers/gpu/drm/i915/i915_vgpu.c:290:
+	vgt_deballoon_space(ggtt,
+		&bl_info->space[VGPU_MAPPABLE_BALLOON_LOW]);

-:147: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#147: FILE: drivers/gpu/drm/i915/i915_vgpu.c:293:
+	vgt_deballoon_space(ggtt,
+		&bl_info->space[VGPU_UNMAPPABLE_BALLOON_HIGH]);

-:151: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#151: FILE: drivers/gpu/drm/i915/i915_vgpu.c:296:
+	vgt_deballoon_space(ggtt,
+		&bl_info->space[VGPU_UNMAPPABLE_BALLOON_LOW]);

total: 0 errors, 0 warnings, 7 checks, 127 lines checked

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 12+ messages in thread

* ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Don't deballoon unused ggtt drm_mm_node in linux guest
  2019-08-20  5:46 ` Xiong Zhang
                   ` (2 preceding siblings ...)
  (?)
@ 2019-08-20  6:16 ` Patchwork
  -1 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2019-08-20  6:16 UTC (permalink / raw)
  To: Xiong Zhang; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/2] drm/i915: Don't deballoon unused ggtt drm_mm_node in linux guest
URL   : https://patchwork.freedesktop.org/series/65450/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6741 -> Patchwork_14092
====================================================

Summary
-------

  **WARNING**

  Minor unknown changes coming with Patchwork_14092 need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_14092, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14092/

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in Patchwork_14092:

### IGT changes ###

#### Warnings ####

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-kbl-7500u:       [FAIL][1] ([fdo#111407]) -> [FAIL][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6741/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14092/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html

  
Known issues
------------

  Here are the changes found in Patchwork_14092 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@kms_chamelium@dp-crc-fast:
    - fi-cml-u2:          [PASS][3] -> [FAIL][4] ([fdo#110627])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6741/fi-cml-u2/igt@kms_chamelium@dp-crc-fast.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14092/fi-cml-u2/igt@kms_chamelium@dp-crc-fast.html

  * igt@kms_chamelium@dp-edid-read:
    - fi-icl-u2:          [PASS][5] -> [FAIL][6] ([fdo#109483] / [fdo#109635 ]) +1 similar issue
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6741/fi-icl-u2/igt@kms_chamelium@dp-edid-read.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14092/fi-icl-u2/igt@kms_chamelium@dp-edid-read.html

  * igt@kms_chamelium@hdmi-crc-fast:
    - fi-icl-u2:          [PASS][7] -> [FAIL][8] ([fdo#109635 ])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6741/fi-icl-u2/igt@kms_chamelium@hdmi-crc-fast.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14092/fi-icl-u2/igt@kms_chamelium@hdmi-crc-fast.html

  * igt@kms_chamelium@hdmi-edid-read:
    - fi-icl-u2:          [PASS][9] -> [FAIL][10] ([fdo#109483])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6741/fi-icl-u2/igt@kms_chamelium@hdmi-edid-read.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14092/fi-icl-u2/igt@kms_chamelium@hdmi-edid-read.html

  * igt@kms_frontbuffer_tracking@basic:
    - fi-hsw-peppy:       [PASS][11] -> [DMESG-WARN][12] ([fdo#102614])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6741/fi-hsw-peppy/igt@kms_frontbuffer_tracking@basic.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14092/fi-hsw-peppy/igt@kms_frontbuffer_tracking@basic.html

  * igt@prime_busy@basic-before-default:
    - fi-icl-u3:          [PASS][13] -> [DMESG-WARN][14] ([fdo#107724]) +1 similar issue
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6741/fi-icl-u3/igt@prime_busy@basic-before-default.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14092/fi-icl-u3/igt@prime_busy@basic-before-default.html

  
#### Possible fixes ####

  * igt@gem_busy@busy-all:
    - fi-icl-u3:          [DMESG-WARN][15] ([fdo#107724]) -> [PASS][16]
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6741/fi-icl-u3/igt@gem_busy@busy-all.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14092/fi-icl-u3/igt@gem_busy@busy-all.html

  * igt@gem_exec_suspend@basic-s3:
    - fi-blb-e6850:       [INCOMPLETE][17] ([fdo#107718]) -> [PASS][18]
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6741/fi-blb-e6850/igt@gem_exec_suspend@basic-s3.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14092/fi-blb-e6850/igt@gem_exec_suspend@basic-s3.html

  * igt@gem_sync@basic-store-each:
    - fi-cfl-8109u:       [INCOMPLETE][19] ([fdo#111427]) -> [PASS][20]
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6741/fi-cfl-8109u/igt@gem_sync@basic-store-each.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14092/fi-cfl-8109u/igt@gem_sync@basic-store-each.html

  * igt@i915_selftest@live_execlists:
    - {fi-icl-guc}:       [INCOMPLETE][21] ([fdo#107713]) -> [PASS][22]
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6741/fi-icl-guc/igt@i915_selftest@live_execlists.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14092/fi-icl-guc/igt@i915_selftest@live_execlists.html

  
#### Warnings ####

  * igt@kms_chamelium@common-hpd-after-suspend:
    - fi-icl-u2:          [DMESG-WARN][23] ([fdo#102505] / [fdo#110390]) -> [FAIL][24] ([fdo#109483])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6741/fi-icl-u2/igt@kms_chamelium@common-hpd-after-suspend.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14092/fi-icl-u2/igt@kms_chamelium@common-hpd-after-suspend.html

  * igt@kms_chamelium@dp-hpd-fast:
    - fi-icl-u2:          [FAIL][25] ([fdo#111407]) -> [FAIL][26] ([fdo#109635 ])
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6741/fi-icl-u2/igt@kms_chamelium@dp-hpd-fast.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14092/fi-icl-u2/igt@kms_chamelium@dp-hpd-fast.html

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-icl-u2:          [FAIL][27] ([fdo#111407]) -> [FAIL][28] ([fdo#109483])
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6741/fi-icl-u2/igt@kms_chamelium@hdmi-hpd-fast.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14092/fi-icl-u2/igt@kms_chamelium@hdmi-hpd-fast.html

  * igt@kms_chamelium@vga-hpd-fast:
    - fi-icl-u2:          [SKIP][29] ([fdo#109309]) -> [FAIL][30] ([fdo#109483]) +1 similar issue
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6741/fi-icl-u2/igt@kms_chamelium@vga-hpd-fast.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14092/fi-icl-u2/igt@kms_chamelium@vga-hpd-fast.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#102505]: https://bugs.freedesktop.org/show_bug.cgi?id=102505
  [fdo#102614]: https://bugs.freedesktop.org/show_bug.cgi?id=102614
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
  [fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
  [fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309
  [fdo#109483]: https://bugs.freedesktop.org/show_bug.cgi?id=109483
  [fdo#109635 ]: https://bugs.freedesktop.org/show_bug.cgi?id=109635 
  [fdo#110390]: https://bugs.freedesktop.org/show_bug.cgi?id=110390
  [fdo#110627]: https://bugs.freedesktop.org/show_bug.cgi?id=110627
  [fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407
  [fdo#111427]: https://bugs.freedesktop.org/show_bug.cgi?id=111427


Participating hosts (55 -> 46)
------------------------------

  Missing    (9): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-apl-guc fi-icl-y fi-byt-clapper fi-bdw-samus 


Build changes
-------------

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_6741 -> Patchwork_14092

  CI-20190529: 20190529
  CI_DRM_6741: 0db9333be821acadbf8c476e13b160522d252d77 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5141: 7102b417fedc2a1ea6f72d768a9f1bd100a34f13 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_14092: b19362df52307a3a540911d2917b20ff8db37b02 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

b19362df5230 drm/i915: Move vgpu balloon info into i915_virtual_gpu struct
7d059cfb5e5c drm/i915: Don't deballoon unused ggtt drm_mm_node in linux guest

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14092/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v2] drm/i915: Move vgpu balloon info into i915_virtual_gpu struct
  2019-08-20  5:46 ` [PATCH 2/2] drm/i915: Move vgpu balloon info into i915_virtual_gpu struct Xiong Zhang
@ 2019-08-21  3:23   ` Xiong Zhang
  2019-08-28  6:06     ` Zhenyu Wang
  0 siblings, 1 reply; 12+ messages in thread
From: Xiong Zhang @ 2019-08-21  3:23 UTC (permalink / raw)
  To: intel-gfx, intel-gvt-dev

vgpu ballon info consists of four drm_mm_node which is used to reserve
ggtt space, then linux guest won't use these reserved ggtt space.

Each vgpu has its own ballon info, so move ballon info into
i915_virtual_gpu structure.

v2: Fix dim PARENTHESIS_ALIGNMENT check warning

Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.h  | 14 ++++++++++++++
 drivers/gpu/drm/i915/i915_vgpu.c | 40 +++++++++++++++++-----------------------
 2 files changed, 31 insertions(+), 23 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 18be8b2..9c14095 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1024,6 +1024,20 @@ struct i915_frontbuffer_tracking {
 struct i915_virtual_gpu {
 	bool active;
 	u32 caps;
+
+	struct balloon_info {
+		/*
+		 * There are up to 2 regions per mappable/unmappable graphic
+		 * memory that might be ballooned. Here, index 0/1 is for
+		 * mappable graphic memory, 2/3 for unmappable graphic memory.
+		 */
+#define VGPU_MAPPABLE_BALLOON_LOW     0
+#define VGPU_MAPPABLE_BALLOON_HIGH    1
+#define VGPU_UNMAPPABLE_BALLOON_LOW   2
+#define VGPU_UNMAPPABLE_BALLOON_HIGH  3
+#define VGPU_MAX_BALLOON_NUM          4
+		struct drm_mm_node space[VGPU_MAX_BALLOON_NUM];
+	} bl_info;
 };
 
 /* used in computing the new watermarks state */
diff --git a/drivers/gpu/drm/i915/i915_vgpu.c b/drivers/gpu/drm/i915/i915_vgpu.c
index d2fd66f..0ed35f4 100644
--- a/drivers/gpu/drm/i915/i915_vgpu.c
+++ b/drivers/gpu/drm/i915/i915_vgpu.c
@@ -105,17 +105,6 @@ bool intel_vgpu_has_full_ppgtt(struct drm_i915_private *dev_priv)
 	return dev_priv->vgpu.caps & VGT_CAPS_FULL_PPGTT;
 }
 
-struct _balloon_info_ {
-	/*
-	 * There are up to 2 regions per mappable/unmappable graphic
-	 * memory that might be ballooned. Here, index 0/1 is for mappable
-	 * graphic memory, 2/3 for unmappable graphic memory.
-	 */
-	struct drm_mm_node space[4];
-};
-
-static struct _balloon_info_ bl_info;
-
 static void vgt_deballoon_space(struct i915_ggtt *ggtt,
 				struct drm_mm_node *node)
 {
@@ -140,15 +129,16 @@ static void vgt_deballoon_space(struct i915_ggtt *ggtt,
  */
 void intel_vgt_deballoon(struct i915_ggtt *ggtt)
 {
+	struct drm_i915_private *dev_priv = ggtt->vm.i915;
 	int i;
 
-	if (!intel_vgpu_active(ggtt->vm.i915))
+	if (!intel_vgpu_active(dev_priv))
 		return;
 
 	DRM_DEBUG("VGT deballoon.\n");
 
-	for (i = 0; i < 4; i++)
-		vgt_deballoon_space(ggtt, &bl_info.space[i]);
+	for (i = 0; i < VGPU_MAX_BALLOON_NUM; i++)
+		vgt_deballoon_space(ggtt, &dev_priv->vgpu.bl_info.space[i]);
 }
 
 static int vgt_balloon_space(struct i915_ggtt *ggtt,
@@ -219,6 +209,7 @@ static int vgt_balloon_space(struct i915_ggtt *ggtt,
 int intel_vgt_balloon(struct i915_ggtt *ggtt)
 {
 	struct intel_uncore *uncore = &ggtt->vm.i915->uncore;
+	struct drm_mm_node *space;
 	unsigned long ggtt_end = ggtt->vm.total;
 
 	unsigned long mappable_base, mappable_size, mappable_end;
@@ -253,9 +244,11 @@ int intel_vgt_balloon(struct i915_ggtt *ggtt)
 		return -EINVAL;
 	}
 
+	space = ggtt->vm.i915->vgpu.bl_info.space;
 	/* Unmappable graphic memory ballooning */
 	if (unmappable_base > ggtt->mappable_end) {
-		ret = vgt_balloon_space(ggtt, &bl_info.space[2],
+		ret = vgt_balloon_space(ggtt,
+					&space[VGPU_UNMAPPABLE_BALLOON_LOW],
 					ggtt->mappable_end, unmappable_base);
 
 		if (ret)
@@ -263,7 +256,8 @@ int intel_vgt_balloon(struct i915_ggtt *ggtt)
 	}
 
 	if (unmappable_end < ggtt_end) {
-		ret = vgt_balloon_space(ggtt, &bl_info.space[3],
+		ret = vgt_balloon_space(ggtt,
+					&space[VGPU_UNMAPPABLE_BALLOON_HIGH],
 					unmappable_end, ggtt_end);
 		if (ret)
 			goto err_upon_mappable;
@@ -271,17 +265,17 @@ int intel_vgt_balloon(struct i915_ggtt *ggtt)
 
 	/* Mappable graphic memory ballooning */
 	if (mappable_base) {
-		ret = vgt_balloon_space(ggtt, &bl_info.space[0],
+		ret = vgt_balloon_space(ggtt,
+					&space[VGPU_MAPPABLE_BALLOON_LOW],
 					0, mappable_base);
-
 		if (ret)
 			goto err_upon_unmappable;
 	}
 
 	if (mappable_end < ggtt->mappable_end) {
-		ret = vgt_balloon_space(ggtt, &bl_info.space[1],
+		ret = vgt_balloon_space(ggtt,
+					&space[VGPU_MAPPABLE_BALLOON_HIGH],
 					mappable_end, ggtt->mappable_end);
-
 		if (ret)
 			goto err_below_mappable;
 	}
@@ -290,11 +284,11 @@ int intel_vgt_balloon(struct i915_ggtt *ggtt)
 	return 0;
 
 err_below_mappable:
-	vgt_deballoon_space(ggtt, &bl_info.space[0]);
+	vgt_deballoon_space(ggtt, &space[VGPU_MAPPABLE_BALLOON_LOW]);
 err_upon_unmappable:
-	vgt_deballoon_space(ggtt, &bl_info.space[3]);
+	vgt_deballoon_space(ggtt, &space[VGPU_UNMAPPABLE_BALLOON_HIGH]);
 err_upon_mappable:
-	vgt_deballoon_space(ggtt, &bl_info.space[2]);
+	vgt_deballoon_space(ggtt, &space[VGPU_UNMAPPABLE_BALLOON_LOW]);
 err:
 	DRM_ERROR("VGT balloon fail\n");
 	return ret;
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [Intel-gfx] [PATCH 1/2] drm/i915: Don't deballoon unused ggtt drm_mm_node in linux guest
  2019-08-20  5:46 ` Xiong Zhang
@ 2019-08-21  3:35   ` Zhenyu Wang
  -1 siblings, 0 replies; 12+ messages in thread
From: Zhenyu Wang @ 2019-08-21  3:35 UTC (permalink / raw)
  To: Xiong Zhang; +Cc: intel-gfx, intel-gvt-dev, stable

[-- Attachment #1: Type: text/plain, Size: 3006 bytes --]

On 2019.08.20 13:46:17 +0800, Xiong Zhang wrote:
> The following call trace may exist in linux guest dmesg when guest i915
> driver is unloaded.
> [   90.776610] [drm:vgt_deballoon_space.isra.0 [i915]] deballoon space: range [0x0 - 0x0] 0 KiB.
> [   90.776621] BUG: unable to handle kernel NULL pointer dereference at 00000000000000c0
> [   90.776691] IP: drm_mm_remove_node+0x4d/0x320 [drm]
> [   90.776718] PGD 800000012c7d0067 P4D 800000012c7d0067 PUD 138e4c067 PMD 0
> [   90.777091] task: ffff9adab60f2f00 task.stack: ffffaf39c0fe0000
> [   90.777142] RIP: 0010:drm_mm_remove_node+0x4d/0x320 [drm]
> [   90.777573] Call Trace:
> [   90.777653]  intel_vgt_deballoon+0x4c/0x60 [i915]
> [   90.777729]  i915_ggtt_cleanup_hw+0x121/0x190 [i915]
> [   90.777792]  i915_driver_unload+0x145/0x180 [i915]
> [   90.777856]  i915_pci_remove+0x15/0x20 [i915]
> [   90.777890]  pci_device_remove+0x3b/0xc0
> [   90.777916]  device_release_driver_internal+0x157/0x220
> [   90.777945]  driver_detach+0x39/0x70
> [   90.777967]  bus_remove_driver+0x51/0xd0
> [   90.777990]  pci_unregister_driver+0x23/0x90
> [   90.778019]  SyS_delete_module+0x1da/0x240
> [   90.778045]  entry_SYSCALL_64_fastpath+0x24/0x87
> [   90.778072] RIP: 0033:0x7f34312af067
> [   90.778092] RSP: 002b:00007ffdea3da0d8 EFLAGS: 00000206
> [   90.778297] RIP: drm_mm_remove_node+0x4d/0x320 [drm] RSP: ffffaf39c0fe3dc0
> [   90.778344] ---[ end trace f4b1bc8305fc59dd ]---
> 
> Four drm_mm_node are used to reserve guest ggtt space, but some of them
> may be skipped and not initialised due to space constraints in
> intel_vgt_balloon(). If drm_mm_remove_node() is called with
> uninitialized drm_mm_node, the above call trace occurs.
> 
> This patch check drm_mm_node's validity before calling
> drm_mm_remove_node().
> 
> Fixes: ff8f797557c7("drm/i915: return the correct usable aperture size under gvt environment")
> Cc: stable@vger.kernel.org
> Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_vgpu.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_vgpu.c b/drivers/gpu/drm/i915/i915_vgpu.c
> index bf2b837..d2fd66f 100644
> --- a/drivers/gpu/drm/i915/i915_vgpu.c
> +++ b/drivers/gpu/drm/i915/i915_vgpu.c
> @@ -119,6 +119,9 @@ static struct _balloon_info_ bl_info;
>  static void vgt_deballoon_space(struct i915_ggtt *ggtt,
>  				struct drm_mm_node *node)
>  {
> +	if (!node->allocated)
> +		return;
> +
>  	DRM_DEBUG_DRIVER("deballoon space: range [0x%llx - 0x%llx] %llu KiB.\n",
>  			 node->start,
>  			 node->start + node->size,

Searching shows this is pretty old one and also with r-b from Chris,
but be ignored that nobody picked this up..

I think I hit this once too and tried to fix it another way,
but this looks simpler to me.

Acked-by: Zhenyu Wang <zhenyuw@linux.intel.com>

-- 
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/2] drm/i915: Don't deballoon unused ggtt drm_mm_node in linux guest
@ 2019-08-21  3:35   ` Zhenyu Wang
  0 siblings, 0 replies; 12+ messages in thread
From: Zhenyu Wang @ 2019-08-21  3:35 UTC (permalink / raw)
  To: Xiong Zhang; +Cc: intel-gfx, intel-gvt-dev, stable


[-- Attachment #1.1: Type: text/plain, Size: 3006 bytes --]

On 2019.08.20 13:46:17 +0800, Xiong Zhang wrote:
> The following call trace may exist in linux guest dmesg when guest i915
> driver is unloaded.
> [   90.776610] [drm:vgt_deballoon_space.isra.0 [i915]] deballoon space: range [0x0 - 0x0] 0 KiB.
> [   90.776621] BUG: unable to handle kernel NULL pointer dereference at 00000000000000c0
> [   90.776691] IP: drm_mm_remove_node+0x4d/0x320 [drm]
> [   90.776718] PGD 800000012c7d0067 P4D 800000012c7d0067 PUD 138e4c067 PMD 0
> [   90.777091] task: ffff9adab60f2f00 task.stack: ffffaf39c0fe0000
> [   90.777142] RIP: 0010:drm_mm_remove_node+0x4d/0x320 [drm]
> [   90.777573] Call Trace:
> [   90.777653]  intel_vgt_deballoon+0x4c/0x60 [i915]
> [   90.777729]  i915_ggtt_cleanup_hw+0x121/0x190 [i915]
> [   90.777792]  i915_driver_unload+0x145/0x180 [i915]
> [   90.777856]  i915_pci_remove+0x15/0x20 [i915]
> [   90.777890]  pci_device_remove+0x3b/0xc0
> [   90.777916]  device_release_driver_internal+0x157/0x220
> [   90.777945]  driver_detach+0x39/0x70
> [   90.777967]  bus_remove_driver+0x51/0xd0
> [   90.777990]  pci_unregister_driver+0x23/0x90
> [   90.778019]  SyS_delete_module+0x1da/0x240
> [   90.778045]  entry_SYSCALL_64_fastpath+0x24/0x87
> [   90.778072] RIP: 0033:0x7f34312af067
> [   90.778092] RSP: 002b:00007ffdea3da0d8 EFLAGS: 00000206
> [   90.778297] RIP: drm_mm_remove_node+0x4d/0x320 [drm] RSP: ffffaf39c0fe3dc0
> [   90.778344] ---[ end trace f4b1bc8305fc59dd ]---
> 
> Four drm_mm_node are used to reserve guest ggtt space, but some of them
> may be skipped and not initialised due to space constraints in
> intel_vgt_balloon(). If drm_mm_remove_node() is called with
> uninitialized drm_mm_node, the above call trace occurs.
> 
> This patch check drm_mm_node's validity before calling
> drm_mm_remove_node().
> 
> Fixes: ff8f797557c7("drm/i915: return the correct usable aperture size under gvt environment")
> Cc: stable@vger.kernel.org
> Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_vgpu.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_vgpu.c b/drivers/gpu/drm/i915/i915_vgpu.c
> index bf2b837..d2fd66f 100644
> --- a/drivers/gpu/drm/i915/i915_vgpu.c
> +++ b/drivers/gpu/drm/i915/i915_vgpu.c
> @@ -119,6 +119,9 @@ static struct _balloon_info_ bl_info;
>  static void vgt_deballoon_space(struct i915_ggtt *ggtt,
>  				struct drm_mm_node *node)
>  {
> +	if (!node->allocated)
> +		return;
> +
>  	DRM_DEBUG_DRIVER("deballoon space: range [0x%llx - 0x%llx] %llu KiB.\n",
>  			 node->start,
>  			 node->start + node->size,

Searching shows this is pretty old one and also with r-b from Chris,
but be ignored that nobody picked this up..

I think I hit this once too and tried to fix it another way,
but this looks simpler to me.

Acked-by: Zhenyu Wang <zhenyuw@linux.intel.com>

-- 
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 12+ messages in thread

* ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Don't deballoon unused ggtt drm_mm_node in linux guest (rev2)
  2019-08-20  5:46 ` Xiong Zhang
                   ` (4 preceding siblings ...)
  (?)
@ 2019-08-21  4:03 ` Patchwork
  -1 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2019-08-21  4:03 UTC (permalink / raw)
  To: Xiong Zhang; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/2] drm/i915: Don't deballoon unused ggtt drm_mm_node in linux guest (rev2)
URL   : https://patchwork.freedesktop.org/series/65450/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6750 -> Patchwork_14115
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14115/

Known issues
------------

  Here are the changes found in Patchwork_14115 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_sync@basic-store-each:
    - fi-cfl-8109u:       [PASS][1] -> [INCOMPLETE][2] ([fdo#111427])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6750/fi-cfl-8109u/igt@gem_sync@basic-store-each.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14115/fi-cfl-8109u/igt@gem_sync@basic-store-each.html

  * igt@i915_selftest@live_execlists:
    - fi-skl-gvtdvm:      [PASS][3] -> [DMESG-FAIL][4] ([fdo#111108])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6750/fi-skl-gvtdvm/igt@i915_selftest@live_execlists.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14115/fi-skl-gvtdvm/igt@i915_selftest@live_execlists.html

  * igt@kms_chamelium@common-hpd-after-suspend:
    - fi-cml-u2:          [PASS][5] -> [DMESG-WARN][6] ([fdo#102505])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6750/fi-cml-u2/igt@kms_chamelium@common-hpd-after-suspend.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14115/fi-cml-u2/igt@kms_chamelium@common-hpd-after-suspend.html

  
#### Possible fixes ####

  * igt@i915_selftest@live_reset:
    - fi-icl-u2:          [INCOMPLETE][7] ([fdo#107713]) -> [PASS][8]
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6750/fi-icl-u2/igt@i915_selftest@live_reset.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14115/fi-icl-u2/igt@i915_selftest@live_reset.html

  
#### Warnings ####

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-kbl-7500u:       [FAIL][9] ([fdo#111096]) -> [FAIL][10] ([fdo#111407])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6750/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14115/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html

  
  [fdo#102505]: https://bugs.freedesktop.org/show_bug.cgi?id=102505
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
  [fdo#111108]: https://bugs.freedesktop.org/show_bug.cgi?id=111108
  [fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407
  [fdo#111427]: https://bugs.freedesktop.org/show_bug.cgi?id=111427


Participating hosts (50 -> 43)
------------------------------

  Additional (3): fi-skl-guc fi-apl-guc fi-pnv-d510 
  Missing    (10): fi-kbl-soraka fi-ilk-m540 fi-icl-u4 fi-hsw-4200u fi-glk-dsi fi-byt-squawks fi-bsw-cyan fi-icl-y fi-byt-clapper fi-bdw-samus 


Build changes
-------------

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_6750 -> Patchwork_14115

  CI-20190529: 20190529
  CI_DRM_6750: ba37f74dbdc1e78e70a5a2e5f4ce8d762d06eaa7 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5146: 357dbe1869d88a2f08bcee4eebceff4ee9014424 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_14115: 72927077d2925b6825b7ebbe925b73d2ffc57a98 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

72927077d292 drm/i915: Move vgpu balloon info into i915_virtual_gpu struct
ee2c19c43308 drm/i915: Don't deballoon unused ggtt drm_mm_node in linux guest

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14115/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 12+ messages in thread

* ✓ Fi.CI.IGT: success for series starting with [1/2] drm/i915: Don't deballoon unused ggtt drm_mm_node in linux guest (rev2)
  2019-08-20  5:46 ` Xiong Zhang
                   ` (5 preceding siblings ...)
  (?)
@ 2019-08-21 16:58 ` Patchwork
  -1 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2019-08-21 16:58 UTC (permalink / raw)
  To: Xiong Zhang; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/2] drm/i915: Don't deballoon unused ggtt drm_mm_node in linux guest (rev2)
URL   : https://patchwork.freedesktop.org/series/65450/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6750_full -> Patchwork_14115_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  

Known issues
------------

  Here are the changes found in Patchwork_14115_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_async@concurrent-writes-bsd:
    - shard-iclb:         [PASS][1] -> [SKIP][2] ([fdo#111325]) +3 similar issues
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6750/shard-iclb3/igt@gem_exec_async@concurrent-writes-bsd.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14115/shard-iclb1/igt@gem_exec_async@concurrent-writes-bsd.html

  * igt@gem_exec_schedule@preempt-queue-chain-bsd2:
    - shard-iclb:         [PASS][3] -> [SKIP][4] ([fdo#109276]) +13 similar issues
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6750/shard-iclb4/igt@gem_exec_schedule@preempt-queue-chain-bsd2.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14115/shard-iclb5/igt@gem_exec_schedule@preempt-queue-chain-bsd2.html

  * igt@gem_tiled_swapping@non-threaded:
    - shard-glk:          [PASS][5] -> [DMESG-WARN][6] ([fdo#108686])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6750/shard-glk3/igt@gem_tiled_swapping@non-threaded.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14115/shard-glk1/igt@gem_tiled_swapping@non-threaded.html

  * igt@i915_pm_backlight@fade_with_suspend:
    - shard-skl:          [PASS][7] -> [INCOMPLETE][8] ([fdo#104108]) +1 similar issue
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6750/shard-skl4/igt@i915_pm_backlight@fade_with_suspend.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14115/shard-skl8/igt@i915_pm_backlight@fade_with_suspend.html

  * igt@kms_flip@flip-vs-expired-vblank:
    - shard-skl:          [PASS][9] -> [FAIL][10] ([fdo#105363])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6750/shard-skl5/igt@kms_flip@flip-vs-expired-vblank.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14115/shard-skl3/igt@kms_flip@flip-vs-expired-vblank.html

  * igt@kms_flip@flip-vs-suspend-interruptible:
    - shard-apl:          [PASS][11] -> [DMESG-WARN][12] ([fdo#108566]) +6 similar issues
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6750/shard-apl3/igt@kms_flip@flip-vs-suspend-interruptible.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14115/shard-apl6/igt@kms_flip@flip-vs-suspend-interruptible.html

  * igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-pwrite:
    - shard-iclb:         [PASS][13] -> [FAIL][14] ([fdo#103167]) +4 similar issues
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6750/shard-iclb7/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-pwrite.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14115/shard-iclb6/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-pwrite.html

  * igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
    - shard-skl:          [PASS][15] -> [FAIL][16] ([fdo#108145] / [fdo#110403])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6750/shard-skl4/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14115/shard-skl9/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html

  * igt@kms_psr@psr2_cursor_mmap_cpu:
    - shard-iclb:         [PASS][17] -> [SKIP][18] ([fdo#109441]) +2 similar issues
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6750/shard-iclb2/igt@kms_psr@psr2_cursor_mmap_cpu.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14115/shard-iclb1/igt@kms_psr@psr2_cursor_mmap_cpu.html

  * igt@kms_vblank@pipe-c-ts-continuation-modeset-hang:
    - shard-glk:          [PASS][19] -> [INCOMPLETE][20] ([fdo#103359] / [k.org#198133])
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6750/shard-glk5/igt@kms_vblank@pipe-c-ts-continuation-modeset-hang.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14115/shard-glk3/igt@kms_vblank@pipe-c-ts-continuation-modeset-hang.html

  * igt@perf_pmu@busy-start-bcs0:
    - shard-iclb:         [PASS][21] -> [INCOMPLETE][22] ([fdo#107713])
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6750/shard-iclb2/igt@perf_pmu@busy-start-bcs0.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14115/shard-iclb4/igt@perf_pmu@busy-start-bcs0.html

  
#### Possible fixes ####

  * igt@gem_ctx_shared@exec-shared-gtt-bsd2:
    - shard-iclb:         [SKIP][23] ([fdo#109276]) -> [PASS][24] +2 similar issues
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6750/shard-iclb3/igt@gem_ctx_shared@exec-shared-gtt-bsd2.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14115/shard-iclb1/igt@gem_ctx_shared@exec-shared-gtt-bsd2.html

  * igt@gem_eio@reset-stress:
    - shard-skl:          [FAIL][25] ([fdo#109661]) -> [PASS][26]
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6750/shard-skl5/igt@gem_eio@reset-stress.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14115/shard-skl3/igt@gem_eio@reset-stress.html

  * igt@gem_exec_schedule@in-order-bsd:
    - shard-iclb:         [SKIP][27] ([fdo#111325]) -> [PASS][28] +4 similar issues
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6750/shard-iclb4/igt@gem_exec_schedule@in-order-bsd.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14115/shard-iclb6/igt@gem_exec_schedule@in-order-bsd.html

  * igt@i915_pm_rps@min-max-config-loaded:
    - shard-iclb:         [FAIL][29] ([fdo#111409]) -> [PASS][30]
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6750/shard-iclb7/igt@i915_pm_rps@min-max-config-loaded.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14115/shard-iclb5/igt@i915_pm_rps@min-max-config-loaded.html

  * igt@i915_suspend@sysfs-reader:
    - shard-apl:          [DMESG-WARN][31] ([fdo#108566]) -> [PASS][32] +4 similar issues
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6750/shard-apl7/igt@i915_suspend@sysfs-reader.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14115/shard-apl3/igt@i915_suspend@sysfs-reader.html

  * igt@kms_cursor_crc@pipe-c-cursor-256x85-sliding:
    - shard-iclb:         [INCOMPLETE][33] ([fdo#107713]) -> [PASS][34]
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6750/shard-iclb7/igt@kms_cursor_crc@pipe-c-cursor-256x85-sliding.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14115/shard-iclb4/igt@kms_cursor_crc@pipe-c-cursor-256x85-sliding.html

  * igt@kms_cursor_legacy@pipe-c-single-move:
    - shard-apl:          [INCOMPLETE][35] ([fdo#103927]) -> [PASS][36] +2 similar issues
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6750/shard-apl1/igt@kms_cursor_legacy@pipe-c-single-move.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14115/shard-apl8/igt@kms_cursor_legacy@pipe-c-single-move.html

  * igt@kms_fbcon_fbt@psr-suspend:
    - shard-skl:          [INCOMPLETE][37] ([fdo#104108]) -> [PASS][38]
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6750/shard-skl10/igt@kms_fbcon_fbt@psr-suspend.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14115/shard-skl10/igt@kms_fbcon_fbt@psr-suspend.html

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-shrfb-plflip-blt:
    - shard-iclb:         [FAIL][39] ([fdo#103167]) -> [PASS][40] +3 similar issues
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6750/shard-iclb4/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-shrfb-plflip-blt.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14115/shard-iclb6/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-shrfb-plflip-blt.html

  * igt@kms_plane_lowres@pipe-a-tiling-x:
    - shard-iclb:         [FAIL][41] ([fdo#103166]) -> [PASS][42]
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6750/shard-iclb1/igt@kms_plane_lowres@pipe-a-tiling-x.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14115/shard-iclb2/igt@kms_plane_lowres@pipe-a-tiling-x.html

  * igt@kms_psr@psr2_suspend:
    - shard-iclb:         [SKIP][43] ([fdo#109441]) -> [PASS][44] +1 similar issue
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6750/shard-iclb1/igt@kms_psr@psr2_suspend.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14115/shard-iclb2/igt@kms_psr@psr2_suspend.html

  
#### Warnings ####

  * igt@gem_mocs_settings@mocs-rc6-bsd2:
    - shard-iclb:         [SKIP][45] ([fdo#109276]) -> [FAIL][46] ([fdo#111330])
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6750/shard-iclb3/igt@gem_mocs_settings@mocs-rc6-bsd2.html
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14115/shard-iclb1/igt@gem_mocs_settings@mocs-rc6-bsd2.html

  * igt@gem_mocs_settings@mocs-settings-bsd2:
    - shard-iclb:         [FAIL][47] ([fdo#111330]) -> [SKIP][48] ([fdo#109276])
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6750/shard-iclb1/igt@gem_mocs_settings@mocs-settings-bsd2.html
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14115/shard-iclb8/igt@gem_mocs_settings@mocs-settings-bsd2.html

  * igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-blt:
    - shard-skl:          [FAIL][49] ([fdo#108040]) -> [FAIL][50] ([fdo#103167])
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6750/shard-skl7/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-blt.html
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14115/shard-skl1/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-blt.html

  
  [fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103359]: https://bugs.freedesktop.org/show_bug.cgi?id=103359
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
  [fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#108040]: https://bugs.freedesktop.org/show_bug.cgi?id=108040
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
  [fdo#108686]: https://bugs.freedesktop.org/show_bug.cgi?id=108686
  [fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#109661]: https://bugs.freedesktop.org/show_bug.cgi?id=109661
  [fdo#110403]: https://bugs.freedesktop.org/show_bug.cgi?id=110403
  [fdo#111325]: https://bugs.freedesktop.org/show_bug.cgi?id=111325
  [fdo#111330]: https://bugs.freedesktop.org/show_bug.cgi?id=111330
  [fdo#111409]: https://bugs.freedesktop.org/show_bug.cgi?id=111409
  [k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133


Participating hosts (10 -> 10)
------------------------------

  No changes in participating hosts


Build changes
-------------

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_6750 -> Patchwork_14115

  CI-20190529: 20190529
  CI_DRM_6750: ba37f74dbdc1e78e70a5a2e5f4ce8d762d06eaa7 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5146: 357dbe1869d88a2f08bcee4eebceff4ee9014424 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_14115: 72927077d2925b6825b7ebbe925b73d2ffc57a98 @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14115/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Intel-gfx] [PATCH 1/2] drm/i915: Don't deballoon unused ggtt drm_mm_node in linux guest
  2019-08-21  3:35   ` Zhenyu Wang
  (?)
@ 2019-08-21 17:04   ` Chris Wilson
  -1 siblings, 0 replies; 12+ messages in thread
From: Chris Wilson @ 2019-08-21 17:04 UTC (permalink / raw)
  To: Xiong Zhang, Zhenyu Wang; +Cc: intel-gfx, intel-gvt-dev, stable

Quoting Zhenyu Wang (2019-08-21 04:35:56)
> On 2019.08.20 13:46:17 +0800, Xiong Zhang wrote:
> > The following call trace may exist in linux guest dmesg when guest i915
> > driver is unloaded.
> > [   90.776610] [drm:vgt_deballoon_space.isra.0 [i915]] deballoon space: range [0x0 - 0x0] 0 KiB.
> > [   90.776621] BUG: unable to handle kernel NULL pointer dereference at 00000000000000c0
> > [   90.776691] IP: drm_mm_remove_node+0x4d/0x320 [drm]
> > [   90.776718] PGD 800000012c7d0067 P4D 800000012c7d0067 PUD 138e4c067 PMD 0
> > [   90.777091] task: ffff9adab60f2f00 task.stack: ffffaf39c0fe0000
> > [   90.777142] RIP: 0010:drm_mm_remove_node+0x4d/0x320 [drm]
> > [   90.777573] Call Trace:
> > [   90.777653]  intel_vgt_deballoon+0x4c/0x60 [i915]
> > [   90.777729]  i915_ggtt_cleanup_hw+0x121/0x190 [i915]
> > [   90.777792]  i915_driver_unload+0x145/0x180 [i915]
> > [   90.777856]  i915_pci_remove+0x15/0x20 [i915]
> > [   90.777890]  pci_device_remove+0x3b/0xc0
> > [   90.777916]  device_release_driver_internal+0x157/0x220
> > [   90.777945]  driver_detach+0x39/0x70
> > [   90.777967]  bus_remove_driver+0x51/0xd0
> > [   90.777990]  pci_unregister_driver+0x23/0x90
> > [   90.778019]  SyS_delete_module+0x1da/0x240
> > [   90.778045]  entry_SYSCALL_64_fastpath+0x24/0x87
> > [   90.778072] RIP: 0033:0x7f34312af067
> > [   90.778092] RSP: 002b:00007ffdea3da0d8 EFLAGS: 00000206
> > [   90.778297] RIP: drm_mm_remove_node+0x4d/0x320 [drm] RSP: ffffaf39c0fe3dc0
> > [   90.778344] ---[ end trace f4b1bc8305fc59dd ]---
> > 
> > Four drm_mm_node are used to reserve guest ggtt space, but some of them
> > may be skipped and not initialised due to space constraints in
> > intel_vgt_balloon(). If drm_mm_remove_node() is called with
> > uninitialized drm_mm_node, the above call trace occurs.
> > 
> > This patch check drm_mm_node's validity before calling
> > drm_mm_remove_node().
> > 
> > Fixes: ff8f797557c7("drm/i915: return the correct usable aperture size under gvt environment")
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com>
> > ---
> >  drivers/gpu/drm/i915/i915_vgpu.c | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_vgpu.c b/drivers/gpu/drm/i915/i915_vgpu.c
> > index bf2b837..d2fd66f 100644
> > --- a/drivers/gpu/drm/i915/i915_vgpu.c
> > +++ b/drivers/gpu/drm/i915/i915_vgpu.c
> > @@ -119,6 +119,9 @@ static struct _balloon_info_ bl_info;
> >  static void vgt_deballoon_space(struct i915_ggtt *ggtt,
> >                               struct drm_mm_node *node)
> >  {
> > +     if (!node->allocated)
> > +             return;
> > +
> >       DRM_DEBUG_DRIVER("deballoon space: range [0x%llx - 0x%llx] %llu KiB.\n",
> >                        node->start,
> >                        node->start + node->size,
> 
> Searching shows this is pretty old one and also with r-b from Chris,
> but be ignored that nobody picked this up..
> 
> I think I hit this once too and tried to fix it another way,
> but this looks simpler to me.
> 
> Acked-by: Zhenyu Wang <zhenyuw@linux.intel.com>

Better late than never, I guess. Thanks for the patch and checking it
over, pushed.
-Chris

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2] drm/i915: Move vgpu balloon info into i915_virtual_gpu struct
  2019-08-21  3:23   ` [PATCH v2] " Xiong Zhang
@ 2019-08-28  6:06     ` Zhenyu Wang
  0 siblings, 0 replies; 12+ messages in thread
From: Zhenyu Wang @ 2019-08-28  6:06 UTC (permalink / raw)
  To: Xiong Zhang; +Cc: intel-gfx, intel-gvt-dev


[-- Attachment #1.1: Type: text/plain, Size: 5771 bytes --]

On 2019.08.21 11:23:10 +0800, Xiong Zhang wrote:
> vgpu ballon info consists of four drm_mm_node which is used to reserve
> ggtt space, then linux guest won't use these reserved ggtt space.
> 
> Each vgpu has its own ballon info, so move ballon info into
> i915_virtual_gpu structure.
> 
> v2: Fix dim PARENTHESIS_ALIGNMENT check warning
> 
> Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com>
> ---

Looks fine to me. You need to refresh after deballoon fix merged.

Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com>

>  drivers/gpu/drm/i915/i915_drv.h  | 14 ++++++++++++++
>  drivers/gpu/drm/i915/i915_vgpu.c | 40 +++++++++++++++++-----------------------
>  2 files changed, 31 insertions(+), 23 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 18be8b2..9c14095 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -1024,6 +1024,20 @@ struct i915_frontbuffer_tracking {
>  struct i915_virtual_gpu {
>  	bool active;
>  	u32 caps;
> +
> +	struct balloon_info {
> +		/*
> +		 * There are up to 2 regions per mappable/unmappable graphic
> +		 * memory that might be ballooned. Here, index 0/1 is for
> +		 * mappable graphic memory, 2/3 for unmappable graphic memory.
> +		 */
> +#define VGPU_MAPPABLE_BALLOON_LOW     0
> +#define VGPU_MAPPABLE_BALLOON_HIGH    1
> +#define VGPU_UNMAPPABLE_BALLOON_LOW   2
> +#define VGPU_UNMAPPABLE_BALLOON_HIGH  3
> +#define VGPU_MAX_BALLOON_NUM          4
> +		struct drm_mm_node space[VGPU_MAX_BALLOON_NUM];
> +	} bl_info;
>  };
>  
>  /* used in computing the new watermarks state */
> diff --git a/drivers/gpu/drm/i915/i915_vgpu.c b/drivers/gpu/drm/i915/i915_vgpu.c
> index d2fd66f..0ed35f4 100644
> --- a/drivers/gpu/drm/i915/i915_vgpu.c
> +++ b/drivers/gpu/drm/i915/i915_vgpu.c
> @@ -105,17 +105,6 @@ bool intel_vgpu_has_full_ppgtt(struct drm_i915_private *dev_priv)
>  	return dev_priv->vgpu.caps & VGT_CAPS_FULL_PPGTT;
>  }
>  
> -struct _balloon_info_ {
> -	/*
> -	 * There are up to 2 regions per mappable/unmappable graphic
> -	 * memory that might be ballooned. Here, index 0/1 is for mappable
> -	 * graphic memory, 2/3 for unmappable graphic memory.
> -	 */
> -	struct drm_mm_node space[4];
> -};
> -
> -static struct _balloon_info_ bl_info;
> -
>  static void vgt_deballoon_space(struct i915_ggtt *ggtt,
>  				struct drm_mm_node *node)
>  {
> @@ -140,15 +129,16 @@ static void vgt_deballoon_space(struct i915_ggtt *ggtt,
>   */
>  void intel_vgt_deballoon(struct i915_ggtt *ggtt)
>  {
> +	struct drm_i915_private *dev_priv = ggtt->vm.i915;
>  	int i;
>  
> -	if (!intel_vgpu_active(ggtt->vm.i915))
> +	if (!intel_vgpu_active(dev_priv))
>  		return;
>  
>  	DRM_DEBUG("VGT deballoon.\n");
>  
> -	for (i = 0; i < 4; i++)
> -		vgt_deballoon_space(ggtt, &bl_info.space[i]);
> +	for (i = 0; i < VGPU_MAX_BALLOON_NUM; i++)
> +		vgt_deballoon_space(ggtt, &dev_priv->vgpu.bl_info.space[i]);
>  }
>  
>  static int vgt_balloon_space(struct i915_ggtt *ggtt,
> @@ -219,6 +209,7 @@ static int vgt_balloon_space(struct i915_ggtt *ggtt,
>  int intel_vgt_balloon(struct i915_ggtt *ggtt)
>  {
>  	struct intel_uncore *uncore = &ggtt->vm.i915->uncore;
> +	struct drm_mm_node *space;
>  	unsigned long ggtt_end = ggtt->vm.total;
>  
>  	unsigned long mappable_base, mappable_size, mappable_end;
> @@ -253,9 +244,11 @@ int intel_vgt_balloon(struct i915_ggtt *ggtt)
>  		return -EINVAL;
>  	}
>  
> +	space = ggtt->vm.i915->vgpu.bl_info.space;
>  	/* Unmappable graphic memory ballooning */
>  	if (unmappable_base > ggtt->mappable_end) {
> -		ret = vgt_balloon_space(ggtt, &bl_info.space[2],
> +		ret = vgt_balloon_space(ggtt,
> +					&space[VGPU_UNMAPPABLE_BALLOON_LOW],
>  					ggtt->mappable_end, unmappable_base);
>  
>  		if (ret)
> @@ -263,7 +256,8 @@ int intel_vgt_balloon(struct i915_ggtt *ggtt)
>  	}
>  
>  	if (unmappable_end < ggtt_end) {
> -		ret = vgt_balloon_space(ggtt, &bl_info.space[3],
> +		ret = vgt_balloon_space(ggtt,
> +					&space[VGPU_UNMAPPABLE_BALLOON_HIGH],
>  					unmappable_end, ggtt_end);
>  		if (ret)
>  			goto err_upon_mappable;
> @@ -271,17 +265,17 @@ int intel_vgt_balloon(struct i915_ggtt *ggtt)
>  
>  	/* Mappable graphic memory ballooning */
>  	if (mappable_base) {
> -		ret = vgt_balloon_space(ggtt, &bl_info.space[0],
> +		ret = vgt_balloon_space(ggtt,
> +					&space[VGPU_MAPPABLE_BALLOON_LOW],
>  					0, mappable_base);
> -
>  		if (ret)
>  			goto err_upon_unmappable;
>  	}
>  
>  	if (mappable_end < ggtt->mappable_end) {
> -		ret = vgt_balloon_space(ggtt, &bl_info.space[1],
> +		ret = vgt_balloon_space(ggtt,
> +					&space[VGPU_MAPPABLE_BALLOON_HIGH],
>  					mappable_end, ggtt->mappable_end);
> -
>  		if (ret)
>  			goto err_below_mappable;
>  	}
> @@ -290,11 +284,11 @@ int intel_vgt_balloon(struct i915_ggtt *ggtt)
>  	return 0;
>  
>  err_below_mappable:
> -	vgt_deballoon_space(ggtt, &bl_info.space[0]);
> +	vgt_deballoon_space(ggtt, &space[VGPU_MAPPABLE_BALLOON_LOW]);
>  err_upon_unmappable:
> -	vgt_deballoon_space(ggtt, &bl_info.space[3]);
> +	vgt_deballoon_space(ggtt, &space[VGPU_UNMAPPABLE_BALLOON_HIGH]);
>  err_upon_mappable:
> -	vgt_deballoon_space(ggtt, &bl_info.space[2]);
> +	vgt_deballoon_space(ggtt, &space[VGPU_UNMAPPABLE_BALLOON_LOW]);
>  err:
>  	DRM_ERROR("VGT balloon fail\n");
>  	return ret;
> -- 
> 2.7.4
> 
> _______________________________________________
> intel-gvt-dev mailing list
> intel-gvt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev

-- 
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-08-28  6:06 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-20  5:46 [PATCH 1/2] drm/i915: Don't deballoon unused ggtt drm_mm_node in linux guest Xiong Zhang
2019-08-20  5:46 ` Xiong Zhang
2019-08-20  5:46 ` [PATCH 2/2] drm/i915: Move vgpu balloon info into i915_virtual_gpu struct Xiong Zhang
2019-08-21  3:23   ` [PATCH v2] " Xiong Zhang
2019-08-28  6:06     ` Zhenyu Wang
2019-08-20  5:53 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/i915: Don't deballoon unused ggtt drm_mm_node in linux guest Patchwork
2019-08-20  6:16 ` ✓ Fi.CI.BAT: success " Patchwork
2019-08-21  3:35 ` [Intel-gfx] [PATCH 1/2] " Zhenyu Wang
2019-08-21  3:35   ` Zhenyu Wang
2019-08-21 17:04   ` [Intel-gfx] " Chris Wilson
2019-08-21  4:03 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Don't deballoon unused ggtt drm_mm_node in linux guest (rev2) Patchwork
2019-08-21 16:58 ` ✓ Fi.CI.IGT: " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.