From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 772C8C4345F for ; Thu, 2 May 2024 17:02:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=OS3L7kVo82NVkcYs/IJ9CNUYZwFaWIwT80028DsYClA=; b=xZdSCMfpHtVG78 VCEnxKmgyizBxTRyklmqn8QIKfeK1ut50wL5xfL6b2iiBKVQ1/yRWXqSYoPpEXGi+Dmcb+VwJyFrT cVSf5OJtac84NvvNp+t39EybBArJDDcJyc11u4CBKZRy/Lo3RVnc44PdwD0PoOwTeWWNeJgKwEMOr 0lEbjgt9riHyozMKJ7hdh5fYYom4cnj5J9fcKO0RZGuijkahLeJrUrTxjsUjtNksnEqIdk9e45PmE cE9OOzqiufMbNUITS03xIMYWx1GqpE4b0QOXNy0HS5ULseozY0qxRujs2ylL2Xl/YtCTOmHR5ffNs Pw+OtKBYMLegqydSKq/g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2ZpT-0000000DNgd-02cH; Thu, 02 May 2024 17:02:43 +0000 Received: from out-187.mta1.migadu.com ([2001:41d0:203:375::bb]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2ZpQ-0000000DNfc-2NIY for linux-arm-kernel@lists.infradead.org; Thu, 02 May 2024 17:02:42 +0000 Date: Thu, 2 May 2024 10:02:30 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1714669357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=L3xYKyc7qvWlRo+eUMy1DICO6wKLqe1hNLnJT3EGrvc=; b=XBY2AG1PJtUIyIMli8kLg1I+5+Y3BxBqZNwcuUo5klSqpCgLxfm3TuTppC/bu53KxgLfYh L2Q0s6Vze7mjA3PMQmtoWc5uBByXHZctZunvX3BJOJmXFfjrnx9FZxJzUGVU2fLwrKIkFA RCXQQ2USwbgt4m/MY7Q1ryG5grQB1EU= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Marc Zyngier Cc: kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, James Morse , Suzuki K Poulose , Zenghui Yu Subject: Re: [PATCH] KVM: arm64: vgic: Allocate private interrupts on demand Message-ID: References: <20240502154545.3012089-1-maz@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240502154545.3012089-1-maz@kernel.org> X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240502_100240_891347_A0BA3215 X-CRM114-Status: GOOD ( 13.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, May 02, 2024 at 04:45:45PM +0100, Marc Zyngier wrote: > Private interrupts are currently part of the CPU interface structure > that is part of each and every vcpu we create. > > Currently, we have 32 of them per vcpu, resulting in a per-vcpu array > that is just shy of 4kB. On its own, that's no big deal, but it gets > in the way of other things: > > - each vcpu gets mapped at EL2 on nVHE/hVHE configurations. This > requires memory that is physically contiguous. However, the EL2 > code has no purpose looking that the interrupt structures and typo: looking at the interrupt ... > could do without them being mapped. > > - supporting features such as EPPIs, which extend the number of > privrate interrupts past the 32 limit would make the array typo: private > even larger, even for VMs that do not use the EPPI feature. > > Address these issues by moving the private interrupt array outside > of the vcpu, and replace it with a simple pointer. We take this > opportunity to make it obvious what gets initialised when, as > that path was remarkably opaque, and tighten the locking. > > Signed-off-by: Marc Zyngier Reviewed-by: Oliver Upton -- Thanks, Oliver _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel