From patchwork Fri Dec 6 18:13:46 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: 847848 Delivered-To: patch@linaro.org Received: by 2002:a5d:50c2:0:b0:385:e875:8a9e with SMTP id f2csp926738wrt; Fri, 6 Dec 2024 10:14:30 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWnR7jM0N8o7yVMh2Ws1JqrKgPPi7k5NydPNOL/P6nF94lHL6X5emtzEsy5FnJVQOm8wT0ZyA==@linaro.org X-Google-Smtp-Source: AGHT+IF/5iPWHqUyUoE8Xwdl8gafd0UiVIQApUFrO3RR8xQ7RGU1W+CKTvQT6+FxYdrKs36eJa3b X-Received: by 2002:a05:6214:27c6:b0:6d8:9f61:de81 with SMTP id 6a1803df08f44-6d8e7149116mr38651396d6.24.1733508870348; Fri, 06 Dec 2024 10:14:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1733508870; cv=none; d=google.com; s=arc-20240605; b=RCBgQ5YJ7iZcmu6IQIoy/8HHB0ECBqOyYQ9oufFT2DONrkqyLUzEaj7XNgqfb0z4pQ 77MIL6PKsH8Gr2PfuuKTxDx+rjqhCTQkbCYIvTzrRCKy7EdEthoB91v/gOuakJSy1R2a 0dceg2gULpM2ygGGLj7lG79HbX94P7GfNKoXmoba6BW1HbKSdK5Qi9vNBGNME7P7nXdZ 4ps6lPAGV454LJvpQ+CSdmNjd03Sul8zTpTWo6NiKBHLKddZ1Gi2EB/H/T37FitiVY1B WJWM/QIxEx1MDfc0cP1Q4q+6H2HWL0FyDwgCUSdk5g8OGblw1GKSHyqkgiNK+u2XIO5X C4DA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=IY1xd8opRoZk/886AEA9wTe2MQaSyJsx/L7Nvi5q+Po=; fh=9Ty5VS5djq2SmBcGJaCOd5BYxL/3CPROvWRjBPoWGv0=; b=JuMbTfQgrENg0iF8A+Gr6E1utNJrtgIKkM9IbZUEItzgMAo7mQbw34cEulzFACGVi2 qSo0/fIVaKQRj35ze2TxXvkRZRo5c8Z+9jjcZTWWYV9SEKKH7sh54d4KrtyldmTG+HY1 pYbKArdQsbtGKsCjLO7IZycEv/X344bbl+tP5oijqM0vcJvsF0yF8sQrQz/bTneKF/dH lkV5ERrMKNJwX2dLW2wf8qgsn0h1jhdzEy1hXr/L70FurZHFtkzb+GIK5X7TZceugfBl mXosIUitQ+2cXmC1SSCArmEV2vW6rsoWF6uX0DVkVurR4eWKMeLSWbTNnFdp8Nmbf41M AT1g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Ktg+vYJ/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6d8f5e8a059si3845796d6.397.2024.12.06.10.14.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 06 Dec 2024 10:14:30 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Ktg+vYJ/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tJcq3-0001I5-B0; Fri, 06 Dec 2024 13:14:03 -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 1tJcq1-0001Hd-6Z for qemu-devel@nongnu.org; Fri, 06 Dec 2024 13:14:01 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tJcpz-0005Nv-LQ for qemu-devel@nongnu.org; Fri, 06 Dec 2024 13:14:00 -0500 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-3862b364538so630139f8f.1 for ; Fri, 06 Dec 2024 10:13:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733508838; x=1734113638; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=IY1xd8opRoZk/886AEA9wTe2MQaSyJsx/L7Nvi5q+Po=; b=Ktg+vYJ/jFCPz61/1ZvmDlVbAnFPG0rbAK5iOCcJjrbWxe0e1x8goDse5Dnm4wn19e nMWwcuI3nIyFZzZIsAD5Lvz5EtcSvw+a4WzcJ2O9qTeEyqbYQwrQ0nQJFo8S4Pb57Gvt maI0Acsx1arNR4WT7DVjA2HdXBEaB+komwGqiF5EodXydEQaxb1vxn26s4ipuBp8LOo5 Kqm3X8Hwqcm2TKx1IJtkrOzuzYsxs8SjX2kJaHWMrONDiV83YnWHzsz0aZVGHoYbbAbv hA/iYc6P7+BnpVrgFWDqQxJ/9QpXBlIlh+P4gz1ZsA0GGAkMPGtSAi+jOwNbodG7N0j/ GwjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733508838; x=1734113638; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=IY1xd8opRoZk/886AEA9wTe2MQaSyJsx/L7Nvi5q+Po=; b=LN6vq55edL1g8nUDDMxYInvI9AsFd2wrH+NoUhGrPMfWTO7DCXOp6srsPC69Y+w0Jx MTSLMvSgvxlBlyqfiDAeMpWfw7fuzIH0g3oYhd9LWebT53txoxb7XplIkEmIBVJ4Tx+S 0Hl7lhFB+0ZrxpQFph0kPpnhh53/0hZ12oKOY0BdKkYYXtlXy3uv54eQkp7Q/5HL1eOO e0C1D9W/bf4i/1FxrsBnx9JAnT+DDj9PRrAuQNc8dCyXfI1Up4tlYifBDJYR39LpRDal yNTOA2QdVNd9N0dICI6IIcQhOg5c1PB6tGu6rWv9tagR2p1aoKWvKRcorNuSpbfbqjCk oriQ== X-Forwarded-Encrypted: i=1; AJvYcCXh6LaP+0e0nMFMNkql2Fy/gYHT2A+aUMeaONewjGxcQ2pv/AsJ5pHxrkDJ8P3DyvCr5y7HbyPDCSQc@nongnu.org X-Gm-Message-State: AOJu0YzBG0ogX8z04M+BKkSeW1VtHF9JaSbvhP7NQ01y+L+YctZif0DX /zDVlolu6DnJGI/G5cUjQ8eK8OfJJZn9kxGzYf9MVU7N+vXgAl7hN/jeSDXwLTw= X-Gm-Gg: ASbGnct2NLKJjAX9tXmPZYxUULBeswX8ugEQwo3znOwfzpZ2HqXSHcFU3NspY+yYdtg 1RxpRwRTP4L5i07btCZ6wWJn5AAnEiq2h6YpZQMY6KflCrExqnRzTTQadLYyqOp3hft2/SJCovk YLc5lv8lqH+GWruz+DC1gtANyXJPlIsSTJgZaxylWLK91LkR2NIdNssAIikSU7lF0lOZ+b71ZKs P6H3rbfU8eaXBX1ZPDo8Z0O/Dtun6RciYdzlXWQz1IDGsyoiLaZ4ec4UORmwpf9oRY= X-Received: by 2002:a5d:64ef:0:b0:385:f892:c8be with SMTP id ffacd0b85a97d-3861bf7382emr5757158f8f.23.1733508838056; Fri, 06 Dec 2024 10:13:58 -0800 (PST) Received: from localhost.localdomain ([95.127.41.180]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-386219098d3sm5256260f8f.70.2024.12.06.10.13.54 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 06 Dec 2024 10:13:57 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Jiahui Cen , qemu-devel@nongnu.org Cc: Gerd Hoffmann , Eduardo Habkost , Gustavo Romero , Paolo Bonzini , Marcel Apfelbaum , "Michael S. Tsirkin" , Richard Henderson , Zhao Liu , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Bernhard Beschow Subject: [PATCH 0/6] hw/nvram/fw_cfg: Move PCI bus methods out Date: Fri, 6 Dec 2024 19:13:46 +0100 Message-ID: <20241206181352.6836-1-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.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=ham 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org In order to keep fw_cfg device model clean, remove the PCI bus specific code. Instead, the equivalent functionality is implemented within the PCI_BUS object in hw/pci/, implementing TYPE_FW_CFG_DATA_GENERATOR_INTERFACE. Philippe Mathieu-Daudé (6): hw/nvram/fw_cfg: Rename fw_cfg_add_[file]_from_generator() hw/nvram/fw_cfg: Pass QOM parent to fw_cfg_add_file_from_generator() hw/pci: Have PCI_BUS implement TYPE_FW_CFG_DATA_GENERATOR_INTERFACE hw/pci: Add pci_bus_add_fw_cfg_extra_pci_roots() helper hw: Use pci_bus_add_fw_cfg_extra_pci_roots() hw/nvram/fw_cfg: Remove fw_cfg_add_extra_pci_roots() include/hw/nvram/fw_cfg.h | 21 ++++++---------- include/hw/pci/pci.h | 3 +++ hw/arm/virt.c | 3 ++- hw/hppa/machine.c | 2 +- hw/i386/pc.c | 3 ++- hw/nvram/fw_cfg.c | 34 +++++-------------------- hw/pci/pci.c | 53 +++++++++++++++++++++++++++++++++++++++ system/vl.c | 3 ++- 8 files changed, 76 insertions(+), 46 deletions(-)