From patchwork Tue Nov 14 14:37:57 2023 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: 743780 Delivered-To: patch@linaro.org Received: by 2002:a5d:67cf:0:b0:32d:baff:b0ca with SMTP id n15csp2206508wrw; Tue, 14 Nov 2023 06:39:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IHGCMfT2K9KOmwJjKLaVTXzdX0ey4W1qmMmMb7jeBwK1KBSnZkz9xwl7qb+g5/OdN51yz7I X-Received: by 2002:a05:620a:178b:b0:76d:984c:9d01 with SMTP id ay11-20020a05620a178b00b0076d984c9d01mr2778828qkb.33.1699972781807; Tue, 14 Nov 2023 06:39:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699972781; cv=none; d=google.com; s=arc-20160816; b=slXy9QFiO6ta8EN5OvyBNo1Y8xNrwPtc8esRFb57rqwiZfP+3iU8u6Cii+RlKb6S+d O8kUjdd8u7YwD5lvKkba43i7CrAbOGJe1RKppS1jodKvzw0I31/QrXLI7G178bIgCxkU XqVNuT9uUD790+2XM8fXXz6sw8AvdvHUDxcuTZ3M0fl0e5qirzJF+VqsfYsuzsKSXe5M 2UdgWjQH0ddyDvxoo9bbjGYlGliGIHx17gQjRc9xWKXGEk8/k6pbWvZao0LCu6cJ6FKH MQO66meUdkYD7pHvKWNC3GoDg+q1BA/tMFnwGBMcGmtvAHSg+gXNxC6eeqTcKOqYZbVh ounA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=7bjOOh298/gVm20zFogtcW7Ag9vjCtjGY9z1KnDRo3U=; fh=+Vke2cRJ/9boBBC29R1hFHQdJ1vL+acKER0N8tLuRWA=; b=MC4x5ZGM38kvFuWQazgCVpNQ/Bi8M+XvFxE4poXeT22Jk8PfW9OoWFWiaVyi7kL2+D VOOu1e6KXs4IsymjNrzYAlYJZIcEy0wauzBRyDIA6LnY+E9iFcE/UOUGaV4ry4cpa+Cu a5ZmOnWrP5D7+DSwCvEly98ktCCNchlYuI6P0LOqp412276kSEfErg4EDG4S4+0kP1t7 vpJFON51JvVw3C9pRbFQg4M3J+uhN452aOhzIR1ikiAieY58XxhJco3nLZ2BP/YhEEKg Y9MfL5yBpFtqq3zbOxNZgfvQ7L5MkbuE6YhIQ/+V9JzGCXqyrQxIPBNoDqyJYJoJR1hO m3hQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="cX1/q5wP"; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id bn44-20020a05620a2aec00b0077758455319si6737713qkb.764.2023.11.14.06.39.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Nov 2023 06:39:41 -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="cX1/q5wP"; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r2uYj-0002bM-Pl; Tue, 14 Nov 2023 09:38:33 -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 1r2uYg-0002aU-KP for qemu-devel@nongnu.org; Tue, 14 Nov 2023 09:38:30 -0500 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r2uYf-0007iM-3y for qemu-devel@nongnu.org; Tue, 14 Nov 2023 09:38:30 -0500 Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-9c773ac9b15so803904366b.2 for ; Tue, 14 Nov 2023 06:38:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699972707; x=1700577507; 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=7bjOOh298/gVm20zFogtcW7Ag9vjCtjGY9z1KnDRo3U=; b=cX1/q5wPI0mDPKtHoJZD9Qucuxvwf7jEbEbmK9eeh+o/x0Xbie7b4I707qwViObxSx e2jGmlbjAU/hRYuatqBYz5uehdGcHHVsXUfE96NmLU08rBcufkG2fw3uv26GS1aB+g6I LePBE7onYdPVYsDjGuzn9MkERgbw5jZBsQn2uTWAVre+haYdLxxNu3bYmtNtb/7U1nqm 3Gr/gWwAJO+Z2d+XNL3HdfbwX1fh+olwvoOyuNARW9lfiX5WDuzzAvsV8kdPLE5CzkHc Vh/Yru6rQfIhINCrjkbTmffyQuCdS1/+uOYpHF2Vdnnmsn4atKh9CaM9JumroPAZ4mTP TVqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699972707; x=1700577507; 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=7bjOOh298/gVm20zFogtcW7Ag9vjCtjGY9z1KnDRo3U=; b=lDFQmcpKlFB2J5zWG+pGTGzm2PU2ubEoRhxkDj8PY15Ww7YNFMkOGx/8u6OXTRV1/w Mx2t2CyP14+t91+akyLkg1kaUKdRRLh9G0jwXqMODl2NyoccUxZPRFi8qKxW9vaLBdEV NXLwfKOxyXR+o9u9ZyR7M8e0EdW2SR9JL2gyjSBRb660avI8MjscNHxueLay2KXUQS1X q9UcOqtcAW+HiHk7iIq9yvJ9qqwkmxpc1J6Kq4GT6B1/tcPa5KJxoKguPIhGODsRfN3l 6CXXzs4bWwwrnSVvrA8fomgUDzuemobhEhwJ7obQCQauC0f6uphx3hiaPXVMqXl+4Btn Qn7Q== X-Gm-Message-State: AOJu0YwJX/m+XAEbK2QeI7XaFNXZWBxNwZ7+NKpx7mbeanjJwpKgvpBm 5OZukM+pyIq3fdspHt2Ar8obLw== X-Received: by 2002:a17:906:e084:b0:9c6:64be:a3c9 with SMTP id gh4-20020a170906e08400b009c664bea3c9mr7562718ejb.39.1699972707580; Tue, 14 Nov 2023 06:38:27 -0800 (PST) Received: from m1x-phil.lan (cac94-h02-176-184-25-155.dsl.sta.abo.bbox.fr. [176.184.25.155]) by smtp.gmail.com with ESMTPSA id v21-20020a1709064e9500b009df5d874ca7sm5636254eju.23.2023.11.14.06.38.25 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 14 Nov 2023 06:38:27 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: David Woodhouse , qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Paul Durrant , qemu-arm@nongnu.org, Paolo Bonzini , David Woodhouse , Stefano Stabellini , Richard Henderson , xen-devel@lists.xenproject.org, qemu-block@nongnu.org, Anthony Perard , kvm@vger.kernel.org, Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Cleber Rosa , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PATCH-for-9.0 v2 01/19] tests/avocado: Add 'guest:xen' tag to tests running Xen guest Date: Tue, 14 Nov 2023 15:37:57 +0100 Message-ID: <20231114143816.71079-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231114143816.71079-1-philmd@linaro.org> References: <20231114143816.71079-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=philmd@linaro.org; helo=mail-ej1-x62c.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, T_SCC_BODY_TEXT_LINE=-0.01 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 Add a tag to run all Xen-specific tests using: $ make check-avocado AVOCADO_TAGS='guest:xen' Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Woodhouse --- tests/avocado/boot_xen.py | 3 +++ tests/avocado/kvm_xen_guest.py | 1 + 2 files changed, 4 insertions(+) diff --git a/tests/avocado/boot_xen.py b/tests/avocado/boot_xen.py index fc2faeedb5..f7f35d4740 100644 --- a/tests/avocado/boot_xen.py +++ b/tests/avocado/boot_xen.py @@ -61,6 +61,9 @@ def launch_xen(self, xen_path): class BootXen(BootXenBase): + """ + :avocado: tags=guest:xen + """ def test_arm64_xen_411_and_dom0(self): """ diff --git a/tests/avocado/kvm_xen_guest.py b/tests/avocado/kvm_xen_guest.py index 5391283113..63607707d6 100644 --- a/tests/avocado/kvm_xen_guest.py +++ b/tests/avocado/kvm_xen_guest.py @@ -22,6 +22,7 @@ class KVMXenGuest(QemuSystemTest, LinuxSSHMixIn): :avocado: tags=arch:x86_64 :avocado: tags=machine:q35 :avocado: tags=accel:kvm + :avocado: tags=guest:xen :avocado: tags=kvm_xen_guest """ From patchwork Tue Nov 14 14:38:02 2023 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: 743779 Delivered-To: patch@linaro.org Received: by 2002:a5d:67cf:0:b0:32d:baff:b0ca with SMTP id n15csp2206386wrw; Tue, 14 Nov 2023 06:39:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IHAhXBeoTq6tjnAPyCcCs28Ju9aBUJPeMOVtfuEhVDSrc6Sc0t0FxlYyA479QAGnC9KlXyL X-Received: by 2002:a05:622a:1aaa:b0:416:5dca:3c9d with SMTP id s42-20020a05622a1aaa00b004165dca3c9dmr2769279qtc.16.1699972765684; Tue, 14 Nov 2023 06:39:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699972765; cv=none; d=google.com; s=arc-20160816; b=aFjjO+qI8bCn1TVCOqQpdBJyBpb05z6k8jInahCOOk8z8UVHfU3oPXBziSBc9itK1Z 7qjVs6nEVlksfm9vFJoVsp9YR8A1YJeSCQf/56cZ6y4girZ/Q97V9aO5jn8qkSTxhvOs cVQyfnR/FmQFoM6uAnp6mc5F52K3t27aqy0okIO6/ULdDEtx9ASWRnT7vHXCsaV3iCnM WSOq9R98McNQtnt6E6keS2iXi4yNNOGoJf/PEgmeDRYzJjXvantIPGu7kIT1tO+UMIYP mb9nypNLI4v/UfBzjZZxkBjwuaJsUxIRF1LiPxFeoB/Q5FCs2a8ff+IzW3OWhX+PQRsA clhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=A2i2PCnBLcbag3MdE1ImS65uDPosS8yIjq0X323T5yY=; fh=x9Fi4ZIukdrtyL5TeYscoblPJScsjDRIG6KPVWTJ4xI=; b=D4H8xtzFoAr0IZA/Sks12NymYQ9cuXmfRGlQ9yVy1CLnRFLR6QleYeHWfbOFK4GoDb x9VJ8gUEqezXT177c8hPGhzqRP1ApyPM6y8lBF2M3xybkY4Flnwh52RPkMjeER60Uy3b UfIrR0270AN4f4X03XUDlMmGPcexJCVpLh8pQgHQ8BfdDNi7u8ygQh335MPn6NG1DwGx wB4EzEAsGg+bf3PS7YPViMyel1vvgjw3tL2kBCk9SRfxJm8qO6bVpLTOYH9X7TY9Pifp TsdbY6Pw6woe/FtkUTjTRKzivU1DPEvYAZWTztXfpBtV2HbUAUUWrnhKmV/N7325tlpP v4eA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=p2MLQoMp; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z12-20020a05622a028c00b0041972df884fsi7062118qtw.578.2023.11.14.06.39.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Nov 2023 06:39:25 -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=p2MLQoMp; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r2uZF-0003DX-6W; Tue, 14 Nov 2023 09:39:05 -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 1r2uZD-0003A6-GP for qemu-devel@nongnu.org; Tue, 14 Nov 2023 09:39:03 -0500 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r2uZB-0007pD-Q5 for qemu-devel@nongnu.org; Tue, 14 Nov 2023 09:39:03 -0500 Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-54366784377so8748935a12.3 for ; Tue, 14 Nov 2023 06:39:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699972740; x=1700577540; 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=A2i2PCnBLcbag3MdE1ImS65uDPosS8yIjq0X323T5yY=; b=p2MLQoMpeE6hKJkd9H/q22lEr3r2r6rGb46b+8xSF7n6UYGAW7SsbSHFvFTJvQkQ9T 69iBCBEA9qfpYthNVcxWC9nEAIDXYbnSLsdVnYYHgz1MlQ5LX7AwyDfJXy/Pnhyr8fmu /kGJqimW90n8Wu7S4YOxPtzIyLH1TAvo8hI5Fx43PObOOzV1vIqqcVx4zOB8K0EmatzA 0G7lkPzwuYNsc2KGdqmZqmtNWOphQ18dU4gaRF+shYB9ij6FLEMocQoxl77kDq04Gdjs M4ftz9EJGh5Z7PzHCusxT3FbQDiMmPPzzUors+NTUUq62P/asF4pzUc0IXGbUTHYwtSL kiXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699972740; x=1700577540; 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=A2i2PCnBLcbag3MdE1ImS65uDPosS8yIjq0X323T5yY=; b=ski0FYaaAng5NLDKNa7M5MlisynkHg5G7Y/Y0dZHPobrmtLP2sLUSzNVVsGgVIDaVY +r0vVkA3ygTmpDQDLAknksgxtppQU0xFj05cLnpE7F6kYk4QwiynG5+/ZW7B8/yJse3+ wQQUhD36yjQTPIjeDdxohc1t8l9pou9ZKSWDb7A/gwRBbjAYhi6yvBpLyTaJsuNGgQ6P 1F/JVtyQjTyBaOXuaLThDobhDvUv0AcCga4klVgJf2VfHLU/9nkZhcuFpxrPnC9voxZj R+uvWS6s34qJuFn5rVhCEfT/vaBK+Wimpac203/+bUakU/p04z4aSD7L4cZMH6PMxmaQ N2Fg== X-Gm-Message-State: AOJu0YwC17fYhPjBcVz+kRBLl3DjH4I/aU3AxmR9Q0g3rQ1Gji2eN5lC eprAHRMIbFDLwP2LE5lQhp/O0g== X-Received: by 2002:a50:fb14:0:b0:53d:eca8:8775 with SMTP id d20-20020a50fb14000000b0053deca88775mr7423669edq.26.1699972740609; Tue, 14 Nov 2023 06:39:00 -0800 (PST) Received: from m1x-phil.lan (cac94-h02-176-184-25-155.dsl.sta.abo.bbox.fr. [176.184.25.155]) by smtp.gmail.com with ESMTPSA id b21-20020aa7d495000000b0054353639161sm5133902edr.89.2023.11.14.06.38.58 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 14 Nov 2023 06:39:00 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: David Woodhouse , qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Paul Durrant , qemu-arm@nongnu.org, Paolo Bonzini , David Woodhouse , Stefano Stabellini , Richard Henderson , xen-devel@lists.xenproject.org, qemu-block@nongnu.org, Anthony Perard , kvm@vger.kernel.org, Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Michael S. Tsirkin" , Marcel Apfelbaum Subject: [PATCH-for-9.0 v2 06/19] hw/pci/msi: Restrict xen_is_pirq_msi() call to Xen Date: Tue, 14 Nov 2023 15:38:02 +0100 Message-ID: <20231114143816.71079-7-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231114143816.71079-1-philmd@linaro.org> References: <20231114143816.71079-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=philmd@linaro.org; helo=mail-ed1-x52f.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, T_SCC_BODY_TEXT_LINE=-0.01 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 Similarly to the restriction in hw/pci/msix.c (see commit e1e4bf2252 "msix: fix msix_vector_masked"), restrict the xen_is_pirq_msi() call in msi_is_masked() to Xen. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci/msi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/pci/msi.c b/hw/pci/msi.c index 041b0bdbec..8104ac1d91 100644 --- a/hw/pci/msi.c +++ b/hw/pci/msi.c @@ -23,6 +23,7 @@ #include "hw/xen/xen.h" #include "qemu/range.h" #include "qapi/error.h" +#include "sysemu/xen.h" #include "hw/i386/kvm/xen_evtchn.h" @@ -308,7 +309,7 @@ bool msi_is_masked(const PCIDevice *dev, unsigned int vector) } data = pci_get_word(dev->config + msi_data_off(dev, msi64bit)); - if (xen_is_pirq_msi(data)) { + if (xen_enabled() && xen_is_pirq_msi(data)) { return false; } From patchwork Tue Nov 14 14:38:03 2023 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: 743781 Delivered-To: patch@linaro.org Received: by 2002:a5d:67cf:0:b0:32d:baff:b0ca with SMTP id n15csp2206640wrw; Tue, 14 Nov 2023 06:39:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IHJwmd8GxhWVjGQesq9Z6lPr6Fn7UmK6l9xsInmssK1P5tdapz7af36+S5CJ9nN+5vJKpD8 X-Received: by 2002:ac8:5fc5:0:b0:41e:1b18:f4a2 with SMTP id k5-20020ac85fc5000000b0041e1b18f4a2mr2533107qta.36.1699972795101; Tue, 14 Nov 2023 06:39:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699972795; cv=none; d=google.com; s=arc-20160816; b=Z3gTlcf18+HW1bkYVF73Ruckfa9ZtT3hnbechHPfIbg+l3EeTIVWxSfzfXfvx6quBA 9PrEuVFxHaxVlvFxbSTz225kuEiSbfVRVp2V71dQP2+MHddviElDUuhVy75aOEu+LWBQ dV6aQBNcG78ApckPlihwCFnXgxEO0JW3cGrwyCNEweGeyET226Zod1LZs6ilJyl287Z8 nIB1e9lCbjCKCiTKp/k0KibC9pfZUVY5clZRg4H9PR6BsAr/Lx9DdMbVgbgdFwpbLFnc msPa7dPrc0HWgilvgR6jWcP3IyL+y/DdiUKAFowA0QsVzvIQcDabkJJxmv9UZtN3HIsp ZnPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=oo2mmHUNt8cswMDm2G2tk7NYG50Leech1RMDbe0XTgw=; fh=WgzlLWvbY5R8+4JotruerK0jeEkAYyt0q4wPP6dSEVI=; b=osWS4m5I2e2Wjwz8Mbh58jIsC3lrs2GeCitxX4KcwzgVaZU198nL7XGbx4wcVfpomH 0XPzFKvAlLo8WtRci3ygc8jZAvC4tLfWMUnT9kgZOwTm3cITmE+s61PV8taIRdlI2o6K JLtQrXUufEbjHVh+r37a/4EuTL4YRB3aKbDWLmOhAeEPb04/NAE9oaWrExIDXO0gHHsr zTfsD03sn+mbiqZ0BcyXZI+yfUgv78m1TFqDlAF3YnYwQQtoeLQPZCRfMJLZrLheyEbD PIXV66rg9r51B/bKyPMCF9a+EDDy5Ss8dtefkJVC27FT/ar0Q6H2EMuOLDNqEljVqq8H 9ZyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zVMaj7I1; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id y13-20020a05622a004d00b00403332e2e31si6559549qtw.559.2023.11.14.06.39.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Nov 2023 06:39:55 -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=zVMaj7I1; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r2uZN-0003be-0C; Tue, 14 Nov 2023 09:39:13 -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 1r2uZL-0003ZB-AD for qemu-devel@nongnu.org; Tue, 14 Nov 2023 09:39:11 -0500 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r2uZI-0007pk-GY for qemu-devel@nongnu.org; Tue, 14 Nov 2023 09:39:11 -0500 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-9d2e7726d5bso856318066b.0 for ; Tue, 14 Nov 2023 06:39:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699972747; x=1700577547; 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=oo2mmHUNt8cswMDm2G2tk7NYG50Leech1RMDbe0XTgw=; b=zVMaj7I1L8G7J7EGcjNGtskc7ZlTuwUP8UlN3WDOeA98on4dzg9QaqOOpd1tleuASs 9mPpAxKq6DJnCzYyOyKFFfgwJ8EJZ+ozm3TxVfl0czN6dRBq78Yq0GSNmchOKIM/zPQ7 wFf5LGJAXnEWBhf3Wt4CFMVy0bafDLvhC6/nRY9AXuKWm27yMlvJyJU1+0beXBKkgWoR tHF1UBxYezyffRtafzpiLlwKWUK+HyOe/ZQ9+AGECfygO+DdTlfmzF+BGkOmEKlBznC5 JK2NcutWe7fVfGTivOtWyKh9THbuyJwbE4zUPoPmvwYXV8jk6W93YleXkvgc4P5KYt+H n6QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699972747; x=1700577547; 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=oo2mmHUNt8cswMDm2G2tk7NYG50Leech1RMDbe0XTgw=; b=EOucd0b0eSMd5yYey4XhG1I5I4Ta0yk6Ow938VFPOCE9gWbZAn7gRtdqtkbg3NYI5X uuiMFyDnHXD2Lp18AdV+B0IKqhsz8YdM0UmvjAE7rSQEhtjO5V4cgvxP36yWMbOjnhyM sD+fYOHJBISD3KtbrKYQV08YikvZiUg1Dtku6C6YBs2+DtDiFPRCxk7gwuBixISE4GtD yHq3TsGUM+Od8IjIrg7zRadBl/yOccPfH2m7ZX7PHOO9FnU3VMriVj8bsG27ZL/9JatI 5aQkpLLyS84jIVcYYVdqJ5cQ3mtjre2wLQ1IlWsIOOLZYOs7INp4zK8RxykF4+6VdskG Eimg== X-Gm-Message-State: AOJu0YzjpaHeS+3aLOsA+fpiGvDz+sySQE0pgT82j9J6hJ/ufQkduRqj jyyopB9euSJKrXmq+02lzMqDnw== X-Received: by 2002:a17:906:45a:b0:9c7:56ee:b6e5 with SMTP id e26-20020a170906045a00b009c756eeb6e5mr6778901eja.40.1699972747032; Tue, 14 Nov 2023 06:39:07 -0800 (PST) Received: from m1x-phil.lan (cac94-h02-176-184-25-155.dsl.sta.abo.bbox.fr. [176.184.25.155]) by smtp.gmail.com with ESMTPSA id m13-20020a170906234d00b00997e00e78e6sm5591697eja.112.2023.11.14.06.39.05 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 14 Nov 2023 06:39:06 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: David Woodhouse , qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Paul Durrant , qemu-arm@nongnu.org, Paolo Bonzini , David Woodhouse , Stefano Stabellini , Richard Henderson , xen-devel@lists.xenproject.org, qemu-block@nongnu.org, Anthony Perard , kvm@vger.kernel.org, Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH-for-9.0 v2 07/19] hw/xen: Remove unnecessary xen_hvm_inject_msi() stub Date: Tue, 14 Nov 2023 15:38:03 +0100 Message-ID: <20231114143816.71079-8-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231114143816.71079-1-philmd@linaro.org> References: <20231114143816.71079-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=philmd@linaro.org; helo=mail-ej1-x635.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, T_SCC_BODY_TEXT_LINE=-0.01 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 Since commit 04b0de0ee8 ("xen: factor out common functions") xen_hvm_inject_msi() stub is not required. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Woodhouse --- stubs/xen-hw-stub.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/stubs/xen-hw-stub.c b/stubs/xen-hw-stub.c index 7d7ffe83a9..6cf0e9a4c1 100644 --- a/stubs/xen-hw-stub.c +++ b/stubs/xen-hw-stub.c @@ -24,10 +24,6 @@ int xen_set_pci_link_route(uint8_t link, uint8_t irq) return -1; } -void xen_hvm_inject_msi(uint64_t addr, uint32_t data) -{ -} - int xen_is_pirq_msi(uint32_t msi_data) { return 0; From patchwork Tue Nov 14 14:38:07 2023 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: 743786 Delivered-To: patch@linaro.org Received: by 2002:a5d:67cf:0:b0:32d:baff:b0ca with SMTP id n15csp2209306wrw; Tue, 14 Nov 2023 06:45:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IGmz3/NwVA+QLmoesf4awIwtLoaa3nHqVcoaHPAPqcPCOg7lJXkzO9j6Zy2M3rLkRBvqpWS X-Received: by 2002:adf:ebca:0:b0:32c:ea14:89e5 with SMTP id v10-20020adfebca000000b0032cea1489e5mr6311307wrn.39.1699973145930; Tue, 14 Nov 2023 06:45:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699973145; cv=none; d=google.com; s=arc-20160816; b=XGR5Z23y2RnR57m6CZhKS1KLLHaIbsAYR4287l804Lnw8BELfexVDx1ybbco4b+YaW B3ldXH1JLTG11vaBV94TnJHiC6kac5VRnbFgtPa05JU6daQLsHXJYOvv8l8B+fFky8b1 gnGp7vgSDuQRdcrcEuylyDBKVHDK+dHbwdBObNw+ktw98RFE2GhLS5fBP3I0oJBfdHvm qLLvTURwkO62fdBlaDKM9tM4ZFG+TRJ8ouiMenmc8ukIMR+OkRUynqSFlpuWP1AuMl+M hxobL+/T/2WdCaKMRKpjyWh58nqSASMuFB9L2cXB4PMREIyF3H/vKig+6uX1wthAVb6A DaEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=6XE67RaqwP19rEjPR9cmWaIkbDnma1jGWKj3qDcuG2M=; fh=8PS3Hy0DxHmOgUJ3YqzgHibVab/EASfDmwtZOBvIi2A=; b=E84sHT5uSoWgvhKuGQLucbpO0MY7frPGgYQEmEws59LBm0ZafibgAsz40u7sRNQV9j fY/dWSMJS4V7Rx61ZjqtXPGOWAUMnFPB5VS468rRiTeXeJJPFh0C8Yf8qhdV0ULI11fO lMHHj4oiQ0AB+Z+PCMd3JRqyD61EQ98xc4BRGXvo5A7T/MLrSRwWBYPy72pF/Hsx2NW0 MhwJyJvaA2VH6rCCYZyULmBZhqIYXNuDEKqTX3UFR0JbloTPR15qvUUN0vqn9R1Yub2A jhrCoMojcG5letKERQHGqCXU5i+FkrXpWnrlp1OjAs3g6FSTEGJArwMRFzycDVFNJgry ui2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="T/ICPmyf"; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id w11-20020a5d404b000000b0032db169d32esi4493853wrp.681.2023.11.14.06.45.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Nov 2023 06:45:45 -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="T/ICPmyf"; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r2uaL-0005HJ-QZ; Tue, 14 Nov 2023 09:40:17 -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 1r2uZp-0004YK-GM for qemu-devel@nongnu.org; Tue, 14 Nov 2023 09:39:45 -0500 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r2uZk-0007w4-Ah for qemu-devel@nongnu.org; Tue, 14 Nov 2023 09:39:38 -0500 Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-9be02fcf268so853378466b.3 for ; Tue, 14 Nov 2023 06:39:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699972774; x=1700577574; 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=6XE67RaqwP19rEjPR9cmWaIkbDnma1jGWKj3qDcuG2M=; b=T/ICPmyfsrFjMiZkCn266Mdd00NiRZcxqt8rUfwotXheChrvheE2VDZ/NMsp7bf75R WePQJRGmGVjrtxSMWBpayRpvXwGGRRydop2ew6NSjxqIgR9JCeqTAYAyyZXRjQkdAxIK 1WzoMgy+piHxXZ5JInrYCK8evokrXJGEaadX1/usX6KgwCHoipgIbbkjMXQCj0+caRv5 TzNq9AJI41xVDHBH4Tlrt1D31lnDD1IQVnP/mqqHETKYbAHAiRl3I/As2ecN2aS+mYuV XbXw+R9fORxJD+5BDb90TPFd0cI43nEfdpvuJivd1Rm1p7nsveGd/9MtLPgIWG80dHQx sx9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699972774; x=1700577574; 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=6XE67RaqwP19rEjPR9cmWaIkbDnma1jGWKj3qDcuG2M=; b=Kra1CrkWKZJjP0cnqAflPYnUxiyo3OtfuZHdL6F25Z3wj0mnD0YdO072gR7d1I/BUe /Awyh4CnRSfgqmNOCmTXGPrYPYuABE2o/1uhOiL7OarlnYMkPp7EhAv9scMUKFV52nlR aATYIV4zP1TOvCoj49psE8h8MFYvo7Ca0laCsOLzdLPJVeTaQecsV6RFNhNaUYnXS63S NdNvBvBjmaPLGS0c22Yn1wQQ3e4mlCLKVkzdEkSH6Nmc1vKKdRsmXVSkZmA6CaXpuZ6v g4xm1tzDCqkhKnkC6AVuh+p7pwwIwL9URzCX7zaSQpIsmy3XOSt/aP6lt9z/o0r7iDxY f2hg== X-Gm-Message-State: AOJu0YyCcdhyDezpQ7pSh/nba2o7E6vIqu7JBfgWXqBDb9qWlEsOX1q+ u6iTd9ciQxRuaUo1ffOycQBvtg== X-Received: by 2002:a17:906:899:b0:9df:e457:cef6 with SMTP id n25-20020a170906089900b009dfe457cef6mr5737290eje.77.1699972774671; Tue, 14 Nov 2023 06:39:34 -0800 (PST) Received: from m1x-phil.lan (cac94-h02-176-184-25-155.dsl.sta.abo.bbox.fr. [176.184.25.155]) by smtp.gmail.com with ESMTPSA id qx25-20020a170906fcd900b0098e34446464sm5684531ejb.25.2023.11.14.06.39.32 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 14 Nov 2023 06:39:34 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: David Woodhouse , qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Paul Durrant , qemu-arm@nongnu.org, Paolo Bonzini , David Woodhouse , Stefano Stabellini , Richard Henderson , xen-devel@lists.xenproject.org, qemu-block@nongnu.org, Anthony Perard , kvm@vger.kernel.org, Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell , "Michael S. Tsirkin" , Marcel Apfelbaum , Eduardo Habkost Subject: [PATCH-for-9.0 v2 11/19] hw/xen/xen_arch_hvm: Rename prototypes using 'xen_arch_' prefix Date: Tue, 14 Nov 2023 15:38:07 +0100 Message-ID: <20231114143816.71079-12-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231114143816.71079-1-philmd@linaro.org> References: <20231114143816.71079-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=philmd@linaro.org; helo=mail-ej1-x634.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, T_SCC_BODY_TEXT_LINE=-0.01 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 Use a common 'xen_arch_' prefix for architecture-specific functions. Rename xen_arch_set_memory() and xen_arch_handle_ioreq(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Woodhouse Reviewed-by: Richard Henderson Acked-by: Anthony PERARD --- include/hw/arm/xen_arch_hvm.h | 4 ++-- include/hw/i386/xen_arch_hvm.h | 4 ++-- hw/arm/xen_arm.c | 4 ++-- hw/i386/xen/xen-hvm.c | 6 +++--- hw/xen/xen-hvm-common.c | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/hw/arm/xen_arch_hvm.h b/include/hw/arm/xen_arch_hvm.h index 8fd645e723..6a974f2020 100644 --- a/include/hw/arm/xen_arch_hvm.h +++ b/include/hw/arm/xen_arch_hvm.h @@ -2,8 +2,8 @@ #define HW_XEN_ARCH_ARM_HVM_H #include -void arch_handle_ioreq(XenIOState *state, ioreq_t *req); -void arch_xen_set_memory(XenIOState *state, +void xen_arch_handle_ioreq(XenIOState *state, ioreq_t *req); +void xen_arch_set_memory(XenIOState *state, MemoryRegionSection *section, bool add); #endif diff --git a/include/hw/i386/xen_arch_hvm.h b/include/hw/i386/xen_arch_hvm.h index 1000f8f543..2822304955 100644 --- a/include/hw/i386/xen_arch_hvm.h +++ b/include/hw/i386/xen_arch_hvm.h @@ -4,8 +4,8 @@ #include #include "hw/xen/xen-hvm-common.h" -void arch_handle_ioreq(XenIOState *state, ioreq_t *req); -void arch_xen_set_memory(XenIOState *state, +void xen_arch_handle_ioreq(XenIOState *state, ioreq_t *req); +void xen_arch_set_memory(XenIOState *state, MemoryRegionSection *section, bool add); #endif diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c index 8a185da193..bf19407879 100644 --- a/hw/arm/xen_arm.c +++ b/hw/arm/xen_arm.c @@ -129,14 +129,14 @@ static void xen_init_ram(MachineState *machine) } } -void arch_handle_ioreq(XenIOState *state, ioreq_t *req) +void xen_arch_handle_ioreq(XenIOState *state, ioreq_t *req) { hw_error("Invalid ioreq type 0x%x\n", req->type); return; } -void arch_xen_set_memory(XenIOState *state, MemoryRegionSection *section, +void xen_arch_set_memory(XenIOState *state, MemoryRegionSection *section, bool add) { } diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c index 1ae943370b..5150984e46 100644 --- a/hw/i386/xen/xen-hvm.c +++ b/hw/i386/xen/xen-hvm.c @@ -659,8 +659,8 @@ void qmp_xen_set_global_dirty_log(bool enable, Error **errp) } } -void arch_xen_set_memory(XenIOState *state, MemoryRegionSection *section, - bool add) +void xen_arch_set_memory(XenIOState *state, MemoryRegionSection *section, + bool add) { hwaddr start_addr = section->offset_within_address_space; ram_addr_t size = int128_get64(section->size); @@ -700,7 +700,7 @@ void arch_xen_set_memory(XenIOState *state, MemoryRegionSection *section, } } -void arch_handle_ioreq(XenIOState *state, ioreq_t *req) +void xen_arch_handle_ioreq(XenIOState *state, ioreq_t *req) { switch (req->type) { case IOREQ_TYPE_VMWARE_PORT: diff --git a/hw/xen/xen-hvm-common.c b/hw/xen/xen-hvm-common.c index cf4053c9f2..cf6ed11f70 100644 --- a/hw/xen/xen-hvm-common.c +++ b/hw/xen/xen-hvm-common.c @@ -65,7 +65,7 @@ static void xen_set_memory(struct MemoryListener *listener, } } - arch_xen_set_memory(state, section, add); + xen_arch_set_memory(state, section, add); } void xen_region_add(MemoryListener *listener, @@ -452,7 +452,7 @@ static void handle_ioreq(XenIOState *state, ioreq_t *req) cpu_ioreq_config(state, req); break; default: - arch_handle_ioreq(state, req); + xen_arch_handle_ioreq(state, req); } if (req->dir == IOREQ_READ) { trace_handle_ioreq_read(req, req->type, req->df, req->data_is_ptr, From patchwork Tue Nov 14 14:38:08 2023 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: 743783 Delivered-To: patch@linaro.org Received: by 2002:a5d:67cf:0:b0:32d:baff:b0ca with SMTP id n15csp2207610wrw; Tue, 14 Nov 2023 06:41:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IErz6SoRqDULCOby+plSDKv8r/vSpwN6mr0QyJHJdT7KMSdB4B4kXS2HRB856bX0i4CfCk1 X-Received: by 2002:ad4:5583:0:b0:672:2e07:5ec8 with SMTP id f3-20020ad45583000000b006722e075ec8mr2306985qvx.48.1699972911850; Tue, 14 Nov 2023 06:41:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699972911; cv=none; d=google.com; s=arc-20160816; b=T97drp4JpFRflV/p+ocWCrS69VQX31PQQngWLmuJaAGDXoB3cCIPb8/9Vwt0+Y0VMp 4J5Wxf/YQZi3jyJaAvjYg6Eyif8TTd0ZLt1mr925fZ8c8pqjGQsbhp5cbeTJngshdi5n RXpAubgi0qb7z187Ncgl7TXgQsxpg7BNTJcdaJs1QMSxvajCFfUwjDZ6JB0ik6LOklIP bL/f8XObpSfmmb/Hbfi5geqgeStaczO4369XzzN0Zwerv++j77LjZ5jbylCpk2ONbDgH CXXXGszBi5vA4jga/Q2MoLpB5OUOCifWAxDvldHQba+KbvgEWnXs6idpqK5l+1OrfA8N CF0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=jzmBSObK1PNYaVxHm2kQdQrWhNegSVRCuy1/LpCCkxs=; fh=1nz8wG6UuYay2KL0jZBUp30jkEi8Ayfk1emV35/PTDM=; b=WvQuj2I3Rof/4DzLAX5JiJllxpK9ZJ5hzwm0669PI7sskkr3PrS5pwbvI02xNSPxhh vAKt/TLxa64xj3HOpZFAet/jmFK/cSIUb4R9EMpKCxZ7y3C8cBa43mVvOzmt2EHGsQFt ZINsjTUWbcYof/DFAgJKtgy1LwSLewhRX2wM+lCVkLnUMIv6z5UwExDI6+RMi3gULVuT o3p77oIEu6WNTAGNk/Q9PWctyGWPUEodeDDxUK9/QvPA4hipDJP+SjKvk7Z/s8NwJWcU b0RIO6HONubSP4GdfEfdshqxdQ1It/avgOR+DgMK9fdBx7/wJ2IClp7YxyDWOOsrfD+1 rzuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Jz/pllyK"; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id f7-20020a05620a280700b0076f214800d4si6761764qkp.436.2023.11.14.06.41.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Nov 2023 06:41:51 -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="Jz/pllyK"; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r2uaX-0005Xw-T1; Tue, 14 Nov 2023 09:40:25 -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 1r2uZx-0004gR-21 for qemu-devel@nongnu.org; Tue, 14 Nov 2023 09:39:51 -0500 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r2uZs-0007x8-Vg for qemu-devel@nongnu.org; Tue, 14 Nov 2023 09:39:47 -0500 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-53dd752685fso8722528a12.3 for ; Tue, 14 Nov 2023 06:39:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699972782; x=1700577582; 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=jzmBSObK1PNYaVxHm2kQdQrWhNegSVRCuy1/LpCCkxs=; b=Jz/pllyKRJPiVH7RjS82U4GzKIcwbx3dlVHm6eYOzTT5lGpHiH5o7IFtTrksrVF3OF 8zVexe3gvMioxv1MQ72x2BRuoWoGTNOVTALyCmu6ziIL5DLSqvIbsGbvSizcqrOGY4Ot WxlfIcjMiMxeBf6z4eUWSodzMO/moP7ztw8aWOxSa2G7eJ8V6oC/QIBUEAChcZN5G8Bb k7TzKu/hm6/QTT3qKjVFGUK/hvpIHqIxAk0Umn1gzc6YjdNtkUhBdSx1vPpckiV+ATDM UwEsgaLxt+8ETrt0/4j9y1bz0pRmYYKAjr7C3AbGQr2GporrXTT6kWUD4Q0drrMeqo4Y 61Ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699972782; x=1700577582; 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=jzmBSObK1PNYaVxHm2kQdQrWhNegSVRCuy1/LpCCkxs=; b=JmlusyMbCmxS46Jn5kHgMluvFWoNgez9xYhG/5/FjJPQlexPzCtM4REzWzHn0L0A4C wxYWjShxD/fHD7hlbA/7A2O6MgKnvTwrGxZyrfu7iJPsFjcbh6JIz63wIAgBwB4PEMGg s0YtcFGhDgEIHzZCO99eFToMInup+jI+hBv2ld6TFbwEMgOiLJwQ6X+6GLSO/jpUTcLQ jGAo7LdPKQCiPjRqKoqZ60/R5jcC5aFFkLJXJ1xdnHlvNJOCpqYmq7T/GgTPVMDNnjT0 /jBIVD7sQu8sqOYaz4vF5mNdDp3p5cZkrGpu2NdDm9jKQ44MAOID6FSI6fCm6c9CS/Tw Xu0Q== X-Gm-Message-State: AOJu0YysXY1t7yYjYCrTRNf020GUF70rOTPOGHUuR3tOmV6VXhAYEY/U wanYNbNsRf88DH4wBzcSRQ2GHQ== X-Received: by 2002:aa7:d050:0:b0:540:3286:d2e8 with SMTP id n16-20020aa7d050000000b005403286d2e8mr7060069edo.18.1699972781909; Tue, 14 Nov 2023 06:39:41 -0800 (PST) Received: from m1x-phil.lan (cac94-h02-176-184-25-155.dsl.sta.abo.bbox.fr. [176.184.25.155]) by smtp.gmail.com with ESMTPSA id k25-20020aa7c059000000b0053dd8898f75sm5155063edo.81.2023.11.14.06.39.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 14 Nov 2023 06:39:41 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: David Woodhouse , qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Paul Durrant , qemu-arm@nongnu.org, Paolo Bonzini , David Woodhouse , Stefano Stabellini , Richard Henderson , xen-devel@lists.xenproject.org, qemu-block@nongnu.org, Anthony Perard , kvm@vger.kernel.org, Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell , Eduardo Habkost , "Michael S. Tsirkin" , Marcel Apfelbaum Subject: [PATCH-for-9.0 v2 12/19] hw/xen: Merge 'hw/xen/arch_hvm.h' in 'hw/xen/xen-hvm-common.h' Date: Tue, 14 Nov 2023 15:38:08 +0100 Message-ID: <20231114143816.71079-13-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231114143816.71079-1-philmd@linaro.org> References: <20231114143816.71079-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=philmd@linaro.org; helo=mail-ed1-x52b.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, T_SCC_BODY_TEXT_LINE=-0.01 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 We don't need a target-specific header for common target-specific prototypes. Declare xen_arch_handle_ioreq() and xen_arch_set_memory() in "hw/xen/xen-hvm-common.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Woodhouse Reviewed-by: Richard Henderson Acked-by: Anthony PERARD --- include/hw/arm/xen_arch_hvm.h | 9 --------- include/hw/i386/xen_arch_hvm.h | 11 ----------- include/hw/xen/arch_hvm.h | 5 ----- include/hw/xen/xen-hvm-common.h | 6 ++++++ hw/arm/xen_arm.c | 1 - hw/i386/xen/xen-hvm.c | 1 - hw/xen/xen-hvm-common.c | 1 - 7 files changed, 6 insertions(+), 28 deletions(-) delete mode 100644 include/hw/arm/xen_arch_hvm.h delete mode 100644 include/hw/i386/xen_arch_hvm.h delete mode 100644 include/hw/xen/arch_hvm.h diff --git a/include/hw/arm/xen_arch_hvm.h b/include/hw/arm/xen_arch_hvm.h deleted file mode 100644 index 6a974f2020..0000000000 --- a/include/hw/arm/xen_arch_hvm.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef HW_XEN_ARCH_ARM_HVM_H -#define HW_XEN_ARCH_ARM_HVM_H - -#include -void xen_arch_handle_ioreq(XenIOState *state, ioreq_t *req); -void xen_arch_set_memory(XenIOState *state, - MemoryRegionSection *section, - bool add); -#endif diff --git a/include/hw/i386/xen_arch_hvm.h b/include/hw/i386/xen_arch_hvm.h deleted file mode 100644 index 2822304955..0000000000 --- a/include/hw/i386/xen_arch_hvm.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef HW_XEN_ARCH_I386_HVM_H -#define HW_XEN_ARCH_I386_HVM_H - -#include -#include "hw/xen/xen-hvm-common.h" - -void xen_arch_handle_ioreq(XenIOState *state, ioreq_t *req); -void xen_arch_set_memory(XenIOState *state, - MemoryRegionSection *section, - bool add); -#endif diff --git a/include/hw/xen/arch_hvm.h b/include/hw/xen/arch_hvm.h deleted file mode 100644 index c7c515220d..0000000000 --- a/include/hw/xen/arch_hvm.h +++ /dev/null @@ -1,5 +0,0 @@ -#if defined(TARGET_I386) || defined(TARGET_X86_64) -#include "hw/i386/xen_arch_hvm.h" -#elif defined(TARGET_ARM) || defined(TARGET_ARM_64) -#include "hw/arm/xen_arch_hvm.h" -#endif diff --git a/include/hw/xen/xen-hvm-common.h b/include/hw/xen/xen-hvm-common.h index d3fa5ed29b..8934033eaa 100644 --- a/include/hw/xen/xen-hvm-common.h +++ b/include/hw/xen/xen-hvm-common.h @@ -96,4 +96,10 @@ void xen_register_ioreq(XenIOState *state, unsigned int max_cpus, const MemoryListener *xen_memory_listener); void cpu_ioreq_pio(ioreq_t *req); + +void xen_arch_handle_ioreq(XenIOState *state, ioreq_t *req); +void xen_arch_set_memory(XenIOState *state, + MemoryRegionSection *section, + bool add); + #endif /* HW_XEN_HVM_COMMON_H */ diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c index bf19407879..6b0e396502 100644 --- a/hw/arm/xen_arm.c +++ b/hw/arm/xen_arm.c @@ -33,7 +33,6 @@ #include "sysemu/sysemu.h" #include "hw/xen/xen-hvm-common.h" #include "sysemu/tpm.h" -#include "hw/xen/arch_hvm.h" #define TYPE_XEN_ARM MACHINE_TYPE_NAME("xenpvh") OBJECT_DECLARE_SIMPLE_TYPE(XenArmState, XEN_ARM) diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c index 5150984e46..0fbe720c8f 100644 --- a/hw/i386/xen/xen-hvm.c +++ b/hw/i386/xen/xen-hvm.c @@ -21,7 +21,6 @@ #include "qemu/range.h" #include "hw/xen/xen-hvm-common.h" -#include "hw/xen/arch_hvm.h" #include static MemoryRegion ram_640k, ram_lo, ram_hi; diff --git a/hw/xen/xen-hvm-common.c b/hw/xen/xen-hvm-common.c index cf6ed11f70..bb3cfb200c 100644 --- a/hw/xen/xen-hvm-common.c +++ b/hw/xen/xen-hvm-common.c @@ -7,7 +7,6 @@ #include "hw/xen/xen-hvm-common.h" #include "hw/xen/xen-bus.h" #include "hw/boards.h" -#include "hw/xen/arch_hvm.h" MemoryRegion xen_memory; From patchwork Tue Nov 14 14:38:09 2023 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: 743787 Delivered-To: patch@linaro.org Received: by 2002:a5d:67cf:0:b0:32d:baff:b0ca with SMTP id n15csp2209552wrw; Tue, 14 Nov 2023 06:46:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IEVfx6qvdMG1oEwW9N3XIelli/qzOYNhXHtcXDFSM91dO8ypLaFC5vrxbOMeLrHasRYmlpn X-Received: by 2002:a05:600c:2d15:b0:404:6ed9:98d1 with SMTP id x21-20020a05600c2d1500b004046ed998d1mr7750808wmf.41.1699973175135; Tue, 14 Nov 2023 06:46:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699973175; cv=none; d=google.com; s=arc-20160816; b=eSG87/Pk8Mp8Mqchowsr+QkaL3RgLSqq0L6v94ojdZDBeYiCDFjjj1TBauH8VfGl0H yvcd/zKPwqY8Tcx+b80JQTYLCjhjFWby2+7j3vpbRoLJZFGlDFpR8xOYqutY2GyLNaON kjqoQkKkeEc7U5+5WVtPbHhGPTMtrKnW2jcb54aG8n5SM6+xnwNAQYFkpqv9WohWy534 oMSaujKTXs6zcGCAI5M/Ht5PTVcLaLejxJwsBK+UroO1anr3ScBIxemVssQWGDVu0wu/ JCWXepbJOfNJGYvn0qCufPAyJb0bnoEYapP9HF8KtSupAj9mJF/HC2fS4lOcg+f40tJT 4SGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=x5X2FluBMHtEHwLVURbcbmArZUeMN34wqMB+9uG3SGg=; fh=WgzlLWvbY5R8+4JotruerK0jeEkAYyt0q4wPP6dSEVI=; b=ElSxByyAIZe8YfxQKSCfXIildqlmSxy6xtbA7FOQOUz57DBsqRgy6s80RaBEt25B4E vzes1Hrh9w2sw1kP9I950kJsBXkEUujTJJxH2BIWlHVWxcDvkzdea+ED0jRioskas2f/ 9Ol29YRp6lHOxOBGSk6r00dpmUtPg2G634JV2T6645PKDc/U4mZzmBZUFcNo/Llrb06/ iEE09GPSjWY8PBq5X+pBQ7v8iZA6GWiwRjhHgA2uy7OungWgWyJkT5lN0Tx3CnSmaEdU AcksWjVvxxaKwXTRqxA3nksqGUSw60Aj+OYRFtWhJ8u8sWzQna0hz+o6IPJpiPHQA3UL Lqvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gSTJ8Rvi; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id h8-20020adffd48000000b0032f7bf78581si4450689wrs.78.2023.11.14.06.46.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Nov 2023 06:46:15 -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=gSTJ8Rvi; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r2uaP-0005Jm-RZ; Tue, 14 Nov 2023 09:40:20 -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 1r2ua1-0004k7-GE for qemu-devel@nongnu.org; Tue, 14 Nov 2023 09:39:56 -0500 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r2uZz-0007yJ-LF for qemu-devel@nongnu.org; Tue, 14 Nov 2023 09:39:53 -0500 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-507adc3381cso7602155e87.3 for ; Tue, 14 Nov 2023 06:39:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699972788; x=1700577588; 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=x5X2FluBMHtEHwLVURbcbmArZUeMN34wqMB+9uG3SGg=; b=gSTJ8Rvicj7iLETfyXC1+AX3u8+ZGZasmJlL75B5tcBGBcP+xw2ZbBkLSN6ak70pi1 hKU1Vgo7AjpBIhj4hxcGMQQnUUAJGfZAKgeN+SbDH572XVjU5osjXeOXKgRUCRZ9p+lk 728vne7r2Lg+VJrCqtodMYJ8EoKPDkl06w3OggPf0dEEPnWpXg7Cg0kO6P8U5HFXrfRS iz0ds24y6FmYo3j240BlKtHSMil71T6qboigv9WD5hIZI17x0ShJ/UrtxQVcYpmuNjqv Yds4ys3D/joJTzfXNMzyV4TBXDuCqHi+TvoFpqC/d/6h273kla5l7Ek9IfeNC9qbN3Wt Wa2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699972788; x=1700577588; 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=x5X2FluBMHtEHwLVURbcbmArZUeMN34wqMB+9uG3SGg=; b=vfIfFshe2wM8AkV3vG2g321qc7Qgu15CL6V8UZqU19H2qQkuK564ssAuQaAGbBFprt StGpw7LitrZpMYyQXx9iwdkt3GpLr7hwV2MDNKWC0f4YMjs03RoybtjmT2SgZHdl2RO4 jbl0JSTOy3QNYK2HJ2ptbR2HWcF3G04q5Wh5mzRobzsFz6aaWrj/rjCONayku/cn/WnC DM0nUJiM1GdNFjkL9iX+AZUD43Wg8XXshOjQ2xL8yLHZ6/upGy1HLQSYKN0gHZ/J/nV8 p2lgSksTv9N4CS5QUva5y+635asAc+aRCtwaaEUKfZ5ZUS5kXb6iFmi6mtS2UYZUOEGJ aahw== X-Gm-Message-State: AOJu0YzqZDOaqprcNpl9tBGkO5MGu0JEtPCOje4sFaMFixnPtvodY3u0 JavtgYe8Gf4FIcYqT6rVO3Ylxw== X-Received: by 2002:a05:6512:b14:b0:509:8e3d:7cb0 with SMTP id w20-20020a0565120b1400b005098e3d7cb0mr9400030lfu.41.1699972788532; Tue, 14 Nov 2023 06:39:48 -0800 (PST) Received: from m1x-phil.lan (cac94-h02-176-184-25-155.dsl.sta.abo.bbox.fr. [176.184.25.155]) by smtp.gmail.com with ESMTPSA id l18-20020a50d6d2000000b00542db304680sm5268842edj.63.2023.11.14.06.39.46 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 14 Nov 2023 06:39:48 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: David Woodhouse , qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Paul Durrant , qemu-arm@nongnu.org, Paolo Bonzini , David Woodhouse , Stefano Stabellini , Richard Henderson , xen-devel@lists.xenproject.org, qemu-block@nongnu.org, Anthony Perard , kvm@vger.kernel.org, Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [RFC PATCH-for-9.0 v2 13/19] hw/xen: Remove use of 'target_ulong' in handle_ioreq() Date: Tue, 14 Nov 2023 15:38:09 +0100 Message-ID: <20231114143816.71079-14-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231114143816.71079-1-philmd@linaro.org> References: <20231114143816.71079-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12e; envelope-from=philmd@linaro.org; helo=mail-lf1-x12e.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, T_SCC_BODY_TEXT_LINE=-0.01 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 Per commit f17068c1c7 ("xen-hvm: reorganize xen-hvm and move common function to xen-hvm-common"), handle_ioreq() is expected to be target-agnostic. However it uses 'target_ulong', which is a target specific definition. Per xen/include/public/hvm/ioreq.h header: struct ioreq { uint64_t addr; /* physical address */ uint64_t data; /* data (or paddr of data) */ uint32_t count; /* for rep prefixes */ uint32_t size; /* size in bytes */ uint32_t vp_eport; /* evtchn for notifications to/from device model */ uint16_t _pad0; uint8_t state:4; uint8_t data_is_ptr:1; /* if 1, data above is the guest paddr * of the real data to use. */ uint8_t dir:1; /* 1=read, 0=write */ uint8_t df:1; uint8_t _pad1:1; uint8_t type; /* I/O type */ }; typedef struct ioreq ioreq_t; If 'data' is not a pointer, it is a u64. - In PIO / VMWARE_PORT modes, only 32-bit are used. - In MMIO COPY mode, memory is accessed by chunks of 64-bit - In PCI_CONFIG mode, access is u8 or u16 or u32. - None of TIMEOFFSET / INVALIDATE use 'req'. - Fallback is only used in x86 for VMWARE_PORT. Masking the upper bits of 'data' to keep 'req->size' low bits is irrelevant of the target word size. Remove the word size check and always extract the relevant bits. Signed-off-by: Philippe Mathieu-Daudé --- hw/xen/xen-hvm-common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/xen/xen-hvm-common.c b/hw/xen/xen-hvm-common.c index bb3cfb200c..fb81bd8fbc 100644 --- a/hw/xen/xen-hvm-common.c +++ b/hw/xen/xen-hvm-common.c @@ -1,5 +1,6 @@ #include "qemu/osdep.h" #include "qemu/units.h" +#include "qemu/bitops.h" #include "qapi/error.h" #include "trace.h" @@ -426,9 +427,8 @@ static void handle_ioreq(XenIOState *state, ioreq_t *req) trace_handle_ioreq(req, req->type, req->dir, req->df, req->data_is_ptr, req->addr, req->data, req->count, req->size); - if (!req->data_is_ptr && (req->dir == IOREQ_WRITE) && - (req->size < sizeof (target_ulong))) { - req->data &= ((target_ulong) 1 << (8 * req->size)) - 1; + if (!req->data_is_ptr && (req->dir == IOREQ_WRITE)) { + req->data = extract64(req->data, 0, BITS_PER_BYTE * req->size); } if (req->dir == IOREQ_WRITE) From patchwork Tue Nov 14 14:38:11 2023 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: 743789 Delivered-To: patch@linaro.org Received: by 2002:a5d:67cf:0:b0:32d:baff:b0ca with SMTP id n15csp2209707wrw; Tue, 14 Nov 2023 06:46:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IHoUhrLUVq/fUEUF1wZTWjoPuHpxLZYX5PUOw7XZrjeSZJFyxDkiLJjOc8r+27THxu2rtgG X-Received: by 2002:a2e:740e:0:b0:2c5:994:ed72 with SMTP id p14-20020a2e740e000000b002c50994ed72mr1781016ljc.21.1699973193577; Tue, 14 Nov 2023 06:46:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699973193; cv=none; d=google.com; s=arc-20160816; b=RkQCPExDRuP3NGZ+T4Eg16MVKyjl7LU0YaId+fa+bwM64U3+IQRdA3t0VnxYLDoyrs i/Kpj38V0zPQBAivcBxO/nno9EqUQXDjHiAbIuZVzkEeYFg5D746t4Rv9RMKEj0edOQ2 M8XY27VufPsF+WlBctRkK6XIE4tJnCJCPYbyh2FgeUJ6iai5g3P6OyPyG/GZ0o/fiFcB aB4fACCC41Y4xcNOEzxnNryUNv/0IJV8l6+iG+V8Aqo7X0ws7J+ntA6wa6CNDjFTGZ2S N4+jYDpEUqQwlWs0EUiq9x3cFVuLLSWLVPKwc2VwlOfwpdyVZFnizDUH9Z9icuCFLj+u Yj5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=vfmEPJkfg9xcA7W0yB07+uhlzLrR51RZZmvLOIuALj0=; fh=1nz8wG6UuYay2KL0jZBUp30jkEi8Ayfk1emV35/PTDM=; b=rC2i71S9/ZQagrEI/v+Snixlm57j5n2fEE2OHXNIy3w79BGOH80LwnK4aUF7OJYQfr AFtIYUZ4apsRSfARdREmo3MKuV8JX4ms0+CyS8TmfRLVAf1VerosWMlSMXoWAwv1iPvQ JUa852jVA1e6qoAiYAwfNv8KZKAAkpL1vjvp/GV2fAKBAkeLCbXvm5m1hTdIlcVZ+hOE VLnVSazb3SgbqRTFqHp3ZmfMVWxPY3bDF/uUmZJLz5ayIbjT5NV0zDcn0FsH5YMPwSI0 LjqPp4M+lR7eoppd3HwFe2iB4h/BngN/5ah7Kl4nzU0yJhlSX85QCX6lBN+g2KFgiG2C Z+Fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SA6nQRmT; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id y18-20020a05600c17d200b00403cab5ee0dsi8180010wmo.183.2023.11.14.06.46.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Nov 2023 06:46:33 -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=SA6nQRmT; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r2ub9-0007FN-Us; Tue, 14 Nov 2023 09:41:04 -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 1r2uaG-00055Y-SD for qemu-devel@nongnu.org; Tue, 14 Nov 2023 09:40:08 -0500 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r2uaC-00082U-DZ for qemu-devel@nongnu.org; Tue, 14 Nov 2023 09:40:06 -0500 Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-53e04b17132so8864656a12.0 for ; Tue, 14 Nov 2023 06:40:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699972802; x=1700577602; 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=vfmEPJkfg9xcA7W0yB07+uhlzLrR51RZZmvLOIuALj0=; b=SA6nQRmTgy8MkaNM4fBrI/2NU8BE+cq/9Z/3HDm+r4Ucx5AJ1zrTo4F7p5mFkKScUS wbTeMv8C75IQRUwO+XTTZCd0XByVG5P06FYQqt0s7wMfGGO9sw2nrJXb0HVNFJoGcmcC dhxCxGfcsTDPVjbVMlCEJAJVR3n0rFbfiDzp2qWBaVYlNuRzB41xHFS1PEOBP++LIct7 1S2tTQMuKpooeazZhohafzPTct3E0stcS3BTgg5cf69OOShfGHJ+F6+c3ldBppa3wy8c q92n6Z3ljxtvoln2WGFRLI8XEqXdDPL0m/9j1nuYoRpprK8Ml4M7j3X3kWI8R44SpH/s IEoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699972802; x=1700577602; 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=vfmEPJkfg9xcA7W0yB07+uhlzLrR51RZZmvLOIuALj0=; b=cdJNtwaaaQIM1sBrhUQ5a2EL1dKJ84n0d4e0jHWj124m8lrc3P7dWdbbiF5aTxw1+f E2z7qHHvwSwik5UmW0vCelfKmRrJ3/+r57aGNdneB9Q3n+2gNqO2kc+TLN6pWmHvv+go WD1nA847pebid3XZ+IxIfyBULlccpN6QrveqCqoXhPbh9nY/n7cUQHWrI0QCZC9Vlp4I OQAhQweuj28I7WCcS1KXjn6KhldcHtYkuuU4rChpjKrbGCj2o/z6cNf95vfrxuYMX67H vBIh9gvYD/Y/ewjm2vSXBFKRVeXG4p6tM96AYXOljfwggYnaD+id/QOZW/i8PMrcBlqk qEcA== X-Gm-Message-State: AOJu0Yy5jvBIAEdF4Pxn4t1edWxZm2/98xowAdadikNl4HcSXMBdNi2q WZTmDzESBrJozjmgksbi97c2Rw== X-Received: by 2002:aa7:d704:0:b0:53d:e0cf:cb95 with SMTP id t4-20020aa7d704000000b0053de0cfcb95mr7775616edq.21.1699972802002; Tue, 14 Nov 2023 06:40:02 -0800 (PST) Received: from m1x-phil.lan (cac94-h02-176-184-25-155.dsl.sta.abo.bbox.fr. [176.184.25.155]) by smtp.gmail.com with ESMTPSA id r30-20020a50aade000000b005434e3d8e7bsm5309632edc.1.2023.11.14.06.39.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 14 Nov 2023 06:40:01 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: David Woodhouse , qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Paul Durrant , qemu-arm@nongnu.org, Paolo Bonzini , David Woodhouse , Stefano Stabellini , Richard Henderson , xen-devel@lists.xenproject.org, qemu-block@nongnu.org, Anthony Perard , kvm@vger.kernel.org, Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell , Eduardo Habkost , "Michael S. Tsirkin" , Marcel Apfelbaum Subject: [PATCH-for-9.0 v2 15/19] hw/xen: Reduce inclusion of 'cpu.h' to target-specific sources Date: Tue, 14 Nov 2023 15:38:11 +0100 Message-ID: <20231114143816.71079-16-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231114143816.71079-1-philmd@linaro.org> References: <20231114143816.71079-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::530; envelope-from=philmd@linaro.org; helo=mail-ed1-x530.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, T_SCC_BODY_TEXT_LINE=-0.01 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 We rarely need to include "cpu.h" in headers. Including it 'taint' headers to be target-specific. Here only the i386/arm implementations requires "cpu.h", so include it there and remove from the "hw/xen/xen-hvm-common.h" *common* header. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: David Woodhouse Acked-by: Anthony PERARD --- include/hw/xen/xen-hvm-common.h | 1 - hw/arm/xen_arm.c | 1 + hw/i386/xen/xen-hvm.c | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/hw/xen/xen-hvm-common.h b/include/hw/xen/xen-hvm-common.h index 8934033eaa..83ed16f425 100644 --- a/include/hw/xen/xen-hvm-common.h +++ b/include/hw/xen/xen-hvm-common.h @@ -4,7 +4,6 @@ #include "qemu/osdep.h" #include "qemu/units.h" -#include "cpu.h" #include "hw/pci/pci.h" #include "hw/hw.h" #include "hw/xen/xen_native.h" diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c index 6b0e396502..b478d74ea0 100644 --- a/hw/arm/xen_arm.c +++ b/hw/arm/xen_arm.c @@ -33,6 +33,7 @@ #include "sysemu/sysemu.h" #include "hw/xen/xen-hvm-common.h" #include "sysemu/tpm.h" +#include "cpu.h" #define TYPE_XEN_ARM MACHINE_TYPE_NAME("xenpvh") OBJECT_DECLARE_SIMPLE_TYPE(XenArmState, XEN_ARM) diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c index 0fbe720c8f..f1c30d1384 100644 --- a/hw/i386/xen/xen-hvm.c +++ b/hw/i386/xen/xen-hvm.c @@ -22,6 +22,7 @@ #include "hw/xen/xen-hvm-common.h" #include +#include "cpu.h" static MemoryRegion ram_640k, ram_lo, ram_hi; static MemoryRegion *framebuffer; From patchwork Tue Nov 14 14:38:12 2023 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: 743782 Delivered-To: patch@linaro.org Received: by 2002:a5d:67cf:0:b0:32d:baff:b0ca with SMTP id n15csp2207606wrw; Tue, 14 Nov 2023 06:41:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IFZAttjWCetdqY5jG6tsYIxm2QTfSSEg4WIcxQXoewlQeCDrOJnA+qdElJuUkSQokS/45YR X-Received: by 2002:a05:6870:d0c6:b0:1bb:509a:824f with SMTP id k6-20020a056870d0c600b001bb509a824fmr12895699oaa.55.1699972911696; Tue, 14 Nov 2023 06:41:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699972911; cv=none; d=google.com; s=arc-20160816; b=No8B7e+bpY9YUcEd3tE/qSeiXXCVwS/4aG6dgQheddhvLrkR6AEuaCrogX42rfChwg P7Dy7VCOYYkKqwNGETgJNOshQuaSGK3lqFXgwoKwq6gtje0Cxf8XeK9TjXd1zQT3R0Sp ub30bFptrkfnRr1LYd3UfZHc2I+k1Wc4H4V5xxIBVVoMfa/L9Yu3dulslkRrDm/Hg/k3 Om8mYJCE1LpaiNAKarGImb9kVqXHACNrTvRxfIe5gb0EKIcbXDtgg5Ey1IL8V0j2A59w F6uXlk83IMuqYlkJ88dSX0vzKbbwZHLgaXfInpc/GR3EOFHSvwI2VrS8ZazmUsRc0kUO tLBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=CAcrCtDRFE27SgAEHRwd23jK5KSLpjZ+znXdyGAiZas=; fh=WgzlLWvbY5R8+4JotruerK0jeEkAYyt0q4wPP6dSEVI=; b=QIoLqvwpXZWzbTSqaP28xmgC0awxTCOnPOzhJ7LhEuPNgLT6Q0uT1g4rm0x5U1A/qx t55Cz8gs0TVVfJeSREIFfVRAo71yoV0Oms/o2C3o8ZpL1Ot87jE10q7/CcN1ELECRwoW 3YFAIoGu4H/9gH5TomkhFbf7ENI9q3yH/uzfUSf2kOnjSEVeNhpm+L7i5nkDqjNUg2ZY LzEGaOa0jv3QnGvc+UpEyuCL2s6+tYu3xGJ9TH4a5rhx0CuftHckHNxOt82qhMg7Yoql 8Q46G1wxmOTeauafnakl5+XVG3wAoTd8TWEhcDD0MkDTFIF+tiN/VCzy1pL+FEzakFxK kNNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pw4rr5y5; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n4-20020a05622a11c400b0041808244656si6420996qtk.313.2023.11.14.06.41.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Nov 2023 06:41:51 -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=pw4rr5y5; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r2ub4-0006g8-P2; Tue, 14 Nov 2023 09:40:59 -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 1r2uaN-0005TH-Rp for qemu-devel@nongnu.org; Tue, 14 Nov 2023 09:40:20 -0500 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r2uaH-0008HN-V8 for qemu-devel@nongnu.org; Tue, 14 Nov 2023 09:40:12 -0500 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-9d0b4dfd60dso855681866b.1 for ; Tue, 14 Nov 2023 06:40:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699972808; x=1700577608; 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=CAcrCtDRFE27SgAEHRwd23jK5KSLpjZ+znXdyGAiZas=; b=pw4rr5y5YglSRcKSHE5jDik+jl4PM6PNbDi+mule542cInNX2HTpV+fc8yjZDzGp3Y 4nnNPI51CyG9sbjzbyaeDyunyqG6McZRMtzsjT6oQUxAhg82mNCeTGwsGeHWnRN4fmZo YpNiPjq5EI3OWmofH8/gd9tGFR6Kc8mi+h/ikzC3Cgg50/jyBUwgA44Hi/EG41Gi/ENB SSTle2jsyQVzWNrFHXk62KJlgZJYRPM2FnEO0CC/x76V9NMPqD+ActaZoLTTQLhTt2j2 kKN5Cp/g3jLO9L7Nw5pC88246QCjpcZjpSJPhT2sZHYJ1fBx19ulecrCYt+VlmARaJ6B qDTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699972808; x=1700577608; 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=CAcrCtDRFE27SgAEHRwd23jK5KSLpjZ+znXdyGAiZas=; b=qib3eDEYqd7gpXD5Lu7Bp6DtThDsrXRTFUQl1y0pEDzXmnokTf2xvrOpLwCIMGg6tv mgOBAhsxzVSTwhttar6Yix+WvD5+eSC6Qs9Th5A6UXTMjl0ttY42jk1Wj3ZLSZaJonFk lCo0OrXhQYAkiMlkOiy0CAfvHz2jUS+DvGJnGgsNW6GF4aQXgAv1/gkgq0hm8h6QAIk1 ntFQhQKK5YDQke3qAqu8wUy7dKXzTPM+qrh8hxsitZPhcwzkrvc4W616XTs8JcE8hAKg lRUlz9vB33eHfdG4b85D53BPsLeisOiY5BlXQWfQAutWy4m0c+L3xlQ5L3ROMua1mA6T dNiA== X-Gm-Message-State: AOJu0Yxu8+8wkWvBIq9fX5IEw0vyQGc/oqDVg6rZdYiwMTbfhCYCu+o7 zJuxcCZ8slARX7biRYOi35Mk/Q== X-Received: by 2002:a17:907:9848:b0:9dd:5adc:b1d2 with SMTP id jj8-20020a170907984800b009dd5adcb1d2mr6678484ejc.38.1699972808614; Tue, 14 Nov 2023 06:40:08 -0800 (PST) Received: from m1x-phil.lan (cac94-h02-176-184-25-155.dsl.sta.abo.bbox.fr. [176.184.25.155]) by smtp.gmail.com with ESMTPSA id y10-20020a1709064b0a00b009dd7bc622fbsm5606206eju.113.2023.11.14.06.40.06 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 14 Nov 2023 06:40:08 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: David Woodhouse , qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Paul Durrant , qemu-arm@nongnu.org, Paolo Bonzini , David Woodhouse , Stefano Stabellini , Richard Henderson , xen-devel@lists.xenproject.org, qemu-block@nongnu.org, Anthony Perard , kvm@vger.kernel.org, Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH-for-9.0 v2 16/19] hw/xen/xen_pt: Add missing license Date: Tue, 14 Nov 2023 15:38:12 +0100 Message-ID: <20231114143816.71079-17-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231114143816.71079-1-philmd@linaro.org> References: <20231114143816.71079-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=philmd@linaro.org; helo=mail-ej1-x631.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, T_SCC_BODY_TEXT_LINE=-0.01 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 Commit eaab4d60d3 ("Introduce Xen PCI Passthrough, qdevice") introduced both xen_pt.[ch], but only added the license to xen_pt.c. Use the same license for xen_pt.h. Suggested-by: David Woodhouse Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Woodhouse --- hw/xen/xen_pt.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/hw/xen/xen_pt.h b/hw/xen/xen_pt.h index 31bcfdf705..d3180bb134 100644 --- a/hw/xen/xen_pt.h +++ b/hw/xen/xen_pt.h @@ -1,3 +1,13 @@ +/* + * Copyright (c) 2007, Neocleus Corporation. + * Copyright (c) 2007, Intel Corporation. + * + * SPDX-License-Identifier: GPL-2.0-only + * + * Alex Novik + * Allen Kay + * Guy Zana + */ #ifndef XEN_PT_H #define XEN_PT_H From patchwork Tue Nov 14 14:38:13 2023 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: 743788 Delivered-To: patch@linaro.org Received: by 2002:a5d:67cf:0:b0:32d:baff:b0ca with SMTP id n15csp2209660wrw; Tue, 14 Nov 2023 06:46:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IEjp8kmVF8A9P9b+Wk8FjWS6bF86D8xFRcb4U/gyzHLXUpM0ckN96KE0uBNc4JhqfZqkFf9 X-Received: by 2002:a05:6000:2a6:b0:331:462a:e6e6 with SMTP id l6-20020a05600002a600b00331462ae6e6mr6754245wry.43.1699973188947; Tue, 14 Nov 2023 06:46:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699973188; cv=none; d=google.com; s=arc-20160816; b=EozPSzcTjPqPKgRaXbd+PLFPCJNugdK6y91v0Tis2X/4QOobtIgfKnPYZE/1lLhpFc UOhPigBYj2RxUSNrBh4U8G1RSRkzs0EDXshDx03+CQht127Kh9r2pbaVROI9Z21bt2s3 Nou3l+wxEvckcgXuIHm/ZzaQ5MSIj4/mP2hvJiekWYhun/xNzO6JVbAc66R8bwW2Eyzw ekvTwRm2aztX3/D+KuIsJyOaz8krNaYHTWZYf/tsmEa0G+5Vg7/HJywDESa3xbjkBIlq BUmDzamGwxaCQnw9WEGcfXAXk4ox0PgZtEbKMp+z0d1vYuJdky9lYF30lWON2y7tJfrP lwrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=cJTBhe5AIq+piFF54yNuiwKWHopSqD7by2+9eio+MdU=; fh=U4UXaHkGm2YPi0Wz6Rjc6ORMc3fSxv41kMvJGLrj2Ss=; b=vVR7VXMT533hznvK6KwinPtnQqpf05qqdJn55YNmzcLNunTnE4MiHeFTwoEueZmpSG AZvUQfjLnqxD9pNxed1iphsw/UoQhjCGHMLRLPdLEUH8obYA1+jdPHZ21cvndlFVY0Yh 57Sca5af6CbarQQOauQHKoviqPcid5zUt9lJV6LHy63G2EMphgRPigdu62rovSmYNeoK oMSpwLywyr03Mgehf2MVVRq1jQP+baLCBrx9/KoAUIQCTWLzGbzUMBCykIsWI4q88VW9 Gy7VJWwlaesDDvbtHz6ntnbe5manwDQ9JGBUsjd0Hvgy4RJbxrgkgPFK4uUwt0yiFmqX 8yNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zcOskpQ6; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id m5-20020a5d4a05000000b003232009d578si4647599wrq.243.2023.11.14.06.46.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Nov 2023 06:46:28 -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=zcOskpQ6; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r2ub9-0007Eh-QG; Tue, 14 Nov 2023 09:41: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 1r2uaW-0005Zz-7r for qemu-devel@nongnu.org; Tue, 14 Nov 2023 09:40:25 -0500 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r2uaP-0008IN-Qw for qemu-devel@nongnu.org; Tue, 14 Nov 2023 09:40:23 -0500 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-9e62f903e88so626386666b.2 for ; Tue, 14 Nov 2023 06:40:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699972815; x=1700577615; 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=cJTBhe5AIq+piFF54yNuiwKWHopSqD7by2+9eio+MdU=; b=zcOskpQ632xXIRJRbNrkKYgrLgESDKporKbfd38FkhS8c3WCGpyusLf/CFnXnmN3+k twJMbAZYn0zd1WiAd+/ORir3/pLxqso3II8rv/dgd/8GOhvFrg9n0XlpSEmSG1SrvHW5 IOsOGZUcqdeoLo5ohvyQvQqiwZSr1MynZ1rqyGi75O3l3bwQh71LFP5/8RvAaxZQdErg YAZtaM8D6GY0SwmmeEVDjadRRpmRWose1qQdH7qLekQqofIHftU4GClk7OjQxptg4+H9 6OS+Wt4PoXL2IcUwwR3GDxvAgGbx7dzpZuCjXzTGe5MrazSoZnpjUquEmsnDNBZfNkvg 5K5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699972815; x=1700577615; 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=cJTBhe5AIq+piFF54yNuiwKWHopSqD7by2+9eio+MdU=; b=IchERD4mjwKFJ7qn2EZVOJxGBd0FcPzfcFrDSdt7eAYERot/m7OFVKsSqncrKIgwA+ xvGhbUtzkndNmDAjay3BDl+3W63kHwQx92vfRTXCqjJngErewEpAmOOZaKUa8QdcHWQ8 C6plIQJv8Lz7+NgG7OApHc83Nq732j49sr07Wo85bBYZ7jfXNkXc5HCer529CScYXLlG 4Jo+FIhg6fay8cXd2iHFec8/SUejqGxxXdZsEuXyE2ubfG1960EH+54SqLDyXqTsyQDf R4oYMOBHngiXAe+hQN0ooS2iAUb1Mb49YkPp11X56MH1P2P/fDtdkYF6ExGQlEhmM5JR Hkzg== X-Gm-Message-State: AOJu0YwBrwDGC9AyIc7VumWYKlsrYz+Wsm02K//dNacKz3qi+pmM5liL ZsBZS8SYo8KcN4YORyZWDIfLvQ== X-Received: by 2002:a17:906:6a1f:b0:9b2:df16:851d with SMTP id qw31-20020a1709066a1f00b009b2df16851dmr9925246ejc.57.1699972815506; Tue, 14 Nov 2023 06:40:15 -0800 (PST) Received: from m1x-phil.lan (cac94-h02-176-184-25-155.dsl.sta.abo.bbox.fr. [176.184.25.155]) by smtp.gmail.com with ESMTPSA id le5-20020a170907170500b00988f168811bsm5631076ejc.135.2023.11.14.06.40.13 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 14 Nov 2023 06:40:15 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: David Woodhouse , qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Paul Durrant , qemu-arm@nongnu.org, Paolo Bonzini , David Woodhouse , Stefano Stabellini , Richard Henderson , xen-devel@lists.xenproject.org, qemu-block@nongnu.org, Anthony Perard , kvm@vger.kernel.org, Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Eduardo Habkost , "Michael S. Tsirkin" , Marcel Apfelbaum Subject: [PATCH-for-9.0 v2 17/19] hw/xen: Extract 'xen_igd.h' from 'xen_pt.h' Date: Tue, 14 Nov 2023 15:38:13 +0100 Message-ID: <20231114143816.71079-18-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231114143816.71079-1-philmd@linaro.org> References: <20231114143816.71079-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=philmd@linaro.org; helo=mail-ej1-x635.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, T_SCC_BODY_TEXT_LINE=-0.01 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 "hw/xen/xen_pt.h" requires "hw/xen/xen_native.h" which is target specific. It also declares IGD methods, which are not target specific. Target-agnostic code can use IGD methods. To allow that, extract these methos into a new "hw/xen/xen_igd.h" header. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Woodhouse --- hw/xen/xen_pt.h | 14 -------------- include/hw/xen/xen_igd.h | 33 +++++++++++++++++++++++++++++++++ accel/xen/xen-all.c | 1 + hw/i386/pc_piix.c | 1 + hw/xen/xen_pt.c | 3 ++- hw/xen/xen_pt_config_init.c | 3 ++- hw/xen/xen_pt_graphics.c | 3 ++- hw/xen/xen_pt_stub.c | 2 +- 8 files changed, 42 insertions(+), 18 deletions(-) create mode 100644 include/hw/xen/xen_igd.h diff --git a/hw/xen/xen_pt.h b/hw/xen/xen_pt.h index d3180bb134..095a0f0365 100644 --- a/hw/xen/xen_pt.h +++ b/hw/xen/xen_pt.h @@ -15,9 +15,6 @@ #include "xen-host-pci-device.h" #include "qom/object.h" -bool xen_igd_gfx_pt_enabled(void); -void xen_igd_gfx_pt_set(bool value, Error **errp); - void xen_pt_log(const PCIDevice *d, const char *f, ...) G_GNUC_PRINTF(2, 3); #define XEN_PT_ERR(d, _f, _a...) xen_pt_log(d, "%s: Error: "_f, __func__, ##_a) @@ -62,12 +59,6 @@ typedef struct XenPTDeviceClass { XenPTQdevRealize pci_qdev_realize; } XenPTDeviceClass; -uint32_t igd_read_opregion(XenPCIPassthroughState *s); -void xen_igd_reserve_slot(PCIBus *pci_bus); -void igd_write_opregion(XenPCIPassthroughState *s, uint32_t val); -void xen_igd_passthrough_isa_bridge_create(XenPCIPassthroughState *s, - XenHostPCIDevice *dev); - /* function type for config reg */ typedef int (*xen_pt_conf_reg_init) (XenPCIPassthroughState *, XenPTRegInfo *, uint32_t real_offset, @@ -353,11 +344,6 @@ static inline bool xen_pt_has_msix_mapping(XenPCIPassthroughState *s, int bar) void *pci_assign_dev_load_option_rom(PCIDevice *dev, int *size, unsigned int domain, unsigned int bus, unsigned int slot, unsigned int function); -static inline bool is_igd_vga_passthrough(XenHostPCIDevice *dev) -{ - return (xen_igd_gfx_pt_enabled() - && ((dev->class_code >> 0x8) == PCI_CLASS_DISPLAY_VGA)); -} int xen_pt_register_vga_regions(XenHostPCIDevice *dev); int xen_pt_unregister_vga_regions(XenHostPCIDevice *dev); void xen_pt_setup_vga(XenPCIPassthroughState *s, XenHostPCIDevice *dev, diff --git a/include/hw/xen/xen_igd.h b/include/hw/xen/xen_igd.h new file mode 100644 index 0000000000..7ffca06c10 --- /dev/null +++ b/include/hw/xen/xen_igd.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2007, Neocleus Corporation. + * Copyright (c) 2007, Intel Corporation. + * + * SPDX-License-Identifier: GPL-2.0-only + * + * Alex Novik + * Allen Kay + * Guy Zana + */ +#ifndef XEN_IGD_H +#define XEN_IGD_H + +#include "hw/xen/xen-host-pci-device.h" + +typedef struct XenPCIPassthroughState XenPCIPassthroughState; + +bool xen_igd_gfx_pt_enabled(void); +void xen_igd_gfx_pt_set(bool value, Error **errp); + +uint32_t igd_read_opregion(XenPCIPassthroughState *s); +void xen_igd_reserve_slot(PCIBus *pci_bus); +void igd_write_opregion(XenPCIPassthroughState *s, uint32_t val); +void xen_igd_passthrough_isa_bridge_create(XenPCIPassthroughState *s, + XenHostPCIDevice *dev); + +static inline bool is_igd_vga_passthrough(XenHostPCIDevice *dev) +{ + return (xen_igd_gfx_pt_enabled() + && ((dev->class_code >> 0x8) == PCI_CLASS_DISPLAY_VGA)); +} + +#endif diff --git a/accel/xen/xen-all.c b/accel/xen/xen-all.c index 5ff0cb8bd9..0bdefce537 100644 --- a/accel/xen/xen-all.c +++ b/accel/xen/xen-all.c @@ -15,6 +15,7 @@ #include "hw/xen/xen_native.h" #include "hw/xen/xen-legacy-backend.h" #include "hw/xen/xen_pt.h" +#include "hw/xen/xen_igd.h" #include "chardev/char.h" #include "qemu/accel.h" #include "sysemu/cpus.h" diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index eace854335..a607dcb56c 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -56,6 +56,7 @@ #ifdef CONFIG_XEN #include #include "hw/xen/xen_pt.h" +#include "hw/xen/xen_igd.h" #endif #include "hw/xen/xen-x86.h" #include "hw/xen/xen.h" diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c index 36e6f93c37..a8edabdabc 100644 --- a/hw/xen/xen_pt.c +++ b/hw/xen/xen_pt.c @@ -59,7 +59,8 @@ #include "hw/pci/pci.h" #include "hw/qdev-properties.h" #include "hw/qdev-properties-system.h" -#include "xen_pt.h" +#include "hw/xen/xen_pt.h" +#include "hw/xen/xen_igd.h" #include "hw/xen/xen.h" #include "hw/xen/xen-legacy-backend.h" #include "qemu/range.h" diff --git a/hw/xen/xen_pt_config_init.c b/hw/xen/xen_pt_config_init.c index 2b8680b112..ba4cd78238 100644 --- a/hw/xen/xen_pt_config_init.c +++ b/hw/xen/xen_pt_config_init.c @@ -15,7 +15,8 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qemu/timer.h" -#include "xen_pt.h" +#include "hw/xen/xen_pt.h" +#include "hw/xen/xen_igd.h" #include "hw/xen/xen-legacy-backend.h" #define XEN_PT_MERGE_VALUE(value, data, val_mask) \ diff --git a/hw/xen/xen_pt_graphics.c b/hw/xen/xen_pt_graphics.c index 0aed3bb6fd..6c2e3f4840 100644 --- a/hw/xen/xen_pt_graphics.c +++ b/hw/xen/xen_pt_graphics.c @@ -3,7 +3,8 @@ */ #include "qemu/osdep.h" #include "qapi/error.h" -#include "xen_pt.h" +#include "hw/xen/xen_pt.h" +#include "hw/xen/xen_igd.h" #include "xen-host-pci-device.h" static unsigned long igd_guest_opregion; diff --git a/hw/xen/xen_pt_stub.c b/hw/xen/xen_pt_stub.c index 5c108446a8..72feebeb20 100644 --- a/hw/xen/xen_pt_stub.c +++ b/hw/xen/xen_pt_stub.c @@ -6,7 +6,7 @@ */ #include "qemu/osdep.h" -#include "hw/xen/xen_pt.h" +#include "hw/xen/xen_igd.h" #include "qapi/error.h" bool xen_igd_gfx_pt_enabled(void) From patchwork Tue Nov 14 14:38:14 2023 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: 743785 Delivered-To: patch@linaro.org Received: by 2002:a5d:67cf:0:b0:32d:baff:b0ca with SMTP id n15csp2208537wrw; Tue, 14 Nov 2023 06:44:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IGE2KSsKK3op4uPXUD9f7UOsjxo1xnIMRZKhWApLwevRF5uQ7gvyWvuFl24HhA+3k88PEb0 X-Received: by 2002:a05:6000:184e:b0:32d:9395:dec6 with SMTP id c14-20020a056000184e00b0032d9395dec6mr5943873wri.67.1699973043332; Tue, 14 Nov 2023 06:44:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699973043; cv=none; d=google.com; s=arc-20160816; b=IUuXvkVLi0II/aPjQH9VwZ3L/NpBlUdnUYboRgqJhY2h6JJhYNnLBmnb9BLdEBNkM5 JwKuCYcoTk+rIu2BY52amyzdDdkdTBFmupkzQWa8TUh+Rhw2bcPp5c8uPUOQN/6gExgY gGy2K9nINQ5qVJEndhiHvVDWpryYul3BJDaIpFEeqYTnwEW2OkYKMQDG0UwCTuZhVngI MuH3B2Kt4nHa3XpYW7Bq6gu7h1qxvHfImeF27MqlFbBzbhsMO/K2gVozECG/ign/NZwl 43oxZ0qKfWiqKUht7CZ5BADcUVX/c+Zpjga8IXKPJSK/XM2PenRx/gCeNS/r4oMK809R 9Gng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=xWc7O88tTfL+IROUfXsM+NSd2X7VWDO4aCdpc797HXc=; fh=HmK5r7mZViO4nQL9yfrGC7+i5gIPLTvrHBCedGapqLw=; b=jopbyjLZ1nmVmEGGp1gTCC6nOeILbhXFfghoLwkNCvt6oGwM0I+uMMZ88Kr368Mh2J Igfay7kBhjEKK2nWJDC/w/QXwlZReuFteC/OUvB2psz9S1zR2NKxWlYQzXyY+QyXLfj6 qU+VAXBRb4ivRApzz723PhScFmazeWAspEMLsToBHVStiZUt8DXghx1iWkzh3Eyhm17Q mC1xs+CS513BLw/hLvfLdhpmqfniT2OpHqOy69B8bmoWCEa0y0bO4txCzKg7dPTj8zis OFlqqre8Zw1il3K7hjaHD0Lm/XudA1xq79qSl99rjuUTfvxR39JRtj1LwHpdPtmogDjv qHmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CNEsi3so; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id q4-20020adff784000000b0032d8eec7a48si4672601wrp.414.2023.11.14.06.44.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Nov 2023 06:44:03 -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=CNEsi3so; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r2ubC-0007P0-JG; Tue, 14 Nov 2023 09:41:06 -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 1r2uah-000611-PG for qemu-devel@nongnu.org; Tue, 14 Nov 2023 09:40:37 -0500 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r2uaV-0008Kb-Ly for qemu-devel@nongnu.org; Tue, 14 Nov 2023 09:40:35 -0500 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-53e751aeb3cso8835064a12.2 for ; Tue, 14 Nov 2023 06:40:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699972822; x=1700577622; 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=xWc7O88tTfL+IROUfXsM+NSd2X7VWDO4aCdpc797HXc=; b=CNEsi3so+btQYoMYE9vqoQFufHMRMk1f9ubh/3YZJgD21aT5jSZtvy7aNxIESE/q1u zlQ0AVHyA5MtFwmadi8E1wdH/dWb/b8uTy/oCq9Ki7AmEM3v/T9GoWr14kIflHgCMba4 NTyCKByJi9Y5m1R/ukGhfzu/y5scZwocO3alHKH6aF4s59kUnwvbKdZNVF21/OV5fOEK lMX00EFFENchkvt393hxFV+MBnNUzAjwabry1kHtveUsdMetcK3/fq/0nqjpc6JiRnlc Ms1V2kHnnZ1Zr9BjUrcCVg1XuIuQgFQbhURC5S2sazxH7xVTJiKBwSzFTGjcBmJr0l9G Vd4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699972822; x=1700577622; 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=xWc7O88tTfL+IROUfXsM+NSd2X7VWDO4aCdpc797HXc=; b=wwcNAE/8R2P5NFG/JbqhE/sHb1OiGX3SJDGaDcceIQVk+hXkZFrE7QRIz6JgIrvrXo 93+7M9Z5zWKrTnlwRvk1yV600LS3R8Y+h4o08gSD8zgTgihIEq707QiYSKd4kNS43F8+ UyPjtt58IyeD42JRoiVXPL8kUSX1whLPLfFvCMHU/BDPeTPQ3I+bX0ucJiWV0i65fK0M 9rff/aTI1HwMmuS4VjAryrEaSeUVk55NytXcbPWnn1PO5PG++QTD7r+TcA0OJDNjG3K1 /gIeQx0TjhBegFojVFFhRe73m+UOYJ/1dEa1VuQDlbH9w9hi88ZSWrHc9kd3/Tuym+H4 +FKg== X-Gm-Message-State: AOJu0Yw4SOaIuDRBOhbBuMfS7+WYDAPehw0orTjs8O248dPVTGqDHD70 uX+2RBLk+GP9OgKgnRwLnG83zw== X-Received: by 2002:a05:6402:518e:b0:543:5c2f:e0e6 with SMTP id q14-20020a056402518e00b005435c2fe0e6mr7401790edd.17.1699972821905; Tue, 14 Nov 2023 06:40:21 -0800 (PST) Received: from m1x-phil.lan (cac94-h02-176-184-25-155.dsl.sta.abo.bbox.fr. [176.184.25.155]) by smtp.gmail.com with ESMTPSA id e29-20020a50d4dd000000b0052e1783ab25sm5343752edj.70.2023.11.14.06.40.19 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 14 Nov 2023 06:40:21 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: David Woodhouse , qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Paul Durrant , qemu-arm@nongnu.org, Paolo Bonzini , David Woodhouse , Stefano Stabellini , Richard Henderson , xen-devel@lists.xenproject.org, qemu-block@nongnu.org, Anthony Perard , kvm@vger.kernel.org, Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Michael S. Tsirkin" , Marcel Apfelbaum , Eduardo Habkost Subject: [PATCH-for-9.0 v2 18/19] hw/i386/xen: Compile 'xen-hvm.c' with Xen CPPFLAGS Date: Tue, 14 Nov 2023 15:38:14 +0100 Message-ID: <20231114143816.71079-19-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231114143816.71079-1-philmd@linaro.org> References: <20231114143816.71079-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=philmd@linaro.org; helo=mail-ed1-x52c.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, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=0.01 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 xen-hvm.c calls xc_set_hvm_param() from , so better compile it with Xen CPPFLAGS. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Woodhouse --- hw/i386/xen/meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/i386/xen/meson.build b/hw/i386/xen/meson.build index 3dc4c4f106..3f0df8bc07 100644 --- a/hw/i386/xen/meson.build +++ b/hw/i386/xen/meson.build @@ -1,8 +1,10 @@ i386_ss.add(when: 'CONFIG_XEN', if_true: files( - 'xen-hvm.c', 'xen_apic.c', 'xen_pvdevice.c', )) +i386_ss.add(when: ['CONFIG_XEN', xen], if_true: files( + 'xen-hvm.c', +)) i386_ss.add(when: 'CONFIG_XEN_BUS', if_true: files( 'xen_platform.c', From patchwork Tue Nov 14 14:38:15 2023 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: 743784 Delivered-To: patch@linaro.org Received: by 2002:a5d:67cf:0:b0:32d:baff:b0ca with SMTP id n15csp2207703wrw; Tue, 14 Nov 2023 06:42:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IEMLRqSUUwzxzhgmMpcUQ59gSHyb9q1cUVI8678z27cgEPqp3dlTVYHaNnjo5O7ipKux9HU X-Received: by 2002:a67:a247:0:b0:45f:4bb5:d306 with SMTP id t7-20020a67a247000000b0045f4bb5d306mr5623184vsh.25.1699972922349; Tue, 14 Nov 2023 06:42:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699972922; cv=none; d=google.com; s=arc-20160816; b=oqq4gx6S7rL4rTFUXAi50k/OEFfBVGa1D1sXlEgmM602sKfbdk3rCjyS68QffnFaZY Rtq+27KKW7dFrm7GCNOP0NQTMc10mwW0zTr/EKFSO2WxVT5MD2yTxBT8OHX61zTdvRPP H2mAlEchW7+D8Oynfofapyva1WDbsxG4LI2dUS+DZCbPwKpHNooEOzCpXm/KfKDNmnWD 6ZsDEbprXDGJzdqqF9EmiOdu6hDFqFSsnQG3YnIr2/KJfjP0CLOENfHmOSEdiDzppEdd cBIfRR839YeBQh5lQxqpDpJOlbkRakygedmczuya2LJPTPlgxvWLjhvgfwXJcH1mXByD 8tWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=85224ACu16xcahxMJd73na2pr08geUP2BaqK8DQk41g=; fh=DQdBwVL0njkjrcmiitPQkWwX/pS9hKiR9dqdA4zWvmw=; b=t+mpKWQAqq8Hqrj5aUHJmZUAOZmpRzT5EVtBQWDQ75PJkT6Yja+wsr275iPISXXAXB vJZ8lhcSIba4IAV81V61FnlP0/uvB4cGIodDHyfl3joEu7j1IbozqoS8wLC09zlCCkUG x6DbYvfwZsZcUYxFSzfdwPSZdN/8wOSaI7XjUDZfLIY5Rcur1/eQ/nMcrwVwmwhkL6jt 6uASGfvvWj3gSEDY8fV9dKshrMznXVVm1MUEvXkX0wGo//5IHEM7bX7rUTckUWD9tP1T hTz7F0YTpbnrBVpkMVbbvG6wjhPDxzvcYlN53H53b6jFqjOx+6nhqugmXtXwQasVb1ZC NjoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B4hc9vTe; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id qc12-20020a05620a654c00b0076da11658adsi6552434qkn.10.2023.11.14.06.42.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Nov 2023 06:42:02 -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=B4hc9vTe; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r2ubE-0007Zk-Pu; Tue, 14 Nov 2023 09:41:08 -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 1r2uaf-0005vY-IX for qemu-devel@nongnu.org; Tue, 14 Nov 2023 09:40:35 -0500 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r2uac-0008QL-AZ for qemu-devel@nongnu.org; Tue, 14 Nov 2023 09:40:31 -0500 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-9e623356e59so626970566b.0 for ; Tue, 14 Nov 2023 06:40:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699972829; x=1700577629; 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=85224ACu16xcahxMJd73na2pr08geUP2BaqK8DQk41g=; b=B4hc9vTee9sMf3O9bj8e9LTD5nUPdAn+KpWQ6bP/RGLCp5XSc5a3OvLxUFY7tMxUjz N3EOVmC8FjiIzw3QwwgatIR4akxeplMc+OwiHqY3bmxlaWtvk6iJcFmX7Et1i3uMqgkv pIIVh9BxAnKLmTkMSreVe7SdJNRFhRcg6FpElBAvQ2J3N8BP3uWRoF1CDuA/HW1o9NU5 Ny49uBppdO0ut+7JSEYkmagqQiFr8LjMI0AfRcA9aFuyrPppCVIwDJFQ8memp6BAjdqy KgmadK7JvKHkNdBGRz8/JBVR4FZaYn3gTVE0weBVR11n+iG9zrhQCVe7pl/vK4m/Nj6l 6uGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699972829; x=1700577629; 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=85224ACu16xcahxMJd73na2pr08geUP2BaqK8DQk41g=; b=LRoP5XQv/Njy9/BB434GfelqW4hDATRtGIHzcL2o6k8Fhbno5ImJ6MxJ7GIS5ccEJP XxDY+LG2j0upHqXKxljGu6QRIP2HukHcrWk46MhVUCzyw5Fb6o7/xvi2ZrDNWVu/xiOW LAvmnkjZpYxZbnA9HUCdTeiMnhC/baMVvdKlgypxHliOAII2Iazqua5kjbXH8ogyBViW phTryL1wX2UGHYvetKVs90S/4AiozeJ18sJB5lTKsajk8BR8QhoVSbjEEy1QBBOA7Asp jOzMy9VRjbieAz10Gwaqhs3VYhh1azKetsibFuptuhQTuUrpMsJP7gsUMQnYgNLlPTuL QXxQ== X-Gm-Message-State: AOJu0YxCkCt7UVW5mF8x5wrm6Apys4Vluu3lGrC3gCXXFUBtLxBYL1Ep 4pEIlsnM0EfjZWVKTe9V5HnU10w3va6xuAw2c2g= X-Received: by 2002:a17:907:969f:b0:9eb:af0e:39da with SMTP id hd31-20020a170907969f00b009ebaf0e39damr3096379ejc.46.1699972828864; Tue, 14 Nov 2023 06:40:28 -0800 (PST) Received: from m1x-phil.lan (cac94-h02-176-184-25-155.dsl.sta.abo.bbox.fr. [176.184.25.155]) by smtp.gmail.com with ESMTPSA id t25-20020a1709066bd900b0099c53c4407dsm5561943ejs.78.2023.11.14.06.40.26 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 14 Nov 2023 06:40:28 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: David Woodhouse , qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Paul Durrant , qemu-arm@nongnu.org, Paolo Bonzini , David Woodhouse , Stefano Stabellini , Richard Henderson , xen-devel@lists.xenproject.org, qemu-block@nongnu.org, Anthony Perard , kvm@vger.kernel.org, Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Hajnoczi , Kevin Wolf , Hanna Reitz Subject: [PATCH-for-9.0 v2 19/19] hw/xen: Have most of Xen files become target-agnostic Date: Tue, 14 Nov 2023 15:38:15 +0100 Message-ID: <20231114143816.71079-20-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231114143816.71079-1-philmd@linaro.org> References: <20231114143816.71079-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=philmd@linaro.org; helo=mail-ej1-x62a.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, T_SCC_BODY_TEXT_LINE=-0.01 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 Previous commits re-organized the target-specific bits from Xen files. We can now build the common files once instead of per-target. Only 4 files call libxen API (thus its CPPFLAGS): - xen-hvm-common.c, - xen_pt.c, xen_pt_graphics.c, xen_pt_msi.c Signed-off-by: Philippe Mathieu-Daudé --- Reworked since v1 so dropping David's R-b tag. --- accel/xen/meson.build | 2 +- hw/block/dataplane/meson.build | 2 +- hw/xen/meson.build | 21 ++++++++++----------- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/accel/xen/meson.build b/accel/xen/meson.build index 002bdb03c6..455ad5d6be 100644 --- a/accel/xen/meson.build +++ b/accel/xen/meson.build @@ -1 +1 @@ -specific_ss.add(when: 'CONFIG_XEN', if_true: files('xen-all.c')) +system_ss.add(when: 'CONFIG_XEN', if_true: files('xen-all.c')) diff --git a/hw/block/dataplane/meson.build b/hw/block/dataplane/meson.build index 025b3b061b..4d8bcb0bb9 100644 --- a/hw/block/dataplane/meson.build +++ b/hw/block/dataplane/meson.build @@ -1,2 +1,2 @@ system_ss.add(when: 'CONFIG_VIRTIO_BLK', if_true: files('virtio-blk.c')) -specific_ss.add(when: 'CONFIG_XEN_BUS', if_true: files('xen-block.c')) +system_ss.add(when: 'CONFIG_XEN_BUS', if_true: files('xen-block.c')) diff --git a/hw/xen/meson.build b/hw/xen/meson.build index d887fa9ba4..403cab49cf 100644 --- a/hw/xen/meson.build +++ b/hw/xen/meson.build @@ -7,26 +7,25 @@ system_ss.add(when: ['CONFIG_XEN_BUS'], if_true: files( 'xen_pvdev.c', )) -system_ss.add(when: ['CONFIG_XEN', xen], if_true: files( +system_ss.add(when: ['CONFIG_XEN'], if_true: files( 'xen-operations.c', -)) - -xen_specific_ss = ss.source_set() -xen_specific_ss.add(files( 'xen-mapcache.c', +)) +system_ss.add(when: ['CONFIG_XEN', xen], if_true: files( 'xen-hvm-common.c', )) + if have_xen_pci_passthrough - xen_specific_ss.add(files( + system_ss.add(when: ['CONFIG_XEN'], if_true: files( 'xen-host-pci-device.c', - 'xen_pt.c', 'xen_pt_config_init.c', - 'xen_pt_graphics.c', 'xen_pt_load_rom.c', + )) + system_ss.add(when: ['CONFIG_XEN', xen], if_true: files( + 'xen_pt.c', + 'xen_pt_graphics.c', 'xen_pt_msi.c', )) else - xen_specific_ss.add(files('xen_pt_stub.c')) + system_ss.add(when: ['CONFIG_XEN'], if_true: files('xen_pt_stub.c')) endif - -specific_ss.add_all(when: ['CONFIG_XEN', xen], if_true: xen_specific_ss)