Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp1067797pxb; Wed, 16 Feb 2022 10:12:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJysnF6S03CmYMuK4z6IoBByRkV3L8eCaSG85a90ud8YoqqAEPPSj7SZLBDOgsfoXPlExK5F X-Received: by 2002:a63:1455:0:b0:370:289c:1404 with SMTP id 21-20020a631455000000b00370289c1404mr3326394pgu.244.1645035176335; Wed, 16 Feb 2022 10:12:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645035176; cv=none; d=google.com; s=arc-20160816; b=U2oTkPL+tLErwtFBIiWC9+5EhjbfC8YBcSDFSKzmf25hp9tUeUnm1GCJmZG+HSSKyV 4kZ739IsEKVpDgLYuq8jKPqYqGXUj0p64PlZopa+bxwmk9QqXcQzUh79YaHWRJ+Ulv4W vPTPBNe7Rs/CbtEQR+JLPi/v6n435gvRi/mNSQZ76C6RzKR8bCyH7u3EkAuGfrlAnH2N GGpRie2a1jRRKz2+RwCzrsRbElQZJM6nnmKD6HnObRBdtTKSdUd2NSxSD/2pnPRCadRj zUSYnzd5UGgtGRlqyry6Qybi1sdzvmPahfH6P0D8nbRD/fILnh11MoaZjKQX5LtaJChm 3NRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=QVJo0VFJhyQRasFCmFQo5AdI87REHk9Jchlt43vXjKo=; b=Xwd0RUD5n2PTPkjO6cXBmv7HOLZexmLi/fp1qmqUzazNQ1NP/EYlkzAt3UZhiwqYkv Hq+6njjFBmzr7hqqtWyrRP6xGjgjMNawzYpEof82mxpfKK//ERjzvS2B3Bx+YDlzMvSq 1xDChmaA67+6qI+ZpJs+XoqqpNGAXjOnu7Y3sN0hGlwoGTwfIU2/pyKWPmoHUb2rSXtm KOFV7jM7K+Oxs6O9GO9Whi9ToWOK2HBiVErwP+1Ihv75qXkOZXM7tmQaJQlTt0Z4+9Hf 1VtMPMzCJwrKR0b0KMWmgy3LvzJ7o3yhXsuXApef18bm+m+NSciEpMU8W8TJ/m9pnkdp dPFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="o9aG/mtt"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bm1si7359882pgb.705.2022.02.16.10.12.38; Wed, 16 Feb 2022 10:12:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="o9aG/mtt"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236460AbiBPQhe (ORCPT + 99 others); Wed, 16 Feb 2022 11:37:34 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:57740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229836AbiBPQhd (ORCPT ); Wed, 16 Feb 2022 11:37:33 -0500 Received: from mail-oo1-xc32.google.com (mail-oo1-xc32.google.com [IPv6:2607:f8b0:4864:20::c32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA2D41A807; Wed, 16 Feb 2022 08:37:19 -0800 (PST) Received: by mail-oo1-xc32.google.com with SMTP id x6-20020a4a4106000000b003193022319cso3084887ooa.4; Wed, 16 Feb 2022 08:37:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QVJo0VFJhyQRasFCmFQo5AdI87REHk9Jchlt43vXjKo=; b=o9aG/mtta5HuiQWh325l/DM5Yl1sisnMB3rpsfvhVienTy3bsmwDxOjcDeZQoRuuWl VIGNhuDHr8823gONBly/lVupj6Ylp5mNoKXZhiq6GtPQwO/8p2SrawX3HKrvNS+SFU03 g1P+vRDQvAozJdFedV2PvSDq9mcgsUDfpe1YzEW0FeiJThALWya4GlnuaOyT0MM7Bnj7 Gsa9S+ydNYpi/XS9X6F1tnglTRIq29AMtX3g2JNP8O+/FVa+r4BuOzO5Izsk0ZmC1zQt aVMP7oF6vq5R3JES2jNtFbjyyjiVI2mqQNE8NwvGH/8Rl9aQ3+92iqn66PKMS305SwTH GGyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QVJo0VFJhyQRasFCmFQo5AdI87REHk9Jchlt43vXjKo=; b=hgH38XMoZiJ7+hrHZk51hxuc7EDOYjtIrpTiUflFu1Ly74RXnI5/A4UtdCkRuBGy7g /HU5kZrGIRmd9qA7PFi/ROdGOy1cVMZSZ5ugVECzXfg3/rA257NTEPKx2+PVzMRas09D bwLrnVm9cvz0WmOTgQtAGHUhMb74qoWfHfwCOjM5h9s7VwIqA7niqdhGm71fg7loViLW 6NV67YRpvDVhQ9X7P0QdVnGrpJOmM9QNb4Q9NzaOygy7yLRtvoHtDDiG3/ZERqEaj9ws FmtZJAun7TdLRzW9NO3o/SweQqZoB9edo9K0zTfo68lSqstjIVsQ5V8uWjS+Ry1J3RLM m8Ww== X-Gm-Message-State: AOAM532aWgetvQ1+ZBCRgMoLYKHkS5IzBmfFKUA1+XXIdtQ1CZN9YYcO WIYwEdJLXG6+lTlDAzkJ4cWVHWSpBuivzeB1L2o= X-Received: by 2002:a05:6870:912c:b0:d3:44be:7256 with SMTP id o44-20020a056870912c00b000d344be7256mr847903oae.73.1645029439081; Wed, 16 Feb 2022 08:37:19 -0800 (PST) MIME-Version: 1.0 References: <87ee57c8fu.fsf@turner.link> <87a6ftk9qy.fsf@dmarc-none.turner.link> <87zgnp96a4.fsf@turner.link> <87czkk1pmt.fsf@dmarc-none.turner.link> <87sftfqwlx.fsf@dmarc-none.turner.link> <87ee4wprsx.fsf@turner.link> <4b3ed7f6-d2b6-443c-970e-d963066ebfe3@amd.com> <87pmo8r6ob.fsf@turner.link> <5a68afe4-1e9e-c683-e06d-30afc2156f14@leemhuis.info> <87pmnnpmh5.fsf@dmarc-none.turner.link> In-Reply-To: <87pmnnpmh5.fsf@dmarc-none.turner.link> From: Alex Deucher Date: Wed, 16 Feb 2022 11:37:07 -0500 Message-ID: Subject: Re: [REGRESSION] Too-low frequency limit for AMD GPU PCI-passed-through to Windows VM To: "James D. Turner" Cc: Thorsten Leemhuis , "Lazar, Lijo" , "Deucher, Alexander" , "regressions@lists.linux.dev" , "kvm@vger.kernel.org" , Greg KH , "Pan, Xinhui" , LKML , "amd-gfx@lists.freedesktop.org" , Alex Williamson , "Koenig, Christian" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 15, 2022 at 9:35 PM James D. Turner wrote: > > Hi Alex, > > > I guess just querying the ATIF method does something that negatively > > influences the windows driver in the guest. Perhaps the platform > > thinks the driver has been loaded since the method has been called so > > it enables certain behaviors that require ATIF interaction that never > > happen because the ACPI methods are not available in the guest. > > Do you mean the `amdgpu_atif_pci_probe_handle` function? If it would be > helpful, I could try disabling that function and testing again. Correct. > > > I don't really have a good workaround other than blacklisting the > > driver since on bare metal the driver needs to use this interface for > > platform interactions. > > I'm not familiar with ATIF, but should `amdgpu_atif_pci_probe_handle` > really be called for PCI devices which are bound to vfio-pci? I'd expect > amdgpu to ignore such devices. > > As I understand it, starting with > f9b7f3703ff9 ("drm/amdgpu/acpi: make ATPX/ATCS structures global (v2)"), > the `amdgpu_acpi_detect` function loops over all PCI devices in the > `PCI_CLASS_DISPLAY_VGA` and `PCI_CLASS_DISPLAY_OTHER` classes to find > the ATIF and ATCS handles. Maybe skipping over any PCI devices bound to > vfio-pci would fix the issue? On a related note, shouldn't it also skip > over any PCI devices with non-AMD vendor IDs? The ACPI methods are global. There's only one instance of each per system and they are relevant to add GPUs on the platform. That's why they are a global resource in the driver. They can be hung off of the dGPU or APU ACPI namespace, depending on the platform which is why we check all of the display devices. Skipping them would prevent them from being available if you later bound the amdgpu driver to the GPU device(s) I think. Alex > > Regards, > James