From patchwork Mon Nov 25 14:05:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 2014949 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=KTVO1eLk; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Xxncs4TdDz1y01 for ; Tue, 26 Nov 2024 01:09:01 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFZkR-0003b5-I6; Mon, 25 Nov 2024 09:07:32 -0500 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 1tFZkP-0003Yg-Sq for qemu-ppc@nongnu.org; Mon, 25 Nov 2024 09:07:29 -0500 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFZkM-0006p6-Ue for qemu-ppc@nongnu.org; Mon, 25 Nov 2024 09:07:29 -0500 Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2fb388e64b0so48996201fa.0 for ; Mon, 25 Nov 2024 06:07:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732543645; x=1733148445; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hhPIY1VBzTRWV9NVUC530URyYQIaOfJGukKvr94mbQc=; b=KTVO1eLkQUjYC709Nr3k+IqVD5ayywzIL0QgrkyJ/tl8nMd0z651yzXC4rTW0miucx NPhWW6WfINbBe9C3YyK3IPVPOdhjsldLeFl8F9w/fwu/e8xsrmfKw9maWPXH8qqkNSLc +xLWUe2Hq4XwwofJpLZoB+yB2wjgYmjxpjdYBZxtkWNmZ/48l62+fiLWmnQr42NU3fJx rGFWSJ0fbOEpDNmvCA6r6oiCy/XsNgxWh5+2YswGCy9JN/aQG+N9GoEOzxTWd3Pk3qlH wsxAbrra4/2Gox90Q/+p4HHgXiOW81DWeNcRI+p/xN3nA+bFYm0lqWMsA8nsQ5tcziBh I7yQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732543645; x=1733148445; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hhPIY1VBzTRWV9NVUC530URyYQIaOfJGukKvr94mbQc=; b=AsZlVSCKtlmvLWM9+BE5fSRojWHb2OJIGT7CLQxTN26oz7y/LyHBA4wof+lnqa9sWt npW5VVoVLlHRlQqDPV9TSvcJJyqL1f1vfhfHZAfErRkC4TUxZmjFIMUVzLmZu9qh6Sme GBWgf/0PF7DPuNf2RsIjIZ+QlmSeqzTcyqpru5zGoc9ww7ouw9BSgTumEmQ+6PYxeAVJ Ca+7hWb8o8WPWS/WMKffJ6Eo9l+H/krixIJlmi3Do6OeNwOYuYvMpcoWIdButT5K0OBu mzZw+wMT54ydgi/tvtaa2A8G4tElmKrtFy7HA2DfNZKfTB6Mi0tW8ZOw7K1mxErIW/YJ ze2Q== X-Forwarded-Encrypted: i=1; AJvYcCVsMejYGkwx+4gDtO0b2/9SnegO7ZgfxA4xK/01561WOPjIBeJaW08W7ixA3+6/iIIM4ElZvuMjFg==@nongnu.org X-Gm-Message-State: AOJu0Yy7BoiuXUbZ10QWHG0pCijzO5JjQC1L4LTw5uXK0sTIxwLLa00r +aG5swcqYalGjRkXL8DprLvDJ9RrDUc0xof1xysmha5/UaZS2yB2it+wat0tZ2w= X-Gm-Gg: ASbGnctLef4fByTLXg9pKpqqmPxu6KsHv8Q42SluztrpRzMh44NyOF83I+MQWrATLhF GTi1VOGa7sAg9gW6i4lzpK/r2xPIBYCTMn/HXjcUXLY+k6s4Q4dVzdxF+AlgGcxq++6djJY2xB/ ieAHDfB8Gi3NG3kzQlktcT+jStj420HehYHgA928msKC5GNJZEzq0iBd5spIJnvacj72GIxm9q5 qtpy8dyIw4aB2YY4mpVcKOTzt2v8RU0uZ41nQzDm7/9ehUpyIAV9x5sJbx48BwJVSwIj3n/ X-Google-Smtp-Source: AGHT+IEbf0beO52iSpVocxIGp0kqvDpasec8DZVORrD5VJMHU1FsQgCTWd+2Zd9KjuUFZexnRUtDug== X-Received: by 2002:a2e:a546:0:b0:2fb:5a19:5b9b with SMTP id 38308e7fff4ca-2ffa70f08a3mr71798411fa.8.1732543644987; Mon, 25 Nov 2024 06:07:24 -0800 (PST) Received: from localhost.localdomain ([176.176.170.239]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-432f642f15esm210421055e9.0.2024.11.25.06.07.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 25 Nov 2024 06:07:24 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Daniel Henrique Barboza , Marcin Juszkiewicz , Bin Meng , Alistair Francis , Harsh Prateek Bora , Zhao Liu , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , Daniel Henrique Barboza , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= , Liu Zhiwei , Palmer Dabbelt , Marcel Apfelbaum , qemu-arm@nongnu.org, "Michael S. Tsirkin" , Nicholas Piggin , Leif Lindholm , Peter Maydell , qemu-riscv@nongnu.org, Weiwei Li , Radoslaw Biernacki , Thomas Huth , Yanan Wang , Eduardo Habkost , qemu-ppc@nongnu.org Subject: [PATCH-for-10.0 8/8] hw/pci/pci: Remove legacy MachineClass::pci_allow_0_address flag Date: Mon, 25 Nov 2024 15:05:35 +0100 Message-ID: <20241125140535.4526-9-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241125140535.4526-1-philmd@linaro.org> References: <20241125140535.4526-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::235; envelope-from=philmd@linaro.org; helo=mail-lj1-x235.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-ppc@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-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org All users of this flag now set the PCI_BUS_IO_ADDR0_ALLOWED PCIBusFlags. Since there are no more users, remove the field in MachineClass. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/boards.h | 1 - hw/pci/pci.c | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/include/hw/boards.h b/include/hw/boards.h index 36fbb9b59d..66fb2eddd3 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -284,7 +284,6 @@ struct MachineClass { no_floppy:1, no_cdrom:1, no_sdcard:1, - pci_allow_0_address:1, legacy_fw_cfg_order:1; bool is_default; const char *default_machine_opts; diff --git a/hw/pci/pci.c b/hw/pci/pci.c index de3f93646f..d27166dd75 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -45,7 +45,6 @@ #include "hw/pci/msi.h" #include "hw/pci/msix.h" #include "hw/hotplug.h" -#include "hw/boards.h" #include "qapi/error.h" #include "qemu/cutils.h" #include "pci-internal.h" @@ -1472,10 +1471,8 @@ pcibus_t pci_bar_address(PCIDevice *d, { pcibus_t new_addr, last_addr; uint16_t cmd = pci_get_word(d->config + PCI_COMMAND); - MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine()); - bool allow_0_address = mc->pci_allow_0_address; + bool allow_0_address = pci_bus_allows_io_addr0_access(pci_get_bus(d)); - allow_0_address |= pci_bus_allows_io_addr0_access(pci_get_bus(d)); if (type & PCI_BASE_ADDRESS_SPACE_IO) { if (!(cmd & PCI_COMMAND_IO)) { return PCI_BAR_UNMAPPED;