This is based on the call in libxl (in xen/tools/libxl/libxl.c - function libxl__domain_pvcontrol_available). I wanted to be as close as possible to the libxl implementation.