From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57386) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqFMh-00068O-7G for qemu-devel@nongnu.org; Wed, 13 Apr 2016 03:37:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aqFMc-00041N-4u for qemu-devel@nongnu.org; Wed, 13 Apr 2016 03:37:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46752) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqFMb-00041I-UF for qemu-devel@nongnu.org; Wed, 13 Apr 2016 03:37:26 -0400 Date: Wed, 13 Apr 2016 15:37:17 +0800 From: Peter Xu Message-ID: <20160413073717.GF17558@pxdev.xzpeter.org> References: <1460366363-4589-1-git-send-email-peterx@redhat.com> <20160411161901.0f0a519c@t450s.home> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20160411161901.0f0a519c@t450s.home> Subject: Re: [Qemu-devel] [PATCH v2 00/13] IOMMU: Enable interrupt remapping for Intel IOMMU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Williamson Cc: qemu-devel@nongnu.org, ehabkost@redhat.com, mst@redhat.com, jasowang@redhat.com, rkrcmar@redhat.com, jan.kiszka@web.de, pbonzini@redhat.com, marcel@redhat.com, imammedo@redhat.com, rth@twiddle.net On Mon, Apr 11, 2016 at 04:19:01PM -0600, Alex Williamson wrote: > On Mon, 11 Apr 2016 17:19:10 +0800 > Peter Xu wrote: > > > v2 changes: > > - patch 1 > > - rename "int_remap" to "intr" in several places [Marcel] > > - remove "Intel" specific words in desc or commit message, prepare > > itself with further AMD support [Marcel] > > - avoid using object_property_get_bool() [Marcel] > > - patch 5 > > - use PCI bus number 0xff rather than 0xf0 for the IOAPIC scope > > definition. (please let me know if anyone knows how I can avoid > > user using PCI bus number 0xff... TIA) > > - patch 11 > > - fix comments [Marcel] > > - all > > - remove intr_supported variable [Marcel] > > > > This patchset provide very basic functionalities for interrupt > > remapping (IR) support of the emulated Intel IOMMU device. > > > > By default, IR is disabled to be better compatible with current > > QEMU. To enable IR, we can using the following command to boot a > > IR-supported VM with basic network (still do not support kvm-ioapic, > > so we need to specify kernel-irqchip=off here): > > > > $ qemu-system-x86_64 -M q35,iommu=on,intr=on,kernel-irqchip=off \ > > -enable-kvm -m 1024 -s \ > > -monitor telnet::3333,server,nowait \ > > -netdev user,id=user.0,hostfwd=tcp::5555-:22 \ > > -device virtio-net-pci,netdev=user.0 \ > > /var/lib/libvirt/images/vm1.qcow2 > > > > When guest boots, we can verify whether IR enabled by grepping the > > dmesg like: > > > > [root@localhost ~]# journalctl -k | grep "DMAR-IR" > > Feb 19 11:21:23 localhost.localdomain kernel: DMAR-IR: IOAPIC id 0 under DRHD base 0xfed90000 IOMMU 0 > > Feb 19 11:21:23 localhost.localdomain kernel: DMAR-IR: Enabled IRQ remapping in xapic mode > > > > Currently only two devices are supported: > > > > - Emulated IOAPIC device > > - PCI Devices > > > > TODO List: > > > > - kvm-ioapic support > > - vhost support > > - pass through device support Hi, Alex, > > vhost and assigned devices should be identical, which boils down to > irqfd support. I imagine a vfio-pci device works with what you've got > here since kvm irqfd support will be disabled without kernel irqchip > (vfio doesn't depend on it). Thanks for the confirmation on vfio-pci part. That would be great if we can make it work without special care. :) > > Also, patches 1, 2, and 4 seem mis-ordered, I would think we only want > to advertise IR support both to the VM and to the user once it's > complete, otherwise we have versions where the options are enabled yet > don't work, even if only in git. Otherwise very nice patch breakdown. Do you mean I should put patch 1 to the end of the series? Since even with patch 2 and 4, IR won't work as well, and guest will hang at kernel boot. I can move patch 1 to the end of series though. That will make sure that when people see the parameter, they can use it as well. Thanks! -- peterx