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 X-Spam-Level: X-Spam-Status: No, score=-15.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21B46C48BD1 for ; Fri, 11 Jun 2021 17:00:15 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id E29E260FDB for ; Fri, 11 Jun 2021 17:00:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E29E260FDB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:Date: Message-ID:References:Cc:To:From:Subject:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=X7zn9Hdny9OPQjpVEf5P3lv/6t79BNTWaGeIxt3VmE8=; b=j+LpOF+fW+KatQIRGjDvCFu8Bm GYOA1SBPythlYHopkGX5+caUaBmZeWQ8M8eeuegJeuT5DcTXwcYZlk1MwXz2fb2GuP5G+FGMNgjIp hjdO580woUFU6ZrOCr9CmCrVzqXFxhMA7P1r40AL7pGNF07Xu5GFzbLnqIn8KQUcfR3P3BnMK0MDV UREsE6NHX0zJr9vP7qOfYe2AbAbIzUkvQ3l+lbuy7wbp7YOX8PSM3sTmux0soAM+04xbVqS4ZFky4 nb4X7XC1K4WrPkVrBAF4WdpCCbQKleryemcprONyOiD7sAEBt0SjB6O2T/f4UTZmHLbATOngFGVRj KP03eNrg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lrkUP-006BE2-Ey; Fri, 11 Jun 2021 16:58:37 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lrkUL-006BD6-L4 for linux-arm-kernel@lists.infradead.org; Fri, 11 Jun 2021 16:58:35 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F31CFD6E; Fri, 11 Jun 2021 09:58:31 -0700 (PDT) Received: from [192.168.0.110] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 81E6B3F719; Fri, 11 Jun 2021 09:58:30 -0700 (PDT) Subject: Re: [PATCH v4 3/9] KVM: arm64: vgic: Be tolerant to the lack of maintenance interrupt masking From: Alexandru Elisei To: Marc Zyngier , linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu Cc: James Morse , Suzuki K Poulose , Eric Auger , Hector Martin , Mark Rutland , Zenghui Yu , kernel-team@android.com References: <20210601104005.81332-1-maz@kernel.org> <20210601104005.81332-4-maz@kernel.org> Message-ID: Date: Fri, 11 Jun 2021 17:59:26 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210611_095833_769340_232FA858 X-CRM114-Status: GOOD ( 17.45 ) 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 Hi Marc, On 6/11/21 5:38 PM, Alexandru Elisei wrote: > Hi Marc, > > On 6/1/21 11:39 AM, Marc Zyngier wrote: >> As it turns out, not all the interrupt controllers are able to >> expose a vGIC maintenance interrupt that can be independently >> enabled/disabled. >> >> And to be fair, it doesn't really matter as all we require is >> for the interrupt to kick us out of guest mode out way or another. >> >> To that effect, add gic_kvm_info.no_maint_irq_mask for an interrupt >> controller to advertise the lack of masking. >> >> Signed-off-by: Marc Zyngier >> --- >> arch/arm64/kvm/vgic/vgic-init.c | 8 +++++++- >> include/linux/irqchip/arm-vgic-info.h | 2 ++ >> 2 files changed, 9 insertions(+), 1 deletion(-) >> >> diff --git a/arch/arm64/kvm/vgic/vgic-init.c b/arch/arm64/kvm/vgic/vgic-init.c >> index 2fdb65529594..6752d084934d 100644 >> --- a/arch/arm64/kvm/vgic/vgic-init.c >> +++ b/arch/arm64/kvm/vgic/vgic-init.c >> @@ -519,12 +519,15 @@ void kvm_vgic_init_cpu_hardware(void) >> */ >> int kvm_vgic_hyp_init(void) >> { >> + bool has_mask; >> int ret; >> >> if (!gic_kvm_info) >> return -ENODEV; >> >> - if (!gic_kvm_info->maint_irq) { >> + has_mask = !gic_kvm_info->no_maint_irq_mask; > This double negative is pretty awkward, I suppose this was done to avoid changes > to the gic drivers, because the default value is 0 (false). Just an idea, maybe > renaming it to maint_irq_unmaskable would be more readable? Actually, after another look, the current name stopped looking awkward to me. Thanks, Alex _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel