From patchwork Fri Mar 7 18:03:26 2025 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: 871222 Delivered-To: patch@linaro.org Received: by 2002:a5d:64c8:0:b0:38f:210b:807b with SMTP id f8csp894992wri; Fri, 7 Mar 2025 10:06:24 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCU5ugZM3teLJ1UKIjYlgtb55ZnebFbw+7H5OUqPNkcVKdRdNOUCvXrEHfAhQjZGW/+vkGz0+Q==@linaro.org X-Google-Smtp-Source: AGHT+IE5EV6s3QLTrCH0N+eRPhjv2egLxy/42VVY6Jo1cuTipuXQ0u1lVlb/xuHyEDdLuh6V6O9r X-Received: by 2002:ac8:5a8b:0:b0:475:85f:820c with SMTP id d75a77b69052e-47610950ac5mr66372671cf.2.1741370783828; Fri, 07 Mar 2025 10:06:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1741370783; cv=none; d=google.com; s=arc-20240605; b=IqwtPnpHT7+RMhGRSIBBWMK1ilQbsZliJnGe08vs0TtuF7FVlnaEQ5SNA5I1kcHeVg xTSsKlrQKVt/EAjAcxceo1iKGchskziYI6I6YSdIWpDeHWxXcXqJXVVYhDDXQd882Oa8 asaEI4sHo433nWx8Fm7VGa32pujjryhZI0ooqJSB2foA1o0lo3XPI6X05CGPj5u7AS8I mTC6QzYUcXqk5r28K2IHG/7JdJ21u+iaJwcWqLStBNyTrs5bS3xOlA7uh01CwF4dQbK0 XT1Ixyno787uGBJKV8pn4C0YX2hVI6Y9f4K+/WdFbwMbT0egNegeZtSskLZ5cdB5tVGj fkxw== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=krlUeIQnTGSREObLa/ECb/a6wxL5+gnrd7UhE7/j7Y4=; fh=ZyzqLhNGJAXkYZjVqygzIY1NON/Kumlz+Vm/jUj6bQE=; b=kPp7Vc8YKyTIwyqjGLjz45zKDPLK1BJgv6HVw33EbRw1u98/EU7nPbzf+hK4r7eRFI cFi0NqMJr3zLVBBXtiQUKoIJssjXkqnex7YrjmWNUkhpM6ssQp9GAvBUocHQSbJ6OtQW LLhj+swXZRCM5DnYhzU34KYvAWtOC/qIdH3SUusFqC3vfcJ8z419eVXvtgnCTikifoRl dk4ulCZW7ZVD/JsmOcOHXjCxu8LxEJMqvHxLwshFHNdMCjGbvWYngRHjo3zblldgW8dp 9AWPFb5C/z3YnAaN6tzT0FcRaPhXJOr7dRueK30gmjVGY6jpvQ8pG+/6OyxXoEk6QhGQ b5+Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=N9hfvTst; 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 d75a77b69052e-4751db17197si37322741cf.338.2025.03.07.10.06.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 07 Mar 2025 10:06:23 -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=N9hfvTst; 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 1tqc3L-0003eu-B6; Fri, 07 Mar 2025 13:04:07 -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 1tqc3F-0003Ut-Lr for qemu-devel@nongnu.org; Fri, 07 Mar 2025 13:04:02 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqc3E-0001ce-1m for qemu-devel@nongnu.org; Fri, 07 Mar 2025 13:04:01 -0500 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-43bcbdf79cdso13615455e9.2 for ; Fri, 07 Mar 2025 10:03:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741370637; x=1741975437; 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=krlUeIQnTGSREObLa/ECb/a6wxL5+gnrd7UhE7/j7Y4=; b=N9hfvTsttsE6ramriuYgHTndOhTPHPuNGtt1ZOakn00CSZckTIhHAYHx3nLvtLFZRV SKi4hLyXSY+7aLtB2+s4BW3GkRNnGtBbywQYqmWGKQdVWiDBMsGrpB9FMKOR4VZ9dSEs 0ezrPc6+zRomgMlrhFBL2s3LYxgWA3EX877GSlua1pv+T5FCL/yqID2zApCsFUDA+9Ar F1UhIMcrqESVVxXS/U3auZMiwUmrHVsCLzzcojmOsDhiD5alkMiSybGvBJ+gHgqcITBk +RWXsY2Zs6JFvqEObT/R+7Nf5Tu0z6+nJYOPDVBZ+b+4iZlWHCwjRCl0XBScmRjkosZl tvhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741370637; x=1741975437; 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=krlUeIQnTGSREObLa/ECb/a6wxL5+gnrd7UhE7/j7Y4=; b=PGcTePmK2tRaA5zeUZLqfwakQwuWawKy9zJzZjkH86PftVf8sU3uZO08v4adAen2ck nKUtHO5ib1DACpIjgxSEbDxKZ1mqjToqMdiLElT3eoUGrF9TGL3JiFBZqZVXPwyUq0W5 w8SGnjAzuElj6iRwWx7Jr5pLuKOKTa9xty5Zd6FgKLhD8thfLxQIti0uK968CfTmClnw SzKkReJXB6lX244la4lJAjYxnITgYNBkFnGGDfHkQhNEfYDeexrl2NaZtmJUPt14i4oO 7EFWrFio+CKxAcDdyHSLvt8IzywfselZ/rhbnQovb9kh8VHgxPct8+8nBtgBhcI51Jt2 f7mw== X-Gm-Message-State: AOJu0YyIld2DpY/PTchgyQQAjsaOTih+TLKnvrwCE/OM8eYHq4BJe6Pt TwlT+hE7fq36eKb0M1S4xNSvbw+pjq5pguZi1huQz3aOWM25QLviBkt4T3iVeQOAfSs2pYXT/IO sWbI= X-Gm-Gg: ASbGnctpdkAbIWgMLKOZyQYsHSOiVLrBqyFCOVfc7/2uJaVsl9UvY1oGjxLO+GxNhjn pCDSC2dzqOpL3ce1x4ywDJ9XPjri+0ZEb7bTQRLHTpqmAhYJmREOEg/UCvo/Lde4K8s3dh4C//B ZmBB2i+aGbXy1NOO1Nh9GDrE5ou8dqHQlTPUg+SRdrWSvayX7HI7piLktUMNQ3+VucGlDZK/Fw1 N8dWxsNCoP0Wb/65hpQeg/Bv6Yyg9+2mDC25DUe03W36IDGABjwsPUyZfKgX5XG04v0co6Ccxsu hOh08KBGfAyftKOULBHyiVOgCQMGOeI40QlMotSppL/mcMls/DlvLwm7HVm2gY2SvMtlnPZplZc WO+B20rtxrD5ar1LMKac= X-Received: by 2002:a05:600c:26cc:b0:43b:c390:b77f with SMTP id 5b1f17b1804b1-43cb91c5affmr23555105e9.26.1741370636721; Fri, 07 Mar 2025 10:03:56 -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-43bd4352e29sm87392995e9.32.2025.03.07.10.03.54 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 07 Mar 2025 10:03:56 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Alex Williamson , Igor Mammedov , qemu-ppc@nongnu.org, Thomas Huth , Richard Henderson , Tony Krowiak , Ilya Leoshkevich , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , kvm@vger.kernel.org, Yi Liu , Paolo Bonzini , Zhenzhong Duan , Matthew Rosato , Eric Farman , Peter Xu , Pierrick Bouvier , Daniel Henrique Barboza , Eric Auger , qemu-s390x@nongnu.org, Jason Herne , =?utf-8?q?C=C3=A9dric_Le_Goater?= , David Hildenbrand , =?utf-8?q?Alex_Benn=C3=A9e?= , Harsh Prateek Bora , Nicholas Piggin , Halil Pasic , Christian Borntraeger Subject: [PATCH 03/14] hw/vfio: Compile some common objects once Date: Fri, 7 Mar 2025 19:03:26 +0100 Message-ID: <20250307180337.14811-4-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250307180337.14811-1-philmd@linaro.org> References: <20250307180337.14811-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.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-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 Some files don't rely on any target-specific knowledge and can be compiled once: - helpers.c - container-base.c - migration.c (removing unnecessary "exec/ram_addr.h") - migration-multifd.c - cpr.c Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson Reviewed-by: Cédric Le Goater --- hw/vfio/migration.c | 1 - hw/vfio/meson.build | 13 ++++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c index 416643ddd69..fbff46cfc35 100644 --- a/hw/vfio/migration.c +++ b/hw/vfio/migration.c @@ -27,7 +27,6 @@ #include "qapi/error.h" #include "qapi/qapi-events-vfio.h" #include "exec/ramlist.h" -#include "exec/ram_addr.h" #include "pci.h" #include "trace.h" #include "hw/hw.h" diff --git a/hw/vfio/meson.build b/hw/vfio/meson.build index 260d65febd6..8e376cfcbf8 100644 --- a/hw/vfio/meson.build +++ b/hw/vfio/meson.build @@ -1,12 +1,7 @@ vfio_ss = ss.source_set() vfio_ss.add(files( - 'helpers.c', 'common.c', - 'container-base.c', 'container.c', - 'migration.c', - 'migration-multifd.c', - 'cpr.c', )) vfio_ss.add(when: 'CONFIG_PSERIES', if_true: files('spapr.c')) vfio_ss.add(when: 'CONFIG_IOMMUFD', if_true: files( @@ -25,3 +20,11 @@ vfio_ss.add(when: 'CONFIG_VFIO_AP', if_true: files('ap.c')) vfio_ss.add(when: 'CONFIG_VFIO_IGD', if_true: files('igd.c')) specific_ss.add_all(when: 'CONFIG_VFIO', if_true: vfio_ss) + +system_ss.add(when: 'CONFIG_VFIO', if_true: files( + 'helpers.c', + 'container-base.c', + 'migration.c', + 'migration-multifd.c', + 'cpr.c', +))