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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15EC3C433FE for ; Tue, 4 Oct 2022 08:30:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229619AbiJDIaS (ORCPT ); Tue, 4 Oct 2022 04:30:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229599AbiJDIaQ (ORCPT ); Tue, 4 Oct 2022 04:30:16 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 214C71B9EB for ; Tue, 4 Oct 2022 01:30:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664872215; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kChJ5YXyR55NqzsspcQL6vhugqTTUyXdwpS+PG+Hins=; b=Kw3r1QGtzzhZ35c/9Zi8Rv0Ekgzwp9oFMTLNmk/ghIaiSYWROlgguAh0VClghWCuyBkUkt EDXih7xDwahOFuPpIBzvMZ/fj5pLiisy/HKwfW5upYQfCfaRTppFdI8o/F3/MZ+YiZqN+B ORwpCMd5FL8tDUTt31RsF6zG8Cqqc3Q= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-663-LX-RQ_pvPLO4E4O8EYEwZQ-1; Tue, 04 Oct 2022 04:30:13 -0400 X-MC-Unique: LX-RQ_pvPLO4E4O8EYEwZQ-1 Received: by mail-ej1-f71.google.com with SMTP id nb3-20020a1709071c8300b0078cf3dab9f4so1457681ejc.20 for ; Tue, 04 Oct 2022 01:30:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=kChJ5YXyR55NqzsspcQL6vhugqTTUyXdwpS+PG+Hins=; b=DNjJ6nlnOS9wkqrDQ9aWHNS3HQCZ6XvUmP7sjxK2Qoz9LfqSeZQD9WZYmg20npSvSb 977zdkMSUiTa9Ue1dvnSWU+o17J/V4tax7zJCmPATRic3khDzoPwjSF4gaM6nGNugS3N FCIFIapZP/z2KlFm06qTBkCKQ5kngxnBdxz2S4xH81uY9RmvZ2xitpety43oEV4ySmTw b4DrogNd1rAu6bzt01+0XY5dYCndfmCnnZUHJvrRu0+MSqjdfwZGpd1BeEWE4ZF/+wE+ ZNqnF4hwUXxYdXXBfoTYYqhrPAVYyxT2O2BPIb6E2I95KhahcIJkboAdH66u0Alvp3Z8 P+Lg== X-Gm-Message-State: ACrzQf0usuBPJN8JAV4w/xA2L4Lecct0zwxxc4sT0g5JZjk30/tQ7NeE OZM0m3Eu6OlYxN9wgpxhcZXBiIbigFghqfsbBneKOj2ycy8PlUJg86cjtbXl4kxOfZTx9kqKs5Q gtlRoVL7UZI/0OkuuNvFM X-Received: by 2002:a17:907:1626:b0:782:e490:4f4 with SMTP id hb38-20020a170907162600b00782e49004f4mr18347579ejc.464.1664872212797; Tue, 04 Oct 2022 01:30:12 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4V1XegvfHQqtOdwuF9hkqqgOAv0Ct2ylqgG/E0UdTe0kkF9v3n5AapSW1/X/ZGX1Jj9DACkw== X-Received: by 2002:a17:907:1626:b0:782:e490:4f4 with SMTP id hb38-20020a170907162600b00782e49004f4mr18347564ejc.464.1664872212563; Tue, 04 Oct 2022 01:30:12 -0700 (PDT) Received: from fedora (nat-2.ign.cz. [91.219.240.2]) by smtp.gmail.com with ESMTPSA id by30-20020a0564021b1e00b004590d4e35cdsm1198745edb.54.2022.10.04.01.30.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Oct 2022 01:30:11 -0700 (PDT) From: Vitaly Kuznetsov To: Nadav Amit , Alexander Graf , Ajay Kaher Cc: "x86@kernel.org" , "hpa@zytor.com" , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "rostedt@goodmis.org" , Srivatsa Bhat , "srivatsa@csail.mit.edu" , Alexey Makhalov , Vasavi Sirnapalli , "er.ajay.kaher@gmail.com" , "willy@infradead.org" , "linux-hyperv@vger.kernel.org" , "kvm@vger.kernel.org" , "jailhouse-dev@googlegroups.com" , "xen-devel@lists.xenproject.org" , "acrn-dev@lists.projectacrn.org" , "helgaas@kernel.org" , "bhelgaas@google.com" , Thomas Gleixner , "mingo@redhat.com" , "bp@alien8.de" , "dave.hansen@linux.intel.com" Subject: Re: [PATCH v2] x86/PCI: Prefer MMIO over PIO on all hypervisor In-Reply-To: <04F550C5-786A-4B8E-9A88-EBFBD8872F16@vmware.com> References: <9FEC6622-780D-41E6-B7CA-8D39EDB2C093@vmware.com> <87zgf3pfd1.fsf@redhat.com> <87tu4l9cfm.fsf@redhat.com> <04F550C5-786A-4B8E-9A88-EBFBD8872F16@vmware.com> Date: Tue, 04 Oct 2022 10:30:10 +0200 Message-ID: <87lepw9ejx.fsf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Nadav Amit writes: > On Oct 3, 2022, at 8:03 AM, Vitaly Kuznetsov wrote: > >> Not my but rather PCI maintainer's call but IMHO dropping 'const' is >> better, introducing a new global var is our 'last resort' and should be >> avoided whenever possible. Alternatively, you can add a >> raw_pci_ext_ops_preferred() function checking somethin within 'struct >> hypervisor_x86' but I'm unsure if it's better. >>=20 >> Also, please check Alex' question/suggestion. > > Here is my take (and Ajay knows probably more than me): > > Looking briefly on MCFG, I do not see a clean way of using the ACPI table. > The two options are either to use a reserved field (which who knows, might > be used one day) or some OEM ID. I am also not familiar with > PCI_COMMAND.MEMORY=3D0, so Ajay can hopefully give some answer about that. > > Anyhow, I understand (although not relate) to the objection for a new glo= bal > variable. How about explicitly calling this hardware bug a =E2=80=9Cbug= =E2=80=9D and using > the proper infrastructure? Calling it explicitly a bug may even push whoe= ver > can to resolve it. > > IOW, how about doing something along the lines of (not tested): > Works for me. Going forward, the intention shoud be to also clear the bug on other x86 hypervisors, e.g. we test modern Hyper-V versions and if MMIO works well we clear it, we test modern QEMU/KVM setups and if MMIO works introduce a feature bit somewhere and also clear the bug in the guest when the bit is set. --=20 Vitaly