From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Williamson Subject: Re: vfio issue in qemu 2.5 Date: Thu, 4 Feb 2016 10:02:07 -0700 Message-ID: <20160204100207.2c953cc3@t450s.home> References: <10c201d15f5c$f7819670$e684c350$@zadarastorage.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: To: "Goutham GS" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:41950 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966415AbcBDRCI (ORCPT ); Thu, 4 Feb 2016 12:02:08 -0500 In-Reply-To: <10c201d15f5c$f7819670$e684c350$@zadarastorage.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, 4 Feb 2016 20:31:17 +0530 "Goutham GS" wrote: > Hi All, > > We are facing a vfio issue on qemu 2.5. Really appreciate any help or > pointers. Details are as below: > > We are using qemu 2.5 compiled out of git commit > 0b0571dd246871f18b7d64b5279511e91e2a7bf6 and are using Linux Kernel > 3.18.19 for both host and the VM. We are also using KVM VM with > pci-assign'ed SRIOV VF interfaces. > > The issue happens once in a while when a running VM is rebooted. On > boot, the VM hits the following error and stops. > > qemu-system-x86_64: -device > vfio-pci,host=04:00.7,id=hostdev2,bus=pci.0,addr=0x9: vfio: failed to > set iommu for container: Bad address > qemu-system-x86_64: -device > vfio-pci,host=04:00.7,id=hostdev2,bus=pci.0,addr=0x9: vfio: failed to > setup container for group 40 > qemu-system-x86_64: -device > vfio-pci,host=04:00.7,id=hostdev2,bus=pci.0,addr=0x9: vfio: failed to > get group 40 > qemu-system-x86_64: -device > vfio-pci,host=04:00.7,id=hostdev2,bus=pci.0,addr=0x9: Device > initialization failed > > Strange thing is, once this error is hit, no further VMs can be > spawned on the host and all of them run into the same problem. > However a reboot of the host appears to solve the issue. > > I have attached the relevant logs. Is it possible to try a newer kernel on the host? "Bad address" is -EFAULT, but I'm not actually able to spot a return path for the VFIO_SET_IOMMU ioctl that returns -EFAULT. Is there anything in dmesg when this triggers? Thanks, Alex