Received: from eggs.gnu.org ([2001:4830:134:3::10]:51786) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ejVa5-0006DK-R9 for qemu-devel@nongnu.org; Wed, 07 Feb 2018 14:40:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ejVa1-0001l3-0v for qemu-devel@nongnu.org; Wed, 07 Feb 2018 14:40:33 -0500 Received: from mail-ve1eur01hn0231.outbound.protection.outlook.com ([104.47.1.231]:47584 helo=EUR01-VE1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ejVa0-0001im-Ko for qemu-devel@nongnu.org; Wed, 07 Feb 2018 14:40:28 -0500 Date: Wed, 7 Feb 2018 22:40:15 +0300 From: Roman Kagan Message-ID: <20180207194015.GB19541@rkaganb.sw.ru> References: <20180206203048.11096-1-rkagan@virtuozzo.com> <20180206203048.11096-28-rkagan@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [RFC PATCH 27/34] tests: hv-scsi: add start-stop test List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, Ben Warren , Konrad Rzeszutek Wilk , Krish Sadhukhan , "Marcos E. Matsunaga" , Jan Dakinevich , Vadim Rozenfeld , "Denis V. Lunev" , si-wei liu , Vitaly Kuznetsov , Cathy Avery On Wed, Feb 07, 2018 at 12:15:50PM +0100, Paolo Bonzini wrote: > On 06/02/2018 21:30, Roman Kagan wrote: > > + if (strcmp(arch, "i386") && strcmp(arch, "x86_64")) { > > + g_printerr("Hyper-V / VMBus are only available on x86\n"); > > + exit(EXIT_FAILURE); > > + } > > This shouldn't be needed. > > > + > > + if (access("/dev/kvm", R_OK | W_OK)) { > > Maybe try opening it too? In theory you could have a /dev/kvm device > that triggers loading the kvm module (see > https://github.com/systemd/systemd/pull/7795 for gory details). Makes sense, will replace with open(O_RDWR). Thanks, Roman.