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 lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 06306C74A44 for ; Tue, 14 Mar 2023 04:02:21 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pbvqy-0004Jb-2w; Tue, 14 Mar 2023 00:01:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pbvqu-0004J4-1c for qemu-devel@nongnu.org; Tue, 14 Mar 2023 00:01:32 -0400 Received: from sonic312-25.consmr.mail.gq1.yahoo.com ([98.137.69.206]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pbvqr-00007T-OD for qemu-devel@nongnu.org; Tue, 14 Mar 2023 00:01:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1678766482; bh=1+u0lRMKY06Q3afqGvjIRM93Hh6BLtsy7Va/1C/NuCg=; h=From:To:Cc:Subject:Date:References:From:Subject:Reply-To; b=S8YdMeALJ0dtBBv8ugZdhLn6w794VU3vXP+pU0a2hfm3rdYFMUrEWdLx6+vDeRJNfxCRs02Y5EAy/e9selVnsazOBoPrKhbhaA39wc20/wWyc1insCa4JU7T+lMooPVuG+ilT01v2iuOmYJB2Oi5e130xV7l4Ia7B2AaqeA52zOmoUVW+LfN7W1qwQTH0Xbd4TuviIWTaDXhUXVTIetAChifpjBhKXxIRvgAhC61u4mD3EjdHdWScRi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D9rYUEcgWlyXkS1ESnHDVLpEp.8MGKl.fIFdUeyWp2r74a4.MnPiV_ oQEBlvLRSnE_0qUXaGOr5Eixx.tbxGMk.nXAMC_4d.kgkSQq3Libsugjj8qC48i412fWtibV2tYa Ukl.LqjhC643MlqfDSv4INAMFMWp3.p26a2vB396ndt9AgduHLuSLuJ4q0ZzBKnyaqppSgzDkxU4 J9hohQnpR3mLcF5d5IGM0tIyEx1z0MGLp6j_p1aqDeiQqwr9LOF12tocZKC2Fb98YGHECp0ZY3yZ 6ZjSR6ZeQIEoLLeEIwGaClOIcd_EeMF9Ou.eufsJE28ZRiUyp2_pus3d.4pmjk8Q6DCyHQe0Idx4 4.b7gF5SVZL7kZ7kwir2ai5lBmZtB8Ks7aK3P0t.rXYEeelApXVI9lfmFKp7zOoWtcswJbUADb_j M5I4_s0qHk9U2Jt5m.R6uDx.guntRMbo3QV8J080pVHHZIwRXDJYgOvwZbSM.XSieWPr1YCalOQA y_VVw2psXi8jckCncFugbmSyfxodP3z7__A3tLCe6XtOyPr_t4ypE3qLPeIkxpPEx0Vqgl5Egwml DBRCEibyJsEzvtPYwsvRhfRsm_pCCXMRp35tjIMw37fu7HI_PLtsx1Y45SPkxX7Uj0l5YufWXx7f Ed2D2HPptILnPlEyCxnDtNAaJIMdJG_ubC2zB.ZcHexoy.yRGaEwJu8dnWLVxgiEPIIccNdmO4h5 4Zd3u9hE- X-Sonic-MF: X-Sonic-ID: d1a5d7b0-8caa-4204-ada0-a818a27dc087 Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.gq1.yahoo.com with HTTP; Tue, 14 Mar 2023 04:01:22 +0000 Received: by hermes--production-ne1-759c9b8c64-fztnz (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 76100b2c878269fd1c2471a41328eeeb; Tue, 14 Mar 2023 04:01:17 +0000 (UTC) From: Chuck Zmudzinski To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Marcel Apfelbaum , Mark Cave-Ayland , Artyom Tarasenko , Stefano Stabellini , Anthony Perard , Paul Durrant , xen-devel@lists.xenproject.org Subject: [PATCH v2 0/2] pci: slot_reserved_mask improvements Date: Tue, 14 Mar 2023 00:01:07 -0400 Message-Id: X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit References: Received-SPF: pass client-ip=98.137.69.206; envelope-from=brchuckz@aim.com; helo=sonic312-25.consmr.mail.gq1.yahoo.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org This patch series consists of two patches. The first provides accessor functions in pci.h to avoid direct access of slot_reserved_mask according to the comment at the top of include/hw/pci/pci_bus.h. No functional change is intended with this patch. The second patch allows a pci bus to be configured so slot_reserved_mask will only be enforced when the device to be added to the bus is configured for automatic slot assignment. The second patch also uses the new capability in the case of the pc/i440fx/xenfv machine types so the current behavior of reserving slot 2 for the Intel IGD for the xenfv machine will be ignored if an administrator manually configures another device to use the reserved slot. The current behavior of always reserving slots in the sun4u machine is preserved by this patch series; the patch series only changes how slot_reserved_mask works in the xenfv machine. Although the patch series can affect xenfv machines configured for igd-passthru if an administrator assigns some of the pci slot addresses manually, it does not affect the libxl default configuration for igd-passthru because libxl uses automatic slot assignment by default. Link: https://lore.kernel.org/qemu-devel/20230106064838-mutt-send-email-mst@kernel.org/ Chuck Zmudzinski (2): pci: avoid accessing slot_reserved_mask directly outside of pci.c pci: allow slot_reserved_mask to be ignored with manual slot assignment Changelog v2: Add first patch and cover letter to make this a 2-patch series Make changes to the second patch (see second patch for changelog) hw/pci-host/i440fx.c | 1 + hw/pci/pci.c | 29 ++++++++++++++++++++++++++++- hw/sparc64/sun4u.c | 7 +++---- hw/xen/xen_pt.c | 7 +++---- include/hw/pci/pci.h | 4 ++++ include/hw/pci/pci_bus.h | 1 + 6 files changed, 40 insertions(+), 9 deletions(-) -- 2.39.2