From patchwork Wed Apr 25 10:09:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 10362191 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8889F601D3 for ; Wed, 25 Apr 2018 10:10:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7903628DF9 for ; Wed, 25 Apr 2018 10:10:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6DC8228F46; Wed, 25 Apr 2018 10:10:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0BFF328EC6 for ; Wed, 25 Apr 2018 10:10:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751965AbeDYKKH (ORCPT ); Wed, 25 Apr 2018 06:10:07 -0400 Received: from foss.arm.com ([217.140.101.70]:37140 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751981AbeDYKKF (ORCPT ); Wed, 25 Apr 2018 06:10:05 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D6F3115B2; Wed, 25 Apr 2018 03:10:04 -0700 (PDT) Received: from e104803-lin.lan (unknown [10.1.207.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A40853F4FF; Wed, 25 Apr 2018 03:10:03 -0700 (PDT) From: Andre Przywara To: Will Deacon , Marc Zyngier Cc: Jean-Philippe Brucker , kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org Subject: [PATCH kvmtool 1/3] arm/gic: remove extra 64K from ITS allocation Date: Wed, 25 Apr 2018 11:09:43 +0100 Message-Id: <20180425100945.19171-2-andre.przywara@arm.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180425100945.19171-1-andre.przywara@arm.com> References: <20180425100945.19171-1-andre.przywara@arm.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The KVM_VGIC_V3_ITS_SIZE macro from the Linux API header file already covers the doorbell page, so we don't need to add that extra page size in our code. Signed-off-by: Andre Przywara --- arm/gic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arm/gic.c b/arm/gic.c index aca0b939..dd4d747d 100644 --- a/arm/gic.c +++ b/arm/gic.c @@ -229,8 +229,8 @@ int gic__create(struct kvm *kvm, enum irqchip_type type) case IRQCHIP_GICV2: break; case IRQCHIP_GICV3_ITS: - /* We reserve the 64K page with the doorbell as well. */ - gic_msi_size = KVM_VGIC_V3_ITS_SIZE + SZ_64K; + /* The 64K page with the doorbell is included. */ + gic_msi_size = KVM_VGIC_V3_ITS_SIZE; /* fall through */ case IRQCHIP_GICV3: gic_redists_size = kvm->cfg.nrcpus * ARM_GIC_REDIST_SIZE;