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=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 AAF4EC433F5 for ; Mon, 20 Sep 2021 09:45:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 93AD360F9B for ; Mon, 20 Sep 2021 09:45:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235040AbhITJq7 (ORCPT ); Mon, 20 Sep 2021 05:46:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229565AbhITJq6 (ORCPT ); Mon, 20 Sep 2021 05:46:58 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4038C061574 for ; Mon, 20 Sep 2021 02:45:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=6WKcFj8KH5zmE3aTXCP6zwGUN8VgQpUtcVDHRQZ/pkI=; b=noZDo68Icsx4e76vM0o8uY9xWS tYFfDr0W4AgOEUQqoEChkEhZ7JiQ4i3H9lsLYGA310nQdTlsUeLroa11nZV+a9gy6QGVe2kW51e7x iDL3X97EpnhI4k4S/lpPy/yvOwEj3dz8539te0Pcr0T7pleb+XOL9mZAVZVZId9Bs34ggUzdN30uX g6sut84PQ6HGiI9yu867yks+CTNFrfydDOFzf5/TNsn2wkQWJ/74hCunVRQ1rlM1JqCtcDn2POQYB oqHwwxp9BoNDKO9i83dSzQmh8Ep/7tD2Y9C34oqZNSmv73VYuj+Hs9TmN4j9z0xGkXGNa0haAfkNO PArPtLWg==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:54662) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mSFrb-0001T7-S1; Mon, 20 Sep 2021 10:45:27 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1mSFra-0002Bu-8S; Mon, 20 Sep 2021 10:45:26 +0100 Date: Mon, 20 Sep 2021 10:45:26 +0100 From: "Russell King (Oracle)" To: Marc Zyngier Cc: linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, James Morse , Alexandru Elisei , Suzuki K Poulose , Will Deacon Subject: Re: REGRESSION: Upgrading host kernel from 5.11 to 5.13 breaks QEMU guests - perf/fw_devlink/kvm Message-ID: References: <877dfcwutt.wl-maz@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <877dfcwutt.wl-maz@kernel.org> Sender: Russell King (Oracle) Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Sun, Sep 19, 2021 at 02:36:46PM +0100, Marc Zyngier wrote: > Urgh. That's a bummer. T1he PMU driver only comes up once it has found > its interrupt controller, which on the Armada 8040 is not the GIC, but > some weird thing on the side that doesn't actually serve any real > purpose. On HW where the PMU is directly wired into the GIC, it all > works fine, though by luck rather than by design. > > Anyway, rant over. This is a bug that needs addressing so that KVM can > initialise correctly irrespective of the probing order. This probably > means that the static key controlling KVM's behaviour wrt the PMU must > be controlled by the PMU infrastructure itself, rather than KVM trying > to probe for it. > > Can you please give the following hack a go (on top of 5.15-rc1)? I've > briefly tested it on my McBin, and it did the trick. I've also tested > it on the M1 (which really doesn't have an architectural PMU) to > verify that it was correctly failing. My test program that derives the number of registers qemu uses now reports 236 registers again and I see: kvm [7]: PMU detected and enabled in the kernel boot log. Tested-by: Russell King (Oracle) Thanks. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! 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=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 02EEEC433F5 for ; Mon, 20 Sep 2021 09:45:38 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 7243660F9B for ; Mon, 20 Sep 2021 09:45:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7243660F9B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id D9D4F4B0DE; Mon, 20 Sep 2021 05:45:36 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@armlinux.org.uk Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id t4lwX4kMsofG; Mon, 20 Sep 2021 05:45:35 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id CEA124B0DD; Mon, 20 Sep 2021 05:45:35 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 364B24B0DD for ; Mon, 20 Sep 2021 05:45:34 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id akLIfCAxv-nI for ; Mon, 20 Sep 2021 05:45:32 -0400 (EDT) Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id CD8B54B089 for ; Mon, 20 Sep 2021 05:45:32 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=6WKcFj8KH5zmE3aTXCP6zwGUN8VgQpUtcVDHRQZ/pkI=; b=noZDo68Icsx4e76vM0o8uY9xWS tYFfDr0W4AgOEUQqoEChkEhZ7JiQ4i3H9lsLYGA310nQdTlsUeLroa11nZV+a9gy6QGVe2kW51e7x iDL3X97EpnhI4k4S/lpPy/yvOwEj3dz8539te0Pcr0T7pleb+XOL9mZAVZVZId9Bs34ggUzdN30uX g6sut84PQ6HGiI9yu867yks+CTNFrfydDOFzf5/TNsn2wkQWJ/74hCunVRQ1rlM1JqCtcDn2POQYB oqHwwxp9BoNDKO9i83dSzQmh8Ep/7tD2Y9C34oqZNSmv73VYuj+Hs9TmN4j9z0xGkXGNa0haAfkNO PArPtLWg==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:54662) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mSFrb-0001T7-S1; Mon, 20 Sep 2021 10:45:27 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1mSFra-0002Bu-8S; Mon, 20 Sep 2021 10:45:26 +0100 Date: Mon, 20 Sep 2021 10:45:26 +0100 From: "Russell King (Oracle)" To: Marc Zyngier Subject: Re: REGRESSION: Upgrading host kernel from 5.11 to 5.13 breaks QEMU guests - perf/fw_devlink/kvm Message-ID: References: <877dfcwutt.wl-maz@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <877dfcwutt.wl-maz@kernel.org> Cc: kvm@vger.kernel.org, Will Deacon , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On Sun, Sep 19, 2021 at 02:36:46PM +0100, Marc Zyngier wrote: > Urgh. That's a bummer. T1he PMU driver only comes up once it has found > its interrupt controller, which on the Armada 8040 is not the GIC, but > some weird thing on the side that doesn't actually serve any real > purpose. On HW where the PMU is directly wired into the GIC, it all > works fine, though by luck rather than by design. > > Anyway, rant over. This is a bug that needs addressing so that KVM can > initialise correctly irrespective of the probing order. This probably > means that the static key controlling KVM's behaviour wrt the PMU must > be controlled by the PMU infrastructure itself, rather than KVM trying > to probe for it. > > Can you please give the following hack a go (on top of 5.15-rc1)? I've > briefly tested it on my McBin, and it did the trick. I've also tested > it on the M1 (which really doesn't have an architectural PMU) to > verify that it was correctly failing. My test program that derives the number of registers qemu uses now reports 236 registers again and I see: kvm [7]: PMU detected and enabled in the kernel boot log. Tested-by: Russell King (Oracle) Thanks. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm 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=-10.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 F03CFC433EF for ; Mon, 20 Sep 2021 09:47:17 +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 B692860F93 for ; Mon, 20 Sep 2021 09:47:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B692860F93 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=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: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=gTpGoMpAmn0fnfVrxgNE5i9fpx3LJgwZYmHdz4XbRPk=; b=nxHGWUzxRBCznt DRirCM2gxOWCclKBnXLFyfzd3P36S0w6qU+Mj8vn9UUOY5UGVU66g+X7VKCmaxdZpV3m0tvPDgJX1 tgijexT6/N13nlPyzYxpDhIH7NE1NgIRfvFXuUwHunEjXtrKel0Y49w+gXKP/2h/U5Zzw9vtPcD4y 8TdyPOtbPf8nRAhmMB1S3tr9DUpTxYJlBg+S7IqpRyp7BEx3cUZG4JsrVNH0MfrYVwuFfbh5+l/gq aChCg4+1ar0QePJCBdcFruU3XuugqhzDnndeasJ+fPU3SlqriLe7OoLGdn5g99NzD95FJoE15fPf5 AB80GtkxR7JEdJcGWu+w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mSFrn-0019x7-Tr; Mon, 20 Sep 2021 09:45:40 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mSFrj-0019v4-5X for linux-arm-kernel@lists.infradead.org; Mon, 20 Sep 2021 09:45:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=6WKcFj8KH5zmE3aTXCP6zwGUN8VgQpUtcVDHRQZ/pkI=; b=noZDo68Icsx4e76vM0o8uY9xWS tYFfDr0W4AgOEUQqoEChkEhZ7JiQ4i3H9lsLYGA310nQdTlsUeLroa11nZV+a9gy6QGVe2kW51e7x iDL3X97EpnhI4k4S/lpPy/yvOwEj3dz8539te0Pcr0T7pleb+XOL9mZAVZVZId9Bs34ggUzdN30uX g6sut84PQ6HGiI9yu867yks+CTNFrfydDOFzf5/TNsn2wkQWJ/74hCunVRQ1rlM1JqCtcDn2POQYB oqHwwxp9BoNDKO9i83dSzQmh8Ep/7tD2Y9C34oqZNSmv73VYuj+Hs9TmN4j9z0xGkXGNa0haAfkNO PArPtLWg==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:54662) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mSFrb-0001T7-S1; Mon, 20 Sep 2021 10:45:27 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1mSFra-0002Bu-8S; Mon, 20 Sep 2021 10:45:26 +0100 Date: Mon, 20 Sep 2021 10:45:26 +0100 From: "Russell King (Oracle)" To: Marc Zyngier Cc: linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, James Morse , Alexandru Elisei , Suzuki K Poulose , Will Deacon Subject: Re: REGRESSION: Upgrading host kernel from 5.11 to 5.13 breaks QEMU guests - perf/fw_devlink/kvm Message-ID: References: <877dfcwutt.wl-maz@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <877dfcwutt.wl-maz@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210920_024535_277157_27EBCBEF X-CRM114-Status: GOOD ( 17.50 ) 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 Sun, Sep 19, 2021 at 02:36:46PM +0100, Marc Zyngier wrote: > Urgh. That's a bummer. T1he PMU driver only comes up once it has found > its interrupt controller, which on the Armada 8040 is not the GIC, but > some weird thing on the side that doesn't actually serve any real > purpose. On HW where the PMU is directly wired into the GIC, it all > works fine, though by luck rather than by design. > > Anyway, rant over. This is a bug that needs addressing so that KVM can > initialise correctly irrespective of the probing order. This probably > means that the static key controlling KVM's behaviour wrt the PMU must > be controlled by the PMU infrastructure itself, rather than KVM trying > to probe for it. > > Can you please give the following hack a go (on top of 5.15-rc1)? I've > briefly tested it on my McBin, and it did the trick. I've also tested > it on the M1 (which really doesn't have an architectural PMU) to > verify that it was correctly failing. My test program that derives the number of registers qemu uses now reports 236 registers again and I see: kvm [7]: PMU detected and enabled in the kernel boot log. Tested-by: Russell King (Oracle) Thanks. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel