Skip to contentSkip to conversation

drm/i915: Add new vGPU cap info bit VGT_CAPS_HUGE_GTT

PATCH In review [email protected] 3 participants 6 messages May 8, 2018 – Jun 5, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Add new vGPU cap info bit VGT_CAPS_HUGE_GTT

From: Changbin Du <[email protected]>

This adds a new vGPU cap info bit VGT_CAPS_HUGE_GTT, which is to detect whether the host supports shadowing of huge gtt pages. If host does support it, remove the page sizes restriction for vGPU.

---
 drivers/gpu/drm/i915/i915_gem.c    | 8 ++------
 drivers/gpu/drm/i915/i915_pvinfo.h | 1 +
 drivers/gpu/drm/i915/i915_vgpu.h   | 6 ++++++
 3 files changed, 9 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/i915_gem.c +2 -6
index 484354f..e0ddfa1 100644
@@ -5355,12 +5355,8 @@ int i915_gem_init(struct drm_i915_private *dev_priv)
 {
 	int ret;
 
-	/*
-	 * We need to fallback to 4K pages since gvt gtt handling doesn't
-	 * support huge page entries - we will need to check either hypervisor
-	 * mm can support huge guest page or just do emulation in gvt.
-	 */
-	if (intel_vgpu_active(dev_priv))
+	/* We need to fallback to 4K pages if host doesn't support huge gtt. */
+	if (intel_vgpu_active(dev_priv) && !intel_vgpu_has_huge_gtt(dev_priv))
 		mkwrite_device_info(dev_priv)->page_sizes =
 			I915_GTT_PAGE_SIZE_4K;
 
drivers/gpu/drm/i915/i915_pvinfo.h +1 -0
index 195203f..55bde4a 100644
@@ -54,6 +54,7 @@ enum vgt_g2v_type {
  */
 #define VGT_CAPS_FULL_48BIT_PPGTT	BIT(2)
 #define VGT_CAPS_HWSP_EMULATION		BIT(3)
+#define VGT_CAPS_HUGE_GTT		BIT(4)
 
 struct vgt_if {
 	u64 magic;		/* VGT_MAGIC */
drivers/gpu/drm/i915/i915_vgpu.h +6 -0
index bb83384..551acc3 100644
@@ -36,6 +36,12 @@ intel_vgpu_has_hwsp_emulation(struct drm_i915_private *dev_priv)
 	return dev_priv->vgpu.caps & VGT_CAPS_HWSP_EMULATION;
 }
 
+static inline bool
+intel_vgpu_has_huge_gtt(struct drm_i915_private *dev_priv)
+{
+	return dev_priv->vgpu.caps & VGT_CAPS_HUGE_GTT;
+}
+
 int intel_vgt_balloon(struct drm_i915_private *dev_priv);
 void intel_vgt_deballoon(struct drm_i915_private *dev_priv);
 
Signature · 6 lines
2.7.4

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

✓ Fi.CI.BAT: success for drm/i915: Add new vGPU cap info bit VGT_CAPS_HUGE_GTT

== Series Details ==

== Series Details ==

Series: drm/i915: Add new vGPU cap info bit VGT_CAPS_HUGE_GTT
URL : https://patchwork.freedesktop.org/series/42861/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4153 -> Patchwork_8937 =

== Summary - SUCCESS ==

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/42861/revisions/1/mbox/

== Known issues ==

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

=== IGT changes ===

    ==== Issues hit ====

    igt@gem_ctx_create@basic-files:
      fi-skl-gvtdvm:      PASS -> INCOMPLETE (fdo#105600)

    igt@kms_flip@basic-flip-vs-dpms:
      fi-bxt-dsi:         PASS -> INCOMPLETE (fdo#103927)

    igt@kms_flip@basic-flip-vs-wf_vblank:
      fi-hsw-4770r:       PASS -> FAIL (fdo#100368)

    igt@kms_frontbuffer_tracking@basic:
      fi-hsw-4200u:       PASS -> DMESG-FAIL (fdo#102614, fdo#106103)

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      fi-snb-2520m:       PASS -> INCOMPLETE (fdo#103713)

    
    ==== Possible fixes ====

    igt@kms_cursor_legacy@basic-flip-after-cursor-legacy:
      fi-bxt-j4205:       FAIL (fdo#106436) -> PASS

    igt@kms_pipe_crc_basic@read-crc-pipe-c-frame-sequence:
      fi-glk-j4005:       DMESG-WARN (fdo#106097) -> PASS +1

fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#105600 https://bugs.freedesktop.org/show_bug.cgi?id=105600
fdo#106097 https://bugs.freedesktop.org/show_bug.cgi?id=106097
fdo#106103 https://bugs.freedesktop.org/show_bug.cgi?id=106103
fdo#106436 https://bugs.freedesktop.org/show_bug.cgi?id=106436

== Participating hosts (41 -> 37) ==

Missing (4): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-skl-6700hq

== Build changes ==

* Linux: CI_DRM_4153 -> Patchwork_8937

CI_DRM_4153: b360612517f613fdf14107a2f0bfc7f1f792a476 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4464: 1bb318b32db003a377da14715c7b80675a712b6b @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_8937: 6936d80afc784354cca0949b9d834e7a047e4909 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4464: 33e58d5583eb7ed3966a1b905f875a1dfa959f6b @ git://anongit.freedesktop.org/piglit

== Linux commits ==

6936d80afc78 drm/i915: Add new vGPU cap info bit VGT_CAPS_HUGE_GTT

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8937/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

✓ Fi.CI.IGT: success for drm/i915: Add new vGPU cap info bit VGT_CAPS_HUGE_GTT

In reply to [email protected]
== Series Details ==

== Series Details ==

Series: drm/i915: Add new vGPU cap info bit VGT_CAPS_HUGE_GTT
URL : https://patchwork.freedesktop.org/series/42861/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4153_full -> Patchwork_8937_full =

== Summary - WARNING ==

Minor unknown changes coming with Patchwork_8937_full need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_8937_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://patchwork.freedesktop.org/api/1.0/series/42861/revisions/1/mbox/

== Possible new issues ==

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

=== IGT changes ===

    ==== Warnings ====

    igt@pm_rc6_residency@rc6-accuracy:
      shard-kbl:          PASS -> SKIP +1

== Known issues ==

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

=== IGT changes ===

    ==== Issues hit ====

    igt@kms_flip@2x-plain-flip-ts-check-interruptible:
      shard-hsw:          PASS -> FAIL (fdo#100368)

    igt@kms_flip@absolute-wf_vblank-interruptible:
      shard-glk:          PASS -> FAIL (fdo#106087)

    igt@kms_flip@flip-vs-absolute-wf_vblank-interruptible:
      shard-kbl:          PASS -> FAIL (fdo#100368)

    igt@prime_vgem@basic-fence-flip:
      shard-apl:          PASS -> FAIL (fdo#104008)

    
    ==== Possible fixes ====

    igt@kms_cursor_legacy@2x-long-flip-vs-cursor-legacy:
      shard-hsw:          FAIL (fdo#104873) -> PASS

    igt@kms_cursor_legacy@flip-vs-cursor-toggle:
      shard-hsw:          FAIL (fdo#102670) -> PASS

    igt@kms_flip@flip-vs-absolute-wf_vblank-interruptible:
      shard-glk:          FAIL (fdo#100368) -> PASS

    igt@kms_flip@plain-flip-ts-check:
      shard-hsw:          FAIL (fdo#100368) -> PASS

    igt@kms_vblank@pipe-c-ts-continuation-modeset:
      shard-kbl:          DMESG-WARN (fdo#106247) -> PASS

fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#102670 https://bugs.freedesktop.org/show_bug.cgi?id=102670
fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
fdo#104873 https://bugs.freedesktop.org/show_bug.cgi?id=104873
fdo#106087 https://bugs.freedesktop.org/show_bug.cgi?id=106087
fdo#106247 https://bugs.freedesktop.org/show_bug.cgi?id=106247

== Participating hosts (6 -> 5) ==

Missing (1): pig-snb-2600

== Build changes ==

* Linux: CI_DRM_4153 -> Patchwork_8937

CI_DRM_4153: b360612517f613fdf14107a2f0bfc7f1f792a476 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4464: 1bb318b32db003a377da14715c7b80675a712b6b @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_8937: 6936d80afc784354cca0949b9d834e7a047e4909 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4464: 33e58d5583eb7ed3966a1b905f875a1dfa959f6b @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8937/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

maintainer Reviewed-by on v1 1/1
#3 lore raw
In reply to [email protected]

Quoting [email protected] (2018-05-08 12:07:05)

Quoted 7 lines

From: Changbin Du <[email protected]>

This adds a new vGPU cap info bit VGT_CAPS_HUGE_GTT, which is to detect whether the host supports shadowing of huge gtt pages. If host does support it, remove the page sizes restriction for vGPU.

I'll merge this.

Regards, Joonas
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw

✓ Fi.CI.BAT: success for drm/i915: Add new vGPU cap info bit VGT_CAPS_HUGE_GTT

In reply to [email protected]
== Series Details ==

== Series Details ==

Series: drm/i915: Add new vGPU cap info bit VGT_CAPS_HUGE_GTT
URL : https://patchwork.freedesktop.org/series/42861/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4278 -> Patchwork_9192 =

== Summary - SUCCESS ==

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/42861/revisions/1/mbox/

== Known issues ==

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

=== IGT changes ===

    ==== Issues hit ====

    igt@gem_sync@basic-store-all:
      fi-glk-j4005:       PASS -> DMESG-WARN (fdo#106745)

    igt@kms_flip@basic-flip-vs-wf_vblank:
      fi-skl-6770hq:      PASS -> FAIL (fdo#100368, fdo#103928)

    igt@kms_frontbuffer_tracking@basic:
      fi-hsw-peppy:       PASS -> DMESG-WARN (fdo#106607)

    
    ==== Possible fixes ====

    igt@kms_flip@basic-flip-vs-wf_vblank:
      fi-cfl-s3:          FAIL (fdo#100368) -> PASS

    igt@kms_pipe_crc_basic@read-crc-pipe-b-frame-sequence:
      fi-glk-j4005:       FAIL (fdo#103481) -> PASS

    igt@kms_pipe_crc_basic@read-crc-pipe-c:
      fi-glk-j4005:       DMESG-WARN (fdo#106000) -> PASS

    igt@prime_vgem@basic-fence-flip:
      fi-ilk-650:         FAIL (fdo#104008) -> PASS

fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103481 https://bugs.freedesktop.org/show_bug.cgi?id=103481
fdo#103928 https://bugs.freedesktop.org/show_bug.cgi?id=103928
fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
fdo#106000 https://bugs.freedesktop.org/show_bug.cgi?id=106000
fdo#106607 https://bugs.freedesktop.org/show_bug.cgi?id=106607
fdo#106745 https://bugs.freedesktop.org/show_bug.cgi?id=106745

== Participating hosts (40 -> 37) ==

Additional (1): fi-bxt-dsi
Missing (4): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-skl-6700hq

== Build changes ==

* Linux: CI_DRM_4278 -> Patchwork_9192

CI_DRM_4278: 6832f9f1d1d74ea696ae703d6ce9aa195be663f2 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4506: 6c9d04797b7ef972b1b3746df6985071d1d2de26 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9192: 206b10d6d40724f0e6cef7827579da57863eab2a @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

206b10d6d407 drm/i915: Add new vGPU cap info bit VGT_CAPS_HUGE_GTT

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9192/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#5 lore raw

✗ Fi.CI.IGT: failure for drm/i915: Add new vGPU cap info bit VGT_CAPS_HUGE_GTT

In reply to [email protected]
== Series Details ==

== Series Details ==

Series: drm/i915: Add new vGPU cap info bit VGT_CAPS_HUGE_GTT
URL : https://patchwork.freedesktop.org/series/42861/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM_4278_full -> Patchwork_9192_full =

== Summary - FAILURE ==

Serious unknown changes coming with Patchwork_9192_full absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_9192_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://patchwork.freedesktop.org/api/1.0/series/42861/revisions/1/mbox/

== Possible new issues ==

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

=== IGT changes ===

    ==== Possible regressions ====

    igt@kms_draw_crc@draw-method-rgb565-blt-ytiled:
      shard-apl:          PASS -> DMESG-WARN

    
    ==== Warnings ====

    igt@gem_exec_schedule@deep-bsd2:
      shard-kbl:          PASS -> SKIP +1

== Known issues ==

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

=== IGT changes ===

    ==== Issues hit ====

    igt@drv_selftest@live_gtt:
      shard-apl:          PASS -> INCOMPLETE (fdo#103927)

    igt@drv_selftest@live_hangcheck:
      shard-kbl:          PASS -> DMESG-FAIL (fdo#106560)

    igt@gem_eio@hibernate:
      shard-snb:          PASS -> FAIL (fdo#105957)

    igt@gem_eio@in-flight-suspend:
      shard-kbl:          PASS -> INCOMPLETE (fdo#106702, fdo#103665)

    igt@kms_flip@2x-plain-flip-ts-check-interruptible:
      shard-glk:          PASS -> FAIL (fdo#100368)

    igt@kms_flip@dpms-vs-vblank-race-interruptible:
      shard-hsw:          PASS -> FAIL (fdo#103060)

    igt@kms_flip_tiling@flip-to-x-tiled:
      shard-glk:          PASS -> FAIL (fdo#104724)

    igt@kms_flip_tiling@flip-x-tiled:
      shard-glk:          PASS -> FAIL (fdo#104724, fdo#103822) +1

    igt@kms_setmode@basic:
      shard-apl:          PASS -> FAIL (fdo#99912)

    igt@kms_vblank@pipe-a-accuracy-idle:
      shard-glk:          PASS -> FAIL (fdo#102583)

    igt@perf@blocking:
      shard-hsw:          PASS -> FAIL (fdo#102252)

    
    ==== Possible fixes ====

    igt@gem_exec_big:
      shard-hsw:          INCOMPLETE (fdo#103540) -> PASS

    igt@kms_atomic_transition@1x-modeset-transitions-nonblocking-fencing:
      shard-glk:          FAIL (fdo#105703) -> PASS

    igt@kms_cursor_legacy@cursor-vs-flip-varying-size:
      shard-hsw:          FAIL (fdo#103355) -> PASS

    igt@kms_flip@2x-flip-vs-wf_vblank-interruptible:
      shard-glk:          FAIL (fdo#100368) -> PASS

    igt@kms_flip@flip-vs-expired-vblank-interruptible:
      shard-glk:          FAIL (fdo#105363) -> PASS

    igt@kms_flip_tiling@flip-y-tiled:
      shard-glk:          FAIL (fdo#104724) -> PASS

    igt@perf@polling:
      shard-hsw:          FAIL (fdo#102252) -> PASS

    
    ==== Warnings ====

    igt@gem_eio@suspend:
      shard-snb:          INCOMPLETE (fdo#105411) -> DMESG-FAIL (fdo#106808)

fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#102583 https://bugs.freedesktop.org/show_bug.cgi?id=102583
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#103355 https://bugs.freedesktop.org/show_bug.cgi?id=103355
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#103822 https://bugs.freedesktop.org/show_bug.cgi?id=103822
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#104724 https://bugs.freedesktop.org/show_bug.cgi?id=104724
fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
fdo#105703 https://bugs.freedesktop.org/show_bug.cgi?id=105703
fdo#105957 https://bugs.freedesktop.org/show_bug.cgi?id=105957
fdo#106560 https://bugs.freedesktop.org/show_bug.cgi?id=106560
fdo#106702 https://bugs.freedesktop.org/show_bug.cgi?id=106702
fdo#106808 https://bugs.freedesktop.org/show_bug.cgi?id=106808
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912

== Participating hosts (5 -> 5) ==

No changes in participating hosts

== Build changes ==

* Linux: CI_DRM_4278 -> Patchwork_9192

CI_DRM_4278: 6832f9f1d1d74ea696ae703d6ce9aa195be663f2 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4506: 6c9d04797b7ef972b1b3746df6985071d1d2de26 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9192: 206b10d6d40724f0e6cef7827579da57863eab2a @ git://anongit.freedesktop.org/gfx-ci/linux

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9192/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx