Re: [PATCH] drm/vmwgfx: Don't use screen objects when SEV is active

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Martin Krastev <krastevm@xxxxxxxxxx>


LGTM!


Reviewed-by: Martin Krastev <krastevm@xxxxxxxxxx>


Regards,

Martin


On 1.12.22 г. 19:53 ч., Zack Rusin wrote:
From: Zack Rusin <zackr@xxxxxxxxxx>

When SEV is enabled gmr's and mob's are explicitly disabled because
the encrypted system memory can not be used by the hypervisor.

The driver was disabling GMR's but the presentation code, which depends
on GMR's, wasn't honoring it which lead to black screen on hosts
with SEV enabled.

Make sure screen objects presentation is not used when guest memory
regions have been disabled to fix presentation on SEV enabled hosts.

Fixes: 3b0d6458c705 ("drm/vmwgfx: Refuse DMA operation when SEV encryption is active")
Cc: <stable@xxxxxxxxxxxxxxx> # v5.7+
Signed-off-by: Zack Rusin <zackr@xxxxxxxxxx>
Reported-by: Nicholas Hunt <nhunt@xxxxxxxxxx>
---
  drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 4 ++++
  1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
index 8db61c541a80..e1f36a09c59c 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
@@ -926,6 +926,10 @@ int vmw_kms_sou_init_display(struct vmw_private *dev_priv)
  	struct drm_device *dev = &dev_priv->drm;
  	int i;
+ /* Screen objects won't work if GMR's aren't available */
+	if (!dev_priv->has_gmr)
+		return -ENOSYS;
+
  	if (!(dev_priv->capabilities & SVGA_CAP_SCREEN_OBJECT_2)) {
  		return -ENOSYS;
  	}



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux