From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Fedin Subject: RE: [PATCH 7/7] KVM: arm: implement kvm_set_msi by gsi direct mapping Date: Thu, 02 Jul 2015 18:37:55 +0300 Message-ID: <02ea01d0b4dd$1186e690$3494b3b0$@samsung.com> References: <1435592237-17924-1-git-send-email-eric.auger@linaro.org> <1435592237-17924-8-git-send-email-eric.auger@linaro.org> <015501d0b49c$1f1349c0$5d39dd40$@samsung.com> <55955290.1030009@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id D1088576E8 for ; Thu, 2 Jul 2015 11:26:44 -0400 (EDT) Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CVn5Si5QWcwa for ; Thu, 2 Jul 2015 11:26:43 -0400 (EDT) Received: from mailout3.w1.samsung.com (mailout3.w1.samsung.com [210.118.77.13]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id EDB4B57685 for ; Thu, 2 Jul 2015 11:26:42 -0400 (EDT) Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NQV00H9FA390Y00@mailout3.w1.samsung.com> for kvmarm@lists.cs.columbia.edu; Thu, 02 Jul 2015 16:37:57 +0100 (BST) In-reply-to: <55955290.1030009@linaro.org> Content-language: ru List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu To: 'Eric Auger' , eric.auger@st.com, linux-arm-kernel@lists.infradead.org, marc.zyngier@arm.com, christoffer.dall@linaro.org, andre.przywara@arm.com, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org Cc: pbonzini@redhat.com, linux-kernel@vger.kernel.org, patches@linaro.org List-Id: kvmarm@lists.cs.columbia.edu Hello! > > Given API change i suggest (using KVM_MSI_VALID_DEVID flag), we could get rid of all these if()'s > > here. Just forward all parameters to vGIC implementation code and let it do its checks. > I don't understand this comment. Here this is the kernel struct that is > used (struct kvm_kernel_irq_routing_entry) and not the user one > (kvm_irq_routing_entry). The kernel struct does not have the flag field. Easy. ARM code can always use struct kvm_extended_msi, and flags can go to this structure. > Another reason I think to keep using the type for homogeneity. Homogeneity is perfect IMHO. If that would be simpler for you, i could post a patch for this which i made on top of your series. Sorry, i don't have time to respin the whole thing, busy with qemu GICv3 fight :) Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia From mboxrd@z Thu Jan 1 00:00:00 1970 From: p.fedin@samsung.com (Pavel Fedin) Date: Thu, 02 Jul 2015 18:37:55 +0300 Subject: [PATCH 7/7] KVM: arm: implement kvm_set_msi by gsi direct mapping In-Reply-To: <55955290.1030009@linaro.org> References: <1435592237-17924-1-git-send-email-eric.auger@linaro.org> <1435592237-17924-8-git-send-email-eric.auger@linaro.org> <015501d0b49c$1f1349c0$5d39dd40$@samsung.com> <55955290.1030009@linaro.org> Message-ID: <02ea01d0b4dd$1186e690$3494b3b0$@samsung.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hello! > > Given API change i suggest (using KVM_MSI_VALID_DEVID flag), we could get rid of all these if()'s > > here. Just forward all parameters to vGIC implementation code and let it do its checks. > I don't understand this comment. Here this is the kernel struct that is > used (struct kvm_kernel_irq_routing_entry) and not the user one > (kvm_irq_routing_entry). The kernel struct does not have the flag field. Easy. ARM code can always use struct kvm_extended_msi, and flags can go to this structure. > Another reason I think to keep using the type for homogeneity. Homogeneity is perfect IMHO. If that would be simpler for you, i could post a patch for this which i made on top of your series. Sorry, i don't have time to respin the whole thing, busy with qemu GICv3 fight :) Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753027AbbGBPiH (ORCPT ); Thu, 2 Jul 2015 11:38:07 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:39867 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753082AbbGBPh7 (ORCPT ); Thu, 2 Jul 2015 11:37:59 -0400 X-AuditID: cbfec7f5-f794b6d000001495-b6-55955ad5a45a From: Pavel Fedin To: "'Eric Auger'" , eric.auger@st.com, linux-arm-kernel@lists.infradead.org, marc.zyngier@arm.com, christoffer.dall@linaro.org, andre.przywara@arm.com, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org, patches@linaro.org, pbonzini@redhat.com References: <1435592237-17924-1-git-send-email-eric.auger@linaro.org> <1435592237-17924-8-git-send-email-eric.auger@linaro.org> <015501d0b49c$1f1349c0$5d39dd40$@samsung.com> <55955290.1030009@linaro.org> In-reply-to: <55955290.1030009@linaro.org> Subject: RE: [PATCH 7/7] KVM: arm: implement kvm_set_msi by gsi direct mapping Date: Thu, 02 Jul 2015 18:37:55 +0300 Message-id: <02ea01d0b4dd$1186e690$3494b3b0$@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-index: AQIj+X5s5FdAGWwAOFAf7dE3NOV/zwF13PvTAow8eUkCfFK6KJzt0tnQ Content-language: ru X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprHIsWRmVeSWpSXmKPExsVy+t/xq7pXo6aGGjzexGyxYt5PRosXr/8x WszfcobV4urms0wWc6YWWnw8dZzdYtPja6wWl3fNYbP4e+cfm8WUw19YLPZv+8fqwO2xZt4a Ro871/aweZzftIbZY/OSeo/3+66yeTz9sZfZ4/MmuQD2KC6blNSczLLUIn27BK6M/ls7mAra 2St6206zNzCeY+1i5OSQEDCRmPnoFDOELSZx4d56ti5GLg4hgaWMEt+6epggnO+MEh1Nc9lB qtgE1CVOf/3AApIQEXjKKNG0rpEFJMEs4Clx9ftiFoiO84wSfRt/gXVwCmhJzN5xF2yHsICf xMK+52ANLAKqEt9+zWYCsXkFLCWmLNnADmELSvyYfA9qqJbE+p3HmSBseYnNa95C3aogsePs a0YQW0TATeLriitQ9SIS0/7dY57AKDQLyahZSEbNQjJqFpKWBYwsqxhFU0uTC4qT0nON9IoT c4tL89L1kvNzNzFCYu3rDsalx6wOMQpwMCrx8K6omRIqxJpYVlyZe4hRgoNZSYR3i+XUUCHe lMTKqtSi/Pii0pzU4kOM0hwsSuK8M3e9DxESSE8sSc1OTS1ILYLJMnFwSjUwCh3MSb8996fI rN/nth7sltmapzJx88a7ZusvT1CJ+WbkkSStfC/kmGpD+3Rr55TSR3eenU2ckSXoyd1nW2rS 4jOtwmjGvTbH8+eD779SmhvttGU1m0nRKxefU7osJaJ/5z24a3uUx6HiSa+LgM3jPvdPs4zq 3fd+Ce3Sk/ikuvHEkkSTO1PuKrEUZyQaajEXFScCAJGNJ9exAgAA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello! > > Given API change i suggest (using KVM_MSI_VALID_DEVID flag), we could get rid of all these if()'s > > here. Just forward all parameters to vGIC implementation code and let it do its checks. > I don't understand this comment. Here this is the kernel struct that is > used (struct kvm_kernel_irq_routing_entry) and not the user one > (kvm_irq_routing_entry). The kernel struct does not have the flag field. Easy. ARM code can always use struct kvm_extended_msi, and flags can go to this structure. > Another reason I think to keep using the type for homogeneity. Homogeneity is perfect IMHO. If that would be simpler for you, i could post a patch for this which i made on top of your series. Sorry, i don't have time to respin the whole thing, busy with qemu GICv3 fight :) Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia