[libvirt] [PATCH v2 6/8] Separate the hostdevice preparation and checks to a new funtion