From patchwork Fri Dec 13 13:33:45 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: 850124 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:2c4:b0:385:e875:8a9e with SMTP id o4csp1502701wry; Fri, 13 Dec 2024 05:35:20 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWauihEUomkArckmcMJOL9uxZ1LpBqBL63d2wDlR9f9JqRxv+k/Gener2qVNE36GmonPNhgEg==@linaro.org X-Google-Smtp-Source: AGHT+IEQ+t0p97gIKKbb6qm5uXUEVPAig6pIAdbIGwa0S1uSaXjEMAZYyln9iG5QzDl0zuKTLiK5 X-Received: by 2002:a05:620a:2989:b0:7b6:dc1f:b98c with SMTP id af79cd13be357-7b6fbf4426bmr456901285a.52.1734096920032; Fri, 13 Dec 2024 05:35:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734096920; cv=none; d=google.com; s=arc-20240605; b=SKEZaoekm2bNQ0grZHG7gH0Q+u7QVOJ7mH0zASuzN3TM4p47Wfxnk/rhjtyZ2giSYB Cq7my6ZAfFY/vY5GXkT40vlquCoVsQIzIX+AjBXQ16PDESnKnOwvROcPZQV4kmlz4tAH CinwPvSxHHxANTSe1qle5PIhOFU3XPnXp4lYeEXqtmX22i3boDynvyb1dlLjAlcwDtOw bl+HXlqn44k0Wr9v4Fgs3Ic41GK3LCHIziEkoingEqzVyVQw0FE9aqfpoo6Zuf8m9vB6 9PcKFuIgxbs2wmVkJknFXCWXavjxldhEbLcSIHUfX9hHZjEimXkMhE3brPhEly+01YrK hH/w== 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=KiX5mmq4vCwE1JaaWuCTD5vC1dSPpb7XgZTnnxB1/+8=; fh=5/bEEfneXpYiCSLu1RRtIdWOVpk1SgQYYFlk2zFRZHo=; b=QEsq3Sg5atk3/d4nwhAVpo3Qg25Hm+8pYJT0PTUVJ5bZIqAYIhesD3iHQUtZ4IxMDe Mq6+sn/24eP5RSD2+xr0bMsHXC4eDaM+456f+H87UrvKjPwSxB1+JnpaKg49SaUaig0a hXSGxk0JZmMXjrEBCfEwsiSm7dOEMrWCtwSJ4Pe+grkGFN+NEH9ztL6/t+WDVYT5T4fy nC+35ZGgM7q73buQn0l5jFz248/zB4/k6b4lrjHCv2romCMJHy6TJ+LfW0L78IQhIOF6 xv+cKr4DLC5iMI+OvBwkbrSvDt36x5bl8hDzqSwFBepfeMFPKhVmrvQKWF3Ghus27f5c I+Hg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JWpx8Txo; 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 af79cd13be357-7b7000f012asi84818885a.637.2024.12.13.05.35.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 13 Dec 2024 05:35:20 -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=JWpx8Txo; 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 1tM5of-0005Pt-2Y; Fri, 13 Dec 2024 08:34:54 -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 1tM5nx-00057s-7X for qemu-devel@nongnu.org; Fri, 13 Dec 2024 08:34:06 -0500 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tM5nv-00014P-3Q for qemu-devel@nongnu.org; Fri, 13 Dec 2024 08:34:04 -0500 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-386329da1d9so862163f8f.1 for ; Fri, 13 Dec 2024 05:33:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734096835; x=1734701635; 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=KiX5mmq4vCwE1JaaWuCTD5vC1dSPpb7XgZTnnxB1/+8=; b=JWpx8Txo4yV0xfb+CcmVIuM0cs2NVD2zEZhVGQ3MWUQ/GcyZpi2kj/DRhenwcsjtpB YRiHBzCY3zrBdD08AdQY2WGAuJ47U2mjze6DpX8fdFJn4k6grm34NQ25T+0+py1pta3n NDP1/h+ctsRCNme1NSUopcvnpoYXgT66APT/SKdyQFwIjlTdZpcV29sZi6MucZNtJR5Q BQ1qAPeP/j7DNSW4u1WrsepvUYj9V42nGaf+XIfLg+SCLkocT+v7e4IAiJYgKoImYeN6 SMyr2+0GBvbAPzKQIu5rtMCnQJzgILlz+QVZPWxAnK/E9+w8o+IJDH7Sg1esxNZ6uyoc ZHjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734096835; x=1734701635; 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=KiX5mmq4vCwE1JaaWuCTD5vC1dSPpb7XgZTnnxB1/+8=; b=dL21G1Zs/CK1vA8XE6VrjjHb5Dj224gdOyO2ir4TSVi4NA/KMVePLaZ5jrmCTskVdP dbirAsXw17oCqwwjXsI540v0CkSOUt6j3g5g05kS9B+tVH8rDsiNNjSnm+VSdr8DRP2b 2LF/bfOhrJX4YxCBm1JIoQ2sXyKHGpeWvoyPgPyz/LRCNWQOZJmHudNTWPTeo6Hbo/Hk 2qNlofr3QoZ5LVaxKAo0J04G4dU+D3XKKV42wN9HDISa+GsgqFr5zuNEvM8nzwfH9yLA BK1G8j2zO0rVWv45rEG50+FXGicJeOdDuciv4x50zkSmm1t2XcgoK+2I9F4ETYiPDU1o ufnQ== X-Gm-Message-State: AOJu0YzBV0bEQ9H/XRKokKETuMPbo6y0UxrfwcG+ylAsmeokWzSFBX7d LNO7h/gvj5TrtMPIW1+jCU0LPPGhTLDQQfwoHrK+MUBRlxoxgaeV2CA32M1xiYjD3p/8H+ZGdCB m X-Gm-Gg: ASbGncuQynoU0SWf/zsf39k/MDLayT8ciYXJjrjQD1+nCLEfIZtDIpmHYBYVWEiBtsA YrDriLgLgyhoDVaZZ1aVeUl4gxC/I1VpzedQmCdS89OtPx/rx9qonDoCdbLnj+ihJL7/KsxWQbc GVIVIoIliSFXDkRCIcDd0efpHZ0l3WMGvWE6CNSrNAfG6Q3oAQ5xOObA5tZzvCkz1ERpzEnhHUm a/v96bLMCtc9tAaJuFxpQwNSXnXjBepqRyJj6NmwsqxcNDjmAdWzRZ3LWrDKh3S+RQWeyh13PdI bPg5mP5rWBdOA9dWuBlGloxNI3G6Vl5speJ6 X-Received: by 2002:a05:6000:1fae:b0:386:366d:5d03 with SMTP id ffacd0b85a97d-38880ad88dcmr1988971f8f.16.1734096834521; Fri, 13 Dec 2024 05:33:54 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3878248f440sm7089595f8f.17.2024.12.13.05.33.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 13 Dec 2024 05:33:53 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Gerd Hoffmann , =?utf-8?q?Daniel?= =?utf-8?q?_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Philippe_?= =?utf-8?q?Mathieu-Daud=C3=A9?= Subject: [PATCH v2 0/7] hw/nvram/fw_cfg: Move PCI bus methods out Date: Fri, 13 Dec 2024 14:33:45 +0100 Message-ID: <20241213133352.10915-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::436; envelope-from=philmd@linaro.org; helo=mail-wr1-x436.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 Missing review: 3 & 4 Since v1: - Patch 3 is new - Added danpb R-b tags 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é (7): 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/nvram/fw_cfg: Skip FW_CFG_DATA_GENERATOR when no data to generate 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 | 32 +++++++++++------------ 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 | 44 +++++++++----------------------- hw/pci/pci.c | 53 +++++++++++++++++++++++++++++++++++++++ system/vl.c | 3 ++- 8 files changed, 89 insertions(+), 54 deletions(-)