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=-14.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 91F52C433DB for ; Tue, 19 Jan 2021 10:16:06 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 2AE6623158 for ; Tue, 19 Jan 2021 10:16:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2AE6623158 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:To:From: Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=nk+q21RPVFkXk9asyhaccOsC3ovwjiiXdgIXTOmk6NI=; b=l6WDsC4hw8ZliAuSX+zlFTGRk l0izZAjmM87EViDthCgj1C3stHd8M0uc62jqJBuqHPQRFy2C5fYyPsNIzRCThRQLSasFZ9DQ0DRtr rS1NnT7X3GsdL7JipHh+zMDMSQmzOXPeXekLLaJOTdkPlvLy1C8zgOgPrqgVORZyEYV6+ZMwLwgGk 4A9OuO2ck8/RcOU1rOxNaNV1yZ6SMFUAlsxzr+TnrLbnrgfl5FZUCR3ylE/thY0M+4S+QF/jUoJRQ XloYp/yKcaDlPE/u86WaaE3Mm9xWxAMisIuKhAv589ZUv5sPblPHymfHFEr2RRvj+pDzlPC5UIWVh cBpgaomTQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1o29-0003ZS-IZ; Tue, 19 Jan 2021 10:14:45 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1o1u-0003S2-4C for linux-arm-kernel@lists.infradead.org; Tue, 19 Jan 2021 10:14:36 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7188A23158; Tue, 19 Jan 2021 10:14:28 +0000 (UTC) Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1l1o1q-008hdN-2m; Tue, 19 Jan 2021 10:14:26 +0000 MIME-Version: 1.0 Date: Tue, 19 Jan 2021 10:14:25 +0000 From: Marc Zyngier To: Shameerali Kolothum Thodi Subject: Re: [PATCH v2 2/2] KVM: arm64: Workaround firmware wrongly advertising GICv2-on-v3 compatibility In-Reply-To: <0edcab071c4845f29ec20af630777dce@huawei.com> References: <20210115140323.2682634-1-maz@kernel.org> <20210115140323.2682634-3-maz@kernel.org> <67c2f61a5dd33731cf52b6e26095ed51@kernel.org> <0edcab071c4845f29ec20af630777dce@huawei.com> User-Agent: Roundcube Webmail/1.4.10 Message-ID: <00f4bbd18e1eb55d028d5db6e4e1ddb6@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: shameerali.kolothum.thodi@huawei.com, ardb@kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, kernel-team@android.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210119_051430_313153_992E8A4A X-CRM114-Status: GOOD ( 16.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Suzuki K Poulose , kvmarm , James Morse , Linux ARM , Android Kernel Team , Ard Biesheuvel , Julien Thierry Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2021-01-19 10:09, Shameerali Kolothum Thodi wrote: >> -----Original Message----- >> From: Marc Zyngier [mailto:maz@kernel.org] >> Sent: 15 January 2021 14:15 >> To: Ard Biesheuvel >> Cc: Linux ARM ; kvmarm >> ; Shameerali Kolothum Thodi >> ; James Morse >> ; Julien Thierry ; >> Suzuki K Poulose ; Android Kernel Team >> >> Subject: Re: [PATCH v2 2/2] KVM: arm64: Workaround firmware wrongly >> advertising GICv2-on-v3 compatibility >> >> On 2021-01-15 14:08, Ard Biesheuvel wrote: >> > On Fri, 15 Jan 2021 at 15:03, Marc Zyngier wrote: >> >> [...] >> >> >> diff --git a/arch/arm64/kvm/vgic/vgic-v3.c >> >> b/arch/arm64/kvm/vgic/vgic-v3.c index 8e7bf3151057..67b27b47312b >> >> 100644 >> >> --- a/arch/arm64/kvm/vgic/vgic-v3.c >> >> +++ b/arch/arm64/kvm/vgic/vgic-v3.c >> >> @@ -584,8 +584,10 @@ early_param("kvm-arm.vgic_v4_enable", >> >> early_gicv4_enable); >> >> int vgic_v3_probe(const struct gic_kvm_info *info) { >> >> u64 ich_vtr_el2 = kvm_call_hyp_ret(__vgic_v3_get_gic_config); >> >> + bool has_v2; >> >> int ret; >> >> >> >> + has_v2 = ich_vtr_el2 >> 63; >> >> ich_vtr_el2 = (u32)ich_vtr_el2; >> >> >> >> /* >> >> @@ -605,13 +607,15 @@ int vgic_v3_probe(const struct gic_kvm_info >> >> *info) >> >> gicv4_enable ? "en" : "dis"); >> >> } >> >> >> >> + kvm_vgic_global_state.vcpu_base = 0; >> >> + >> >> if (!info->vcpu.start) { >> >> kvm_info("GICv3: no GICV resource entry\n"); >> >> - kvm_vgic_global_state.vcpu_base = 0; >> >> + } else if (!has_v2) { >> >> + pr_warn("CPU interface incapable of MMIO access\n"); >> > >> > Could we include FW_BUG here to stress that this is a firmware problem? >> >> Absolutely! That's what it now looks like: >> >> [ 2.648452] kvm [1]: IPA Size Limit: 40 bits >> [ 2.649259] [Firmware Bug]: CPU interface incapable of MMIO access >> [ 2.649620] kvm [1]: disabling GICv2 emulation >> [ 2.650227] kvm [1]: GIC system register CPU interface enabled >> [ 2.652004] kvm [1]: vgic interrupt IRQ9 >> [ 2.655623] kvm [1]: VHE mode initialized successfully >> >> Updated version pushed out. > > Is there a v3 for this series? I couldn't find one. Nope, I didn't think it was useful to send another series for such a minor change. > > Anyways, tested this series on a D06 with faulty firmware and it is > working as expected. > FWIW, > > Tested-by: Shameer Kolothum > Thanks, M. -- Jazz is not dead. It just smells funny... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel