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=-12.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 38A25C433EF for ; Mon, 20 Sep 2021 14:39:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 14B39610CE for ; Mon, 20 Sep 2021 14:39:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237471AbhITOk7 (ORCPT ); Mon, 20 Sep 2021 10:40:59 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:51486 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231792AbhITOk6 (ORCPT ); Mon, 20 Sep 2021 10:40:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632148771; 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=nhpibeqk4PvPTYyqOpXGwb8TL8EsN3x82upWewR9w28=; b=QPHdNAE5bGOXNbo1icr+lQmrrVxSlR7FO0z+zKfTuHRAfkOi4t3yMrYFDreYPmls+ScmUI LKUXe9uQ/S4sJ9bKbiVBL5rrTyihGpQunLG2+EbvdqQpGwo5Msm7LtUT8KKhgi25A/ZV6F +L1uT5zspjutn0DnARlrr2fgJi+vL5A= Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-290-r6jX3BEPNqel-tPt_VEEBA-1; Mon, 20 Sep 2021 10:39:30 -0400 X-MC-Unique: r6jX3BEPNqel-tPt_VEEBA-1 Received: by mail-qk1-f198.google.com with SMTP id bl32-20020a05620a1aa000b004330d29d5bfso61505016qkb.23 for ; Mon, 20 Sep 2021 07:39:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=nhpibeqk4PvPTYyqOpXGwb8TL8EsN3x82upWewR9w28=; b=YPardJnPCt/j52j+L2F33KFg/qyqSMh/OKP9qBBrfBCS235BMXNI0TLTUVMm67s4ei cMq9QH1E2nfvOhELpPHbJoM0F0XNEo1OYfZTa0WSwo+xgSePzljS4eDdwNM3K4ZzxH3J llfHqf6t7ymj+EBtOtr7p7FdfipCPl93DiZjZKDSX0jg03QL1nZEeDZ2uw9/j9c2JJHo KkocymOCxFNEWdMlCutgMLOh5X0F/mkNqYPAGGylqAPhpb8EHcru3/LqVUPz4NsXlVk0 xjAM4e3GRWt31I4Do0QaMN1QwdMHttl0eFCFHHf55tgWrN8vwZL93aO4OXjaurcIBIjv QyFw== X-Gm-Message-State: AOAM532E8Mmwu0CKdxQ6aESodBXL9dZaochxifmQyFH9rakSOBvWFhAP eiS/GnaAAh9e/+fF4CZJkdqhQ2GJmtRTL1rXsY1IE0hTVnEsT+TO+xHwitQy6iYH1tgmqGkLZM8 LYsXgGfnH19zY X-Received: by 2002:a05:620a:cd0:: with SMTP id b16mr24832170qkj.136.1632148769855; Mon, 20 Sep 2021 07:39:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxB2Y7T7b4bSWSVgRi7HdyZbRCph2nN2tQ4jNT1Sag+Z5mGiiad+h22+bslkc/EIiCd4pdyg== X-Received: by 2002:a05:620a:cd0:: with SMTP id b16mr24832151qkj.136.1632148769680; Mon, 20 Sep 2021 07:39:29 -0700 (PDT) Received: from gator (nat-pool-brq-u.redhat.com. [213.175.37.12]) by smtp.gmail.com with ESMTPSA id n20sm11509869qkk.135.2021.09.20.07.39.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Sep 2021 07:39:28 -0700 (PDT) Date: Mon, 20 Sep 2021 16:39:24 +0200 From: Andrew Jones To: "Russell King (Oracle)" Cc: Marc Zyngier , kvm@vger.kernel.org, Will Deacon , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Subject: Re: REGRESSION: Upgrading host kernel from 5.11 to 5.13 breaks QEMU guests - perf/fw_devlink/kvm Message-ID: <20210920143924.zh3zb7gf7wmd2uyx@gator> References: <877dfcwutt.wl-maz@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Mon, Sep 20, 2021 at 10:45:26AM +0100, Russell King (Oracle) wrote: > 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: Hi Russell, You may be interested in kvm selftests and this one[1] in particular. [1] tools/testing/selftests/kvm/aarch64/get-reg-list.c Thanks, drew > > 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=-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 3DC5FC433EF for ; Mon, 20 Sep 2021 14:39: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 A0CDF610FB for ; Mon, 20 Sep 2021 14:39:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A0CDF610FB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com 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 1BBB040256; Mon, 20 Sep 2021 10:39:37 -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=@redhat.com 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 8OyjRV6X+WCp; Mon, 20 Sep 2021 10:39:35 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id EBACE4057F; Mon, 20 Sep 2021 10:39:35 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id F301B40256 for ; Mon, 20 Sep 2021 10:39: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 GkmfDLoXjgxe for ; Mon, 20 Sep 2021 10:39:33 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mm01.cs.columbia.edu (Postfix) with ESMTP id D2C4F4024F for ; Mon, 20 Sep 2021 10:39:33 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632148773; 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=nhpibeqk4PvPTYyqOpXGwb8TL8EsN3x82upWewR9w28=; b=E/4/DFihWWfuH2AoPFpnb4H+g8pmpJnEaHiKVy/KU3nQDwpgYN9+Ns5/7fVj1aN37yAbpG gIZ/ANSSndEFwUpRjcTCC4ERgph52crv4PFjZLism0xAH4wwgIOzgQJV9KQoWM4VdZnPW9 QlzNT1WUZhI1dI/Q5+EObEhLe8zkxy4= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-475-ar-EhhCIP72s2e-GXJV7Fg-1; Mon, 20 Sep 2021 10:39:30 -0400 X-MC-Unique: ar-EhhCIP72s2e-GXJV7Fg-1 Received: by mail-qk1-f197.google.com with SMTP id bk33-20020a05620a1a2100b00432fff50d40so62587661qkb.22 for ; Mon, 20 Sep 2021 07:39:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=nhpibeqk4PvPTYyqOpXGwb8TL8EsN3x82upWewR9w28=; b=5+jCcvaw4Ta6qGNIQmFubPnkGaZ4fj5JKB1+KU/X0f15kIaXyfyj4juPVkSIv5hED2 G/D+teMRhe4NxN9AneVktqJiETl7VDijCs4uCiDZavJ5VcjJPGYvMvXrPLCDtJ+/vd6r tUxAPi1dxTW0IQZUym7Kvx+ezXDnYT3pgnqdsDy2IR1CLCTZIY1h7abY5HpqvFAMzzXa AkhOOtvKBbVPBiLel9BmPeA6DYrJJ1gh53AfvXWZNY9pj6oUUKp/meIveYU4McDFYV1l Ek1x/Yyz/AKuWHXerQqDHnbcRDkcLmwJOFQFsQpUPp3jnU/i3HdHTGDknEXFWR6pKVvO 8rkw== X-Gm-Message-State: AOAM532xHiHsg+vyJh/pE5hvqQBicwEbtaZbWmP9pL5fVzCRlAJdLskt dFdMLslP5iAiaBBf8ZuaMN0yb2Perhy83WZL4n35qJjgMra+KAZvoc3Vs9wu7UAt4YBtdj1T6L3 OuwmUqkwRzvgGUhVh2n+lIRoq X-Received: by 2002:a05:620a:cd0:: with SMTP id b16mr24832172qkj.136.1632148769871; Mon, 20 Sep 2021 07:39:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxB2Y7T7b4bSWSVgRi7HdyZbRCph2nN2tQ4jNT1Sag+Z5mGiiad+h22+bslkc/EIiCd4pdyg== X-Received: by 2002:a05:620a:cd0:: with SMTP id b16mr24832151qkj.136.1632148769680; Mon, 20 Sep 2021 07:39:29 -0700 (PDT) Received: from gator (nat-pool-brq-u.redhat.com. [213.175.37.12]) by smtp.gmail.com with ESMTPSA id n20sm11509869qkk.135.2021.09.20.07.39.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Sep 2021 07:39:28 -0700 (PDT) Date: Mon, 20 Sep 2021 16:39:24 +0200 From: Andrew Jones To: "Russell King (Oracle)" Subject: Re: REGRESSION: Upgrading host kernel from 5.11 to 5.13 breaks QEMU guests - perf/fw_devlink/kvm Message-ID: <20210920143924.zh3zb7gf7wmd2uyx@gator> References: <877dfcwutt.wl-maz@kernel.org> MIME-Version: 1.0 In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=drjones@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Cc: linux-arm-kernel@lists.infradead.org, Marc Zyngier , Will Deacon , kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.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 Mon, Sep 20, 2021 at 10:45:26AM +0100, Russell King (Oracle) wrote: > 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: Hi Russell, You may be interested in kvm selftests and this one[1] in particular. [1] tools/testing/selftests/kvm/aarch64/get-reg-list.c Thanks, drew > > 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 > _______________________________________________ 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 E5978C433EF for ; Mon, 20 Sep 2021 14:42: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 AF94160F46 for ; Mon, 20 Sep 2021 14:42:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org AF94160F46 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com 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=9RiP1ahhdu6M/qQT8BqAPEIrAxKuvd/noIrL0p3ki+s=; b=0Nvbp0u5uYiMk7 yQ8BT3vvWBM1szdHJlqJyx24KQJtWUOSQNLQbgTvbHM3DLkutRzMd/bxs8L/bGMGoKjFZ6D09flVr TnMKWJlwAw5TbTOAUoMAVnHPLVvrWN7eiwTnASirTZPQIkHgUcNk1krt/G0urLqHaoSWAhbe+8DWk jET2/4EvisgGGhbUnxzLcWxmT3I29U6I691XYAH/9SLWd7pcqByK00l182Zk7rA6eh0aVpsCnLiJC fE/DCV20jZIuk1Gz4hnqh3IZpG3rozBKu8FSyWxqq6zLxxa20BXG767d8SYGvOIOhtthwPaIzNXi3 kAa/+XhXS8L7S1zP2EhQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mSKSU-001zRb-FH; Mon, 20 Sep 2021 14:39:52 +0000 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mSKSK-001zMZ-CZ for linux-arm-kernel@lists.infradead.org; Mon, 20 Sep 2021 14:39:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632148772; 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=nhpibeqk4PvPTYyqOpXGwb8TL8EsN3x82upWewR9w28=; b=GBQnYNQI354cqsJ+eG+xUo1+0HLqZ4P30AnXsMt+y9wDZIw9ttbGow+S3gAuJH2msajA6f uVK1LZh7c77sYGQFjXj04J2B6BqaVXIqqsq00EgYsRwdtt9qByHRmGflJuWgTMqj6n4Gj8 CB9KY8w3hSypCzTs8F8VMu3/CnY1gdY= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-491-z4aM7zD4PNOHWSKZ4prQVQ-1; Mon, 20 Sep 2021 10:39:30 -0400 X-MC-Unique: z4aM7zD4PNOHWSKZ4prQVQ-1 Received: by mail-qk1-f199.google.com with SMTP id ay30-20020a05620a179e00b00433294fbf97so40266304qkb.3 for ; Mon, 20 Sep 2021 07:39:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=nhpibeqk4PvPTYyqOpXGwb8TL8EsN3x82upWewR9w28=; b=D1yjJxSKDA/NK9iazNHtDTkS2C6nhyvjfDQervZT1H9I/Y34i24loxYR1go/mG0mLz 0mrocWub4bfvAu5jNT5qhxs3rjwkJTlu6tym9MsAnX+ibLgcEn90L6z5v85by68+2d32 8ElaAAswpXQXQoNpjfqC6zqWWrumyA4e/UqKRPsusnvXA/x6Zec1oCaUn7zH6mK5pBpT 6ke0xoVLMgtvr3iErhc5j/fyEO9FDHqnePkHiBVvORWDXnQFw9x6xRfzz6+pVt1mDLh2 wV+CVK27r5dKXNRFWUZC6toMO+APk1TtJPh/5EFLt88EKX4jHCaWkzeiDv8lzkNlHxh3 cJPA== X-Gm-Message-State: AOAM532MqOyi+6gQSz65NsuYlSXVwhK65wH7IwDU8XUJoIRrzCtW/2tb f4CFsKGtd8TLTpfgC7pR1RNIpTjUaF0AFD9oaXFY6fBwol2G8ZNc9lLREiUNy8ZFTsZxLQiFC7I ep9cIgYhShRR4NyemZqZwDSHp4tozYjxkql0= X-Received: by 2002:a05:620a:cd0:: with SMTP id b16mr24832168qkj.136.1632148769854; Mon, 20 Sep 2021 07:39:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxB2Y7T7b4bSWSVgRi7HdyZbRCph2nN2tQ4jNT1Sag+Z5mGiiad+h22+bslkc/EIiCd4pdyg== X-Received: by 2002:a05:620a:cd0:: with SMTP id b16mr24832151qkj.136.1632148769680; Mon, 20 Sep 2021 07:39:29 -0700 (PDT) Received: from gator (nat-pool-brq-u.redhat.com. [213.175.37.12]) by smtp.gmail.com with ESMTPSA id n20sm11509869qkk.135.2021.09.20.07.39.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Sep 2021 07:39:28 -0700 (PDT) Date: Mon, 20 Sep 2021 16:39:24 +0200 From: Andrew Jones To: "Russell King (Oracle)" Cc: Marc Zyngier , kvm@vger.kernel.org, Will Deacon , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Subject: Re: REGRESSION: Upgrading host kernel from 5.11 to 5.13 breaks QEMU guests - perf/fw_devlink/kvm Message-ID: <20210920143924.zh3zb7gf7wmd2uyx@gator> References: <877dfcwutt.wl-maz@kernel.org> MIME-Version: 1.0 In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=drjones@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210920_073940_571021_00076941 X-CRM114-Status: GOOD ( 25.39 ) 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 Mon, Sep 20, 2021 at 10:45:26AM +0100, Russell King (Oracle) wrote: > 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: Hi Russell, You may be interested in kvm selftests and this one[1] in particular. [1] tools/testing/selftests/kvm/aarch64/get-reg-list.c Thanks, drew > > 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 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel