drm/vmwgfx: Don't use the HB port if memory encryption is active
authorThomas Hellstrom <thellstrom@vmware.com>
Thu, 14 Nov 2019 13:03:18 +0000 (13:03 +0000)
committerThomas Hellstrom <thellstrom@vmware.com>
Wed, 15 Jan 2020 10:46:57 +0000 (11:46 +0100)
commitaf4eaf10978e5b14660020f39e619059489cc694
tree0a8c5c211f8a5c66b90ec049349bdd33195226e3
parent71e7274066c646bb3d9da39d2f4db0a6404c0a2d
drm/vmwgfx: Don't use the HB port if memory encryption is active

With memory encryption active, the hypervisor typically can't read the
guest memory using the HB port, since it is encrypted using a key known
only to the guest. In that case fall back to processing 4 bytes at a time
using the ordinary backdoor port.
The other option would be to use unencrypted bounce buffers for the
hypervisor to read out from or write into, but given the limited message
sizes it appears more efficient to just fall back to the ordinary backdoor
port.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
drivers/gpu/drm/vmwgfx/vmwgfx_msg.c