summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZack Rusin <zackr@vmware.com>2021-08-16 14:25:36 -0400
committerDylan Baker <dylan.c.baker@intel.com>2022-06-01 14:10:27 -0700
commit6ec3f71e05dbf3f26e6f4a37189da871d40fa139 (patch)
tree672d05e37e6d11eb3fb1516f0693b16bfa23f984
parent492034e0e2f69e323d88f6181100d48757cb66b8 (diff)
svga: Don't try to build x86/x64 assembly on different arch's
svga used to use vmx backdoor directly to send logs to the host. This functionality has been implemented in vmwgfx 2.17, but to make sure we still work with old kernels the functionality to use the backdoor directly has been kept. There's no reason to port that code to arm since vmwgfx implements it and arm64 (or other new platforms) would depend on vmwgfx versions a lot newer than 2.17, so everywhere but on x86/x64 it's fine to assume vmwgfx always support the host logging ioctls. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Reviewed-by: Neha Bhende <bhenden@vmware.com> Reviewed-by: Martin Krastev <krastevm@vmware.com> (cherry picked from commit 71a749bc7b05ebc7289c3201c9baeb183f436386) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16564>
-rw-r--r--src/gallium/winsys/svga/drm/vmw_msg.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gallium/winsys/svga/drm/vmw_msg.c b/src/gallium/winsys/svga/drm/vmw_msg.c
index e664769c279..cc00b8ebc33 100644
--- a/src/gallium/winsys/svga/drm/vmw_msg.c
+++ b/src/gallium/winsys/svga/drm/vmw_msg.c
@@ -61,7 +61,7 @@
#define HIGH_WORD(X) ((X & 0xFFFF0000) >> 16)
-#if defined(PIPE_CC_GCC) && (PIPE_CC_GCC_VERSION > 502)
+#if defined(PIPE_CC_GCC) && (PIPE_CC_GCC_VERSION > 502) && (defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64))
/**
* Hypervisor-specific bi-directional communication channel. Should never
@@ -426,15 +426,10 @@ vmw_send_msg(struct rpc_channel *channel, const char *msg)
void
vmw_svga_winsys_host_log(struct svga_winsys_screen *sws, const char *log)
{
- struct rpc_channel channel;
struct vmw_winsys_screen *vws = vmw_winsys_screen(sws);
char *msg;
int msg_len;
- int ret;
-
-#ifdef MSG_NOT_IMPLEMENTED
- return;
-#endif
+ int ret = 0;
if (!log)
return;
@@ -459,10 +454,15 @@ vmw_svga_winsys_host_log(struct svga_winsys_screen *sws, const char *log)
&msg_arg, sizeof(msg_arg));
} else {
+#ifdef MSG_NOT_IMPLEMENTED
+ debug_printf("Old vmwgfx doesn't support message passing.\n");
+#else
+ struct rpc_channel channel;
if (!(ret = vmw_open_channel(&channel, RPCI_PROTOCOL_NUM))) {
ret = vmw_send_msg(&channel, msg);
vmw_close_channel(&channel);
}
+#endif
}
if (ret)