All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Martin Krastev (VMware)" <martinkrastev768@gmail.com>
To: Zack Rusin <zackr@vmware.com>, dri-devel@lists.freedesktop.org
Cc: krastevm@vmware.com, mombasawalam@vmware.com, banackm@vmware.com,
	Nicholas Hunt <nhunt@vmware.com>
Subject: Re: [PATCH] drm/vmwgfx: Don't use screen objects when SEV is active
Date: Thu, 1 Dec 2022 21:05:12 +0200	[thread overview]
Message-ID: <5fa3d069-e0dc-ebdc-2cac-76c41ab54283@gmail.com> (raw)
In-Reply-To: <20221201175341.491884-1-zack@kde.org>

From: Martin Krastev <krastevm@vmware.com>


LGTM!


Reviewed-by: Martin Krastev <krastevm@vmware.com>


Regards,

Martin


On 1.12.22 г. 19:53 ч., Zack Rusin wrote:
> From: Zack Rusin <zackr@vmware.com>
>
> 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@vger.kernel.org> # v5.7+
> Signed-off-by: Zack Rusin <zackr@vmware.com>
> Reported-by: Nicholas Hunt <nhunt@vmware.com>
> ---
>   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;
>   	}

  reply	other threads:[~2022-12-01 19:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-01 17:53 [PATCH] drm/vmwgfx: Don't use screen objects when SEV is active Zack Rusin
2022-12-01 19:05 ` Martin Krastev (VMware) [this message]
2022-12-01 22:46 ` "Maaz Mombasawala (VMware)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5fa3d069-e0dc-ebdc-2cac-76c41ab54283@gmail.com \
    --to=martinkrastev768@gmail.com \
    --cc=banackm@vmware.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=krastevm@vmware.com \
    --cc=mombasawalam@vmware.com \
    --cc=nhunt@vmware.com \
    --cc=zackr@vmware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.