virgl: more robust resource/context table init/cleanup

Track whether the tables have been initialized, and avoid double
init/cleanup.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
2 files changed