From patchwork Mon Feb 5 15:32:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksii Kurochko X-Patchwork-Id: 13545703 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5C1A7C4829F for ; Mon, 5 Feb 2024 15:33:03 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.676201.1052213 (Exim 4.92) (envelope-from ) id 1rX0xn-0000Ir-0J; Mon, 05 Feb 2024 15:32:51 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 676201.1052213; Mon, 05 Feb 2024 15:32:50 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rX0xm-0000Ih-Rg; Mon, 05 Feb 2024 15:32:50 +0000 Received: by outflank-mailman (input) for mailman id 676201; Mon, 05 Feb 2024 15:32:49 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rX0xl-0007I6-Oa for xen-devel@lists.xenproject.org; Mon, 05 Feb 2024 15:32:49 +0000 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [2a00:1450:4864:20::133]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id d0af2684-c43b-11ee-98f5-efadbce2ee36; Mon, 05 Feb 2024 16:32:47 +0100 (CET) Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-51124db6cf0so3952831e87.0 for ; Mon, 05 Feb 2024 07:32:47 -0800 (PST) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id s1-20020a056512314100b005114d401157sm474445lfi.2.2024.02.05.07.32.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 07:32:46 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: d0af2684-c43b-11ee-98f5-efadbce2ee36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707147167; x=1707751967; darn=lists.xenproject.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=EBotcF0+SThVpP3W9n7XOyM76ldShQpdZhp7LK29d70=; b=bTD2yDLrXJ6LzZXaF0oSRYvepLB07HVyKTqZjqvG8asR7M4nlzZRPwOzZZYMQfuqVx MIYh+nWLHzCYi5dKrYB7jG5JcohulixFBi3cnAqxdcVkR2JP6p/oXBxi06XnowVVfYHP v6nuJMOAvoYJPs3c7SKLac9swSaoPMaZ95fmvvXe/NiobAO00mU/G7wAGnKgwjhbEGfP Afc/5gLKMWL9iVmwhM7eO0dCM6/Nl9AxoWG7nzsZDUgK42cya2zL04rsMdndOvBnFSNS bdWRNX3h93QQWXuAJGt/z5Hbci/MqCcYswWIClYjLcCCkvXbrOMdqHznTRQcRopLsLfc CW9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707147167; x=1707751967; 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=EBotcF0+SThVpP3W9n7XOyM76ldShQpdZhp7LK29d70=; b=Jf2iGiL6juPFl2QIUvagxmAhcnbM47ziJqiND7TwK5qsWnhw5HZP3/jxwdJ7rNuF26 GDQc1gxAjeCfRHdPOZgE8dYcbeuc1rQK6IZ/KnmYAiatt00vcSwh8P29WUOSK6/mMEQ1 JINZZ75u9AsbJBD7gvQEnS7FiZk8hH1HxnGQ1lVCMmD8ysQI9854F0Xub7RaY5cYCWcj i4cTgTQh9Tgk3htByy9l+ZspPRkBCrx+ZneQK/z60MT4TLDaS1AUEqyWI791ZpbM97uZ Yb9R4Zi0JOWwPi6eJXQ8tWUqWvStGee4ZDMZwisBy4IQb1sfIFQ8l1dOLs0kAs5qQrDV sYMQ== X-Gm-Message-State: AOJu0Ywf2KHvJfmCRBVFl+y4Hmj3k5FUU1xuHIb7CFGCs7ysvYjeNo1g vGq07zZpU1Vtfc39fCD30YX1tLtre/6MDFvcconp/dLY/xR3/S9e9o4CCWsw X-Google-Smtp-Source: AGHT+IGlApynLcTSmBkHRExhVCI8u5HUGtusmYhRVxMrylZdRgq9ep6QS77uqsxZ/UfDXjAB9p32hw== X-Received: by 2002:a19:4f56:0:b0:511:56fb:b2a8 with SMTP id a22-20020a194f56000000b0051156fbb2a8mr122013lfk.8.1707147167141; Mon, 05 Feb 2024 07:32:47 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCXnEv4K2PpNuztEqD+bWPCE7ysgM6vo9uLx9ZkjlfOwMNyBtdDQpC4sybGDlJU5awDLLOC6X/EGUrjNzWzLh0Uldqk5N2/moeqwv2MoHDKwb45hlAdvzxdQBKVvdkezRrdzbrDEXg== From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Jan Beulich , Paul Durrant , =?utf-8?q?Rog?= =?utf-8?q?er_Pau_Monn=C3=A9?= Subject: [PATCH v4 06/30] xen: avoid generation of empty asm/iommu.h Date: Mon, 5 Feb 2024 16:32:13 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 asm/iommu.h shouldn't be included when CONFIG_HAS_PASSTHROUGH isn't enabled. As is ifdef-ed by CONFIG_HAS_PASSTHROUGH it should be also ifdef-ed field "struct arch_iommu arch" in struct domain_iommu as definition of arch_iommu is located in . These amount of changes are enough to avoid generation of empty asm/iommu.h for now. Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Changes in V4: - Update the commit message. --- Changes in V3: - new patch. --- xen/include/xen/iommu.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xen/include/xen/iommu.h b/xen/include/xen/iommu.h index a21f25df9f..7aa6a77209 100644 --- a/xen/include/xen/iommu.h +++ b/xen/include/xen/iommu.h @@ -337,7 +337,9 @@ extern int iommu_add_extra_reserved_device_memory(unsigned long start, extern int iommu_get_extra_reserved_device_memory(iommu_grdm_t *func, void *ctxt); +#ifdef CONFIG_HAS_PASSTHROUGH #include +#endif #ifndef iommu_call # define iommu_call(ops, fn, args...) ((ops)->fn(args)) @@ -345,7 +347,9 @@ extern int iommu_get_extra_reserved_device_memory(iommu_grdm_t *func, #endif struct domain_iommu { +#ifdef CONFIG_HAS_PASSTHROUGH struct arch_iommu arch; +#endif /* iommu_ops */ const struct iommu_ops *platform_ops;