[libvirt] [PATCH v3 05/13] Separate the hostdevice preparation and checks to a new funtion