From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Fedin Subject: RE: IRQFD support with GICv3 ITS (WAS: RE: [PATCH 00/13] arm64: KVM: GICv3 ITS emulation) Date: Thu, 18 Jun 2015 17:19:03 +0300 Message-ID: <019901d0a9d1$bb47d390$31d77ab0$@samsung.com> References: <042601d0a357$d3cec4d0$7b6c4e70$@samsung.com> <557842A0.9070503@linaro.org> <05da01d0a392$58bf5030$0a3df090$@samsung.com> <011601d0a8de$f75b8280$e6128780$@samsung.com> <558153D8.7040100@arm.com> <018801d0a8f3$3c3f8720$b4be9560$@samsung.com> <558266BE.7040403@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Cc: kvm@vger.kernel.org To: 'Eric Auger' , 'Andre Przywara' , 'Marc Zyngier' , christoffer.dall@linaro.org Return-path: Received: from mailout1.w1.samsung.com ([210.118.77.11]:50141 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752119AbbFROTH convert rfc822-to-8bit (ORCPT ); Thu, 18 Jun 2015 10:19:07 -0400 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NQ50069S93TDY40@mailout1.w1.samsung.com> for kvm@vger.kernel.org; Thu, 18 Jun 2015 15:19:05 +0100 (BST) In-reply-to: <558266BE.7040403@linaro.org> Content-language: ru Sender: kvm-owner@vger.kernel.org List-ID: Hello! > I also have an implementation of GSI routing on ARM, basically a rebase > of my old/first implementation of irqfd > (https://patches.linaro.org/32261/) based on irqchip gsi routing & qemu > part (https://lists.gnu.org/archive/html/qemu-devel/2014-07/msg01090.html). I took a glance at it, and looks like it's already obsolete. We already have a convention of GSI number == SPI number. Kind of hardcoded default routing table which cannot be changed. It is used at least by GICv2m emulation. I think we should maintain backwards compatibility with it. I thought about something like: a) GSI < 8192 - correspond to SPIs and cannot be re-routed. b) GSI >= 8192 - correspond to MSI and need to be routed before use. During routing setup we could use either GSI with offset (starting from 8192), or raw number (starting from 0). In case of raw number we would have some complex structure of GSI field in KVM_CAP_IRQFD ioctl, similar to KVM_IRQ_LINE. Something like: bits: | 31 ... 24 | 23 ... 0 | field: | irq_type | irq_id | irq_type[0]: irq_id = SPI irq_type[3]: irq_id = GSI number routed to MSI Consequently, we have to implement only KVM_IRQ_ROUTING_MSI type and completely ignore KVM_IRQ_ROUTING_IRQCHIP. I hope i am clear enough... Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia