winsys/svga/drm: Fix 32-bit RPCI send message
authorDeepak Rawat <drawat@vmware.com>
Wed, 9 May 2018 22:50:39 +0000 (15:50 -0700)
committerThomas Hellstrom <thellstrom@vmware.com>
Thu, 6 Jun 2019 08:27:10 +0000 (10:27 +0200)
commit72fc886826e97a547828da427e1a157b83ba5ea0
tree4d31c250d926259ba83fef4a29d48f1176c67396
parentb9d3a6b6565952855bc6609f22986ee25638dada
winsys/svga/drm: Fix 32-bit RPCI send message

Depending on whether compiled with frame-pointer or not, the temporary
memory location used for the bp parameter in these macros are referenced
relative to the stack pointer or the frame pointer.
Hence we can never reference that parameter when we've modified either
the stack pointer or the frame pointer, because then the compiler would
generate an incorrect stack reference.

Fix this by pushing the temporary memory parameter on a known location on
the stack before modifying the stack- and frame pointers.

Also in case of failuire RPCI channel is not closed which lead to vmx
running out of channels.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Deepak Rawat <drawat@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
src/gallium/winsys/svga/drm/vmw_msg.c