From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoffer Dall Subject: Re: [PATCH v4 09/11] KVM: arm/arm64: vgic: Prevent userspace injection of a mapped interrupt Date: Tue, 11 Aug 2015 00:44:40 -0700 Message-ID: <20150811074440.GD5007@lvm> References: <1438962347-17541-1-git-send-email-marc.zyngier@arm.com> <1438962347-17541-10-git-send-email-marc.zyngier@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, Eric Auger , Alex =?iso-8859-1?Q?Benn=E9e?= , Andre Przywara To: Marc Zyngier Return-path: Received: from mail-lb0-f171.google.com ([209.85.217.171]:34791 "EHLO mail-lb0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755242AbbHKHoz (ORCPT ); Tue, 11 Aug 2015 03:44:55 -0400 Received: by lbbtg9 with SMTP id tg9so1302666lbb.1 for ; Tue, 11 Aug 2015 00:44:54 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1438962347-17541-10-git-send-email-marc.zyngier@arm.com> Sender: kvm-owner@vger.kernel.org List-ID: On Fri, Aug 07, 2015 at 04:45:45PM +0100, Marc Zyngier wrote: > Virtual interrupts mapped to a HW interrupt should only be triggered > from inside the kernel. Otherwise, you could end up confusing the > kernel (and the GIC's) state machine. > > Rearrange the injection path so that kvm_vgic_inject_irq is > used for non-mapped interrupts, and kvm_vgic_inject_mapped_irq is > used for mapped interrupts. The latter should only be called from > inside the kernel (timer, irqfd). > > Signed-off-by: Marc Zyngier Reviewed-by: Christoffer Dall