From nobody Sat Apr 5 01:11:18 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1739220567; cv=none; d=zohomail.com; s=zohoarc; b=Gi02QGi0iRr6tpXSOx1DhIjtX3FV99Y0WMRYJOspGM5VywO95JgCGKGNHWAk/F1uQtJvUyPcmf36cJUxC7/7Nm0vlPMcJ6Neb4pjm7vL7I+OH7lA/0nN0AtiOQlUMmu2acpNuYcnMm/D04PyvmXuGSVCLkonrjV4GLQxOHpxEOs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1739220567; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=164MJWJMM4XF5ZTwp3LiTfxGt94ljlFDi9lBlhGSKKs=; b=e/3dwOGaiFQYNwF99TMzwixDV5sQukfbnXfukdwZjTWZYhSe6GWIreMwa7hNXh0F44nBbBK7CYEGAa3Bf38gl/3fs8jJW/LcISZLiphufVlPGfLz3Uo1ccHmMF4+Regv2RNMtc9+In+x7kva1kRatEr9Won8L5jb3JdctLCFn7w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1739220567865222.50738424026576; Mon, 10 Feb 2025 12:49:27 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1thacm-0007S5-8d; Mon, 10 Feb 2025 15:43:24 -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 1thacf-0007Cc-Dt for qemu-devel@nongnu.org; Mon, 10 Feb 2025 15:43:18 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1thacd-0003g8-KU for qemu-devel@nongnu.org; Mon, 10 Feb 2025 15:43:17 -0500 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-38dcac27bcbso2115330f8f.0 for ; Mon, 10 Feb 2025 12:43:15 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4391d5283b2sm161645935e9.0.2025.02.10.12.43.12 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 10 Feb 2025 12:43:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739220194; x=1739824994; 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=164MJWJMM4XF5ZTwp3LiTfxGt94ljlFDi9lBlhGSKKs=; b=i4gWmIS+FmyYSdXjemmR8Cm9KJWeJYhIw0O7JloFQil1P4XwGC78l0il/gaRzfmSp5 bvEM8sgUu4VpUC9UqfGyvp0z9ZmPwrkUXZ9uEYCAmpaWihw2stpOXwVmpsEp73I4HDni tMTO85bsaIhYj6dzzeLJIicskeQw7lZBkT0gx4jrJ5SMGTODw3591KCqn+4qQ0279rga Hvqw1apPgRvTeL7PfOi86/42D3Y9WKma2i748ghTcO/N+sRWOV55TbQHqpxUN1WPPBKL VUeLwF5wwNZExCatifIyDWp7IY4o/hyKXrMTZOF/Bn/Z4OUQf0+60sJlZvArnqRi3zfN Dg5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739220194; x=1739824994; 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=164MJWJMM4XF5ZTwp3LiTfxGt94ljlFDi9lBlhGSKKs=; b=FQ4XtvOoGPb8FEed7Ks7f9j2yJSKZrvEHF2zRIK2KHUxcYWEj3d68X7P8EDUDO3lk1 8naPi4tmuG8hv8aFtyIDeQGPWIFrMw20E66uGnkLgGsAkU6QFC0IW95aAF+ADOMb/WJs UQ3wsXFhi/StySMQyCEK48N10tTOGHASJzY6rqeFTxiQs3xDzSea7+Uh6U8Gq20rnuc6 4/t+kmWZKe3DsD4keqK3hdo5zAKpa+1YvcR5oXbscjAbFDBNBiOPpphV9yu0cewkJumv SKrFWBEQdM15Ep62dxmZCdNQQ0dPMVdzUKya63tL3DUFei1+k/gRYYqkxopVnJzyBEK0 4bzA== X-Gm-Message-State: AOJu0YzKuQv/7Nsvpik6Z85wrh7gp+zTgdBea8vu4Cng9fEFImZ74K0N bqkY198Fo4hLkEs2v5EvyF58aEnRuIDD9gMSo3sT8Pmk/vpo+qTHS6+Rv3Nhc0JO2Fry79qGcZF RR4k= X-Gm-Gg: ASbGncsE9s09bcLAh2AnoC6yejeQUOCYjeE0ZKVOPFHS/hAkY++ejijEY/tmeIWX6kz t0m3VetXxKogFzTS9bXL9+ZEujvmaoVnmj5rLIa/izSrKRivpemAUWjMArCw4ZU8xXy9CWJQrbF NyWsgs1cSksvUOleNtDkEJO8OGH+KQf2RQJKsIYXS6d/DAUn1jv/Vm6tdELAPii02Fm68S5LMik qEFe+zN5oeXIcGsTk8xnnrj+a3v3KD7xCaMMN+zOMqg9GrZZVeAhtN984rhA4A+obDzMizAeIns oWSamy/lqwYShgqC4+apIBNcLtahR0XPSMGad0D9L0/H2Vn0tnPAgsbKxh880Rmn4A== X-Google-Smtp-Source: AGHT+IEQyCDA17Rv1DgYeW9fS9OghSWSHQOiqaK/1t4gRdiEU7CVLYGq9Xf3vKxGhRbcJERxvY2uIQ== X-Received: by 2002:a05:6000:156c:b0:38d:c88e:d57b with SMTP id ffacd0b85a97d-38de43e921fmr588013f8f.26.1739220193397; Mon, 10 Feb 2025 12:43:13 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , Alexander Graf Subject: [PULL 13/32] hw/vfio: Have VFIO_PLATFORM devices inherit from DYNAMIC_SYS_BUS_DEVICE Date: Mon, 10 Feb 2025 21:41:45 +0100 Message-ID: <20250210204204.54407-14-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250210204204.54407-1-philmd@linaro.org> References: <20250210204204.54407-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=philmd@linaro.org; helo=mail-wr1-x42c.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1739220569975019000 Do not explain why VFIO_PLATFORM devices are user_creatable, have them inherit TYPE_DYNAMIC_SYS_BUS_DEVICE, to make explicit that they can optionally be plugged on TYPE_PLATFORM_BUS_DEVICE. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Reviewed-by: Alexander Graf Message-Id: <20250125181343.59151-5-philmd@linaro.org> --- hw/vfio/amd-xgbe.c | 2 -- hw/vfio/calxeda-xgmac.c | 2 -- hw/vfio/platform.c | 4 +--- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/hw/vfio/amd-xgbe.c b/hw/vfio/amd-xgbe.c index 96bd608b8dd..aaa96903db0 100644 --- a/hw/vfio/amd-xgbe.c +++ b/hw/vfio/amd-xgbe.c @@ -41,8 +41,6 @@ static void vfio_amd_xgbe_class_init(ObjectClass *klass, = void *data) &vcxc->parent_realize); dc->desc =3D "VFIO AMD XGBE"; dc->vmsd =3D &vfio_platform_amd_xgbe_vmstate; - /* Supported by TYPE_VIRT_MACHINE */ - dc->user_creatable =3D true; } =20 static const TypeInfo vfio_amd_xgbe_dev_info =3D { diff --git a/hw/vfio/calxeda-xgmac.c b/hw/vfio/calxeda-xgmac.c index 87c382e7361..b016d42b496 100644 --- a/hw/vfio/calxeda-xgmac.c +++ b/hw/vfio/calxeda-xgmac.c @@ -41,8 +41,6 @@ static void vfio_calxeda_xgmac_class_init(ObjectClass *kl= ass, void *data) &vcxc->parent_realize); dc->desc =3D "VFIO Calxeda XGMAC"; dc->vmsd =3D &vfio_platform_calxeda_xgmac_vmstate; - /* Supported by TYPE_VIRT_MACHINE */ - dc->user_creatable =3D true; } =20 static const TypeInfo vfio_calxeda_xgmac_dev_info =3D { diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c index 1070a2113a1..f491f4dc954 100644 --- a/hw/vfio/platform.c +++ b/hw/vfio/platform.c @@ -672,13 +672,11 @@ static void vfio_platform_class_init(ObjectClass *kla= ss, void *data) dc->desc =3D "VFIO-based platform device assignment"; sbc->connect_irq_notifier =3D vfio_start_irqfd_injection; set_bit(DEVICE_CATEGORY_MISC, dc->categories); - /* Supported by TYPE_VIRT_MACHINE */ - dc->user_creatable =3D true; } =20 static const TypeInfo vfio_platform_dev_info =3D { .name =3D TYPE_VFIO_PLATFORM, - .parent =3D TYPE_SYS_BUS_DEVICE, + .parent =3D TYPE_DYNAMIC_SYS_BUS_DEVICE, .instance_size =3D sizeof(VFIOPlatformDevice), .instance_init =3D vfio_platform_instance_init, .class_init =3D vfio_platform_class_init, --=20 2.47.1