RM and NVGPU both have a variant of this, we probably should too. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>