From nobody Sat May 18 05:04:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1701094438; cv=none; d=zohomail.com; s=zohoarc; b=i7pJTHQlpaTjrMjkNtTQh+kC3M/fH1JfAD0YM0zMUn7qPVi35tPk056w0qPO9qicS+TK7+Lx2sA8ubUQVdd84g2bsxuFleFk5nm3Elxo9d0Te58DPuSxWhQqlVtIhzImW4HahNZTCWhqbiC8S4JIpe4tzLvA7MsjJntrGaW95iU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701094438; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=U9O7jlW2ke1lTOAYgSQUjqDX45LjkP4J1X6mHCR3nQ8=; b=VPSt16YDCX0bM7Xdui046Ie9S/UurQ4zmTAy4FVWrmmnJbgm6jtinyqLc5CZvPg87nD/fUzAOCIlZwI8OG8nyhlTZilig8HveyUl0hCV32vKkKDaLOv4R39OPPcUYBKt0gzvSVqQrjsluq9c3PA8GyrTwLpgaFWwXH0Xg8xDWX8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1701094438009430.4228509781833; Mon, 27 Nov 2023 06:13:58 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.642119.1001306 (Exim 4.92) (envelope-from ) id 1r7cMj-0005pO-8Q; Mon, 27 Nov 2023 14:13:37 +0000 Received: by outflank-mailman (output) from mailman id 642119.1001306; Mon, 27 Nov 2023 14:13:37 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r7cMj-0005oF-4W; Mon, 27 Nov 2023 14:13:37 +0000 Received: by outflank-mailman (input) for mailman id 642119; Mon, 27 Nov 2023 14:13:35 +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 1r7cMh-0005in-OQ for xen-devel@lists.xenproject.org; Mon, 27 Nov 2023 14:13:35 +0000 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [2a00:1450:4864:20::130]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 25ef3fd3-8d2f-11ee-9b0e-b553b5be7939; Mon, 27 Nov 2023 15:13:33 +0100 (CET) Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-50aab0ca90aso6114007e87.0 for ; Mon, 27 Nov 2023 06:13:33 -0800 (PST) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id x29-20020ac259dd000000b00507b869b068sm1494100lfn.302.2023.11.27.06.13.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 06:13:31 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 25ef3fd3-8d2f-11ee-9b0e-b553b5be7939 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701094413; x=1701699213; 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=U9O7jlW2ke1lTOAYgSQUjqDX45LjkP4J1X6mHCR3nQ8=; b=FQL9/NQQyCSzklikVdYX+c+6LryAW3MCeKkC0zOD8IN+f4vQU9iuT/vmm2QoIm1q3F yYsFnto1v6qtLvO7qaWwTEpKloZJwkI/Rbns3Xnuw+BZa8MaRfOoi5TiSOEAAELYXxjC 9d60NehMjAr8fYUOp5JYV5qpwGeiOfCwmt2i2E4vY4rzVrhmHzifVzKWXmJEwKBR1Om7 zwgWQlO5NM6xfWj9ED6eGh1iz/sNpShtkdcPHS/Ssa03G206rGxHLfo+JNcmR3COeqW8 N9KX3tJX38E2vi5JXqpJTHwz6/OQxqUW1kP7dpnXIY4kcAhHAQkNuQOmbjZ2n+bpoCPs XZEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701094413; x=1701699213; 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=U9O7jlW2ke1lTOAYgSQUjqDX45LjkP4J1X6mHCR3nQ8=; b=O9SM2aXn43S6YiW9tQS5rc6YWbzgp0HgLdB10NwDF0SB4EFHQbW93jgmuKDNjLWU7A nNUL9VT34SgKFxOk5BQnKzlPLxp1ea/eVouepLkjdWKxfkIhPyDkwswVJkngmFTVhZu8 W9h7HVLr3MZeUHeiJPFiwPHKwjODAuQi1B7jwUd8mf/zX4wSfssKRLTBj7dZEFwoVeZm yS3ki1o6rBu/Z8vHIkXlbBoffpduqNxN2prlcVZ8B+BvXd6OdFn2IzGrhWMCMEACcgl2 yhwvaUyz+VsOUmAxsPN6irzXR1mcLHn4XM1O+5x3xFPudc9APcLJF6tIWaJMGdkFuyFU 707w== X-Gm-Message-State: AOJu0Yxf2RtimdMbP5UClcuCvn1qnj+x/EU0NHn91cp0aW7BnqSnkdhv m4EzQd0Him4MOzAwSZ2Y+VWR975oguiGfA== X-Google-Smtp-Source: AGHT+IHUpefJlm8io5BjsZw06/4eH4Ux24My5p1bmY1fI2IT6oNJBg5n2kcJyvqUuUYk3v2PhpwUiw== X-Received: by 2002:a05:6512:1592:b0:507:ab58:7f7a with SMTP id bp18-20020a056512159200b00507ab587f7amr10227140lfb.10.1701094411951; Mon, 27 Nov 2023 06:13:31 -0800 (PST) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , Andrew Cooper , George Dunlap , Jan Beulich , Wei Liu , Shawn Anastasio , Julien Grall Subject: [PATCH v4 01/14] xen/asm-generic: introduce stub header paging.h Date: Mon, 27 Nov 2023 16:13:14 +0200 Message-ID: <78608aaa8108f1dd56758c098f64534580c54cc3.1701093907.git.oleksii.kurochko@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1701094438751000002 Content-Type: text/plain; charset="utf-8" The patch introduces generic paging.h header for Arm, PPC and RISC-V. All mentioned above architectures use hardware virt extensions and hardware pagetable extensions thereby it makes sense to set paging_mode_translate and paging_mode_external by default. Also in this patch Arm and PPC architectures are switched to generic paging.h header. Signed-off-by: Oleksii Kurochko Reviewed-by: Jan Beulich Acked-by: Julien Grall Acked-by: Shawn Anastasio --- Changes in V4: - Added Acked-by: Julien Grall . --- Changes in V3: - Sort xen/arch/{arm,ppc}/include/asm/Makefile alphabetically. - Add Reviewed-by: Jan Beulich --- Changes in V2: - evaluate argument of macros - covert macros to true - use proper tabs - switch Arm & PPC to generic paging.h - update commit message --- xen/arch/arm/include/asm/Makefile | 1 + xen/arch/arm/include/asm/paging.h | 16 ---------------- xen/arch/ppc/include/asm/Makefile | 1 + xen/arch/ppc/include/asm/paging.h | 7 ------- xen/include/asm-generic/paging.h | 19 +++++++++++++++++++ 5 files changed, 21 insertions(+), 23 deletions(-) delete mode 100644 xen/arch/arm/include/asm/paging.h delete mode 100644 xen/arch/ppc/include/asm/paging.h create mode 100644 xen/include/asm-generic/paging.h diff --git a/xen/arch/arm/include/asm/Makefile b/xen/arch/arm/include/asm/M= akefile index 821addb0bf..ece7fa66dd 100644 --- a/xen/arch/arm/include/asm/Makefile +++ b/xen/arch/arm/include/asm/Makefile @@ -1,2 +1,3 @@ # SPDX-License-Identifier: GPL-2.0-only +generic-y +=3D paging.h generic-y +=3D vm_event.h diff --git a/xen/arch/arm/include/asm/paging.h b/xen/arch/arm/include/asm/p= aging.h deleted file mode 100644 index 6d1a000246..0000000000 --- a/xen/arch/arm/include/asm/paging.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef _XEN_PAGING_H -#define _XEN_PAGING_H - -#define paging_mode_translate(d) (1) -#define paging_mode_external(d) (1) - -#endif /* XEN_PAGING_H */ - -/* - * Local variables: - * mode: C - * c-file-style: "BSD" - * c-basic-offset: 4 - * indent-tabs-mode: nil - * End: - */ diff --git a/xen/arch/ppc/include/asm/Makefile b/xen/arch/ppc/include/asm/M= akefile index 821addb0bf..ece7fa66dd 100644 --- a/xen/arch/ppc/include/asm/Makefile +++ b/xen/arch/ppc/include/asm/Makefile @@ -1,2 +1,3 @@ # SPDX-License-Identifier: GPL-2.0-only +generic-y +=3D paging.h generic-y +=3D vm_event.h diff --git a/xen/arch/ppc/include/asm/paging.h b/xen/arch/ppc/include/asm/p= aging.h deleted file mode 100644 index eccacece29..0000000000 --- a/xen/arch/ppc/include/asm/paging.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef __ASM_PPC_PAGING_H__ -#define __ASM_PPC_PAGING_H__ - -#define paging_mode_translate(d) (1) -#define paging_mode_external(d) (1) - -#endif /* __ASM_PPC_PAGING_H__ */ diff --git a/xen/include/asm-generic/paging.h b/xen/include/asm-generic/pag= ing.h new file mode 100644 index 0000000000..8df534cfdc --- /dev/null +++ b/xen/include/asm-generic/paging.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __ASM_GENERIC_PAGING_H__ +#define __ASM_GENERIC_PAGING_H__ + +#include + +#define paging_mode_translate(d) ((void)(d), true) +#define paging_mode_external(d) ((void)(d), true) + +#endif /* __ASM_GENERIC_PAGING_H__ */ + +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ --=20 2.43.0 From nobody Sat May 18 05:04:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1701094448; cv=none; d=zohomail.com; s=zohoarc; b=DqSnTivb+zWpDy5T1wM+5IsRqZP+5f6tlXW1x5uH9YdlFNelTaLks5zKuXm3IleEcVoapWYgIMYX5PGj1LP8qLHJN/UMEeTX/GQXkLhPl7oHGoxXqmKVBnKvpCbg8Cq/WOBHhhhFbbktuaoppie5PyVSNh9xJciyIa1snu1b/cU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701094448; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Jt+o8yKRJ72jcDErPqmz2xVNbl8BtgwH3tlP5mvg/DI=; b=MVj1DDmyBzwodAsTBM2fJ+EJikoO81gGT8/O944CoL2laJiaKt78BlLABVPbOrl7Q5hfbo884Yaw0rhT8EXdS2NNAn58RPqAR2kJD0Bfv382jD1NW+7beDDjBuQouI9Os+RIYtwBYOD1vA965HHzQJDyNA7rjmoDNYr9xznjIH4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1701094448901450.37140097902784; Mon, 27 Nov 2023 06:14:08 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.642118.1001303 (Exim 4.92) (envelope-from ) id 1r7cMi-0005mO-W9; Mon, 27 Nov 2023 14:13:36 +0000 Received: by outflank-mailman (output) from mailman id 642118.1001303; Mon, 27 Nov 2023 14:13:36 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r7cMi-0005mH-Sz; Mon, 27 Nov 2023 14:13:36 +0000 Received: by outflank-mailman (input) for mailman id 642118; Mon, 27 Nov 2023 14:13:35 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r7cMh-0005XE-77 for xen-devel@lists.xenproject.org; Mon, 27 Nov 2023 14:13:35 +0000 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [2a00:1450:4864:20::134]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 266fc5f8-8d2f-11ee-98e2-6d05b1d4d9a1; Mon, 27 Nov 2023 15:13:34 +0100 (CET) Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-507a98517f3so5768211e87.0 for ; Mon, 27 Nov 2023 06:13:34 -0800 (PST) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id x29-20020ac259dd000000b00507b869b068sm1494100lfn.302.2023.11.27.06.13.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 06:13:33 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 266fc5f8-8d2f-11ee-98e2-6d05b1d4d9a1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701094413; x=1701699213; 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=Jt+o8yKRJ72jcDErPqmz2xVNbl8BtgwH3tlP5mvg/DI=; b=UInkNey0t2j2HiP+r4qP2LTCU2ZkQaIBvN6JzD9wcfMuJqq1tefT5y/so1aCM5j7dv 7TIcc0Gj9DYrbP6Rh5pT9aEt47cmGbL9S2kG0xSxO4AshxQxnR7XOw+bVWzkjxwUo4+1 wRJOl90KwXk/RVAukyW83krhxsAXnK+7tFcWXjKuK3SE08PgocTHxL9b1HHFYmY53OBi Pn0J3AbYnRdMG2wLkZUCN4sdvLGNIAG1s21uKZpj0F9TSC2kFYkkTgV1EmOs73QwxzfW X5qszaQ/kNCK6tsfN6kPwUuaUyi5GG6f7k2NsF4nk9bY93K8lD1fRq68zCzGmxfGPmmg x1KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701094413; x=1701699213; 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=Jt+o8yKRJ72jcDErPqmz2xVNbl8BtgwH3tlP5mvg/DI=; b=Mm7jxPLsbc1rVlpd219xODR05xJrWWEcYEHaq+GXvJsKiDQg/zzBybJw5LFmUArR9m 25Buc+TRax3kwsI6JW+FRtARSH7Lzs4ZTHHkzSKD21gAMYVkxWw8lChQCVzcDk3XzrUo K3HxeqGLiCBsWWC0dfX8bEZCp1b3jWqjVaS+p8QV9IQr+MmbcIyspJVfGHz6ih0CYe+9 lXjGtGpLwUafvC+dFgexsk8ZJ/LqcIqJl3FNpjG6pu2p81mif5B5sMjc3YDUNLqAHn62 EOa3SRdrKqjrRlyoeirTjlmUKSllctKruufSiIKwKD3mDDU/FUlSAF9k4NrxNs/FjvKV hsmw== X-Gm-Message-State: AOJu0YzNeKqzkWRLeqyMHibtZD4YJXHAXIE2R3m9mjxfqdjhW1kVB3MA CGS+W7XnRKkd0/hpNxjucAq8LQ/RYKzsJQ== X-Google-Smtp-Source: AGHT+IGHD+aUwzD82bEStkCkUhNz+16lrAzAm78czHJax++twgbKThhzcrt6DF7kA7uALf5w1+g0jA== X-Received: by 2002:ac2:4acb:0:b0:50b:ac31:28e5 with SMTP id m11-20020ac24acb000000b0050bac3128e5mr3448337lfp.65.1701094413189; Mon, 27 Nov 2023 06:13:33 -0800 (PST) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , Andrew Cooper , George Dunlap , Jan Beulich , Wei Liu , Shawn Anastasio Subject: [PATCH v4 02/14] xen/asm-generic: introduce generic device.h Date: Mon, 27 Nov 2023 16:13:15 +0200 Message-ID: <67172a4fbf88833480203fcb1e2c640b6d39a556.1701093907.git.oleksii.kurochko@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1701094450749000002 Content-Type: text/plain; charset="utf-8" Arm, PPC and RISC-V use the same device.h thereby device.h was moved to asm-generic. Arm's device.h was taken as a base with the following changes: - #ifdef PCI related things. - #ifdef ACPI related things. - Rename #ifdef guards. - Add SPDX tag. - #ifdef CONFIG_HAS_DEVICE_TREE related things. - #ifdef-ing iommu related things with CONFIG_HAS_PASSTHROUGH. Also Arm and PPC are switched to asm-generic version of device.h Signed-off-by: Oleksii Kurochko --- Changes in V4: - Updated the commit message - Switched Arm and PPC to asm-generic version of device.h - Replaced HAS_PCI with CONFIG_HAS_PCI - ifdef-ing iommu filed of dev_archdata struct with CONFIG_HAS_PASSTHROUGH - ifdef-ing iommu_fwspec of device struct with CONFIG_HAS_PASSTHROUGH - ifdef-ing DT related things with CONFIG_HAS_DEVICE_TREE - Updated the commit message ( remove a note with question about if device.h should be in asm-generic or not ) - Replaced DEVICE_IC with DEVICE_INTERRUPT_CONTROLLER - Rationalized usage of CONFIG_HAS_* in device.h - Fixed indents for ACPI_DEVICE_START and ACPI_DEVICE_END --- Changes in V3: - ifdef device tree related things. - update the commit message --- Changes in V2: - take ( as common ) device.h from Arm as PPC and RISC-V use it as a base. - #ifdef PCI related things. - #ifdef ACPI related things. - rename DEVICE_GIC to DEVIC_IC. - rename #ifdef guards. - switch Arm and PPC to generic device.h - add SPDX tag - update the commit message --- xen/arch/arm/device.c | 15 ++- xen/arch/arm/domain_build.c | 2 +- xen/arch/arm/gic-v2.c | 4 +- xen/arch/arm/gic-v3.c | 6 +- xen/arch/arm/gic.c | 4 +- xen/arch/arm/include/asm/Makefile | 1 + xen/arch/ppc/include/asm/Makefile | 1 + xen/arch/ppc/include/asm/device.h | 53 -------- xen/arch/ppc/include/asm/irq.h | 4 + .../asm =3D> include/asm-generic}/device.h | 125 +++++++++++------- xen/include/headers++.chk.new | 0 11 files changed, 106 insertions(+), 109 deletions(-) delete mode 100644 xen/arch/ppc/include/asm/device.h rename xen/{arch/arm/include/asm =3D> include/asm-generic}/device.h (79%) create mode 100644 xen/include/headers++.chk.new diff --git a/xen/arch/arm/device.c b/xen/arch/arm/device.c index 1f631d3274..affbe79f9a 100644 --- a/xen/arch/arm/device.c +++ b/xen/arch/arm/device.c @@ -16,7 +16,10 @@ #include =20 extern const struct device_desc _sdevice[], _edevice[]; + +#ifdef CONFIG_ACPI extern const struct acpi_device_desc _asdevice[], _aedevice[]; +#endif =20 int __init device_init(struct dt_device_node *dev, enum device_class class, const void *data) @@ -45,6 +48,7 @@ int __init device_init(struct dt_device_node *dev, enum d= evice_class class, return -EBADF; } =20 +#ifdef CONFIG_ACPI int __init acpi_device_init(enum device_class class, const void *data, int= class_type) { const struct acpi_device_desc *desc; @@ -61,6 +65,7 @@ int __init acpi_device_init(enum device_class class, cons= t void *data, int class =20 return -EBADF; } +#endif =20 enum device_class device_get_class(const struct dt_device_node *dev) { @@ -329,9 +334,13 @@ int handle_device(struct domain *d, struct dt_device_n= ode *dev, p2m_type_t p2mt, struct map_range_data mr_data =3D { .d =3D d, .p2mt =3D p2mt, - .skip_mapping =3D !own_device || - (is_pci_passthrough_enabled() && - (device_get_class(dev) =3D=3D DEVICE_PCI_HOSTBRIDG= E)), + .skip_mapping =3D + !own_device +#ifdef CONFIG_HAS_PCI + || (is_pci_passthrough_enabled() && + (device_get_class(dev) =3D=3D DEVICE_PCI_HOSTBRIDG= E)) +#endif + , .iomem_ranges =3D iomem_ranges, .irq_ranges =3D irq_ranges }; diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 2dd2926b41..a26cbff68e 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -2361,7 +2361,7 @@ static int __init handle_node(struct domain *d, struc= t kernel_info *kinfo, * Replace these nodes with our own. Note that the original may be * used_by DOMID_XEN so this check comes first. */ - if ( device_get_class(node) =3D=3D DEVICE_GIC ) + if ( device_get_class(node) =3D=3D DEVICE_INTERRUPT_CONTROLLER ) return make_gic_node(d, kinfo->fdt, node); if ( dt_match_node(timer_matches, node) ) return make_timer_node(kinfo); diff --git a/xen/arch/arm/gic-v2.c b/xen/arch/arm/gic-v2.c index cf392bfd1c..5d6885e389 100644 --- a/xen/arch/arm/gic-v2.c +++ b/xen/arch/arm/gic-v2.c @@ -1366,7 +1366,7 @@ static const struct dt_device_match gicv2_dt_match[] = __initconst =3D { /* sentinel */ }, }; =20 -DT_DEVICE_START(gicv2, "GICv2", DEVICE_GIC) +DT_DEVICE_START(gicv2, "GICv2", DEVICE_INTERRUPT_CONTROLLER) .dt_match =3D gicv2_dt_match, .init =3D gicv2_dt_preinit, DT_DEVICE_END @@ -1381,7 +1381,7 @@ static int __init gicv2_acpi_preinit(const void *data) return 0; } =20 -ACPI_DEVICE_START(agicv2, "GICv2", DEVICE_GIC) +ACPI_DEVICE_START(agicv2, "GICv2", DEVICE_INTERRUPT_CONTROLLER) .class_type =3D ACPI_MADT_GIC_VERSION_V2, .init =3D gicv2_acpi_preinit, ACPI_DEVICE_END diff --git a/xen/arch/arm/gic-v3.c b/xen/arch/arm/gic-v3.c index 9b35a8c8a7..d8f9aa0352 100644 --- a/xen/arch/arm/gic-v3.c +++ b/xen/arch/arm/gic-v3.c @@ -1875,7 +1875,7 @@ static const struct dt_device_match gicv3_dt_match[] = __initconst =3D { /* sentinel */ }, }; =20 -DT_DEVICE_START(gicv3, "GICv3", DEVICE_GIC) +DT_DEVICE_START(gicv3, "GICv3", DEVICE_INTERRUPT_CONTROLLER) .dt_match =3D gicv3_dt_match, .init =3D gicv3_dt_preinit, DT_DEVICE_END @@ -1890,12 +1890,12 @@ static int __init gicv3_acpi_preinit(const void *da= ta) return 0; } =20 -ACPI_DEVICE_START(agicv3, "GICv3", DEVICE_GIC) +ACPI_DEVICE_START(agicv3, "GICv3", DEVICE_INTERRUPT_CONTROLLER) .class_type =3D ACPI_MADT_GIC_VERSION_V3, .init =3D gicv3_acpi_preinit, ACPI_DEVICE_END =20 -ACPI_DEVICE_START(agicv4, "GICv4", DEVICE_GIC) +ACPI_DEVICE_START(agicv4, "GICv4", DEVICE_INTERRUPT_CONTROLLER) .class_type =3D ACPI_MADT_GIC_VERSION_V4, .init =3D gicv3_acpi_preinit, ACPI_DEVICE_END diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c index d922ea67aa..b5a9c8266c 100644 --- a/xen/arch/arm/gic.c +++ b/xen/arch/arm/gic.c @@ -234,7 +234,7 @@ static void __init gic_dt_preinit(void) if ( !dt_get_parent(node) ) continue; =20 - rc =3D device_init(node, DEVICE_GIC, NULL); + rc =3D device_init(node, DEVICE_INTERRUPT_CONTROLLER, NULL); if ( !rc ) { /* NOTE: Only one GIC is supported */ @@ -262,7 +262,7 @@ static void __init gic_acpi_preinit(void) =20 dist =3D container_of(header, struct acpi_madt_generic_distributor, he= ader); =20 - if ( acpi_device_init(DEVICE_GIC, NULL, dist->version) ) + if ( acpi_device_init(DEVICE_INTERRUPT_CONTROLLER, NULL, dist->version= ) ) panic("Unable to find compatible GIC in the ACPI table\n"); } #else diff --git a/xen/arch/arm/include/asm/Makefile b/xen/arch/arm/include/asm/M= akefile index ece7fa66dd..df4c1ebb08 100644 --- a/xen/arch/arm/include/asm/Makefile +++ b/xen/arch/arm/include/asm/Makefile @@ -1,3 +1,4 @@ # SPDX-License-Identifier: GPL-2.0-only +generic-y +=3D device.h generic-y +=3D paging.h generic-y +=3D vm_event.h diff --git a/xen/arch/ppc/include/asm/Makefile b/xen/arch/ppc/include/asm/M= akefile index ece7fa66dd..df4c1ebb08 100644 --- a/xen/arch/ppc/include/asm/Makefile +++ b/xen/arch/ppc/include/asm/Makefile @@ -1,3 +1,4 @@ # SPDX-License-Identifier: GPL-2.0-only +generic-y +=3D device.h generic-y +=3D paging.h generic-y +=3D vm_event.h diff --git a/xen/arch/ppc/include/asm/device.h b/xen/arch/ppc/include/asm/d= evice.h deleted file mode 100644 index 8253e61d51..0000000000 --- a/xen/arch/ppc/include/asm/device.h +++ /dev/null @@ -1,53 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ASM_PPC_DEVICE_H__ -#define __ASM_PPC_DEVICE_H__ - -enum device_type -{ - DEV_DT, - DEV_PCI, -}; - -struct device { - enum device_type type; -#ifdef CONFIG_HAS_DEVICE_TREE - struct dt_device_node *of_node; /* Used by drivers imported from Linux= */ -#endif -}; - -enum device_class -{ - DEVICE_SERIAL, - DEVICE_IOMMU, - DEVICE_PCI_HOSTBRIDGE, - /* Use for error */ - DEVICE_UNKNOWN, -}; - -struct device_desc { - /* Device name */ - const char *name; - /* Device class */ - enum device_class class; - /* List of devices supported by this driver */ - const struct dt_device_match *dt_match; - /* - * Device initialization. - * - * -EAGAIN is used to indicate that device probing is deferred. - */ - int (*init)(struct dt_device_node *dev, const void *data); -}; - -typedef struct device device_t; - -#define DT_DEVICE_START(name_, namestr_, class_) \ -static const struct device_desc __dev_desc_##name_ __used \ -__section(".dev.info") =3D { \ - .name =3D namestr_, \ - .class =3D class_, \ - -#define DT_DEVICE_END \ -}; - -#endif /* __ASM_PPC_DEVICE_H__ */ diff --git a/xen/arch/ppc/include/asm/irq.h b/xen/arch/ppc/include/asm/irq.h index 5c37d0cf25..49193fddff 100644 --- a/xen/arch/ppc/include/asm/irq.h +++ b/xen/arch/ppc/include/asm/irq.h @@ -3,7 +3,9 @@ #define __ASM_PPC_IRQ_H__ =20 #include +#ifdef CONFIG_HAS_DEVICE_TREE #include +#endif #include =20 /* TODO */ @@ -25,9 +27,11 @@ static inline void arch_move_irqs(struct vcpu *v) BUG_ON("unimplemented"); } =20 +#ifdef CONFIG_HAS_DEVICE_TREE static inline int platform_get_irq(const struct dt_device_node *device, in= t index) { BUG_ON("unimplemented"); } +#endif =20 #endif /* __ASM_PPC_IRQ_H__ */ diff --git a/xen/arch/arm/include/asm/device.h b/xen/include/asm-generic/de= vice.h similarity index 79% rename from xen/arch/arm/include/asm/device.h rename to xen/include/asm-generic/device.h index b5d451e087..063c448c4e 100644 --- a/xen/arch/arm/include/asm/device.h +++ b/xen/include/asm-generic/device.h @@ -1,14 +1,37 @@ -#ifndef __ASM_ARM_DEVICE_H -#define __ASM_ARM_DEVICE_H +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __ASM_GENERIC_DEVICE_H__ +#define __ASM_GENERIC_DEVICE_H__ + +#include =20 enum device_type { +#ifdef CONFIG_HAS_DEVICE_TREE DEV_DT, +#endif + +#ifdef CONFIG_HAS_PCI DEV_PCI, +#endif + DEV_TYPE_MAX, +}; + +enum device_class +{ + DEVICE_SERIAL, + DEVICE_IOMMU, + DEVICE_INTERRUPT_CONTROLLER, +#ifdef CONFIG_HAS_PCI + DEVICE_PCI_HOSTBRIDGE, +#endif + /* Use for error */ + DEVICE_UNKNOWN, }; =20 struct dev_archdata { +#ifdef CONFIG_HAS_PASSTHROUGH void *iommu; /* IOMMU private data */ +#endif }; =20 /* struct device - The basic device structure */ @@ -19,31 +42,65 @@ struct device struct dt_device_node *of_node; /* Used by drivers imported from Linux= */ #endif struct dev_archdata archdata; +#ifdef CONFIG_HAS_PASSTHROUGH struct iommu_fwspec *iommu_fwspec; /* per-device IOMMU instance data */ +#endif }; =20 typedef struct device device_t; =20 +#ifdef CONFIG_HAS_DEVICE_TREE + #include =20 -#define dev_is_pci(dev) ((dev)->type =3D=3D DEV_PCI) #define dev_is_dt(dev) ((dev)->type =3D=3D DEV_DT) =20 -enum device_class -{ - DEVICE_SERIAL, - DEVICE_IOMMU, - DEVICE_GIC, - DEVICE_PCI_HOSTBRIDGE, - /* Use for error */ - DEVICE_UNKNOWN, +/** + * device_init - Initialize a device + * @dev: device to initialize + * @class: class of the device (serial, network...) + * @data: specific data for initializing the device + * + * Return 0 on success. + */ +int device_init(struct dt_device_node *dev, enum device_class class, + const void *data); + +/** + * device_get_type - Get the type of the device + * @dev: device to match + * + * Return the device type on success or DEVICE_ANY on failure + */ +enum device_class device_get_class(const struct dt_device_node *dev); + +#define DT_DEVICE_START(_name, _namestr, _class) \ +static const struct device_desc __dev_desc_##_name __used \ +__section(".dev.info") =3D { \ + .name =3D _namestr, \ + .class =3D _class, \ + +#define DT_DEVICE_END \ }; =20 +#else /* !CONFIG_HAS_DEVICE_TREE */ +#define dev_is_dt(dev) ((void)(dev), false) +#endif /* CONFIG_HAS_DEVICE_TREE */ + +#ifdef CONFIG_HAS_PCI +#define dev_is_pci(dev) ((dev)->type =3D=3D DEV_PCI) +#else +#define dev_is_pci(dev) ((void)(dev), false) +#endif + struct device_desc { /* Device name */ const char *name; /* Device class */ enum device_class class; + +#ifdef CONFIG_HAS_DEVICE_TREE + /* List of devices supported by this driver */ const struct dt_device_match *dt_match; /* @@ -52,8 +109,12 @@ struct device_desc { * -EAGAIN is used to indicate that device probing is deferred. */ int (*init)(struct dt_device_node *dev, const void *data); + +#endif }; =20 +#ifdef CONFIG_ACPI + struct acpi_device_desc { /* Device name */ const char *name; @@ -75,44 +136,18 @@ struct acpi_device_desc { int acpi_device_init(enum device_class class, const void *data, int class_type); =20 -/** - * device_init - Initialize a device - * @dev: device to initialize - * @class: class of the device (serial, network...) - * @data: specific data for initializing the device - * - * Return 0 on success. - */ -int device_init(struct dt_device_node *dev, enum device_class class, - const void *data); - -/** - * device_get_type - Get the type of the device - * @dev: device to match - * - * Return the device type on success or DEVICE_ANY on failure - */ -enum device_class device_get_class(const struct dt_device_node *dev); +#define ACPI_DEVICE_START(_name, _namestr, _class) \ +static const struct acpi_device_desc __dev_desc_##_name __used \ +__section(".adev.info") =3D { \ + .name =3D _namestr, \ + .class =3D _class, \ =20 -#define DT_DEVICE_START(_name, _namestr, _class) \ -static const struct device_desc __dev_desc_##_name __used \ -__section(".dev.info") =3D { \ - .name =3D _namestr, \ - .class =3D _class, \ - -#define DT_DEVICE_END \ +#define ACPI_DEVICE_END \ }; =20 -#define ACPI_DEVICE_START(_name, _namestr, _class) \ -static const struct acpi_device_desc __dev_desc_##_name __used \ -__section(".adev.info") =3D { \ - .name =3D _namestr, \ - .class =3D _class, \ - -#define ACPI_DEVICE_END \ -}; +#endif /* CONFIG_ACPI */ =20 -#endif /* __ASM_ARM_DEVICE_H */ +#endif /* __ASM_GENERIC_DEVICE_H__ */ =20 /* * Local variables: diff --git a/xen/include/headers++.chk.new b/xen/include/headers++.chk.new new file mode 100644 index 0000000000..e69de29bb2 --=20 2.43.0 From nobody Sat May 18 05:04:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1701094446; cv=none; d=zohomail.com; s=zohoarc; b=Gjcg0FLwM+i+ORrqHxEqM3bT5lQuLZlO5dNnVhlqCuRqwMWQWoVQ632vcKJw3aJavscW+H6ARq40wDLJx6xF60zJtBhL9YBY6t683w4NOqbDfFJWgp+/7rU7s7MW6PaaN8IPQyttrQmvL/PChDPjWUS0dGH9LzD2fBJeU8j3xdc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701094446; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=w5JXuiZ7y/GlkK062RV6dkVhWvGbS3m7ws90DCrxh6U=; b=BSYv7LfKwGt5BnzgfQMT6uubzuMlRTneSfii4vwwXRr0CmGnCm69ioxXyZri4uSMF/bfjhbnFLDI3m8cKlSIHeD9c9wMKLYjJXNmh+uicGx5Svny5gsJioPKha2nrZ7TmcuE1cZ3/i45UWCPsZzchjODCvcVQJsLZHAOZVrY7BA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1701094446422869.7937233981974; Mon, 27 Nov 2023 06:14:06 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.642120.1001322 (Exim 4.92) (envelope-from ) id 1r7cMk-0006Gt-L9; Mon, 27 Nov 2023 14:13:38 +0000 Received: by outflank-mailman (output) from mailman id 642120.1001322; Mon, 27 Nov 2023 14:13:38 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r7cMk-0006Gh-IN; Mon, 27 Nov 2023 14:13:38 +0000 Received: by outflank-mailman (input) for mailman id 642120; Mon, 27 Nov 2023 14:13:37 +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 1r7cMj-0005in-2c for xen-devel@lists.xenproject.org; Mon, 27 Nov 2023 14:13:37 +0000 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [2a00:1450:4864:20::130]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 27126976-8d2f-11ee-9b0e-b553b5be7939; Mon, 27 Nov 2023 15:13:35 +0100 (CET) Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-50aabfa1b75so6013173e87.3 for ; Mon, 27 Nov 2023 06:13:35 -0800 (PST) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id x29-20020ac259dd000000b00507b869b068sm1494100lfn.302.2023.11.27.06.13.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 06:13:33 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 27126976-8d2f-11ee-9b0e-b553b5be7939 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701094414; x=1701699214; 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=w5JXuiZ7y/GlkK062RV6dkVhWvGbS3m7ws90DCrxh6U=; b=DN5mpgKDXUujobLQXmeWg1w8cIxwqnuz/Zhx+zWWO2QmELfX5qg4HLLCvQ8dVZ3w7n ArZKxk1K5slEQ3reYoAKjZkqtoPxAUJOFeK6PimUwe/ZhK0J6l1gk/SNJ4fufP8g5Imn PcN1tttLToH3ha6ZJYgzezMuE+dJL/54nx2qxQfyR7R79GqEjXoU8FpeJhfF15QhAnDr pyXKCBPBIS41HaXEhD6fWRo3lDgJMjS02u6LWGq+w5dl03cBi+w46n/61RIwoP1V1Z5S DY++1VcImZmS3ypkD+13gkLgDL/8H4ksRnt+x5OT49G7gRgakDhcK/5cut+2h0JPSbSS eQTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701094414; x=1701699214; 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=w5JXuiZ7y/GlkK062RV6dkVhWvGbS3m7ws90DCrxh6U=; b=sr9rBIEdDwLqMyn5x9mXrkcNz9qhRiDQ3eS9Ki3Q7etQMzIqIb8UTrOmSR1TUS7EOh ZotdEDKo6uSTu2Iq4lnF8QUAZsutecjLcqbmATENb9yvwlxSAjPBXkC+YDAvVkQa7ZS2 v+lf0ZgQL1HXYQyGQDvirmjPU82DDu8XKCLjjrJcQeK5tRuCbU8++zVB/EgJdVhoVSSY 06MCMKFcccl7C/JyCAOP5OepnkX9HtgI8NVKEcy1rYFDhoNPem+XYEUjyeLFphxPhoqG zSbQucUDpoJUd1OPRhItTKhB5t6kUYodn/vRMU/7j946igK8rZkRzRYrdDiwkg/+MMpu JUvg== X-Gm-Message-State: AOJu0YwOWdvh8MGSaIjn1D/zTcfjaUWGh40NxcD8qjiLoFMQCcY6XR0E xzj5tEWOedopnDHjpSJ06LdCpP67lphP6g== X-Google-Smtp-Source: AGHT+IEatNVdXmW8IqzjIx2tCSu+qukrkKZOFVdAtYZechh5EkESLflZ4iddO6h3vLURycoMFC3xFg== X-Received: by 2002:a05:6512:14f:b0:50b:a75f:c7 with SMTP id m15-20020a056512014f00b0050ba75f00c7mr5490792lfo.57.1701094414107; Mon, 27 Nov 2023 06:13:34 -0800 (PST) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Shawn Anastasio , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [PATCH v4 03/14] xen/asm-generic: introduce generic hypercall.h Date: Mon, 27 Nov 2023 16:13:16 +0200 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1701094446747000001 Content-Type: text/plain; charset="utf-8" Introduce an empty generic hypercall.h for archs which don't implement it. Drop PPC's hypercall.h and switch to generic one instead. Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich Acked-by: Shawn Anastasio --- Changes in V4: - Nothing changed. Only rebase. --- Changes in V3: - Drop PPC's hypercall.h and switch to generic one. - Update the commit message - Add Acked-by: Jan Beulich --- Changes in V2: - add check that isn't included directly. --- xen/arch/ppc/include/asm/Makefile | 1 + xen/arch/ppc/include/asm/hypercall.h | 5 ----- xen/include/asm-generic/hypercall.h | 18 ++++++++++++++++++ 3 files changed, 19 insertions(+), 5 deletions(-) delete mode 100644 xen/arch/ppc/include/asm/hypercall.h create mode 100644 xen/include/asm-generic/hypercall.h diff --git a/xen/arch/ppc/include/asm/Makefile b/xen/arch/ppc/include/asm/M= akefile index df4c1ebb08..d5e369128c 100644 --- a/xen/arch/ppc/include/asm/Makefile +++ b/xen/arch/ppc/include/asm/Makefile @@ -1,4 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-only generic-y +=3D device.h +generic-y +=3D hypercall.h generic-y +=3D paging.h generic-y +=3D vm_event.h diff --git a/xen/arch/ppc/include/asm/hypercall.h b/xen/arch/ppc/include/as= m/hypercall.h deleted file mode 100644 index 1e8ca0ce9c..0000000000 --- a/xen/arch/ppc/include/asm/hypercall.h +++ /dev/null @@ -1,5 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ASM_PPC_HYPERCALL_H__ -#define __ASM_PPC_HYPERCALL_H__ - -#endif /* __ASM_PPC_HYPERCALL_H__ */ diff --git a/xen/include/asm-generic/hypercall.h b/xen/include/asm-generic/= hypercall.h new file mode 100644 index 0000000000..7743b35c0d --- /dev/null +++ b/xen/include/asm-generic/hypercall.h @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __XEN_HYPERCALL_H__ +#error "asm/hypercall.h should not be included directly - include xen/hype= rcall.h instead" +#endif + +#ifndef __ASM_GENERIC_HYPERCALL_H__ +#define __ASM_GENERIC_HYPERCALL_H__ + +#endif /* __ASM_GENERIC_HYPERCALL_H__ */ + +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ --=20 2.43.0 From nobody Sat May 18 05:04:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1701094438; cv=none; d=zohomail.com; s=zohoarc; b=KB3LsD+bewa6kHwS4vXuBtMbxpVUUAudt3vTWx89ezwR1HecAfKuw5jyeI34yo0cqXIvdE08Auiv94Be0LS0ZXslJwSYNvHqnMY+kjAnh/frt8UkzN983oDkAxg4W9kCFPSgHulpJatf/mblARsp+Y+9r1ErDDZ4cGWEcu7ea8w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701094438; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=LTGEtmZyvJYSvDBCU/Joet0728F83MeKuS2cE8UNmxw=; b=RjsY3H4QERt7Sl/i2QBW+rkwn6rWw0WPwG1KYxSQaf3lojVf+d6rHRew8AtPGRd6FAAB7ixCM4zq+omj0LhEuMYzHjTzAfR7TM8S49WqYJq75NcKueUE+aYCac1hafZTVG0hddk3Ef9dg+vsKksloJYlVv6I/PZLtOaWf8UX8Kw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1701094438061860.1617266114714; Mon, 27 Nov 2023 06:13:58 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.642121.1001333 (Exim 4.92) (envelope-from ) id 1r7cMl-0006YN-SH; Mon, 27 Nov 2023 14:13:39 +0000 Received: by outflank-mailman (output) from mailman id 642121.1001333; Mon, 27 Nov 2023 14:13:39 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r7cMl-0006YD-PX; Mon, 27 Nov 2023 14:13:39 +0000 Received: by outflank-mailman (input) for mailman id 642121; Mon, 27 Nov 2023 14:13:38 +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 1r7cMk-0005in-CT for xen-devel@lists.xenproject.org; Mon, 27 Nov 2023 14:13:38 +0000 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [2a00:1450:4864:20::135]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 27d2a50a-8d2f-11ee-9b0e-b553b5be7939; Mon, 27 Nov 2023 15:13:36 +0100 (CET) Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-507a98517f3so5768285e87.0 for ; Mon, 27 Nov 2023 06:13:36 -0800 (PST) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id x29-20020ac259dd000000b00507b869b068sm1494100lfn.302.2023.11.27.06.13.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 06:13:34 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 27d2a50a-8d2f-11ee-9b0e-b553b5be7939 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701094416; x=1701699216; 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=LTGEtmZyvJYSvDBCU/Joet0728F83MeKuS2cE8UNmxw=; b=UJ+uN8vD88p81E8jSqmhNPkEeuArZG9A9wu55lFNpEC/FDw82h6tnxVrRNsOeMYfTO eck3KMyZi9bMvSI5QVCOJxolL2eXwxQY6R44ik1cuFyLHmu74NMBoiDLoU0CycszP03V kQYyR8OW8+6H7gnqCdRp43mR+MIIX4EauYXQ5p1GNVtXMqMVqFrnNG+vdWkkGQEGiKDW qxVwDknKC48AubDvUf78XbHeLsishQtD5uh3BP8yzVXTzjUbnYVFF3CNpRGuwKm6twMg 4MADulmooYPmqo2NCObQP26Y7/q4JwCSLHVcPNW3gSn+jOhaQpQjumclAQ3OX1AwInsx XVEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701094416; x=1701699216; 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=LTGEtmZyvJYSvDBCU/Joet0728F83MeKuS2cE8UNmxw=; b=k8U7w0tHwKjGFthK+A8uOaMxftcrGUxmG3frZEwHT/61GwIa62GeTFuOOhnB4k9rnh J7GrxApAElwo8DUby9/WDRfhZZrQHeql7BCer18HUTLMLZ/1BeLWcQnWyWPOhOl29T2q rYCuOaF/pCyPBNq8o9C8c6iGx/1cdVX/FBIjJAbSu72Umi198tu6al7ooiW9wBbpwU/t ncv8/ZgPP/kjOMmfBcRZTzAQP/6ITJDXC3ka84Tjg/k9byy4jFl4brTQDTluT9hNXgGr OUADBdDv0L/t/HJbhGRY/SvP/H3sey+s6pof7JezemBSlyf2H8TBqrXYI/IM9khXrtc8 LzuQ== X-Gm-Message-State: AOJu0YwnGWSEgxHadaKqEn6fKwAcMjuJ+k53vfq6RdBcY8AJxpSI1vA1 aWO2btpbyaphvt5YOCqaUKo57m0ABE6vwQ== X-Google-Smtp-Source: AGHT+IGSEcW61mTUe4cUfkt2cJXqcXPCENoYhknpst/CAwEbU39mNrs0P0CCsyJ1SDaFNznvLWyAiw== X-Received: by 2002:a05:6512:ea0:b0:503:1b83:e352 with SMTP id bi32-20020a0565120ea000b005031b83e352mr9955172lfb.52.1701094415582; Mon, 27 Nov 2023 06:13:35 -0800 (PST) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , Andrew Cooper , George Dunlap , Jan Beulich , Wei Liu , Shawn Anastasio , Julien Grall Subject: [PATCH v4 04/14] xen/asm-generic: introduce generic header iocap.h Date: Mon, 27 Nov 2023 16:13:17 +0200 Message-ID: <855ac4ea4061fac36f24dc8b9125349c2074e1dc.1701093907.git.oleksii.kurochko@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1701094438743000001 Content-Type: text/plain; charset="utf-8" iocap.h is common for Arm, PPC and RISC-V architectures thereby it was moved to asm-generic. Also Arm and PPC were switched to asm-generic version of iocap.h. Signed-off-by: Oleksii Kurochko Reviewed-by: Jan Beulich Acked-by: Julien Grall Acked-by: Shawn Anastasio --- Changes in V4: - Added Reviewed-by: Jan Beulich - Acked-by: Julien Grall --- Changes in V3: - Drop Arm and PPC's iocap.h and switch to asm-generic's version. - Update the commit message. --- Changes in V2: - update the commit message --- xen/arch/arm/include/asm/Makefile | 1 + xen/arch/ppc/include/asm/Makefile | 1 + xen/arch/ppc/include/asm/iocap.h | 8 -------- xen/{arch/arm/include/asm =3D> include/asm-generic}/iocap.h | 7 ++++--- 4 files changed, 6 insertions(+), 11 deletions(-) delete mode 100644 xen/arch/ppc/include/asm/iocap.h rename xen/{arch/arm/include/asm =3D> include/asm-generic}/iocap.h (60%) diff --git a/xen/arch/arm/include/asm/Makefile b/xen/arch/arm/include/asm/M= akefile index df4c1ebb08..2d036045e8 100644 --- a/xen/arch/arm/include/asm/Makefile +++ b/xen/arch/arm/include/asm/Makefile @@ -1,4 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-only generic-y +=3D device.h +generic-y +=3D iocap.h generic-y +=3D paging.h generic-y +=3D vm_event.h diff --git a/xen/arch/ppc/include/asm/Makefile b/xen/arch/ppc/include/asm/M= akefile index d5e369128c..209c3e74d8 100644 --- a/xen/arch/ppc/include/asm/Makefile +++ b/xen/arch/ppc/include/asm/Makefile @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only generic-y +=3D device.h generic-y +=3D hypercall.h +generic-y +=3D iocap.h generic-y +=3D paging.h generic-y +=3D vm_event.h diff --git a/xen/arch/ppc/include/asm/iocap.h b/xen/arch/ppc/include/asm/io= cap.h deleted file mode 100644 index 76bf13a70f..0000000000 --- a/xen/arch/ppc/include/asm/iocap.h +++ /dev/null @@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ASM_PPC_IOCAP_H__ -#define __ASM_PPC_IOCAP_H__ - -#define cache_flush_permitted(d) \ - (!rangeset_is_empty((d)->iomem_caps)) - -#endif /* __ASM_PPC_IOCAP_H__ */ diff --git a/xen/arch/arm/include/asm/iocap.h b/xen/include/asm-generic/ioc= ap.h similarity index 60% rename from xen/arch/arm/include/asm/iocap.h rename to xen/include/asm-generic/iocap.h index 276fefbc59..dd7cb45488 100644 --- a/xen/arch/arm/include/asm/iocap.h +++ b/xen/include/asm-generic/iocap.h @@ -1,10 +1,11 @@ -#ifndef __X86_IOCAP_H__ -#define __X86_IOCAP_H__ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __ASM_GENERIC_IOCAP_H__ +#define __ASM_GENERIC_IOCAP_H__ =20 #define cache_flush_permitted(d) \ (!rangeset_is_empty((d)->iomem_caps)) =20 -#endif +#endif /* __ASM_GENERIC_IOCAP_H__ */ =20 /* * Local variables: --=20 2.43.0 From nobody Sat May 18 05:04:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1701094454; cv=none; d=zohomail.com; s=zohoarc; b=EQWDEyDmH9G2o8VIPOwpZMNKQGiAE9ZqmNWOoLxCjzrxlKTYkResg5tQxjHYInIrdyAEOrwa0taO8jJKcuW3dm59GMwfh2Ctq4Zl3FqgznNaRk+IuyaqUXJixtf4xFU1jM1Nz/2M8U0U7FLEpgrW81MU/mAKMs8z/a2PMvlSf1I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701094454; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=iArxO5Q+e25GnaSqlqRKwaYLFQZh1QQBQsbgx4QCxvE=; b=GSL+JsV3QTB1ZwR3X7ZiAYMChHBd/MVHey0NwuSJQElaTeTn7XmdSZP78meOuA4tX1dNri1LeLd2x1UyHCjhIKh4XgPDP+UjgiPmx77zcVkoMCcNrczlgAnMWmS/1QC3NgPPEAlOczD4pgyidNyZbEe8RM6mHGL7QdeKapKEOgo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1701094454270107.29119808334463; Mon, 27 Nov 2023 06:14:14 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.642122.1001343 (Exim 4.92) (envelope-from ) id 1r7cMo-0006rh-53; Mon, 27 Nov 2023 14:13:42 +0000 Received: by outflank-mailman (output) from mailman id 642122.1001343; Mon, 27 Nov 2023 14:13:42 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r7cMo-0006rV-16; Mon, 27 Nov 2023 14:13:42 +0000 Received: by outflank-mailman (input) for mailman id 642122; Mon, 27 Nov 2023 14:13:40 +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 1r7cMm-0005in-6D for xen-devel@lists.xenproject.org; Mon, 27 Nov 2023 14:13:40 +0000 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [2a00:1450:4864:20::131]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 28df9258-8d2f-11ee-9b0e-b553b5be7939; Mon, 27 Nov 2023 15:13:38 +0100 (CET) Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-5079f6efd64so5736092e87.2 for ; Mon, 27 Nov 2023 06:13:38 -0800 (PST) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id x29-20020ac259dd000000b00507b869b068sm1494100lfn.302.2023.11.27.06.13.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 06:13:36 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 28df9258-8d2f-11ee-9b0e-b553b5be7939 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701094418; x=1701699218; 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=iArxO5Q+e25GnaSqlqRKwaYLFQZh1QQBQsbgx4QCxvE=; b=TkmFCuPjvERm7zHhMnga0i795JMPzF7IIStd5uFrO7ZADZCp39Inug7UntDP43ZSf4 gA46TGCJv08GoXpErmK9Nc7B0LaANBHIq6jVxSD8oLrYc3Z8zMXRkUpA0x5QZUwI17CF +LfZdprFZlnszzMJ0hb2I8oVHqCCuKSDljyVJioU6fh6p8n2n7ztnUthQKaMseP+8rkY NaTyi17UhJi8BctdiSoSXYMQuhYtuYrT+ugmvKPCR0wYPJs2JQj+NzFkxTkseOwFsePz /oEe66tFrlxmKgU26nKsFGxSlDeenMp/FlgOa17Osfs18yIcyfO4n6L6/do+Dqne1FMb et3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701094418; x=1701699218; 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=iArxO5Q+e25GnaSqlqRKwaYLFQZh1QQBQsbgx4QCxvE=; b=n58Lsq9aFhvAUJLFxxFDF8O/yiAeiOQMQv0uI7TdXuTbPHLxPEQFRKWO66srFjw8qM bKk7Hp9NuevIqYJX4q+7pKmGgT8183GWqIdMM++RsUiFELKV/NBMxQHnQLcGcQskallE zETGm5fuMQA/LSy2chZyxAq+RncDJ8J5/0K4VbUM6lOzs2odLnBsLe+R+CzvmUdkKJC4 z2qCEOSQzCO6zvVjlrDRmRY1O3Ltdmh4PcNsYFLEY6MkdnVBxawTjWRQWJ1ZTx6dXTmq LarH5grPlA0I17WYfuauBGRIHY9QKNzLbuSqhVVjqrSwQaXsmminUMdJIdQN2CIsPQm5 wddQ== X-Gm-Message-State: AOJu0YynBQ23iEuL/ki5pERcQVbxFiW8uKD2bC+VQLV9hz/XiwJMPRi9 qqjgv3beL63UT19YPV5xPQpoaZwB+oCa6g== X-Google-Smtp-Source: AGHT+IH/exedbxyFOf3LS6xovtduxEpwge7jrCOrzVMj28WIz07/xbb24ot6oHAdSP2YExPkcHhwPA== X-Received: by 2002:ac2:456a:0:b0:507:a0d6:f178 with SMTP id k10-20020ac2456a000000b00507a0d6f178mr7027439lfm.35.1701094417655; Mon, 27 Nov 2023 06:13:37 -0800 (PST) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , Andrew Cooper , George Dunlap , Jan Beulich , Wei Liu , Shawn Anastasio , Julien Grall Subject: [PATCH v4 05/14] xen/asm-generic: introduce stub header Date: Mon, 27 Nov 2023 16:13:18 +0200 Message-ID: <6025959eee0b7c140b97a7866c6c762e74eee1a7.1701093907.git.oleksii.kurochko@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1701094454725000002 Content-Type: text/plain; charset="utf-8" is common for Arm, PPC and RISC-V thereby it is moved to asm-generic. Signed-off-by: Oleksii Kurochko Reviewed-by: Jan Beulich Acked-by: Julien Grall Acked-by: Shawn Anastasio --- Changes in V4: - Added Reviewed-by: Jan Beulich - Added Acked-by: Julien Grall --- Changes in V3: - Drop Arm and PPC's random.h and switch to asm-generic verison. --- Changes in V2: - update the commit messages --- xen/arch/arm/include/asm/Makefile | 1 + xen/arch/arm/include/asm/random.h | 9 --------- xen/arch/ppc/include/asm/Makefile | 1 + xen/arch/ppc/include/asm/random.h | 9 --------- xen/include/asm-generic/random.h | 19 +++++++++++++++++++ 5 files changed, 21 insertions(+), 18 deletions(-) delete mode 100644 xen/arch/arm/include/asm/random.h delete mode 100644 xen/arch/ppc/include/asm/random.h create mode 100644 xen/include/asm-generic/random.h diff --git a/xen/arch/arm/include/asm/Makefile b/xen/arch/arm/include/asm/M= akefile index 2d036045e8..7593c4e8ee 100644 --- a/xen/arch/arm/include/asm/Makefile +++ b/xen/arch/arm/include/asm/Makefile @@ -2,4 +2,5 @@ generic-y +=3D device.h generic-y +=3D iocap.h generic-y +=3D paging.h +generic-y +=3D random.h generic-y +=3D vm_event.h diff --git a/xen/arch/arm/include/asm/random.h b/xen/arch/arm/include/asm/r= andom.h deleted file mode 100644 index b4acee276b..0000000000 --- a/xen/arch/arm/include/asm/random.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef __ASM_RANDOM_H__ -#define __ASM_RANDOM_H__ - -static inline unsigned int arch_get_random(void) -{ - return 0; -} - -#endif /* __ASM_RANDOM_H__ */ diff --git a/xen/arch/ppc/include/asm/Makefile b/xen/arch/ppc/include/asm/M= akefile index 209c3e74d8..039b0eb5ee 100644 --- a/xen/arch/ppc/include/asm/Makefile +++ b/xen/arch/ppc/include/asm/Makefile @@ -3,4 +3,5 @@ generic-y +=3D device.h generic-y +=3D hypercall.h generic-y +=3D iocap.h generic-y +=3D paging.h +generic-y +=3D random.h generic-y +=3D vm_event.h diff --git a/xen/arch/ppc/include/asm/random.h b/xen/arch/ppc/include/asm/r= andom.h deleted file mode 100644 index 2f9e9bbae4..0000000000 --- a/xen/arch/ppc/include/asm/random.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef __ASM_PPC_RANDOM_H__ -#define __ASM_PPC_RANDOM_H__ - -static inline unsigned int arch_get_random(void) -{ - return 0; -} - -#endif /* __ASM_PPC_RANDOM_H__ */ diff --git a/xen/include/asm-generic/random.h b/xen/include/asm-generic/ran= dom.h new file mode 100644 index 0000000000..d0d35dd217 --- /dev/null +++ b/xen/include/asm-generic/random.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __ASM_GENERIC_RANDOM_H__ +#define __ASM_GENERIC_RANDOM_H__ + +static inline unsigned int arch_get_random(void) +{ + return 0; +} + +#endif /* __ASM_GENERIC_RANDOM_H__ */ + +/* + * Local variables: + * mode: C + * c-file-style: BSD + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ --=20 2.43.0 From nobody Sat May 18 05:04:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1701094453; cv=none; d=zohomail.com; s=zohoarc; b=H8J8VpjxmR8Aul361B8HXP72XKTcpfule83hbKARvbVfzi1WXQ1EWZadfYVC94aEusOJbRl9/vPSNi0SXloYLQx6ygLI6kk+cLzsh4dBp92tYh40Wss+FiuvfmhRRMPVkBZ3uospDDlEuhbq/UB8tPjGpI/dsE9N/gGXq3LJ9bQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701094453; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=JqLH1UtY7OVGSY4DIQ1ECGjJMVg4yHMMQVT4k4W5848=; b=St60PP2XDP10t/OZPMA2aEr6rZSAE+WWYE72giXrb+Wsczl4TD0Kj17g9teyFX+cgtnB3ycfTeyhSrAack5RIdtnVuEkKSIMaCbTxsL0DxSlBCyoOAaTaFWoOYWUc6bCwZmAPUssIbLO5YoLCNsJZdC24486cQ8HOgdBZbggnhA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1701094453048903.7821870187549; Mon, 27 Nov 2023 06:14:13 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.642123.1001350 (Exim 4.92) (envelope-from ) id 1r7cMo-0006vZ-Jd; Mon, 27 Nov 2023 14:13:42 +0000 Received: by outflank-mailman (output) from mailman id 642123.1001350; Mon, 27 Nov 2023 14:13:42 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r7cMo-0006ts-9J; Mon, 27 Nov 2023 14:13:42 +0000 Received: by outflank-mailman (input) for mailman id 642123; Mon, 27 Nov 2023 14:13:40 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r7cMm-0005XE-81 for xen-devel@lists.xenproject.org; Mon, 27 Nov 2023 14:13:40 +0000 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [2a00:1450:4864:20::12c]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 29874509-8d2f-11ee-98e2-6d05b1d4d9a1; Mon, 27 Nov 2023 15:13:39 +0100 (CET) Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-507a29c7eefso5569503e87.1 for ; Mon, 27 Nov 2023 06:13:39 -0800 (PST) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id x29-20020ac259dd000000b00507b869b068sm1494100lfn.302.2023.11.27.06.13.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 06:13:38 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 29874509-8d2f-11ee-98e2-6d05b1d4d9a1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701094419; x=1701699219; 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=JqLH1UtY7OVGSY4DIQ1ECGjJMVg4yHMMQVT4k4W5848=; b=gGGKqnGsWmSHKtYDArtm9ssTIfzF+zJDz1J+PdMiKT2ZES3W+DKCSo4ESt6eoLqeel +52bvii0ZGz7iawiJ5kJtHWHAfWA+vfc9fjmxSnsDmmvk6HkB7LkNCV2NU6GkS0uEXbo Vp9w2hx+1iTsSXrKTTQVlb4ROK5ZfrJuoBqXn+gd0clg+C/ENTXd3GhkgiuM1ae4wsGb YE7rQUIEmqhZnzKRM7mqqcixMtwau/Np+LY61GQu6Pvqm2aaNzuP+3BdtS6JMnUbsk+4 x2Zxt/Jg1LkiT45HzgbYRGBJG3twTuUXF5W+nWjLeT+omeZaWL9M1f6KyHqhIQS7fCs8 YUFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701094419; x=1701699219; 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=JqLH1UtY7OVGSY4DIQ1ECGjJMVg4yHMMQVT4k4W5848=; b=gcBlphJHt9BkzgapbEovPUfL2fA/z3s8NuYn7QX5Fd1A0d7WF6qcpGfDUmzqQdXmvO Tq5sxndkgL2o53ZRdgVi3B2j8+6iV5gRdGktjScRLEnE7qCExCAq1Y4VfohG/xCnJRKY /SQrC1HAI0R2UCyC90q0a8a3OD5/+jSajf18faw/FoWFkn0Vg1YKPFO1QntibojzMqBe uh4t51iaLs2MkU5jv61vo4fSjCB13bALo8WkJqmZUzpTEatRESFU3FamOFC6+HIvdZ3U SG/hplVDUrQt+cHTChRuTVvBlE/+EAPIR89zIdjrw7NCRnPnVZmG92EVGbek26CyhAfM UEBA== X-Gm-Message-State: AOJu0Yzp/hQ2/KjiMJ070gIRa0OAzRDZ6qCH950clsmaTa61R4KrQRkC uBSBGHPrFoGtTWUERz8MYkH/ACvO99w3+w== X-Google-Smtp-Source: AGHT+IHt0FhUols5qxnlTvCt3Dy6pOvBwfZVdzrK9weVqGSEmrZ9XIK7fddDee0n8ARFW8Hd1UItQg== X-Received: by 2002:a05:6512:3c91:b0:502:fdca:2eaa with SMTP id h17-20020a0565123c9100b00502fdca2eaamr6205170lfv.52.1701094418591; Mon, 27 Nov 2023 06:13:38 -0800 (PST) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , Andrew Cooper , George Dunlap , Jan Beulich , Wei Liu , Shawn Anastasio , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Julien Grall Subject: [PATCH v4 06/14] xen/asm-generic: introduce generic header percpu.h Date: Mon, 27 Nov 2023 16:13:19 +0200 Message-ID: <7f10cbda3885a91e108e1a303fe74ffc21d1025c.1701093907.git.oleksii.kurochko@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1701094454751000004 Content-Type: text/plain; charset="utf-8" The patch introduces generic percpu.h which was based on Arm's version with the following changes: * makes __per_cpu_data_end[] constant * introduce get_per_cpu_offset() for macros this_cpu() and this_cpu_ptr() * add inclustion of as get_per_cpu_offset() is located the= re. Also it was changed a place where is included in because asm-generic version of percpu.h started to include = which requires definition of DECLARE_PER_CPU. As well the patch switches Arm, PPC and x86 architectures to use asm-generic version of percpu.h. Signed-off-by: Oleksii Kurochko Acked-by: Julien Grall Acked-by: Shawn Anastasio Reviewed-by: Jan Beulich --- Changes in V4: - Added FIXME comment in ppc/current.h for get_per_cpu_offset() - Added Acked-by: Julien Grall . --- Changes in V3: - switch all architectures to asm-generic version of percpu.h - introduce get_per_cpu_offset() and implement it architectures. - make __per_cpu_data_end constamt. - update the commit message. --- Changes in V2: - use smp_processor_id() instead of get_processor_id(). - update commit message . --- xen/arch/arm/include/asm/Makefile | 1 + xen/arch/arm/include/asm/current.h | 3 +++ xen/arch/ppc/include/asm/Makefile | 1 + xen/arch/ppc/include/asm/current.h | 6 +++++ xen/arch/ppc/include/asm/percpu.h | 24 ------------------- xen/arch/x86/include/asm/Makefile | 2 ++ xen/arch/x86/include/asm/current.h | 2 ++ xen/arch/x86/include/asm/percpu.h | 22 ----------------- .../asm =3D> include/asm-generic}/percpu.h | 18 ++++++++------ xen/include/xen/percpu.h | 4 ++-- 10 files changed, 28 insertions(+), 55 deletions(-) delete mode 100644 xen/arch/ppc/include/asm/percpu.h create mode 100644 xen/arch/x86/include/asm/Makefile delete mode 100644 xen/arch/x86/include/asm/percpu.h rename xen/{arch/arm/include/asm =3D> include/asm-generic}/percpu.h (57%) diff --git a/xen/arch/arm/include/asm/Makefile b/xen/arch/arm/include/asm/M= akefile index 7593c4e8ee..60bb78fc09 100644 --- a/xen/arch/arm/include/asm/Makefile +++ b/xen/arch/arm/include/asm/Makefile @@ -2,5 +2,6 @@ generic-y +=3D device.h generic-y +=3D iocap.h generic-y +=3D paging.h +generic-y +=3D percpu.h generic-y +=3D random.h generic-y +=3D vm_event.h diff --git a/xen/arch/arm/include/asm/current.h b/xen/arch/arm/include/asm/= current.h index 51d1c8efa8..0be7ad6ef9 100644 --- a/xen/arch/arm/include/asm/current.h +++ b/xen/arch/arm/include/asm/current.h @@ -5,6 +5,7 @@ #include =20 #include +#include =20 /* Tell whether the guest vCPU enabled Workaround 2 (i.e variant 4) */ #define CPUINFO_WORKAROUND_2_FLAG_SHIFT 0 @@ -60,6 +61,8 @@ do { \ this_cpu(cpu_id) =3D (id); \ } while ( 0 ) =20 +#define get_per_cpu_offset() READ_SYSREG(TPIDR_EL2) + #endif =20 #endif /* __ARM_CURRENT_H__ */ diff --git a/xen/arch/ppc/include/asm/Makefile b/xen/arch/ppc/include/asm/M= akefile index 039b0eb5ee..edef0fab78 100644 --- a/xen/arch/ppc/include/asm/Makefile +++ b/xen/arch/ppc/include/asm/Makefile @@ -3,5 +3,6 @@ generic-y +=3D device.h generic-y +=3D hypercall.h generic-y +=3D iocap.h generic-y +=3D paging.h +generic-y +=3D percpu.h generic-y +=3D random.h generic-y +=3D vm_event.h diff --git a/xen/arch/ppc/include/asm/current.h b/xen/arch/ppc/include/asm/= current.h index 0ca06033f9..e329a548e6 100644 --- a/xen/arch/ppc/include/asm/current.h +++ b/xen/arch/ppc/include/asm/current.h @@ -4,6 +4,8 @@ =20 #include =20 +#include + #ifndef __ASSEMBLY__ =20 struct vcpu; @@ -38,6 +40,10 @@ static inline struct cpu_info *get_cpu_info(void) =20 #define guest_cpu_user_regs() (&get_cpu_info()->guest_cpu_user_regs) =20 +#define smp_processor_id() 0 /* TODO: Fix this */ + +#define get_per_cpu_offset() smp_processor_id() /* TODO: Fix this */ + #endif /* __ASSEMBLY__ */ =20 #endif /* __ASM_PPC_CURRENT_H__ */ diff --git a/xen/arch/ppc/include/asm/percpu.h b/xen/arch/ppc/include/asm/p= ercpu.h deleted file mode 100644 index e7c40c0f03..0000000000 --- a/xen/arch/ppc/include/asm/percpu.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef __PPC_PERCPU_H__ -#define __PPC_PERCPU_H__ - -#ifndef __ASSEMBLY__ - -extern char __per_cpu_start[], __per_cpu_data_end[]; -extern unsigned long __per_cpu_offset[NR_CPUS]; -void percpu_init_areas(void); - -#define smp_processor_id() 0 /* TODO: Fix this */ - -#define per_cpu(var, cpu) \ - (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset[cpu])) -#define this_cpu(var) \ - (*RELOC_HIDE(&per_cpu__##var, smp_processor_id())) - -#define per_cpu_ptr(var, cpu) \ - (*RELOC_HIDE(var, __per_cpu_offset[cpu])) -#define this_cpu_ptr(var) \ - (*RELOC_HIDE(var, smp_processor_id())) - -#endif - -#endif /* __PPC_PERCPU_H__ */ diff --git a/xen/arch/x86/include/asm/Makefile b/xen/arch/x86/include/asm/M= akefile new file mode 100644 index 0000000000..874429ed30 --- /dev/null +++ b/xen/arch/x86/include/asm/Makefile @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0-only +generic-y +=3D percpu.h diff --git a/xen/arch/x86/include/asm/current.h b/xen/arch/x86/include/asm/= current.h index 35cca5cbe4..10950f36cc 100644 --- a/xen/arch/x86/include/asm/current.h +++ b/xen/arch/x86/include/asm/current.h @@ -102,6 +102,8 @@ static inline struct cpu_info *get_cpu_info(void) #define smp_processor_id() (get_cpu_info()->processor_id) #define guest_cpu_user_regs() (&get_cpu_info()->guest_cpu_user_regs) =20 +#define get_per_cpu_offset() (get_cpu_info()->per_cpu_offset) + /* * Get the bottom-of-stack, as stored in the per-CPU TSS. This actually po= ints * into the middle of cpu_info.guest_cpu_user_regs, at the section that diff --git a/xen/arch/x86/include/asm/percpu.h b/xen/arch/x86/include/asm/p= ercpu.h deleted file mode 100644 index 2b0c29a233..0000000000 --- a/xen/arch/x86/include/asm/percpu.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef __X86_PERCPU_H__ -#define __X86_PERCPU_H__ - -#ifndef __ASSEMBLY__ -extern char __per_cpu_start[], __per_cpu_data_end[]; -extern unsigned long __per_cpu_offset[NR_CPUS]; -void percpu_init_areas(void); -#endif - -/* var is in discarded region: offset to particular copy we want */ -#define per_cpu(var, cpu) \ - (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset[cpu])) -#define this_cpu(var) \ - (*RELOC_HIDE(&per_cpu__##var, get_cpu_info()->per_cpu_offset)) - -#define this_cpu_ptr(var) \ - (*RELOC_HIDE(var, get_cpu_info()->per_cpu_offset)) - -#define per_cpu_ptr(var, cpu) \ - (*RELOC_HIDE(var, __per_cpu_offset[cpu])) - -#endif /* __X86_PERCPU_H__ */ diff --git a/xen/arch/arm/include/asm/percpu.h b/xen/include/asm-generic/pe= rcpu.h similarity index 57% rename from xen/arch/arm/include/asm/percpu.h rename to xen/include/asm-generic/percpu.h index f1a8768080..60af4f9ff9 100644 --- a/xen/arch/arm/include/asm/percpu.h +++ b/xen/include/asm-generic/percpu.h @@ -1,28 +1,32 @@ -#ifndef __ARM_PERCPU_H__ -#define __ARM_PERCPU_H__ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __ASM_GENERIC_PERCPU_H__ +#define __ASM_GENERIC_PERCPU_H__ =20 #ifndef __ASSEMBLY__ =20 #include -#include +#include =20 -extern char __per_cpu_start[], __per_cpu_data_end[]; +extern char __per_cpu_start[]; +extern const char __per_cpu_data_end[]; extern unsigned long __per_cpu_offset[NR_CPUS]; void percpu_init_areas(void); =20 #define per_cpu(var, cpu) \ (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset[cpu])) + #define this_cpu(var) \ - (*RELOC_HIDE(&per_cpu__##var, READ_SYSREG(TPIDR_EL2))) + (*RELOC_HIDE(&per_cpu__##var, get_per_cpu_offset())) =20 #define per_cpu_ptr(var, cpu) \ (*RELOC_HIDE(var, __per_cpu_offset[cpu])) #define this_cpu_ptr(var) \ - (*RELOC_HIDE(var, READ_SYSREG(TPIDR_EL2))) + (*RELOC_HIDE(var, get_per_cpu_offset())) =20 #endif =20 -#endif /* __ARM_PERCPU_H__ */ +#endif /* __ASM_GENERIC_PERCPU_H__ */ + /* * Local variables: * mode: C diff --git a/xen/include/xen/percpu.h b/xen/include/xen/percpu.h index c7bf57cbcd..57522f346b 100644 --- a/xen/include/xen/percpu.h +++ b/xen/include/xen/percpu.h @@ -1,8 +1,6 @@ #ifndef __XEN_PERCPU_H__ #define __XEN_PERCPU_H__ =20 -#include - #define DECLARE_PER_CPU(type, name) \ extern __typeof__(type) per_cpu__ ## name =20 @@ -29,6 +27,8 @@ =20 #define get_per_cpu_var(var) (per_cpu__##var) =20 +#include + /* Linux compatibility. */ #define get_cpu_var(var) this_cpu(var) #define put_cpu_var(var) --=20 2.43.0 From nobody Sat May 18 05:04:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1701094454; cv=none; d=zohomail.com; s=zohoarc; b=TrkVzRyTyolBtCxW35yw6CvfP9ouUPkH9RHcSsI3YXm6eNhdahDH3BWC7Mfaini3/3hnIdJGe/qrvb4+MUwREq3qclV8Yg5hN6xYFtSMwaW59YwGkVIyC7DJqjt5ANkhIJ9zMf1B+jPXYQO7ASWxNG/HwNZDWsA7WmPtk0m6jHU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701094454; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=XCDKszFdTZd3ubNMlRIerIQDFL6fl03ubInCKVrFPUQ=; b=jpBYcCA3snEq9KbTILr/b2+Aavli56itv+7wXaPSJKF1n7zHQHZLB/qfNgG++6SqwSHeRlryoRowv+F26R4wN4tmhbDYDU/fFV9NauBpavhhIy0sav6CSHA4fZt93X06n7Xh9pRdbRYoR/vcCEFYYtGQwhWuEmLCMrIhKrn6/6A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1701094454834382.0310778308865; Mon, 27 Nov 2023 06:14:14 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.642124.1001356 (Exim 4.92) (envelope-from ) id 1r7cMp-0007BJ-Ay; Mon, 27 Nov 2023 14:13:43 +0000 Received: by outflank-mailman (output) from mailman id 642124.1001356; Mon, 27 Nov 2023 14:13:43 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r7cMp-00077k-3d; Mon, 27 Nov 2023 14:13:43 +0000 Received: by outflank-mailman (input) for mailman id 642124; Mon, 27 Nov 2023 14:13:41 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r7cMn-0005XE-C8 for xen-devel@lists.xenproject.org; Mon, 27 Nov 2023 14:13:41 +0000 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [2a00:1450:4864:20::134]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 2a57dcc0-8d2f-11ee-98e2-6d05b1d4d9a1; Mon, 27 Nov 2023 15:13:40 +0100 (CET) Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-50aab20e828so6079842e87.2 for ; Mon, 27 Nov 2023 06:13:40 -0800 (PST) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id x29-20020ac259dd000000b00507b869b068sm1494100lfn.302.2023.11.27.06.13.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 06:13:39 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 2a57dcc0-8d2f-11ee-98e2-6d05b1d4d9a1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701094420; x=1701699220; 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=XCDKszFdTZd3ubNMlRIerIQDFL6fl03ubInCKVrFPUQ=; b=TNMzRNwDnfKy+7xq+ZNxoEVFavEBNz6eKhw8wGt1y6okTxV9ZvSBHqVBRDsIzJQi+d Ro1LlcX57rN9cnzl0kv5kWSgXWGJihrRD6QMoLym28CcwtRFMDY3WUJVFthnLD0Uvo2g OlsyVLqFTBQualAAffLxvmHlV9nAv6Q4gDkmRQuTZGa8MgQiX9gFQXCo8bUM6GYabw06 ErpG+02APHpYMYHwGQEigiS09PtP6DCQ9TyF3u7N5K/sjTDb7ELUcnn0b4vEAkdgBQgd 2c++mfSlgrRDjdNDpJJjScprdAIJ0gvRC/Rji1gzinGzUOsB/zCz8BaL9eWkoeuzTwNi AHvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701094420; x=1701699220; 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=XCDKszFdTZd3ubNMlRIerIQDFL6fl03ubInCKVrFPUQ=; b=XnEyjjXrjjaIua1OdqA3AawxDvkPrL0j9EUsxF/gpuEQgEo3xy/ZodtDLtBoqb9gPB fGnK/proM5YE1FitDsJtNvgtt1TGLdE4xrzTRphLh0LzBWQtPKl1qBq3tRKLH+M5EYKQ RjPrpnuOwVwgiZlZW4MbtR+Uks9gu5kfW6IPqAQFNh6l/SRtcaTODoY8tAa18nN2Ib/G R+/6DVMeOBVw9uPYd4D+5wA8eAH+ROFZkW+WVm1hwWamtqNv4gfbbW3N4dx9ORep9q7I c7wrvUk3D2I7TJI226pw+G8uv/ySl/uRbWycB1Ei9PKE9w16DvpFahX8O2kmE2j8h5en X9Eg== X-Gm-Message-State: AOJu0YwoA4vBB+q6EeQkSk4NF00jQN9nSvLTCj5P9tNGUv//XOJJLT1w l2/Lmm2Yc9c0GlnBTC+DUjBEaYYVU+iKVw== X-Google-Smtp-Source: AGHT+IGIv7qDJm1UBS7MdqQQbNs8Vfeg3A1ypx4IfmzCjPBzEWLTSrDeeq68OF3ymgUlgnftq0yj9g== X-Received: by 2002:a05:6512:23a7:b0:500:a66b:b189 with SMTP id c39-20020a05651223a700b00500a66bb189mr6988673lfv.51.1701094419620; Mon, 27 Nov 2023 06:13:39 -0800 (PST) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , Andrew Cooper , George Dunlap , Jan Beulich , Wei Liu , Shawn Anastasio , Julien Grall Subject: [PATCH v4 07/14] xen/asm-generic: introduce generalized hardirq.h Date: Mon, 27 Nov 2023 16:13:20 +0200 Message-ID: <4834c3e10a0dba429edb41c340065560ccf0d942.1701093907.git.oleksii.kurochko@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1701094456800000010 Content-Type: text/plain; charset="utf-8" is common through archs thereby it is moved to asm-generic. Arm and PPC were switched to asm generic verstion of hardirq.h. Signed-off-by: Oleksii Kurochko Reviewed-by: Jan Beulich Acked-by: Julien Grall Acked-by: Shawn Anastasio --- Changes in V4: - Added Reviewed-by: Jan Beulich . - Added Acked-by: Julien Grall . --- Changes in V3: - Drop Arm and PPC's hardirq.h - Update the commit message. --- Changes in V2: - add #include . - update the commit message --- xen/arch/arm/include/asm/Makefile | 1 + xen/arch/ppc/include/asm/Makefile | 1 + xen/arch/ppc/include/asm/hardirq.h | 19 ------------------- .../asm =3D> include/asm-generic}/hardirq.h | 8 +++++--- 4 files changed, 7 insertions(+), 22 deletions(-) delete mode 100644 xen/arch/ppc/include/asm/hardirq.h rename xen/{arch/arm/include/asm =3D> include/asm-generic}/hardirq.h (79%) diff --git a/xen/arch/arm/include/asm/Makefile b/xen/arch/arm/include/asm/M= akefile index 60bb78fc09..f6f108bbb8 100644 --- a/xen/arch/arm/include/asm/Makefile +++ b/xen/arch/arm/include/asm/Makefile @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only generic-y +=3D device.h +generic-y +=3D hardirq.h generic-y +=3D iocap.h generic-y +=3D paging.h generic-y +=3D percpu.h diff --git a/xen/arch/ppc/include/asm/Makefile b/xen/arch/ppc/include/asm/M= akefile index edef0fab78..3241236c64 100644 --- a/xen/arch/ppc/include/asm/Makefile +++ b/xen/arch/ppc/include/asm/Makefile @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only generic-y +=3D device.h +generic-y +=3D hardirq.h generic-y +=3D hypercall.h generic-y +=3D iocap.h generic-y +=3D paging.h diff --git a/xen/arch/ppc/include/asm/hardirq.h b/xen/arch/ppc/include/asm/= hardirq.h deleted file mode 100644 index 343efc7e69..0000000000 --- a/xen/arch/ppc/include/asm/hardirq.h +++ /dev/null @@ -1,19 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ASM_PPC_HARDIRQ_H__ -#define __ASM_PPC_HARDIRQ_H__ - -#include - -typedef struct { - unsigned long __softirq_pending; - unsigned int __local_irq_count; -} __cacheline_aligned irq_cpustat_t; - -#include /* Standard mappings for irq_cpustat_t abo= ve */ - -#define in_irq() (local_irq_count(smp_processor_id()) !=3D 0) - -#define irq_enter() (local_irq_count(smp_processor_id())++) -#define irq_exit() (local_irq_count(smp_processor_id())--) - -#endif /* __ASM_PPC_HARDIRQ_H__ */ diff --git a/xen/arch/arm/include/asm/hardirq.h b/xen/include/asm-generic/h= ardirq.h similarity index 79% rename from xen/arch/arm/include/asm/hardirq.h rename to xen/include/asm-generic/hardirq.h index 67b6a673db..ddccf460b9 100644 --- a/xen/arch/arm/include/asm/hardirq.h +++ b/xen/include/asm-generic/hardirq.h @@ -1,5 +1,6 @@ -#ifndef __ASM_HARDIRQ_H -#define __ASM_HARDIRQ_H +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __ASM_GENERIC_HARDIRQ_H +#define __ASM_GENERIC_HARDIRQ_H =20 #include #include @@ -16,7 +17,8 @@ typedef struct { #define irq_enter() (local_irq_count(smp_processor_id())++) #define irq_exit() (local_irq_count(smp_processor_id())--) =20 -#endif /* __ASM_HARDIRQ_H */ +#endif /* __ASM_GENERIC_HARDIRQ_H */ + /* * Local variables: * mode: C --=20 2.43.0 From nobody Sat May 18 05:04:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1701094450; cv=none; d=zohomail.com; s=zohoarc; b=XT0RP/WE7vpQ+z7qD6OnvQbHRQrwaff3CEMluoa/5K8nS3f/S3zLnxwfe1RlhER2DiNlhuzKslmkQQexafn8jtW6v+1A4KGkdmpTvn8Zy4G+fhA4L+d1alivWvQVvwH+iaIT9wqwWFomVRlUG1iL2UGJwgOL0sx8vr1PvrKlwf0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701094450; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=RX3zgR/k3naH0cxTUjVNfFsJEx/hUFvxNDBlPipUY+c=; b=UqLuEd6B8vNxOLkcA9zpLt6O6AfBLw82kfVRAoToZto8iIL4Cy66s/WCxOPiX3OzK3bauw6fQT1oZy5kvbReifA8Guz/3nztODfgWMVArz4SGMNEtR+uczRVgjBGLDJeZhQiXIEhe5S/6LasIoqirbVTdXLEZp3IONF9tpXF3xg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 170109445042492.69488219984692; Mon, 27 Nov 2023 06:14:10 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.642125.1001372 (Exim 4.92) (envelope-from ) id 1r7cMq-0007ct-Nr; Mon, 27 Nov 2023 14:13:44 +0000 Received: by outflank-mailman (output) from mailman id 642125.1001372; Mon, 27 Nov 2023 14:13:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r7cMq-0007c2-H9; Mon, 27 Nov 2023 14:13:44 +0000 Received: by outflank-mailman (input) for mailman id 642125; Mon, 27 Nov 2023 14:13:43 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r7cMo-0005XE-SG for xen-devel@lists.xenproject.org; Mon, 27 Nov 2023 14:13:42 +0000 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [2a00:1450:4864:20::136]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 2b39ff78-8d2f-11ee-98e2-6d05b1d4d9a1; Mon, 27 Nov 2023 15:13:42 +0100 (CET) Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-50970c2115eso5775410e87.1 for ; Mon, 27 Nov 2023 06:13:42 -0800 (PST) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id x29-20020ac259dd000000b00507b869b068sm1494100lfn.302.2023.11.27.06.13.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 06:13:40 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 2b39ff78-8d2f-11ee-98e2-6d05b1d4d9a1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701094422; x=1701699222; 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=RX3zgR/k3naH0cxTUjVNfFsJEx/hUFvxNDBlPipUY+c=; b=lzgv7d3v2jzlz5bDZm9QASV0BY8LTL+oqHbP5EmNJnUKCY9poi3YHrfkWAuxHGBz0w co3e5bWE1RpaNSVQssvWqwDfH96E0q1jwfzoSBAIWkgUvLThLQHlEjlFhwEU9s052520 vDH7R5p0JygHeTXN4T/kymsvmM7yjFykklA6ySVJKzxA9Q6LrvGqaPVvVBabZbTL2fdC Xeni94Evj7PhGPDzGRqngBe1ySRd13d9cQdzwDZHUIc9tOzXyBgeXLe6di8B7C3lHa// LrY41UtLfd6nXNV7UuLTqd8TQGTKtd1SKUYwM1OrRZvuCsPcfO5gYJkq31mKrXGmNJcC PXbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701094422; x=1701699222; 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=RX3zgR/k3naH0cxTUjVNfFsJEx/hUFvxNDBlPipUY+c=; b=o2dUqRT4UrwmjtndKz6/I1adipwqCjYOYrtFlj1tqV7JKKp7ug7+vcMw7SJdyjJX2O aeZludETxUyyxwrjUN7zz2IE/RJEMiJcP2vEvqhdp0j3/ij7ka7V4e6Fb6w8SW/GGoUk WY8J0U8eMCWhb20uJdPGAj+MrgolAEzwxsl2y14GJxXLD7RayOzj0LjWJwKiH1xVVRxd jDbvYhJYXh1QcJOr+iIQjx3CpT3XZUQppB5O5D8ZHasDNIALrZs149bqW9F1qa5gxqdI H9uGrQ66cpPrRbkXLWZMTS46h/O2iOiWVHpjtVRNAtVF3CE129OZVtO7tlSguMecneYC 6bGA== X-Gm-Message-State: AOJu0Yw1f4nujqcOk4w1x7k0DhHJwU6ZavPBmPiug6P8nG6i00yWcvgv 76PI8gMeAJywdxTgWuje30lpLC8ZzD95cg== X-Google-Smtp-Source: AGHT+IHgVb25jgNQ0m8/UNTAYkEhO51GThc7+/wtvJ6LjS77N58SkOQgkPS2ZRVjLDZYE1IfqMqnhw== X-Received: by 2002:a05:6512:3c87:b0:50b:a64d:acf with SMTP id h7-20020a0565123c8700b0050ba64d0acfmr8699499lfv.59.1701094421004; Mon, 27 Nov 2023 06:13:41 -0800 (PST) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , Andrew Cooper , George Dunlap , Jan Beulich , Wei Liu , Shawn Anastasio , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH v4 08/14] xen/asm-generic: introduce generic div64.h header Date: Mon, 27 Nov 2023 16:13:21 +0200 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1701094450732000001 Content-Type: text/plain; charset="utf-8" All archs have the do_div implementation for BITS_PER_LONG =3D=3D 64 so do_div64.h is moved to asm-generic. x86 and PPC were switched to asm-generic version of div64.h. Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich Acked-by: Shawn Anastasio --- Changes in V4: - Added Acked-by: Jan Beulich . - include in Arm's div64.h for 64-bit case. --- Changes in V3: - Drop x86 and PPC's div64.h. - Update the commit message. --- Changes in V2: - rename base to divisor - add "#if BITS_PER_LONG =3D=3D 64" - fix code style --- xen/arch/arm/include/asm/div64.h | 8 +------- xen/arch/ppc/include/asm/Makefile | 1 + xen/arch/ppc/include/asm/div64.h | 14 -------------- xen/arch/x86/include/asm/Makefile | 1 + xen/arch/x86/include/asm/div64.h | 14 -------------- xen/include/asm-generic/div64.h | 27 +++++++++++++++++++++++++++ 6 files changed, 30 insertions(+), 35 deletions(-) delete mode 100644 xen/arch/ppc/include/asm/div64.h delete mode 100644 xen/arch/x86/include/asm/div64.h create mode 100644 xen/include/asm-generic/div64.h diff --git a/xen/arch/arm/include/asm/div64.h b/xen/arch/arm/include/asm/di= v64.h index fc667a80f9..0459d5cc01 100644 --- a/xen/arch/arm/include/asm/div64.h +++ b/xen/arch/arm/include/asm/div64.h @@ -24,13 +24,7 @@ =20 #if BITS_PER_LONG =3D=3D 64 =20 -# define do_div(n,base) ({ \ - uint32_t __base =3D (base); \ - uint32_t __rem; \ - __rem =3D ((uint64_t)(n)) % __base; \ - (n) =3D ((uint64_t)(n)) / __base; \ - __rem; \ - }) +#include =20 #elif BITS_PER_LONG =3D=3D 32 =20 diff --git a/xen/arch/ppc/include/asm/Makefile b/xen/arch/ppc/include/asm/M= akefile index 3241236c64..5364bb1d59 100644 --- a/xen/arch/ppc/include/asm/Makefile +++ b/xen/arch/ppc/include/asm/Makefile @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only generic-y +=3D device.h +generic-y +=3D div64.h generic-y +=3D hardirq.h generic-y +=3D hypercall.h generic-y +=3D iocap.h diff --git a/xen/arch/ppc/include/asm/div64.h b/xen/arch/ppc/include/asm/di= v64.h deleted file mode 100644 index d213e50585..0000000000 --- a/xen/arch/ppc/include/asm/div64.h +++ /dev/null @@ -1,14 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ASM_PPC_DIV64_H__ -#define __ASM_PPC_DIV64_H__ - -#include - -#define do_div(n, base) ({ \ - uint32_t base_ =3D (base); \ - uint32_t rem_ =3D (uint64_t)(n) % base_; \ - (n) =3D (uint64_t)(n) / base_; \ - rem_; \ -}) - -#endif /* __ASM_PPC_DIV64_H__ */ diff --git a/xen/arch/x86/include/asm/Makefile b/xen/arch/x86/include/asm/M= akefile index 874429ed30..daab34ff0a 100644 --- a/xen/arch/x86/include/asm/Makefile +++ b/xen/arch/x86/include/asm/Makefile @@ -1,2 +1,3 @@ # SPDX-License-Identifier: GPL-2.0-only +generic-y +=3D div64.h generic-y +=3D percpu.h diff --git a/xen/arch/x86/include/asm/div64.h b/xen/arch/x86/include/asm/di= v64.h deleted file mode 100644 index dd49f64a3b..0000000000 --- a/xen/arch/x86/include/asm/div64.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef __X86_DIV64 -#define __X86_DIV64 - -#include - -#define do_div(n,base) ({ \ - uint32_t __base =3D (base); \ - uint32_t __rem; \ - __rem =3D ((uint64_t)(n)) % __base; \ - (n) =3D ((uint64_t)(n)) / __base; \ - __rem; \ -}) - -#endif diff --git a/xen/include/asm-generic/div64.h b/xen/include/asm-generic/div6= 4.h new file mode 100644 index 0000000000..068d8a11ad --- /dev/null +++ b/xen/include/asm-generic/div64.h @@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __ASM_GENERIC_DIV64 +#define __ASM_GENERIC_DIV64 + +#include + +#if BITS_PER_LONG =3D=3D 64 + +#define do_div(n, divisor) ({ \ + uint32_t divisor_ =3D (divisor); \ + uint32_t rem_ =3D (uint64_t)(n) % divisor_; \ + (n) =3D (uint64_t)(n) / divisor_; \ + rem_; \ +}) + +#endif /* BITS_PER_LONG */ + +#endif + +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ --=20 2.43.0 From nobody Sat May 18 05:04:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1701094460; cv=none; d=zohomail.com; s=zohoarc; b=UN9e3SFmzG6ys72I3g0wl5YV9umyaWuT3+7RIPfQHu42FTWgFZTRsC1GeplkcWsy5fV2y5FnddUn1541yB58sQ7kx0ezPEtBdKmLIVHYDvzLQG7zhpHsjBfYvVUXHth8RztUdGAwIDhWW10265WzioyYfdzzcQ1ALDE9agUD65M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701094460; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=MfFkIWV/5QoXgBfRidEiq3DVpTBnfp3dPpbyHjgJaBY=; b=jLQOffAxaUYnHYKIFj+jbFGQcJSQ8svpFtSub+2NmFE+1irHtU4XCSHnQVKa9tqaEknVWxqSXb0AU18M4NjyxeFARLJH95b+HZqrU0xJ/3jEm+HFATX4CBPM6kv0EuxjkpE4gqeJ6GBTMP1cqW7VYCLi8th334HaWkd1Xt2xAUg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1701094460925166.72924206282812; Mon, 27 Nov 2023 06:14:20 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.642126.1001383 (Exim 4.92) (envelope-from ) id 1r7cMs-0007xK-4k; Mon, 27 Nov 2023 14:13:46 +0000 Received: by outflank-mailman (output) from mailman id 642126.1001383; Mon, 27 Nov 2023 14:13:46 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r7cMr-0007wP-Uo; Mon, 27 Nov 2023 14:13:45 +0000 Received: by outflank-mailman (input) for mailman id 642126; Mon, 27 Nov 2023 14:13:44 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r7cMq-0005XE-F8 for xen-devel@lists.xenproject.org; Mon, 27 Nov 2023 14:13:44 +0000 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [2a00:1450:4864:20::12f]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 2c28e230-8d2f-11ee-98e2-6d05b1d4d9a1; Mon, 27 Nov 2023 15:13:43 +0100 (CET) Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-507c5249d55so6473999e87.3 for ; Mon, 27 Nov 2023 06:13:43 -0800 (PST) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id x29-20020ac259dd000000b00507b869b068sm1494100lfn.302.2023.11.27.06.13.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 06:13:42 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 2c28e230-8d2f-11ee-98e2-6d05b1d4d9a1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701094423; x=1701699223; 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=MfFkIWV/5QoXgBfRidEiq3DVpTBnfp3dPpbyHjgJaBY=; b=hraTyRggYQESA8UfITKKImw3TsG4mc2Xo1KFagAyRWt6WmFNXVQnHPCxrG+/v4vbat y0l+iW+Sapq1WS2OmWL7Cv+u6EhSBcWpfS5JcH1o8X1FvlJGMqXWM+OD8G2zaHHRxxI4 ES9XTXfFtIGlpDPhQg+VzII+1htiYEFL1/bbGhBHrYrB2LRE6mK3EC/UBktYP45Rj1h2 YACDKT0ib7DIJ3kO3LD1b2AvYkpxsahCjUsCbdAeu0qOlTHDTCMWpWqaa9o9aOHcobXM 2Y9s+4OOfHbZEN7fVGzny3TztbR/NSCujEtTBhcUfpAFAIyYeT1oEgEeZ0dVYG+vtCoa rCTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701094423; x=1701699223; 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=MfFkIWV/5QoXgBfRidEiq3DVpTBnfp3dPpbyHjgJaBY=; b=pBGq2Jz83Tc5/9GSaz4DSNzPGdJlcYmlMSlmiw51d90TmwbLSzWQCuxafXFbHBNp/i B1EHS3Jr35as0F2IC62v13nvamowUnyCzfdQt3FwxlMKA/jqmNpCOUIsEMMPcHTuJ6la pej1EPAXnuu/yXcGGf443B8L/SfxD3GYkFbksYc/BWBFNz/C3xqhyafDFKIf1gIqdH0a vfyinXPp8UaKTkOrJc6UKw9Ag3WZF19F1/Vpg/9mDKeHj/aHJjsDmFLoYI2mGO5r/554 8O47VlovKIS/lfJtXa9M3BTAxJFJLesKmglYZPZOOa6hvsBEb8FOUqDcky9FDKe+o36e Iyew== X-Gm-Message-State: AOJu0YyQZohu0PStcdoac3zhWjI2obAAEu3IXDtgxkT6Dl8o6kKx18dA CVZ4Y1leVs0M6WJVR2W9PNBnTHJght9dtg== X-Google-Smtp-Source: AGHT+IHKIKz8d5RLuVwcYataUKXp7A3JIB7f6KQ7x0z9RxUJeoO8rwo+r/odpwVF2RJzG4fFifOa7w== X-Received: by 2002:ac2:4c55:0:b0:507:a1b3:2d47 with SMTP id o21-20020ac24c55000000b00507a1b32d47mr8022420lfk.17.1701094422549; Mon, 27 Nov 2023 06:13:42 -0800 (PST) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , Andrew Cooper , George Dunlap , Jan Beulich , Wei Liu , Shawn Anastasio Subject: [PATCH v4 09/14] xen/asm-generic: introduce generic header altp2m.h Date: Mon, 27 Nov 2023 16:13:22 +0200 Message-ID: <5e1846febdbc5b9ebfe61993231dbebc9457f083.1701093907.git.oleksii.kurochko@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1701094463024000001 Content-Type: text/plain; charset="utf-8" is common between several archs so it is moved to asm-generic. Arm and PPC were switched to asm-generic version of altp2m.h. Signed-off-by: Oleksii Kurochko Acked-by: Michal Orzel Acked-by: Jan Beulich Acked-by: Shawn Anastasio --- Michal asked the following: Shouldn't this copyright be moved to generic header as well? It seems to me that it is fine to leave the stub altp2m header without the copyright "Copyright (c) 2014, Intel Corporation.". =20 If an absense of the copyright violates something I will be happy to add it during merge. --- Changes in V4: - Update the commit message - Added Acked-by: Michal Orzel - Added Acked-by: Jan Beulich --- Changes in V3: - Drop Arm and PPC's altp2m.h - Update the commit message. --- Changes in V2: - change uint16_t to unsigned int in declaration of altp2m_vcpu_idx - update the commit message --- xen/arch/arm/include/asm/Makefile | 1 + xen/arch/arm/include/asm/altp2m.h | 39 ------------------------------- xen/arch/ppc/include/asm/Makefile | 1 + xen/arch/ppc/include/asm/altp2m.h | 25 -------------------- xen/include/asm-generic/altp2m.h | 34 +++++++++++++++++++++++++++ 5 files changed, 36 insertions(+), 64 deletions(-) delete mode 100644 xen/arch/arm/include/asm/altp2m.h delete mode 100644 xen/arch/ppc/include/asm/altp2m.h create mode 100644 xen/include/asm-generic/altp2m.h diff --git a/xen/arch/arm/include/asm/Makefile b/xen/arch/arm/include/asm/M= akefile index f6f108bbb8..55d153ed82 100644 --- a/xen/arch/arm/include/asm/Makefile +++ b/xen/arch/arm/include/asm/Makefile @@ -1,4 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-only +generic-y +=3D altp2m.h generic-y +=3D device.h generic-y +=3D hardirq.h generic-y +=3D iocap.h diff --git a/xen/arch/arm/include/asm/altp2m.h b/xen/arch/arm/include/asm/a= ltp2m.h deleted file mode 100644 index df50cb2f09..0000000000 --- a/xen/arch/arm/include/asm/altp2m.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Alternate p2m - * - * Copyright (c) 2014, Intel Corporation. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU General Public License, - * version 2, as published by the Free Software Foundation. - * - * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License f= or - * more details. - * - * You should have received a copy of the GNU General Public License along= with - * this program; If not, see . - */ - -#ifndef __ASM_ARM_ALTP2M_H -#define __ASM_ARM_ALTP2M_H - -#include - -/* Alternate p2m on/off per domain */ -static inline bool altp2m_active(const struct domain *d) -{ - /* Not implemented on ARM. */ - return false; -} - -/* Alternate p2m VCPU */ -static inline uint16_t altp2m_vcpu_idx(const struct vcpu *v) -{ - /* Not implemented on ARM, should not be reached. */ - BUG(); - return 0; -} - -#endif /* __ASM_ARM_ALTP2M_H */ diff --git a/xen/arch/ppc/include/asm/Makefile b/xen/arch/ppc/include/asm/M= akefile index 5364bb1d59..319e90955b 100644 --- a/xen/arch/ppc/include/asm/Makefile +++ b/xen/arch/ppc/include/asm/Makefile @@ -1,4 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-only +generic-y +=3D altp2m.h generic-y +=3D device.h generic-y +=3D div64.h generic-y +=3D hardirq.h diff --git a/xen/arch/ppc/include/asm/altp2m.h b/xen/arch/ppc/include/asm/a= ltp2m.h deleted file mode 100644 index bd5c9aa415..0000000000 --- a/xen/arch/ppc/include/asm/altp2m.h +++ /dev/null @@ -1,25 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ASM_PPC_ALTP2M_H__ -#define __ASM_PPC_ALTP2M_H__ - -#include - -struct domain; -struct vcpu; - -/* Alternate p2m on/off per domain */ -static inline bool altp2m_active(const struct domain *d) -{ - /* Not implemented on PPC. */ - return false; -} - -/* Alternate p2m VCPU */ -static inline uint16_t altp2m_vcpu_idx(const struct vcpu *v) -{ - /* Not implemented on PPC, should not be reached. */ - ASSERT_UNREACHABLE(); - return 0; -} - -#endif /* __ASM_PPC_ALTP2M_H__ */ diff --git a/xen/include/asm-generic/altp2m.h b/xen/include/asm-generic/alt= p2m.h new file mode 100644 index 0000000000..39865a842a --- /dev/null +++ b/xen/include/asm-generic/altp2m.h @@ -0,0 +1,34 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __ASM_GENERIC_ALTP2M_H +#define __ASM_GENERIC_ALTP2M_H + +#include + +struct domain; +struct vcpu; + +/* Alternate p2m on/off per domain */ +static inline bool altp2m_active(const struct domain *d) +{ + /* Not implemented on GENERIC. */ + return false; +} + +/* Alternate p2m VCPU */ +static inline unsigned int altp2m_vcpu_idx(const struct vcpu *v) +{ + /* Not implemented on GENERIC, should not be reached. */ + BUG(); + return 0; +} + +#endif /* __ASM_GENERIC_ALTP2M_H */ + +/* + * Local variables: + * mode: C + * c-file-style: BSD + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ --=20 2.43.0 From nobody Sat May 18 05:04:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1701094454; cv=none; d=zohomail.com; s=zohoarc; b=ILj/0AV9ugMFhlMQys90H8x+TojLZZ6DLaizOId+BWu4Jd3+JMPSRitbRiaBG/4xa8WHzL8pGMMXjNupDfDqCmdkZqIsZB/1Ku4FSi+0beWfsuu0NXIWTsV2QNIl02BMMiFXMjro3Cr4bKIFTayYLyxvhZPrQ4YBCTIMtrbeAUg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701094454; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=bnIg8DAf+y9I4dvM43pjfdMpTdd4ChaNYKivfQNekNQ=; b=AUCx4W7nBR4BVgSp8yTiuhTGntD5C9CWDR3xIW5Mstneb6GBgLRNnCueG2fpHxO3w6mX+Wz0t97kZeWTArXXi5xI3K++Gzx5/hBZ0YmLB0vZCqJqy4k4eMl4GrSTzWh2JDCbMukNq1Dhr0oFf3Rjimaf/E4LZ/Y7ZttmANbBUk8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1701094454540574.4276144346212; Mon, 27 Nov 2023 06:14:14 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.642127.1001392 (Exim 4.92) (envelope-from ) id 1r7cMt-0008FN-EA; Mon, 27 Nov 2023 14:13:47 +0000 Received: by outflank-mailman (output) from mailman id 642127.1001392; Mon, 27 Nov 2023 14:13:47 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r7cMt-0008F1-9I; Mon, 27 Nov 2023 14:13:47 +0000 Received: by outflank-mailman (input) for mailman id 642127; Mon, 27 Nov 2023 14:13:46 +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 1r7cMs-0005in-DY for xen-devel@lists.xenproject.org; Mon, 27 Nov 2023 14:13:46 +0000 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [2a00:1450:4864:20::12b]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 2c95ebc5-8d2f-11ee-9b0e-b553b5be7939; Mon, 27 Nov 2023 15:13:44 +0100 (CET) Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-507c5249d55so6474024e87.3 for ; Mon, 27 Nov 2023 06:13:44 -0800 (PST) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id x29-20020ac259dd000000b00507b869b068sm1494100lfn.302.2023.11.27.06.13.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 06:13:43 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 2c95ebc5-8d2f-11ee-9b0e-b553b5be7939 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701094423; x=1701699223; 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=bnIg8DAf+y9I4dvM43pjfdMpTdd4ChaNYKivfQNekNQ=; b=R+yLmRlOPLVRbLjrLZr8TmPEv7ofHHuWbbTvl6xe9l5xX/9kGmcCNQqI7A7inF/525 fLmkaJ1/1g1kyHFGP+5S7vgJer2mAZC/Fdlzl/usTh1FF0z9TX5INxteRyUyPdGMdNCk VFloflCBgZR0TEIfg0mjD2gPmydwNJu8BaHboL3eO0DXnBA+4wJQ8Jb+HQEto40zjFIu PTr+PCNdiIcA4z0sjV/Liw59LgkgD/uOZkCW8dD52B30jqF2yDHT+gjDVj7TB9440YzQ /Fw6D4Nd3lPgHdLganMG6BtorUI9E/CUGvg3iNs2i43c9oy4sAhu5le94jB+xRjH0a2U fc4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701094423; x=1701699223; 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=bnIg8DAf+y9I4dvM43pjfdMpTdd4ChaNYKivfQNekNQ=; b=dHYKs8wzjr//hGNYNjzZ+6fnscBwMb8Zh03jSGXkLGeMPmofy3Ae+oNeo2mVGDiI8i 4EJXnFbUX2pNKaGFjYAwg5GVkeEkXqlqIF5SSWCt26OO0WCpVPuG4Zd6qh71uBQIYxXE 9ssLWt8OprJa8hDwkM5gpxbr/18KkyQmIKC1wuZ/ev7JHKdHKo/J/7STlcVdAFoizRul +iLroC/WB+3LWXOfTuJdmQ2u7tCadomBvTXgBABYGESy2VMkHnXTCT0dtCXT4kvfFHXs TZrw9hImhhp4yPOZq7/OetNlT9FBDj4flp74S9aKu667UGlXhM1pIv8E6dKEQYdguW1S acMQ== X-Gm-Message-State: AOJu0YznDyYZ7mN104+OFf3EVtjACXyng4gC+3vOsLx1sZ6GA54sv1oc nMAv4aqPVhazIG6vk8oh8tEEPNEBx2N6Gg== X-Google-Smtp-Source: AGHT+IEz0BsFdd9YfJPJCwRyQXF90Zskc6ipeZE43MBh+1q4c9KD9668ivj++xWsjE+B2qEDYYjk+g== X-Received: by 2002:a05:6512:3b2c:b0:4fb:9f93:365f with SMTP id f44-20020a0565123b2c00b004fb9f93365fmr5720616lfv.38.1701094423201; Mon, 27 Nov 2023 06:13:43 -0800 (PST) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Shawn Anastasio , Tamas K Lengyel , Alexandru Isaila , Petre Pircalabu , Jan Beulich Subject: [PATCH v4 10/14] xen/asm-generic: introduce stub header monitor.h Date: Mon, 27 Nov 2023 16:13:23 +0200 Message-ID: <83e16ccc588d35042b804e0d56ebdb5fe710695b.1701093907.git.oleksii.kurochko@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1701094454731000003 Content-Type: text/plain; charset="utf-8" The header is shared between several archs so it is moved to asm-generic. Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich . --- Changes in V4: - Removed the double blank line. - Added Acked-by: Jan Beulich . - Update the commit message --- Changes in V3: - Use forward-declaration of struct domain instead of " #include ". - Add ' include ' - Drop PPC's monitor.h. --- Changes in V2: - remove inclusion of "+#include " - add "struct xen_domctl_monitor_op;" - remove one of SPDX tags. --- xen/arch/ppc/include/asm/Makefile | 1 + xen/arch/ppc/include/asm/monitor.h | 43 --------------------- xen/include/asm-generic/monitor.h | 62 ++++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+), 43 deletions(-) delete mode 100644 xen/arch/ppc/include/asm/monitor.h create mode 100644 xen/include/asm-generic/monitor.h diff --git a/xen/arch/ppc/include/asm/Makefile b/xen/arch/ppc/include/asm/M= akefile index 319e90955b..bcddcc181a 100644 --- a/xen/arch/ppc/include/asm/Makefile +++ b/xen/arch/ppc/include/asm/Makefile @@ -5,6 +5,7 @@ generic-y +=3D div64.h generic-y +=3D hardirq.h generic-y +=3D hypercall.h generic-y +=3D iocap.h +generic-y +=3D monitor.h generic-y +=3D paging.h generic-y +=3D percpu.h generic-y +=3D random.h diff --git a/xen/arch/ppc/include/asm/monitor.h b/xen/arch/ppc/include/asm/= monitor.h deleted file mode 100644 index e5b0282bf1..0000000000 --- a/xen/arch/ppc/include/asm/monitor.h +++ /dev/null @@ -1,43 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* Derived from xen/arch/arm/include/asm/monitor.h */ -#ifndef __ASM_PPC_MONITOR_H__ -#define __ASM_PPC_MONITOR_H__ - -#include -#include - -static inline -void arch_monitor_allow_userspace(struct domain *d, bool allow_userspace) -{ -} - -static inline -int arch_monitor_domctl_op(struct domain *d, struct xen_domctl_monitor_op = *mop) -{ - /* No arch-specific monitor ops on PPC. */ - return -EOPNOTSUPP; -} - -int arch_monitor_domctl_event(struct domain *d, - struct xen_domctl_monitor_op *mop); - -static inline -int arch_monitor_init_domain(struct domain *d) -{ - /* No arch-specific domain initialization on PPC. */ - return 0; -} - -static inline -void arch_monitor_cleanup_domain(struct domain *d) -{ - /* No arch-specific domain cleanup on PPC. */ -} - -static inline uint32_t arch_monitor_get_capabilities(struct domain *d) -{ - BUG_ON("unimplemented"); - return 0; -} - -#endif /* __ASM_PPC_MONITOR_H__ */ diff --git a/xen/include/asm-generic/monitor.h b/xen/include/asm-generic/mo= nitor.h new file mode 100644 index 0000000000..6be8614431 --- /dev/null +++ b/xen/include/asm-generic/monitor.h @@ -0,0 +1,62 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * include/asm-GENERIC/monitor.h + * + * Arch-specific monitor_op domctl handler. + * + * Copyright (c) 2015 Tamas K Lengyel (tamas@tklengyel.com) + * Copyright (c) 2016, Bitdefender S.R.L. + * + */ + +#ifndef __ASM_GENERIC_MONITOR_H__ +#define __ASM_GENERIC_MONITOR_H__ + +#include + +struct domain; +struct xen_domctl_monitor_op; + +static inline +void arch_monitor_allow_userspace(struct domain *d, bool allow_userspace) +{ +} + +static inline +int arch_monitor_domctl_op(struct domain *d, struct xen_domctl_monitor_op = *mop) +{ + /* No arch-specific monitor ops on GENERIC. */ + return -EOPNOTSUPP; +} + +int arch_monitor_domctl_event(struct domain *d, + struct xen_domctl_monitor_op *mop); + +static inline +int arch_monitor_init_domain(struct domain *d) +{ + /* No arch-specific domain initialization on GENERIC. */ + return 0; +} + +static inline +void arch_monitor_cleanup_domain(struct domain *d) +{ + /* No arch-specific domain cleanup on GENERIC. */ +} + +static inline uint32_t arch_monitor_get_capabilities(struct domain *d) +{ + return 0; +} + +#endif /* __ASM_GENERIC_MONITOR_H__ */ + +/* + * Local variables: + * mode: C + * c-file-style: BSD + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ --=20 2.43.0 From nobody Sat May 18 05:04:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1701094462; cv=none; d=zohomail.com; s=zohoarc; b=b32tOeW62b4HnvwnD01paXd+5rZz3kxyo5N+1H39TBlNCouCEjvNc2bdo2unmQnfIrFwllG5uCRPY3usTq3MbzD8wSPp43x2aqPlbCdKkeSWLGAWM3yvwBpqDjL/zXGffUVngz4P9jk84jho/Cvnb6RYHPNKycCkJ9MriS+J3iI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701094462; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=4bUm713lDLCEJ2dvdCey6eXivZPe2wBORV5zk7ydBpk=; b=dCyCBSN0tMPmGcMQx5NjcmvKU9lJtr4XvAAOxEiWSkHPGzhrfkNWfXdzEcHZp19bqfqD12dulWSYt9K1HTdzjdlDrns+9A7o2zFh620QyslXNPkdk/cBzM44uIwNb3K67fLczBz4ymTxkZN4w5BI37PsR+D8zLiGR2GgqI7Tv9c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1701094462904503.2709616795099; Mon, 27 Nov 2023 06:14:22 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.642128.1001404 (Exim 4.92) (envelope-from ) id 1r7cMv-0000C5-EV; Mon, 27 Nov 2023 14:13:49 +0000 Received: by outflank-mailman (output) from mailman id 642128.1001404; Mon, 27 Nov 2023 14:13:49 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r7cMv-0000Au-4T; Mon, 27 Nov 2023 14:13:49 +0000 Received: by outflank-mailman (input) for mailman id 642128; Mon, 27 Nov 2023 14:13:46 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r7cMs-0005XE-Q4 for xen-devel@lists.xenproject.org; Mon, 27 Nov 2023 14:13:46 +0000 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [2a00:1450:4864:20::12a]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 2d7bb9e7-8d2f-11ee-98e2-6d05b1d4d9a1; Mon, 27 Nov 2023 15:13:46 +0100 (CET) Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-50baa1ca01cso2655965e87.2 for ; Mon, 27 Nov 2023 06:13:46 -0800 (PST) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id x29-20020ac259dd000000b00507b869b068sm1494100lfn.302.2023.11.27.06.13.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 06:13:43 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 2d7bb9e7-8d2f-11ee-98e2-6d05b1d4d9a1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701094425; x=1701699225; 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=4bUm713lDLCEJ2dvdCey6eXivZPe2wBORV5zk7ydBpk=; b=JlyGcqPo+DwBzWs5Af2IgHUrjUzecFJlprbhtOxyQTsmGBsCRCYQ78VLby6L9PWX8A 453e3XGVvWFC9zRn2l01w/NQmrvKDiny5wHpRtKQRTsD2lcB/Lr0Ead1IKHHgN7c1vFY ebIzVhQraI5ZZdw49qV838ANQeGSWwtaU6aB95DkGVk3D6yVP6Bj7tzrKLjANMhdDFI1 7gVG853OOGdwEO6o7nIadaWZWCuv28/ZUwrBKebJxfjZufBosS/mm7MSKhEAR3MURsDd bI3yKEsZ8EGfQEog49/aBXe0M9XttH6a4VLb5IzrO4Z7EpPB6F/Owa9rscXOX65Iz+Kd WPrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701094425; x=1701699225; 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=4bUm713lDLCEJ2dvdCey6eXivZPe2wBORV5zk7ydBpk=; b=pNf/8zNDbVq0nxbN74/B3coRRUQURUYJgtYPHEx5fQNmJtrXiLHiluBu53J7QOpbXy tAhvArHKNNKHqkTY6udgGdn7dKQDVnA+G8lAgJ5Wq/j+FjDCrt57U7EYGql2KrsJIrHh 70ww/1xzyNgweBlpxUrzsUXaVV5duPILkIqvf6snqZt30PXrohEli6RiLy1Lp6TS28NU jyLoACIkr+uSZjMc3O80a7oUOEafe42If+Gqbm65ttXXkAIGl/m1IVR/HPeI/H2/u0V+ ZD+O24OT8wQ03xc+9sfAnuLlcPrdQzjEBRVqGX7M9q+4b6Opp3FAog+xbixHs0g7laFH amCw== X-Gm-Message-State: AOJu0Yx9dC0zuH1dB58dcVrHB9+NG3HX31rU7c0MQB8ZNXUUJLnL7yp0 wW38uh8TqAi82A2TxffXO4I3CtJs3FKt/Q== X-Google-Smtp-Source: AGHT+IEutomLAHesztCjy6aoYueTcP3YR8O+2sj2jEHca65VzhdmRPVVuTEfc3Fu8l4ECyaqLw3AZA== X-Received: by 2002:ac2:44b2:0:b0:50b:aee4:ab12 with SMTP id c18-20020ac244b2000000b0050baee4ab12mr2615799lfm.53.1701094425004; Mon, 27 Nov 2023 06:13:45 -0800 (PST) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , Andrew Cooper , George Dunlap , Jan Beulich , Wei Liu , Shawn Anastasio Subject: [PATCH v4 11/14] xen/asm-generic: introduce stub header numa.h Date: Mon, 27 Nov 2023 16:13:24 +0200 Message-ID: <44bb374738ad0cae041a0164812dfd33d091d954.1701093907.git.oleksii.kurochko@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1701094465150000001 Content-Type: text/plain; charset="utf-8" is common through some archs so it is moved to asm-generic. Signed-off-by: Oleksii Kurochko Reviewed-by: Michal Orzel Acked-by: Jan Beulich Acked-by: Shawn Anastasio --- Changes in V4: - Updated guards name: *ARCH_GENERIC* -> *ASM_GENERIC*. - Moved inclusion of xen/mm-frame.h under "#ifndef CONFIG_NUMA". - Added Reviewed-by: Michal Orzel . --- Changes in V3: - Remove old header inclusion in asm-generic numa.h and include and - Drop Arm and PPC's numa.h and use asm-generic version instead. --- Changes in V2: - update the commit message. - change u8 to uint8_t. - add ifnded CONFIG_NUMA. --- xen/arch/arm/include/asm/Makefile | 1 + xen/arch/ppc/include/asm/Makefile | 1 + xen/arch/ppc/include/asm/numa.h | 26 ------------------- .../asm =3D> include/asm-generic}/numa.h | 14 ++++++---- 4 files changed, 11 insertions(+), 31 deletions(-) delete mode 100644 xen/arch/ppc/include/asm/numa.h rename xen/{arch/arm/include/asm =3D> include/asm-generic}/numa.h (76%) diff --git a/xen/arch/arm/include/asm/Makefile b/xen/arch/arm/include/asm/M= akefile index 55d153ed82..b8e0763c77 100644 --- a/xen/arch/arm/include/asm/Makefile +++ b/xen/arch/arm/include/asm/Makefile @@ -3,6 +3,7 @@ generic-y +=3D altp2m.h generic-y +=3D device.h generic-y +=3D hardirq.h generic-y +=3D iocap.h +generic-y +=3D numa.h generic-y +=3D paging.h generic-y +=3D percpu.h generic-y +=3D random.h diff --git a/xen/arch/ppc/include/asm/Makefile b/xen/arch/ppc/include/asm/M= akefile index bcddcc181a..a4188dce1d 100644 --- a/xen/arch/ppc/include/asm/Makefile +++ b/xen/arch/ppc/include/asm/Makefile @@ -6,6 +6,7 @@ generic-y +=3D hardirq.h generic-y +=3D hypercall.h generic-y +=3D iocap.h generic-y +=3D monitor.h +generic-y +=3D numa.h generic-y +=3D paging.h generic-y +=3D percpu.h generic-y +=3D random.h diff --git a/xen/arch/ppc/include/asm/numa.h b/xen/arch/ppc/include/asm/num= a.h deleted file mode 100644 index 7fdf66c3da..0000000000 --- a/xen/arch/ppc/include/asm/numa.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef __ASM_PPC_NUMA_H__ -#define __ASM_PPC_NUMA_H__ - -#include -#include - -typedef uint8_t nodeid_t; - -/* Fake one node for now. See also node_online_map. */ -#define cpu_to_node(cpu) 0 -#define node_to_cpumask(node) (cpu_online_map) - -/* - * TODO: make first_valid_mfn static when NUMA is supported on PPC, this - * is required because the dummy helpers are using it. - */ -extern mfn_t first_valid_mfn; - -/* XXX: implement NUMA support */ -#define node_spanned_pages(nid) (max_page - mfn_x(first_valid_mfn)) -#define node_start_pfn(nid) (mfn_x(first_valid_mfn)) -#define __node_distance(a, b) (20) - -#define arch_want_default_dmazone() (false) - -#endif /* __ASM_PPC_NUMA_H__ */ diff --git a/xen/arch/arm/include/asm/numa.h b/xen/include/asm-generic/numa= .h similarity index 76% rename from xen/arch/arm/include/asm/numa.h rename to xen/include/asm-generic/numa.h index e2bee2bd82..b00fca4978 100644 --- a/xen/arch/arm/include/asm/numa.h +++ b/xen/include/asm-generic/numa.h @@ -1,12 +1,15 @@ -#ifndef __ARCH_ARM_NUMA_H -#define __ARCH_ARM_NUMA_H +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __ASM_GENERIC_NUMA_H +#define __ASM_GENERIC_NUMA_H =20 -#include +#include =20 -typedef u8 nodeid_t; +typedef uint8_t nodeid_t; =20 #ifndef CONFIG_NUMA =20 +#include + /* Fake one node for now. See also node_online_map. */ #define cpu_to_node(cpu) 0 #define node_to_cpumask(node) (cpu_online_map) @@ -26,7 +29,8 @@ extern mfn_t first_valid_mfn; =20 #define arch_want_default_dmazone() (false) =20 -#endif /* __ARCH_ARM_NUMA_H */ +#endif /* __ASM_GENERIC_NUMA_H */ + /* * Local variables: * mode: C --=20 2.43.0 From nobody Sat May 18 05:04:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1701094454; cv=none; d=zohomail.com; s=zohoarc; b=cHxzYNHKmBEGOsTc3e2nt+XpUMzHdHfdA4l0kyztt9R+fD1w9at5oM0L9FHD/tahYEAkjZNPQ4dhXH9a0rvemxWyjoDAFgns1wBaPBmz6IwrrOofrJWNur0duRk4i0avXa7o1bfT+1J6Qz2S3xwNE3zarbKZr5Ct9/kZsNwFrV4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701094454; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=9kdAs1MJcXuPPHejdAkexStxGmrKeo9/ZkYuTVmb0VU=; b=JSMwjwvPlER+RSAHDI6jXGmydmkiSvHPLhkCXQJkvlQ2gdlXBdS1nPX34vb+4YlNPI4iID+tD5fmRGLoL2/dr05rkHy/mFsc/Vzo9Yd5LDJ9FmAAt27MG2Vxs46mEeBem/ne83i/Qq4bSI7BQrgpTJ8aQJX4r+donaQHTWE9p+0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1701094454044714.7351121169366; Mon, 27 Nov 2023 06:14:14 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.642129.1001409 (Exim 4.92) (envelope-from ) id 1r7cMw-0000H7-3B; Mon, 27 Nov 2023 14:13:50 +0000 Received: by outflank-mailman (output) from mailman id 642129.1001409; Mon, 27 Nov 2023 14:13:49 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r7cMv-0000GB-KM; Mon, 27 Nov 2023 14:13:49 +0000 Received: by outflank-mailman (input) for mailman id 642129; Mon, 27 Nov 2023 14:13:47 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r7cMt-0005XE-Q6 for xen-devel@lists.xenproject.org; Mon, 27 Nov 2023 14:13:47 +0000 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [2a00:1450:4864:20::12d]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 2dfd07be-8d2f-11ee-98e2-6d05b1d4d9a1; Mon, 27 Nov 2023 15:13:47 +0100 (CET) Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-50baa3e5c00so2618142e87.1 for ; Mon, 27 Nov 2023 06:13:47 -0800 (PST) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id x29-20020ac259dd000000b00507b869b068sm1494100lfn.302.2023.11.27.06.13.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 06:13:45 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 2dfd07be-8d2f-11ee-98e2-6d05b1d4d9a1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701094426; x=1701699226; 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=9kdAs1MJcXuPPHejdAkexStxGmrKeo9/ZkYuTVmb0VU=; b=gaR6X+8FRkkQpkK8YaCsEnW0h4u+XRUcTx9NSSAhe1N5/hZ6fuxHOn3b39ykRpLmrz TYoYqjaqiDhP2h29lijNnFL6gPpyl8DdHO20aU4J+eSm58wTDoQ6B/6XGBKma2TqmCeS 6tz+Tu6Mkr+IfUXrXCa/tU7w6iOYO9iQHxdEKkME88QkxuuYaJfZV0gMATcLZSRV4AFd E4Du3txlTXTuS2ANR+Difu9lwn6CFpQSkNaICvTSEVUK4QJzwINvHvNelcmml8ZPu7Nx Rx6ymppq4F6a7MUnI1y/Gkyq28IYvfZYpHelHA0KoSzhBr/Vgy4dCA6mV2h+e7EPMV+3 I+WA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701094426; x=1701699226; 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=9kdAs1MJcXuPPHejdAkexStxGmrKeo9/ZkYuTVmb0VU=; b=NHkO8sBWwHOibSc09KkK96Arhvy8uuKcaiIApuZ2njHgFfkNUjrLe98HPTzHGmIoS1 7RtJuxgZawMith58zpTK3vEOX30IwzIR1CIgGJ+A32oPQZ2EIpC4FGo1VXgaK8F46Q1G gj/nYsF2eYAG4RTSNUaz0IF9/xW0RvfaQYaFxBv7VddSuGXJISo1d76yaKVy/WMr/07L 37oyRWn19N/AyqKI5wKTmHtciKM5YFQWyPMRGFRxjOB6vTWLSfeQ2mM0NVZsEb6WqKcW tvbczZpBL8M8hmM5W7m97ujVRns7ESCdpOoCpiLJGbdeyJz/DS/MzGAGoQUYj6ZfxGJk Iopw== X-Gm-Message-State: AOJu0Yycrc3LBYbIHWJBo+TCHGYVoWxKYGMVop2C0Qfo26O3abfxbHlQ gGjcG1vb//QisjgIPMtSeZ1MN7BIOyKtxw== X-Google-Smtp-Source: AGHT+IF7XO+57hao/i105qRWNU98qqjNFbo7I+jgj+SEKPMIAIYlDITfNqO2ety+PmZfzc29dBzzUg== X-Received: by 2002:a05:6512:1588:b0:50a:af72:538 with SMTP id bp8-20020a056512158800b0050aaf720538mr5095709lfb.55.1701094426379; Mon, 27 Nov 2023 06:13:46 -0800 (PST) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , Andrew Cooper , George Dunlap , Jan Beulich , Wei Liu , Shawn Anastasio Subject: [PATCH v4 12/14] xen/asm-generic: introduce stub header softirq.h Date: Mon, 27 Nov 2023 16:13:25 +0200 Message-ID: <090991be61252cabefc06da19597e3a86a4cd1da.1701093907.git.oleksii.kurochko@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1701094454721000001 Content-Type: text/plain; charset="utf-8" is common between Arm, PPC and RISC-V so it is moved to asm-generic. Drop Arm and PPC's softirq.h and use asm-generic version instead. Signed-off-by: Oleksii Kurochko Reviewed-by: Michal Orzel Added Acked-by: Jan Beulich Acked-by: Shawn Anastasio --- Changes in V4: - Added Reviewed-by: Michal Orzel - Added Acked-by: Jan Beulich --- Changes in V3: - Drop Arm and PPC's softirq.h - Update the commit message. --- Changes in V2: - update the commit message. --- xen/arch/arm/include/asm/Makefile | 1 + xen/arch/ppc/include/asm/Makefile | 1 + xen/arch/ppc/include/asm/softirq.h | 8 -------- .../arm/include/asm =3D> include/asm-generic}/softirq.h | 7 ++++--- 4 files changed, 6 insertions(+), 11 deletions(-) delete mode 100644 xen/arch/ppc/include/asm/softirq.h rename xen/{arch/arm/include/asm =3D> include/asm-generic}/softirq.h (56%) diff --git a/xen/arch/arm/include/asm/Makefile b/xen/arch/arm/include/asm/M= akefile index b8e0763c77..c3f4291ee2 100644 --- a/xen/arch/arm/include/asm/Makefile +++ b/xen/arch/arm/include/asm/Makefile @@ -7,4 +7,5 @@ generic-y +=3D numa.h generic-y +=3D paging.h generic-y +=3D percpu.h generic-y +=3D random.h +generic-y +=3D softirq.h generic-y +=3D vm_event.h diff --git a/xen/arch/ppc/include/asm/Makefile b/xen/arch/ppc/include/asm/M= akefile index a4188dce1d..4da0c70cc0 100644 --- a/xen/arch/ppc/include/asm/Makefile +++ b/xen/arch/ppc/include/asm/Makefile @@ -10,4 +10,5 @@ generic-y +=3D numa.h generic-y +=3D paging.h generic-y +=3D percpu.h generic-y +=3D random.h +generic-y +=3D softirq.h generic-y +=3D vm_event.h diff --git a/xen/arch/ppc/include/asm/softirq.h b/xen/arch/ppc/include/asm/= softirq.h deleted file mode 100644 index a0b28a5e51..0000000000 --- a/xen/arch/ppc/include/asm/softirq.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef __ASM_PPC_SOFTIRQ_H__ -#define __ASM_PPC_SOFTIRQ_H__ - -#define NR_ARCH_SOFTIRQS 0 - -#define arch_skip_send_event_check(cpu) 0 - -#endif /* __ASM_PPC_SOFTIRQ_H__ */ diff --git a/xen/arch/arm/include/asm/softirq.h b/xen/include/asm-generic/s= oftirq.h similarity index 56% rename from xen/arch/arm/include/asm/softirq.h rename to xen/include/asm-generic/softirq.h index 976e0ebd70..83be855e50 100644 --- a/xen/arch/arm/include/asm/softirq.h +++ b/xen/include/asm-generic/softirq.h @@ -1,11 +1,12 @@ -#ifndef __ASM_SOFTIRQ_H__ -#define __ASM_SOFTIRQ_H__ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __ASM_GENERIC_SOFTIRQ_H__ +#define __ASM_GENERIC_SOFTIRQ_H__ =20 #define NR_ARCH_SOFTIRQS 0 =20 #define arch_skip_send_event_check(cpu) 0 =20 -#endif /* __ASM_SOFTIRQ_H__ */ +#endif /* __ASM_GENERIC_SOFTIRQ_H__ */ /* * Local variables: * mode: C --=20 2.43.0 From nobody Sat May 18 05:04:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1701094458; cv=none; d=zohomail.com; s=zohoarc; b=gPExuVi26TfitnXC+vTK/JvbxRvhAmsiwMVkWFj14HlTAWLC044PTRKzAuv5iFHvF1Dbz+ncoadEwgvqtxEbRsrR6tHmgoVwD4HAXDkwY9ovqfZbwrSLp5ilT6VU32OdKgUaQNZGzC5stgiO0CBLDsCvTRqXajwY4Y7ahFNVejo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701094458; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=+K9fYcSeRYeq73qmv3zekjZbm7cEpWWW1b3TdqlhfPg=; b=gNo5dc4dml/xQ1cVgBzWYtCxMxIX35pAt4ktrlJhzZ96YALBkmewd2yT2D2nsp3x6Z3JMyfKNlSr1XWjOerX2t/9AvCPdM6uV265Wk3+Oo3E9xq/01GIdL+Uvuc+KNI2iKaO0wRkXzjUi4VkSaKtXdolqQO7kvqcfQIGzr1Sj94= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1701094458837575.6978030769078; Mon, 27 Nov 2023 06:14:18 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.642130.1001421 (Exim 4.92) (envelope-from ) id 1r7cMx-0000kH-JV; Mon, 27 Nov 2023 14:13:51 +0000 Received: by outflank-mailman (output) from mailman id 642130.1001421; Mon, 27 Nov 2023 14:13:51 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r7cMx-0000h1-7E; Mon, 27 Nov 2023 14:13:51 +0000 Received: by outflank-mailman (input) for mailman id 642130; Mon, 27 Nov 2023 14:13:49 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r7cMv-0005XE-3w for xen-devel@lists.xenproject.org; Mon, 27 Nov 2023 14:13:49 +0000 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [2a00:1450:4864:20::12d]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 2efbd014-8d2f-11ee-98e2-6d05b1d4d9a1; Mon, 27 Nov 2023 15:13:48 +0100 (CET) Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-50baa2a278bso2638234e87.0 for ; Mon, 27 Nov 2023 06:13:48 -0800 (PST) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id x29-20020ac259dd000000b00507b869b068sm1494100lfn.302.2023.11.27.06.13.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 06:13:46 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 2efbd014-8d2f-11ee-98e2-6d05b1d4d9a1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701094428; x=1701699228; 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=+K9fYcSeRYeq73qmv3zekjZbm7cEpWWW1b3TdqlhfPg=; b=BqMvaPR0PLF41NXF89n9bb5OlRuBdPKIhEJZVsWgwooaeaii3yWcwWLHqRYji0nQ6m l1tc/cOrkFqPYc1ZycD3q6F43npcezsT/myPvl6FTcnKROlWFeseXHuuqtqgqjoWqiKm 81FVIOB8DHl/KChRIiZshZ1q90Fz6ehEOJUzA9cbm1bS6CLK3mOKg9rhv4B6j0BnWqIP S0aAa3UJEu71w6V4JpRIEIZv0xXNcsM63ZNsR9kZY0+RXh+gR0CZOkNcM8XO8owSJRNK d/47TURUEikV4oQimOcjM265tpx89AUM+AhOsZi6YYpU0x+dbM/t0uYbFzcX3NFoJof7 +J4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701094428; x=1701699228; 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=+K9fYcSeRYeq73qmv3zekjZbm7cEpWWW1b3TdqlhfPg=; b=n0WVKEsZ/OWr1svRWQpQ6LgZZ02xfyoSJBkS33dF2G8f3efOrx969flD99rrRxBf+v Xc+fcF/VqYr597VUyDzU9xTWJ5nksVTn9rWvXKp0XSzJb6meY+8iGHCoOwzH6tpDxupW YKpGQ1LFrTqAfkdCozLvhIaGZZFddL/M3DCHSyuT3Ue1fCoq8S5+1GSfURt0n2Kl3L+N kLseLAGBmI/miFOx2K+ZNlWDNvBI0pN/LqqTcShpA18ggsZRP1c9Q3MlqVE7PY0FPLXx 8pqBJxbDBSgE/7Dq+dtBchfEWVfNpqljE/2Vn1LJhodfCh77WrVxUfsn3D1MIdrTSKcd LirQ== X-Gm-Message-State: AOJu0YyU3TOjBksFmpKB3L2hgWmT4Iv0DAeny4/TFQfJbsFOgi0rSOBY KrrPxGtfyhw5lR9ZB8bLQgvFwT+MD4KQcQ== X-Google-Smtp-Source: AGHT+IGIcJqUMoKPodavVLftJXyzgym2+XXHilyK7pfv/1E5QyNQPki/WNSmULlxxUiUHUYFnU/9Vg== X-Received: by 2002:a05:6512:11eb:b0:509:4bb5:ff96 with SMTP id p11-20020a05651211eb00b005094bb5ff96mr6195802lfs.59.1701094427177; Mon, 27 Nov 2023 06:13:47 -0800 (PST) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , Andrew Cooper , George Dunlap , Jan Beulich , Wei Liu , Shawn Anastasio Subject: [PATCH v4 13/14] xen: ifdef inclusion of in Date: Mon, 27 Nov 2023 16:13:26 +0200 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1701094460881000001 Content-Type: text/plain; charset="utf-8" Ifdef-ing inclusion of allows to avoid generation of empty for cases when CONFIG_GRANT_TABLE is not enabled. The following changes were done for Arm: should be included directly because it contains gnttab_dom0_frames() macros which is unique for Arm and is used in arch/arm/domain_build.c. is #ifdef-ed with CONFIG_GRANT_TABLE in so in case of !CONFIG_GRANT_TABLE gnttab_dom0_frames won't be available for use in arch/arm/domain_build.c. Suggested-by: Jan Beulich Signed-off-by: Oleksii Kurochko --- Changes in V4: - Nothing changed. Only rebase. --- Changes in V3: - Remove unnecessary comment. --- xen/arch/arm/domain_build.c | 1 + xen/arch/ppc/include/asm/grant_table.h | 5 ----- xen/include/xen/grant_table.h | 3 +++ 3 files changed, 4 insertions(+), 5 deletions(-) delete mode 100644 xen/arch/ppc/include/asm/grant_table.h diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index a26cbff68e..646862b10e 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -34,6 +34,7 @@ =20 #include #include +#include #include =20 #define STATIC_EVTCHN_NODE_SIZE_CELLS 2 diff --git a/xen/arch/ppc/include/asm/grant_table.h b/xen/arch/ppc/include/= asm/grant_table.h deleted file mode 100644 index d0ff58dd3d..0000000000 --- a/xen/arch/ppc/include/asm/grant_table.h +++ /dev/null @@ -1,5 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ASM_PPC_GRANT_TABLE_H__ -#define __ASM_PPC_GRANT_TABLE_H__ - -#endif /* __ASM_PPC_GRANT_TABLE_H__ */ diff --git a/xen/include/xen/grant_table.h b/xen/include/xen/grant_table.h index 85fe6b7b5e..50edfecfb6 100644 --- a/xen/include/xen/grant_table.h +++ b/xen/include/xen/grant_table.h @@ -26,7 +26,10 @@ #include #include #include + +#ifdef CONFIG_GRANT_TABLE #include +#endif =20 struct grant_table; =20 --=20 2.43.0 From nobody Sat May 18 05:04:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1701094456; cv=none; d=zohomail.com; s=zohoarc; b=adTWD1UuT37kJe4TkWCbPpa8wbmlAo1a+RpbQ0xVHsYZZ+WUOBzAPZj8wFmmLDja7RyOmWgrnJJfLajWLLBF39keero3eNRjJUsMlbBn0rUwmn3t2MdNpDZO/O4Pkoi+led7hpR06JhEnwFJP79K4MBLuBB6Pua/E0YdcmC/y3s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701094456; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=r0iOf2hTMhBZexTObReAkFaeeSyAcKp7YhGZC/f1qqo=; b=dQS2u/sVFWj+HaWa74UME7atg8zRVwraH80bZ0OxY2YeJiQWUZQ6uBTjICAFh/s+Po15eQpgq8CP8loYPZtHgUA5/sTnKLGQWFYIhZYFAGAeZOlYsvn8DOGxxTn9j1AeApqfW/KCEWaH0Rpt0S7mErjKxAgVTXQktsKFTWCIPGw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1701094456312981.9524468260457; Mon, 27 Nov 2023 06:14:16 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.642131.1001424 (Exim 4.92) (envelope-from ) id 1r7cMy-0000q8-61; Mon, 27 Nov 2023 14:13:52 +0000 Received: by outflank-mailman (output) from mailman id 642131.1001424; Mon, 27 Nov 2023 14:13:52 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r7cMx-0000p5-TE; Mon, 27 Nov 2023 14:13:51 +0000 Received: by outflank-mailman (input) for mailman id 642131; Mon, 27 Nov 2023 14:13:50 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r7cMw-0005XE-7e for xen-devel@lists.xenproject.org; Mon, 27 Nov 2023 14:13:50 +0000 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [2a00:1450:4864:20::132]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 2fa4ea2b-8d2f-11ee-98e2-6d05b1d4d9a1; Mon, 27 Nov 2023 15:13:49 +0100 (CET) Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-5094cb3a036so5768083e87.2 for ; Mon, 27 Nov 2023 06:13:49 -0800 (PST) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id x29-20020ac259dd000000b00507b869b068sm1494100lfn.302.2023.11.27.06.13.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 06:13:48 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 2fa4ea2b-8d2f-11ee-98e2-6d05b1d4d9a1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701094429; x=1701699229; 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=r0iOf2hTMhBZexTObReAkFaeeSyAcKp7YhGZC/f1qqo=; b=IKxGI901CiRxhXPOjVdmC3QmHJE+UzR0w8eEEmcV+3RQ7597Ag8S1yaC4EnN3xOpez P1DPTjhIRrZtxMvRryNcxx3uuxLHTfO0w69AeUoAz6gD3YRp1r5Bp0CkLp8JFpnxf+fO CisahWQ9u/lm1N8zu7jhU1ScGXx79pfDhe2GLbJTxF8w/6/S3OQPqTIquaxNUZQZ9p6S aiHX89z9kJgLV2LqWzUpJO5HJcCPLTtbrPfEOfXpG6NBQm4YZLaQI5XAqJQaKrpBiHxr BvbpKgj0ESMIKT8KMvoBp5vIQVWUCQL9EzVD8KLxqqJfZ+NDgI0w+LtryZJtaTw/u8Lf BWaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701094429; x=1701699229; 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=r0iOf2hTMhBZexTObReAkFaeeSyAcKp7YhGZC/f1qqo=; b=MaOkf4Ya1XvW2Gu/ZUWH0Rz72X4+X+M70bX2KU8AQMTR5IRwnyROVZAVkbaATIY9CY Dmjxer6sJ2Napfpr2FFBZXi9e8N6/K83f8ZI4Wc3iRKaAR4cM1LKfBIpw2V7KkgGubRr 6j7rnM8U9PFSPuPe8gLq2wILuGmvFG9o82ofDEQgR7qjfl9VwpqaxTJ7kSM0VRL3qZ0n 6MvMBwDPDsyEVVx0rZWmM6e7AXO3HzL97Xglug8FbcbKIcfSjPMrdDKY7U7mHtiYLMm9 VkXmRSjz+Y1xsd1/36kv0MU1eUGuewoKkt/Wh/cTn0ymfMuSh1xQwO/qKSdv+VH8lBGx kDIQ== X-Gm-Message-State: AOJu0YziFF89onLU7dfaLeomqYYgXbr6yaT1tkub7GDWF0VaSicEIl0B qDaAKSbjhUfv+0KoYkUGf+joLWH6s9KNwQ== X-Google-Smtp-Source: AGHT+IEn+2Umx1QwZQfZosBAm8En1WuFDBDCAyHpi2S4U21cq4UkU/GGWMJwz0BiPihG4x1eHoNoXw== X-Received: by 2002:a05:6512:3694:b0:50a:7640:6a83 with SMTP id d20-20020a056512369400b0050a76406a83mr6658554lfs.32.1701094429022; Mon, 27 Nov 2023 06:13:49 -0800 (PST) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , Tamas K Lengyel , Alexandru Isaila , Petre Pircalabu , Shawn Anastasio , Jan Beulich Subject: [PATCH v4 14/14] xen/asm-generic: ifdef inclusion of Date: Mon, 27 Nov 2023 16:13:27 +0200 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1701094456794000009 Content-Type: text/plain; charset="utf-8" ifdefing inclusion of in allows to avoid generation of empty header for the case when !CONFIG_MEM_ACCESS. For Arm it was explicitly added inclusion of for p2m.c and traps.c because they require some functions from whi= ch aren't available in case of !CONFIG_MEM_ACCESS. Suggested-by: Jan Beulich Signed-off-by: Oleksii Kurochko --- Changes in V4: - Nothing changed. Only rebase. --- Changes in V3: - Remove unnecessary comment. --- xen/arch/arm/p2m.c | 1 + xen/arch/arm/traps.c | 1 + xen/arch/ppc/include/asm/mem_access.h | 5 ----- xen/include/xen/mem_access.h | 2 ++ 4 files changed, 4 insertions(+), 5 deletions(-) delete mode 100644 xen/arch/ppc/include/asm/mem_access.h diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index b991b76ce4..2465c266e9 100644 --- a/xen/arch/arm/p2m.c +++ b/xen/arch/arm/p2m.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include =20 diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index 8492e2b7bb..0ad056b89b 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include diff --git a/xen/arch/ppc/include/asm/mem_access.h b/xen/arch/ppc/include/a= sm/mem_access.h deleted file mode 100644 index e7986dfdbd..0000000000 --- a/xen/arch/ppc/include/asm/mem_access.h +++ /dev/null @@ -1,5 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ASM_PPC_MEM_ACCESS_H__ -#define __ASM_PPC_MEM_ACCESS_H__ - -#endif /* __ASM_PPC_MEM_ACCESS_H__ */ diff --git a/xen/include/xen/mem_access.h b/xen/include/xen/mem_access.h index 4e4811680d..87d93b31f6 100644 --- a/xen/include/xen/mem_access.h +++ b/xen/include/xen/mem_access.h @@ -33,7 +33,9 @@ */ struct vm_event_st; =20 +#ifdef CONFIG_MEM_ACCESS #include +#endif =20 /* * Additional access types, which are used to further restrict --=20 2.43.0