From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50905) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzIrz-0007WR-Vi for qemu-devel@nongnu.org; Wed, 26 Oct 2016 03:43:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bzIrv-0000P5-To for qemu-devel@nongnu.org; Wed, 26 Oct 2016 03:43:31 -0400 Received: from mga09.intel.com ([134.134.136.24]:51156) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bzIrv-0000OR-KC for qemu-devel@nongnu.org; Wed, 26 Oct 2016 03:43:27 -0400 Date: Thu, 27 Oct 2016 00:37:17 +0800 From: Chao Gao Message-ID: <20161026163717.GA10185@g.c> References: <1476997641-29648-1-git-send-email-bd.aviv@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1476997641-29648-1-git-send-email-bd.aviv@gmail.com> Subject: Re: [Qemu-devel] [PATCH v5 0/3] IOMMU: intel_iommu support map and unmap notifications List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Aviv B.D" Cc: qemu-devel@nongnu.org, Jan Kiszka , Alex Williamson , Peter Xu , "Michael S. Tsirkin" On Fri, Oct 21, 2016 at 12:07:18AM +0300, Aviv B.D wrote: >From: "Aviv Ben-David" > >* Advertize Cache Mode capability in iommu cap register. > This capability is controlled by "cache-mode" property of intel-iommu device. > To enable this option call QEMU with "-device intel-iommu,cache-mode=true". > >* On page cache invalidation in intel vIOMMU, check if the domain belong to > registered notifier, and notify accordingly. > >Currently this patch still doesn't enabling VFIO devices support with vIOMMU >present. Current problems: >* vfio_iommu_map_notify is not aware about memory range belong to specific > VFIOGuestIOMMU. >* memory_region_iommu_replay hangs QEMU on start up while it itterate over > 64bit address space. Commenting out the call to this function enables > workable VFIO device while vIOMMU present. > After applying the patch series based on commit ede0cbeb, I run the following cmd: modprobe vfio-pci echo 8086 1528 > /sys/bus/pci/drivers/vfio-pci/new_id echo "0000:03:00.1" > /sys/bus/pci/devices/0000\:03\:00.1/driver/unbind echo 8086 1528 > /sys/bus/pci/drivers/vfio-pci/new_id to prepare for assigning nic device. After that, I try to boot a guest by qemu-system-x86_64 -boot c -m 4096 -monitor pty -serial stdio --enable-kvm \ -M kernel-irqchip=split -bios bios.bin -smp cpus=288 -hda vdisk.img \ -machine q35 -device intel-iommu,intremap=on,eim=on,cache-mode=true \ -net none -device vfio-pci,host=03:00.1 and however encounter this error: qemu-system-x86_64: -device vfio-pci,host=03:00.1: iommu map to non memory area e258e000 qemu-system-x86_64: -device vfio-pci,host=03:00.1: iommu map to non memory area e258f000 qemu-system-x86_64: -device vfio-pci,host=03:00.1: iommu map to non memory area e2590000 Do i make some mistakes in this test? How to correct it? by the way, there is a build error: qemu/hw/pci-host/apb.c:326:5: error: initialization from incompatible pointer type [-Werror] .translate = pbm_translate_iommu, ^ qemu/hw/pci-host/apb.c:326:5: error: (near initialization for \u2018pbm_iommu_ops.translate\u2019) [-Werror] cc1: all warnings being treated as errors make: *** [hw/pci-host/apb.o] Error 1 > >-- >1.9.1 > >