From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753249AbdFVR1O (ORCPT ); Thu, 22 Jun 2017 13:27:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58144 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751927AbdFVR1M (ORCPT ); Thu, 22 Jun 2017 13:27:12 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 628A741A47 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=alex.williamson@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 628A741A47 Date: Thu, 22 Jun 2017 11:27:09 -0600 From: Alex Williamson To: Nitin Saxena Cc: linux-kernel@vger.kernel.org, qemu-devel , Peter Xu Subject: Re: Query on VFIO in Virtual machine Message-ID: <20170622112709.51bd4885@w520.home> In-Reply-To: References: <20170622105935.2dbd574d@w520.home> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 22 Jun 2017 17:27:12 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 22 Jun 2017 22:42:19 +0530 Nitin Saxena wrote: > Thanks Alex. > > >> Without an iommu in the VM, you'd be limited to no-iommu support for VM userspace, > So are you trying to say VFIO NO-IOMMU should work inside VM. Does > that mean VFIO NO-IOMMU in VM and VFIO IOMMU in host for same device > is a legitimate configuration? I did tried this configuration and the > application (in VM) seems to get container_fd, group_fd, device_fd > successfully but after VFIO_DEVICE_RESET ioctl the PCI link breaks > from VM as well as from host. This could be specific to PCI endpoint > device which I can dig. > > I will be happy if VFIO NO-IOMMU in VM and IOMMU in host for same > device is legitimate configuration. Using no-iommu in the guest should work in that configuration, however there's no isolation from the user to the rest of VM memory, so the VM kernel will be tainted. Host memory does have iommu isolation. Device reset from VM userspace sounds like another bug to investigate. Thanks, Alex