From nobody Thu May 16 07:06:13 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=1706283756; cv=none; d=zohomail.com; s=zohoarc; b=OyCBlf6Tbad4uGlMNARsP2L0r5EnizpFUFYAICPrQoNV5p9Jb2uwK+5JgeaFIigCIH7Blp7yZJosnMZ7UBMM3c15dXK7NFVdRuaz/HgvSNeb15AuqzXI0hOPkkZr+MqW5SSQttclxLfX/GAlv2BUowD78jaitJO0nr7HWZiYLjM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1706283756; 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=9frqrEGnz0W4k7a7XllRVu4rPLg+BpM3QOeHeG0pwG0=; b=LSZDI4XlboMA+wUhUKvVmLatAEb83EUjnhwjcPHlpiaOjDPZLIyDrX+0d1To8hEmp2pB26G6iYf8HWoGfBgkv0WG7ApjEvDxwNRz4fNVDsHH9vBrbU8UoNiNCrhP/pxyRXOTQthzhPV7zzgYaoMYyz9G8QBMeE1Q+84vMRn5lBc= 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 1706283756609647.2108514037959; Fri, 26 Jan 2024 07:42:36 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.672090.1045759 (Exim 4.92) (envelope-from ) id 1rTOLO-0002rr-O4; Fri, 26 Jan 2024 15:42:14 +0000 Received: by outflank-mailman (output) from mailman id 672090.1045759; Fri, 26 Jan 2024 15:42:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rTOLO-0002qt-JV; Fri, 26 Jan 2024 15:42:14 +0000 Received: by outflank-mailman (input) for mailman id 672090; Fri, 26 Jan 2024 15:42:13 +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 1rTOLN-0002k9-IV for xen-devel@lists.xenproject.org; Fri, 26 Jan 2024 15:42:13 +0000 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [2a00:1450:4864:20::12e]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 7905a9bd-bc61-11ee-8a43-1f161083a0e0; Fri, 26 Jan 2024 16:42:12 +0100 (CET) Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-5100c2f7a16so458697e87.1 for ; Fri, 26 Jan 2024 07:42:12 -0800 (PST) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id q5-20020ac25105000000b0050e7ec49881sm208351lfb.21.2024.01.26.07.42.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 07:42:11 -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: 7905a9bd-bc61-11ee-8a43-1f161083a0e0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706283732; x=1706888532; 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=9frqrEGnz0W4k7a7XllRVu4rPLg+BpM3QOeHeG0pwG0=; b=IGdWECKa3A19Z3sQxraETJabPBn83yrgG9gXgdG46AvRLdNMTnDKsX5/MT2QblWhT+ 0pUH6MP1zVtc9rd/z7rrb/9y/ZR5asQLVcuwcB53PI5BcCZCjk/KmXgtWtOdIeG2TS1N /l5XnSP+euVS+MvtlEKzO/gX4P6cX01xC/zn0iJbkDFlIUp3x+vHQulA4+y72Htko0Zl rW/x/NhCaQ1zYOGJqFfIW6b8zkphz2wnMi56D+TVc9EhbFs+r4AJ5Yg1VXEBVO9D6DjR /hK94uBMrLMIhIHeBOQKq2Nk+RuJ0QuH0rCEgaa3mV6qOEIWMnYcIbPuZMBZzagCvZaW dEnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706283732; x=1706888532; 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=9frqrEGnz0W4k7a7XllRVu4rPLg+BpM3QOeHeG0pwG0=; b=ErzYlw7kKQsY3MJMNw3zL5ppNkEl1EMeI4juJlXIcYzrcuxSqizbxlA2P3LkPYQ07x +g5U7cE9GTqVnmaECdBKmxU9Z9xjzOVuxeC43uWvznpmGQ92fQ+7m6TeEPd2g4HXz1In a/C7uGadpNjg6WHTO4bpLjjzV8DOdRJAXZnM7FQqqmwCln9ccb08e4oS65Il9oGjHWOs 8k2oan4bv9vQACe1zcxXWCZguyQxD97XkTM7f5GbtUXKq/qsbTqPb/ijadboS8+wxu5c a/hQaEKnxJeuJuJXBZ7NrKymxJl+8caI6X136KUlZZS37c+g63GOkUtOemXHQeuMK9KA 61rA== X-Gm-Message-State: AOJu0Yy4hZU3rZIJ0HxpWiwRuPgtQYKg9hSkdlhwvFMRZO/Qj7H5RECl 1bRV6C9V8MlfLy46caTwto39a8hJpcYegjzCMPU3cehnw7ePXzJCR9Ft7Xgo X-Google-Smtp-Source: AGHT+IE3qzD0ycJ8aiiklcdFzLB2L8rKX5f2U3LKuisq5f7IpONyuxZcQKGG95f6dysttMDBOZDcAw== X-Received: by 2002:a19:6457:0:b0:510:1489:b5a8 with SMTP id b23-20020a196457000000b005101489b5a8mr795186lfj.4.1706283731496; Fri, 26 Jan 2024 07:42:11 -0800 (PST) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Doug Goldstein , Stefano Stabellini Subject: [PATCH v7 1/7] automation: ensure values in EXTRA_FIXED_RANDCONFIG are separated by new line Date: Fri, 26 Jan 2024 17:42:01 +0200 Message-ID: <0350f75605245b2300ba3c5d46d004c387e89687.1706281994.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: 1706283756875100001 Content-Type: text/plain; charset="utf-8" Kconfig tool expects each configuration to be on a new line. The current version of the build script puts all of ${EXTRA_FIXED_RANDCONFI= G} in a single line and configs are seperated by spaces. As a result, only the first configuration in ${EXTRA_FIXED_RANDCONFIG} will be used. Signed-off-by: Oleksii Kurochko --- Changes in V7: - Nothing changed. Only rebase --- Changes in V6: - The patch was introduced in this version of patch series. --- automation/scripts/build | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/automation/scripts/build b/automation/scripts/build index b3c71fb6fb..13b043923d 100755 --- a/automation/scripts/build +++ b/automation/scripts/build @@ -14,7 +14,7 @@ if [[ "${RANDCONFIG}" =3D=3D "y" ]]; then =20 # Append job-specific fixed configuration if [[ -n "${EXTRA_FIXED_RANDCONFIG}" ]]; then - echo "${EXTRA_FIXED_RANDCONFIG}" >> xen/tools/kconfig/allrandom.co= nfig + sed "s/ /\n/g" <<< "${EXTRA_FIXED_RANDCONFIG}" > xen/tools/kconfig= /allrandom.config fi =20 make -j$(nproc) -C xen KCONFIG_ALLCONFIG=3Dtools/kconfig/allrandom.con= fig randconfig @@ -28,9 +28,11 @@ else echo "CONFIG_DEBUG=3D${debug}" >> xen/.config =20 if [[ -n "${EXTRA_XEN_CONFIG}" ]]; then - echo "${EXTRA_XEN_CONFIG}" >> xen/.config + sed "s/ /\n/g" <<< "${EXTRA_XEN_CONFIG}" >> xen/.config fi =20 + cat xen/.config + make -j$(nproc) -C xen olddefconfig fi =20 --=20 2.43.0 From nobody Thu May 16 07:06:13 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=1706283754; cv=none; d=zohomail.com; s=zohoarc; b=GYwZCnmBbdP9BNnjN8WMCwTXntSjohUqHtb6SdY+R5Mf2VQcGybah2tzYxgGhIenYF9xJiHp/1wLxs2EwgodAh7Qj69mk4OEdPZ99GRvgZ8G4N69mU7PCiLw97KVy7E5lNQbn+Gt/lOG6Gs6iPnprIUcIml2VHvHE9o9YH4uLnM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1706283754; 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=VEZW9bC9IZuUyn5hU4hwwOb0kPnkeC45L5CWqPFzyWM=; b=LhFOHMGP3Eb1bkYbVYKi3LZTgTAIYfgNwqxXI7wsc7oX9cM38BQREgFbdZTuVlrM02ci088nX4WfAAj2J28gpL8LK51P6b1VIrR0H6m3cuGSiOrcc22Qt+lG+DLvt5cuOIkByj7OpuAtScRRIxQYOov4Ioc/I8b65QjM8tHQY6A= 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 1706283754802753.6216536332786; Fri, 26 Jan 2024 07:42:34 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.672091.1045773 (Exim 4.92) (envelope-from ) id 1rTOLP-0003GE-V4; Fri, 26 Jan 2024 15:42:15 +0000 Received: by outflank-mailman (output) from mailman id 672091.1045773; Fri, 26 Jan 2024 15:42:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rTOLP-0003G7-RK; Fri, 26 Jan 2024 15:42:15 +0000 Received: by outflank-mailman (input) for mailman id 672091; Fri, 26 Jan 2024 15:42:14 +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 1rTOLO-0002k9-Ip for xen-devel@lists.xenproject.org; Fri, 26 Jan 2024 15:42:14 +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 79405bba-bc61-11ee-8a43-1f161083a0e0; Fri, 26 Jan 2024 16:42:12 +0100 (CET) Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-5100c2f7a16so458704e87.1 for ; Fri, 26 Jan 2024 07:42:12 -0800 (PST) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id q5-20020ac25105000000b0050e7ec49881sm208351lfb.21.2024.01.26.07.42.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 07:42:11 -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: 79405bba-bc61-11ee-8a43-1f161083a0e0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706283732; x=1706888532; 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=VEZW9bC9IZuUyn5hU4hwwOb0kPnkeC45L5CWqPFzyWM=; b=GcZ1e2aRoSGSa2QrUHmXldkfXO2UASRFV74EBCMwoeG/uqiiYCmx8RL5txQ6nLmgnl xd/L+nGjCD1euVFH4WDT9QrpEBbkj0kjkavAh0sYSrEaLf6zBIrao1b/c86SbjXcM7AV 9MENnfMrpRx8vfBZkEYWyNQpUhxrUpFIHIjNtYr+Nx/86YvYdHZhP2Y90/21j+B2029W 6piJcsDXAmACpUxjvfkjovpjiZmjafTEnb/MksLp88nPFVZJp44yLYU3fgk/FNmID7Hi iH4bAQN04DsQ9l1tVMdqxKKUPV/mFhj9N9siPLKrarluSADG/xJzVsDsRwfL4p83SQMK h85g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706283732; x=1706888532; 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=VEZW9bC9IZuUyn5hU4hwwOb0kPnkeC45L5CWqPFzyWM=; b=sG5wG89aPyKbGwt6zRlpDPynEPCjFKWSrz2ThG7/1KWSESwyxCFHYWq2XqyY7xiIeM b4AxM5jaldzE6JwZbUwypMKlR0Z09KCchaoNE6mMmmJdt7a0NeWSX5qkDlVgYIaV9YoP 0aqoGGeMTvn4RJDntk+PdNjWFSqPpTbICSgWhRavWbww3oFCdZWGQLfixDOw4GpHeX04 FfGgLxRFK3wHLmCwVAm4IqTyYuy5xdNIwntbxEKgjqMx2/UufZkBBI+PQuS5xWVETucE dYxucs5dC+fvr6g1ffn/gEujnfDp/LaDCpnl0FMYm4Q4mlD3Q6cEIhU2KXgY/9nZ1ma/ 0+Fg== X-Gm-Message-State: AOJu0Yyq02gc7DmFdnn/y2oYpukKxhQRtiI4aDX//xmtZOF0BqW6pX+O XiQCQB81C/TuAItpgQ5w2dhij/JwwFcI/Qg4NB6mrRb6lPt3iqcEIaguQJMo X-Google-Smtp-Source: AGHT+IEe9j/Pjph1NsnFlw2LwlbWbgpilGjH7F9SOqvpbcVHNAN5EN/XiY1sJWitLcqPCemnE/5y+g== X-Received: by 2002:ac2:4985:0:b0:510:194e:4e07 with SMTP id f5-20020ac24985000000b00510194e4e07mr13193lfl.26.1706283732052; Fri, 26 Jan 2024 07:42:12 -0800 (PST) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Doug Goldstein , Stefano Stabellini Subject: [PATCH v7 2/7] automation: introduce fixed randconfig for RISC-V Date: Fri, 26 Jan 2024 17:42:02 +0200 Message-ID: <6641e6fdd36c4128c6c76badfb778dc195f1e419.1706281994.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: 1706283756896100002 Content-Type: text/plain; charset="utf-8" This patch introduces the file riscv-fixed-randconfig.yaml, which includes all configurations that should be disabled for randconfig builds. Suggested-by: Stefano Stabellini Signed-off-by: Oleksii Kurochko --- The patch were introduced after discussion in a topic: https://lore.kernel.org/xen-devel/cover.1701966261.git.oleksii.kurochko@gm= ail.com/ --- Changes in V7: - Nothing changed. Only rebase --- Changes in V6: - The patch was introduced in this version of patch series. --- automation/gitlab-ci/build.yaml | 8 ++++---- automation/gitlab-ci/riscv-fixed-randconfig.yaml | 7 +++++++ 2 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 automation/gitlab-ci/riscv-fixed-randconfig.yaml diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.y= aml index 32af30cced..38cd93c306 100644 --- a/automation/gitlab-ci/build.yaml +++ b/automation/gitlab-ci/build.yaml @@ -516,6 +516,8 @@ alpine-3.18-gcc-debug-arm64-boot-cpupools: CONFIG_BOOT_TIME_CPUPOOLS=3Dy =20 # RISC-V 64 cross-build +include: 'automation/gitlab-ci/riscv-fixed-randconfig.yaml' + archlinux-current-gcc-riscv64: extends: .gcc-riscv64-cross-build variables: @@ -536,8 +538,7 @@ archlinux-current-gcc-riscv64-randconfig: CONTAINER: archlinux:current-riscv64 KBUILD_DEFCONFIG: tiny64_defconfig RANDCONFIG: y - EXTRA_FIXED_RANDCONFIG: - CONFIG_COVERAGE=3Dn + EXTRA_FIXED_RANDCONFIG: !reference [.riscv-fixed-randconfig, variables= , EXTRA_FIXED_RANDCONFIG] =20 archlinux-current-gcc-riscv64-debug-randconfig: extends: .gcc-riscv64-cross-build-debug @@ -545,8 +546,7 @@ archlinux-current-gcc-riscv64-debug-randconfig: CONTAINER: archlinux:current-riscv64 KBUILD_DEFCONFIG: tiny64_defconfig RANDCONFIG: y - EXTRA_FIXED_RANDCONFIG: - CONFIG_COVERAGE=3Dn + EXTRA_FIXED_RANDCONFIG: !reference [.riscv-fixed-randconfig, variables= , EXTRA_FIXED_RANDCONFIG] =20 # Power cross-build debian-bullseye-gcc-ppc64le: diff --git a/automation/gitlab-ci/riscv-fixed-randconfig.yaml b/automation/= gitlab-ci/riscv-fixed-randconfig.yaml new file mode 100644 index 0000000000..f1282b40c9 --- /dev/null +++ b/automation/gitlab-ci/riscv-fixed-randconfig.yaml @@ -0,0 +1,7 @@ +.riscv-fixed-randconfig: + variables: + EXTRA_FIXED_RANDCONFIG: + CONFIG_COVERAGE=3Dn + CONFIG_EXPERT=3Dy + CONFIG_GRANT_TABLE=3Dn + CONFIG_MEM_ACCESS=3Dn --=20 2.43.0 From nobody Thu May 16 07:06:13 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=1706283756; cv=none; d=zohomail.com; s=zohoarc; b=nyAgfiHUUYXVz5DXtV9dxkZ6TcpqpmMU0yEKZ9oVcLRp6ha9Hb0xtKsnHqMJ0/AZxDEGXREcUr21NGncB2LwQno66+wQtPeiKXEcyw1ZJ/U4xXABD6JnX8tOhiw+Qg1BEQYMY8xfwwlb3zp/Zv3Qt2da/cGPYXp3yykSSeKF/B8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1706283756; 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=PEnbKoxUIDJ0rSJ2LPqRBVQnrHP4+bmWPqcwN9Vjt2M=; b=PfH31kkCJ+B9EDWEQTy65AUTTdqYpweqom/0SbKzFrQROMUfscgki7hBtGWctshwa7G+edS/nbu3l1wxn9zwAl2ceRCDAKjGdxU2ya0AAxHsly+J8/41RnFM9Z5AUIm+ZFsFwl2ZH3/AAp9SkRX06bQfXMap88zelDT7MiYwlZg= 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 1706283756370843.1522649785385; Fri, 26 Jan 2024 07:42:36 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.672093.1045787 (Exim 4.92) (envelope-from ) id 1rTOLR-0003YO-Jl; Fri, 26 Jan 2024 15:42:17 +0000 Received: by outflank-mailman (output) from mailman id 672093.1045787; Fri, 26 Jan 2024 15:42:17 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rTOLR-0003XX-CS; Fri, 26 Jan 2024 15:42:17 +0000 Received: by outflank-mailman (input) for mailman id 672093; Fri, 26 Jan 2024 15:42:15 +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 1rTOLP-00039n-Nq for xen-devel@lists.xenproject.org; Fri, 26 Jan 2024 15:42:15 +0000 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [2a00:1450:4864:20::132]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 79c0cb68-bc61-11ee-98f5-efadbce2ee36; Fri, 26 Jan 2024 16:42:13 +0100 (CET) Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-5101f2dfdadso1011819e87.2 for ; Fri, 26 Jan 2024 07:42:13 -0800 (PST) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id q5-20020ac25105000000b0050e7ec49881sm208351lfb.21.2024.01.26.07.42.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 07:42:12 -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: 79c0cb68-bc61-11ee-98f5-efadbce2ee36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706283733; x=1706888533; 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=PEnbKoxUIDJ0rSJ2LPqRBVQnrHP4+bmWPqcwN9Vjt2M=; b=CGNMMHbXhVG/+tUMrNF+8F9QEn7L4jgLW2L3R/MtbEECpPtnLxj/H9VAQMcP/YIAh8 fu1iOMohBwH11iBeedCrR7rAPQtS3qTnOEe7xW5WoAsE3j8mMvBB6W7KY+KpiLvF4sEQ fP7XlGhcmhaWdOEO3xKaqpKLHUKwtWP188lgwI/d5EV3ky9tWk71cN0l3qLlrlmK8KFS NzZsSHu5tsi/UX/vLjplfITq2OlobFOVtSkVHFm+2sQhTRzRfNNYxw8C8CCCeuWX6VYx dAy0zf7kJa8O1f3em0ZVAQx2+HpbcnGNubo0Y2+THXiuVXYrhWqsRqQM4Rvh7fB8g/nr UN0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706283733; x=1706888533; 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=PEnbKoxUIDJ0rSJ2LPqRBVQnrHP4+bmWPqcwN9Vjt2M=; b=admZFuASGWb/yT3Ajv464jMlMAcGz7LZItv13BLhWOwLH2YcCuEbYSgr6gjJV3YM7n npO1m+R1tYK/qbFo1MJ7BtWFpSh37KISWTp47YVZVbVwUXBB9ovsvR3Bzbfc7jCAZOF6 r2RI9RASz0uOkh+4W3DaraBIjWxevlJTlH3QlGOKKVkvWqCrysFPWxpgEJd+peiBsWL/ Q7eUM/EFL2O7HjrWLW3iJkAR4aXy7ck1YWIS6L+cIE1PZerxNEcVfuDVXmpxuQrxMiGK iihHhejLNIDm8Ih2Hss1g8hCFFdfcCyhMR9fCNnrpdkvDP0VSSMV+5y4tTfZVOMk6hww 21cg== X-Gm-Message-State: AOJu0YwN6Kil0PkBZTuEkWsUOlguSGqNzczXmzf66vNwJdgCCPlhSn1P TyE9QWh0fVfd9LCOIJv2gNC/APty9r0VBhE8SJGq64xd5NHR2fRIttFITjS0 X-Google-Smtp-Source: AGHT+IGK8zG93Ct3BE/l1gWNjoWtAbdCtC8/XUbclrxLoCZbTAuapgwts2d3sdINbocUwJ5FtNnxdQ== X-Received: by 2002:a19:8c14:0:b0:50e:1d6a:48d4 with SMTP id o20-20020a198c14000000b0050e1d6a48d4mr765012lfd.122.1706283732888; Fri, 26 Jan 2024 07:42:12 -0800 (PST) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Tamas K Lengyel , Alexandru Isaila , Petre Pircalabu , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , Shawn Anastasio , Jan Beulich Subject: [PATCH v7 3/7] xen/asm-generic: introduce stub header monitor.h Date: Fri, 26 Jan 2024 17:42:03 +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: 1706283756973100005 Content-Type: text/plain; charset="utf-8" The header is shared between several archs so it is moved to asm-generic. Switch partly Arm and PPC to asm-generic/monitor.h and only arch_monitor_get_capabilities() left in arch-specific/monitor.h. Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich Acked-by: Tamas K Lengyel --- Changes in V7: - Drop definition of arch_monitor_domctl_event for PPC. - define arch_monitor_domctl_event in asm-generic/monitor.h. - add "define HAS_ARCH_MONITOR_DOMCTL_EVENT" in arm/.../monitor.h as it ha= s arch specific implementation. --- Changes in V6: - Rebase only. --- Changes in V5: - Switched partly Arm and PPC to asm-generic monitor.h only arch_monitor_get_capabilities() left in arch-specific/monitor.h. - Updated the commit message. --- 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/arm/include/asm/monitor.h | 25 +----------- xen/arch/ppc/include/asm/monitor.h | 28 +------------ xen/arch/ppc/stubs.c | 8 ---- xen/include/asm-generic/monitor.h | 64 ++++++++++++++++++++++++++++++ 4 files changed, 67 insertions(+), 58 deletions(-) create mode 100644 xen/include/asm-generic/monitor.h diff --git a/xen/arch/arm/include/asm/monitor.h b/xen/arch/arm/include/asm/= monitor.h index 7567be66bd..77a3c1a36c 100644 --- a/xen/arch/arm/include/asm/monitor.h +++ b/xen/arch/arm/include/asm/monitor.h @@ -25,34 +25,13 @@ #include #include =20 -static inline -void arch_monitor_allow_userspace(struct domain *d, bool allow_userspace) -{ -} +#define HAS_ARCH_MONITOR_DOMCTL_EVENT =20 -static inline -int arch_monitor_domctl_op(struct domain *d, struct xen_domctl_monitor_op = *mop) -{ - /* No arch-specific monitor ops on ARM. */ - return -EOPNOTSUPP; -} +#include =20 int arch_monitor_domctl_event(struct domain *d, struct xen_domctl_monitor_op *mop); =20 -static inline -int arch_monitor_init_domain(struct domain *d) -{ - /* No arch-specific domain initialization on ARM. */ - return 0; -} - -static inline -void arch_monitor_cleanup_domain(struct domain *d) -{ - /* No arch-specific domain cleanup on ARM. */ -} - static inline uint32_t arch_monitor_get_capabilities(struct domain *d) { uint32_t capabilities =3D 0; diff --git a/xen/arch/ppc/include/asm/monitor.h b/xen/arch/ppc/include/asm/= monitor.h index e5b0282bf1..89000dacc6 100644 --- a/xen/arch/ppc/include/asm/monitor.h +++ b/xen/arch/ppc/include/asm/monitor.h @@ -6,33 +6,7 @@ #include #include =20 -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. */ -} +#include =20 static inline uint32_t arch_monitor_get_capabilities(struct domain *d) { diff --git a/xen/arch/ppc/stubs.c b/xen/arch/ppc/stubs.c index a96e45626d..da193839bd 100644 --- a/xen/arch/ppc/stubs.c +++ b/xen/arch/ppc/stubs.c @@ -95,14 +95,6 @@ void arch_get_domain_info(const struct domain *d, BUG_ON("unimplemented"); } =20 -/* monitor.c */ - -int arch_monitor_domctl_event(struct domain *d, - struct xen_domctl_monitor_op *mop) -{ - BUG_ON("unimplemented"); -} - /* smp.c */ =20 void arch_flush_tlb_mask(const cpumask_t *mask) diff --git a/xen/include/asm-generic/monitor.h b/xen/include/asm-generic/mo= nitor.h new file mode 100644 index 0000000000..1ade289099 --- /dev/null +++ b/xen/include/asm-generic/monitor.h @@ -0,0 +1,64 @@ +/* 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 +#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; +} + +#ifndef HAS_ARCH_MONITOR_DOMCTL_EVENT +static inline +int arch_monitor_domctl_event(struct domain *d, + struct xen_domctl_monitor_op *mop) +{ + BUG_ON("unimplemented"); +} +#endif + +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. */ +} + +#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 Thu May 16 07:06:13 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=1706283752; cv=none; d=zohomail.com; s=zohoarc; b=A1W6GRwa/9d/8xPP+6emPPfHyOH9RuSl8buWzXlwT9U8nRaiYREPsZIxmB4dPnaCHmYeHhi2vtAhfXxzy7Sfrv6S/T+VmwB+4XFJP2sWSi/S8zu/5zdvBc4PtggpHagIRaRF4WSpbMs6yOUo/+OSeYrK2s4ktCoV83+9sRXNLYo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1706283752; 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=GiIkhTp0Ki6vQDdcTozvmRdsu4x2izraQMAOShMyo6I=; b=almhnUE/3ARf0iJFMr84g4YVkwnNSWit2MsesqZ3MzlzcGAPdzpyh9AsBbN8nLvzhwOfi5VulXaF1utNxn4kDAWKad0NRmkPspgsdU3b+HYgNOlmjZcj0E1QMba1XhlMr4UVEbt33YiLJItMflOfbOUX3HfHoRJbQNjRUvdnPyU= 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 1706283752573265.51191707254884; Fri, 26 Jan 2024 07:42:32 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.672092.1045783 (Exim 4.92) (envelope-from ) id 1rTOLR-0003Vh-5g; Fri, 26 Jan 2024 15:42:17 +0000 Received: by outflank-mailman (output) from mailman id 672092.1045783; Fri, 26 Jan 2024 15:42:17 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rTOLR-0003VQ-1v; Fri, 26 Jan 2024 15:42:17 +0000 Received: by outflank-mailman (input) for mailman id 672092; Fri, 26 Jan 2024 15:42:15 +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 1rTOLP-0002k9-J9 for xen-devel@lists.xenproject.org; Fri, 26 Jan 2024 15:42:15 +0000 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [2a00:1450:4864:20::12e]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 7a4d0ba9-bc61-11ee-8a43-1f161083a0e0; Fri, 26 Jan 2024 16:42:14 +0100 (CET) Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-51021ba75edso624467e87.3 for ; Fri, 26 Jan 2024 07:42:14 -0800 (PST) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id q5-20020ac25105000000b0050e7ec49881sm208351lfb.21.2024.01.26.07.42.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 07:42:13 -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: 7a4d0ba9-bc61-11ee-8a43-1f161083a0e0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706283734; x=1706888534; 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=GiIkhTp0Ki6vQDdcTozvmRdsu4x2izraQMAOShMyo6I=; b=CbxugwRaC9voWQ/OpznBtGC1d8JqSsqtvg7NmGIi/XMZesoMh+usPy3yFtwi+OTtEb qAyCjBSjdq9l83fgCRfSv2DBwszKyQDJ1ZG+mLudPGQBWyB0EC7QJA9toRsa+vtAoXhx 26Lg11Jco7s/j7v0wPGB6oXnSPqCDwRh7ln4fQ4/nc+Wd18BUSrGcwBl6lUrtHNhQXqh kvSY8nmm1rZS76K0KEFELrCRQ1Lsi6ln/wBlSGJECWEnaXYv3wGSN172gEwMO5oPtUyt iAID87cyI7Hvg/rtjCl94/O1doxucOH/lcS5u9eXIfgIebho7U15R8CI4ij0I7A41Ie2 C4Qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706283734; x=1706888534; 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=GiIkhTp0Ki6vQDdcTozvmRdsu4x2izraQMAOShMyo6I=; b=ct36k4+qXVPM7/vdnUSUf9A9DPuVWjhb6ypZAVl+86EeTT3H1p1z5Xvu67Z6tc8M4u ZQ4V2wHJXSoKWF++cegUcCaun7KP3PV7T3dwnU40h+tfqd2pB98Sikm5qjlLjn7Mf5IF Z0UUMRdNhj3mkZQjeFz0wPfP8WC6pNp1qpfb/6c9MOcrXFpXATdDZMdmBasNgwdkFpZr q+1/Yv0l+f4EW1L0DAjtcN6aGw01ZtxRITbdyXGA0fW6ro4OClUz/TE9tVBbelKmcFvZ 5BckSyyzAYxy9idqLZfWl6GLjznGLoeoS8CMyM2LmPjZXSqQYwdTQONs/9OZLtIlRDHw TSSg== X-Gm-Message-State: AOJu0YyaSALKoWSPKgS+XBdKNi0QnLA8E9lt+/zdgwg8QlvMPt5tXL7C JEp554fbKyGNoJKRSUN/RakY9jfte6MHjKgVd+UAoWSeUM7aY+CwKK9iQiZf X-Google-Smtp-Source: AGHT+IHktIAD+lMcXxk2xM244NybPcZDevc44vTzmfQCMHnEFiX4MqYR1ljD+yj/CMp+vgjVz6F3/Q== X-Received: by 2002:a05:6512:3b89:b0:510:150e:62a7 with SMTP id g9-20020a0565123b8900b00510150e62a7mr894338lfv.113.1706283733878; Fri, 26 Jan 2024 07:42:13 -0800 (PST) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , Shawn Anastasio , Tamas K Lengyel , Alexandru Isaila , Petre Pircalabu , Alistair Francis , Bob Eshleman , Connor Davis , Jan Beulich Subject: [PATCH v7 4/7] xen/asm-generic: ifdef inclusion of Date: Fri, 26 Jan 2024 17:42:04 +0200 Message-ID: <30c450ef4141656724b03adcc292fd1ac4b635b6.1706281994.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: 1706283752951100001 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 Acked-by: Tamas K Lengyel --- Changes in V7: - Nothing changed. Only rebase --- Changes in V6: - Remove the way how CONFIG_MEM_ACCESS is disabled for PPC and RISC-V. - Disable the config in ppc64_defconfig and tiny64_defconfig (RISC-V). --- Changes in V5: - Added dependencies for "Config MEM_ACCESS" to be sure that randconfig wi= ll not turn on the config. --- 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/configs/ppc64_defconfig | 1 + xen/arch/ppc/include/asm/mem_access.h | 5 ----- xen/arch/riscv/configs/tiny64_defconfig | 1 + xen/include/xen/mem_access.h | 2 ++ 6 files changed, 6 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 9c10e8f78c..8ddca643d4 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/configs/ppc64_defconfig b/xen/arch/ppc/configs/pp= c64_defconfig index f7cc075e45..48a053237a 100644 --- a/xen/arch/ppc/configs/ppc64_defconfig +++ b/xen/arch/ppc/configs/ppc64_defconfig @@ -6,6 +6,7 @@ # CONFIG_HYPFS is not set # CONFIG_GRANT_TABLE is not set # CONFIG_SPECULATIVE_HARDEN_ARRAY is not set +# CONFIG_MEM_ACCESS is not set =20 CONFIG_PPC64=3Dy CONFIG_DEBUG=3Dy 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/arch/riscv/configs/tiny64_defconfig b/xen/arch/riscv/confi= gs/tiny64_defconfig index 3c9a2ff941..09defe236b 100644 --- a/xen/arch/riscv/configs/tiny64_defconfig +++ b/xen/arch/riscv/configs/tiny64_defconfig @@ -6,6 +6,7 @@ # CONFIG_HYPFS is not set # CONFIG_GRANT_TABLE is not set # CONFIG_SPECULATIVE_HARDEN_ARRAY is not set +# CONFIG_MEM_ACCESS is not set =20 CONFIG_RISCV_64=3Dy CONFIG_DEBUG=3Dy 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 From nobody Thu May 16 07:06:13 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=1706283759; cv=none; d=zohomail.com; s=zohoarc; b=NE0FYwjEq8DWOIw7ObRPAamomhlC9LfPlGksAkt6r9WZLgsi2kCatz4vfr+zvr0afZ9iGmz8IQLW1MtfbHLvOf7KF+kwvEvwUZ2osa6OCejwinLtq/YlgnMiUt+kj/fw5ktF0xXwJYObWOGtKlA+uGNITNWkfVTZCOZhc72NENw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1706283759; 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=FLBEcEhjguKvXHdTuEC4hoUJhlDOkKsN5bndKqUwPUQ=; b=PhAo/wMgtxmLD3iRdd2ZO/DttwJsIuyvZZ2ckdZBDjWJws4Ss/eeSyojSk1O0S/xPf+ktsuMrGX+8HeQ2xlXudI+y9POrtGCZEhbqU7YaiKoyJq7XpAiASoZ3bPPqUDDVtstvjwI1+j13NI9mRFCgw4xE9LH+14z7ZCkjDETi5U= 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 1706283759601899.8068505708327; Fri, 26 Jan 2024 07:42:39 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.672094.1045796 (Exim 4.92) (envelope-from ) id 1rTOLS-0003jw-6e; Fri, 26 Jan 2024 15:42:18 +0000 Received: by outflank-mailman (output) from mailman id 672094.1045796; Fri, 26 Jan 2024 15:42:18 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rTOLR-0003hn-Vy; Fri, 26 Jan 2024 15:42:17 +0000 Received: by outflank-mailman (input) for mailman id 672094; Fri, 26 Jan 2024 15:42:17 +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 1rTOLR-00039n-3B for xen-devel@lists.xenproject.org; Fri, 26 Jan 2024 15:42:17 +0000 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [2a00:1450:4864:20::12e]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 7ae2e924-bc61-11ee-98f5-efadbce2ee36; Fri, 26 Jan 2024 16:42:15 +0100 (CET) Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-51022133a84so642725e87.3 for ; Fri, 26 Jan 2024 07:42:15 -0800 (PST) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id q5-20020ac25105000000b0050e7ec49881sm208351lfb.21.2024.01.26.07.42.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 07:42:14 -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: 7ae2e924-bc61-11ee-98f5-efadbce2ee36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706283735; x=1706888535; 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=FLBEcEhjguKvXHdTuEC4hoUJhlDOkKsN5bndKqUwPUQ=; b=bsaA9S/JUS1UyIS+31G5cqoW3XJXQGbFetJ5f/JQl4ztwutXVuL0mmBb56FWoqQ4Rt 0Js0PAmPMqiLJSYlxkypEVUJH3Stwambj16KCZBS/AjRcAZS4+pdM5ZHxEeq1oFhMPfC wSmkootA+0W6SU6S3nZ5cmvVF1l4YMo+MhXb659EpbnrkjV8Kn9MuRvJqGQTBNgMIIDC WETffYKszlBS22oV8IaLrY0/t/7/a320fSupKModrGsIaniATBR3pR23/ZZ1+I1PHb4S HUU5kR0CBJCO/ou1cE5jPoprJPrM+iLLoilW9KE/5sFZbc8/spKjgZRtDF8g1ZtTAV+y 7GAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706283735; x=1706888535; 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=FLBEcEhjguKvXHdTuEC4hoUJhlDOkKsN5bndKqUwPUQ=; b=gvecNdiOsvuZ0FXn8w25bK21+SySM9YWovNKIRxXYbUWPvMRqbOlxcaGyCn7sXLBj9 LDJQ32c7cz9k9Q52jRUFkIf/gwgx6mrWKvacmsi6r7NPhhB4A7dMAyly8jgO++aLQeEs FidAjhX0Tptc3grUGHNiM9IqqJNmqwQWjA2IQaizPrCDXet/Lhmtjvfh3dRK5270SoZA IfkZh8CHiH+F8og2ex2ceF+HmRJM6VKkZAKxFMVyukHAfp6fcP4Iigr1C6/1NkxvEgwD IuN2/wwgO5Vxw5q9M7KuDabDFqxFcv3FDqtP+6JuQ459nS5pAZxTO1CM1tR2eDPchJzF TM4Q== X-Gm-Message-State: AOJu0YypZCD62pIx5i8g069zF27HgfbrOq2rfGcEVyKLvqHynJ+RFHZv vp8EV6MQog0/EfRhUOURKscFfSVT4amQTDD+02s2qvgcdjH1aBe07ScjM3Tf X-Google-Smtp-Source: AGHT+IFpaeOqR1Lx9X/+OfhLDLRNmlovnlRSZA2BL1j7RuqIt8Q1MlPu+uZ7fMMcS7Tds8AECo3DnQ== X-Received: by 2002:a19:e05a:0:b0:50e:7c08:1a55 with SMTP id g26-20020a19e05a000000b0050e7c081a55mr43653lfj.18.1706283734802; Fri, 26 Jan 2024 07:42:14 -0800 (PST) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [PATCH v7 5/7] xen/asm-generic: introduce generic device.h Date: Fri, 26 Jan 2024 17:42:05 +0200 Message-ID: <621ff5bd992ea8e6202ec03fa52c0e09aacd8f83.1706281994.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: 1706283760860100001 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. Signed-off-by: Oleksii Kurochko --- Changes in V7: - keeping DEVICE_PCI_HOSTBRIDGE available for every build based on the rep= ly: https://lore.kernel.org/xen-devel/926a5c12-7f02-42ec-92a8-1c82d060c710@= xen.org/ - add comment above enum device_type.h with explanation about DEV_TYPE_MAX= . =20 - separate patch "[PATCH v6 9/9] xen/asm-generic: introduce generic devic= e.h" into 3 patches. --- Changes in V6: - Rebase only. --- Changes in V5: - Removed generated file: xen/include/headers++.chk.new - Removed pointless #ifdef CONFIG_HAS_DEVICE_TREE ... #endif for PPC as CONFIG_HAS_DEVICE_TREE will be always used for PPC. --- 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/include/asm-generic/device.h | 162 +++++++++++++++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 xen/include/asm-generic/device.h diff --git a/xen/include/asm-generic/device.h b/xen/include/asm-generic/dev= ice.h new file mode 100644 index 0000000000..f12b30dc43 --- /dev/null +++ b/xen/include/asm-generic/device.h @@ -0,0 +1,162 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __ASM_GENERIC_DEVICE_H__ +#define __ASM_GENERIC_DEVICE_H__ + +#include + +/* + * DEV_TYPE_MAX is currently not in use, but it was added because the enum= may + * be empty when !HAS_DEVICE_TREE and !HAS_PCI, which could lead to + * a compilation error. + */ +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, + DEVICE_PCI_HOSTBRIDGE, + /* Use for error */ + DEVICE_UNKNOWN, +}; + +struct dev_archdata { +#ifdef CONFIG_HAS_PASSTHROUGH + void *iommu; /* IOMMU private data */ +#endif +}; + +/* struct device - The basic device structure */ +struct device +{ + enum device_type type; +#ifdef CONFIG_HAS_DEVICE_TREE + 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 +}; + +typedef struct device device_t; + +#ifdef CONFIG_HAS_DEVICE_TREE + +#include + +#define dev_is_dt(dev) ((dev)->type =3D=3D DEV_DT) + +/** + * 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 \ +}; + +#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; + /* + * Device initialization. + * + * -EAGAIN is used to indicate that device probing is deferred. + */ + int (*init)(struct dt_device_node *dev, const void *data); + +#endif +}; + +#ifdef CONFIG_ACPI + +struct acpi_device_desc { + /* Device name */ + const char *name; + /* Device class */ + enum device_class class; + /* type of device supported by the driver */ + const int class_type; + /* Device initialization */ + int (*init)(const void *data); +}; + +/** + * acpi_device_init - Initialize a device + * @class: class of the device (serial, network...) + * @data: specific data for initializing the device + * + * Return 0 on success. + */ +int acpi_device_init(enum device_class class, + const void *data, int class_type); + +#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 */ + +#endif /* __ASM_GENERIC_DEVICE_H__ */ + +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ --=20 2.43.0 From nobody Thu May 16 07:06:13 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=1706283758; cv=none; d=zohomail.com; s=zohoarc; b=KnBvqtxatWUUIZaWQ4tZ20UlgY9L+XR+fDDVmRTyCgB+we8zrmKDIKo8YWAdlmQvv7OeBITj1KUJLhn8GbCEVllAIke/4af5KC+DrY9VJXJm+A1VjYyyPEObY6t0YTPppoYiTiD2B8bjxSun0KeG2iwWBrniAaJtYHzAWpLR5ec= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1706283758; 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=9CoC0jYDEb7IzuBO+LTtL41X0IwHwYGfKM4uqjQc6J8=; b=VRjSr5Zj7u2IQcsQjYPICBe+HEHQbSr8dxNkpnWBYtxHCj+8fZ8P7belmefCX7qcCIXN9EQWYtenVAyVqvf1KnFzrrAq5++dNRazUFqAJwsogLFGlS6FsYCdPTl3XmxGcVjtu2r//SsDimNO4DyPpvN+/HPRzdYjhZaqlkj3jPU= 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 1706283758014661.4444434077802; Fri, 26 Jan 2024 07:42:38 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.672095.1045812 (Exim 4.92) (envelope-from ) id 1rTOLT-0004Bq-Gu; Fri, 26 Jan 2024 15:42:19 +0000 Received: by outflank-mailman (output) from mailman id 672095.1045812; Fri, 26 Jan 2024 15:42:19 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rTOLT-0004Al-96; Fri, 26 Jan 2024 15:42:19 +0000 Received: by outflank-mailman (input) for mailman id 672095; Fri, 26 Jan 2024 15:42:18 +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 1rTOLS-00039n-2f for xen-devel@lists.xenproject.org; Fri, 26 Jan 2024 15:42:18 +0000 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [2a00:1450:4864:20::12f]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 7b6c9df7-bc61-11ee-98f5-efadbce2ee36; Fri, 26 Jan 2024 16:42:16 +0100 (CET) Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-5100ed2b33dso1253461e87.0 for ; Fri, 26 Jan 2024 07:42:16 -0800 (PST) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id q5-20020ac25105000000b0050e7ec49881sm208351lfb.21.2024.01.26.07.42.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 07:42:15 -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: 7b6c9df7-bc61-11ee-98f5-efadbce2ee36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706283736; x=1706888536; 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=9CoC0jYDEb7IzuBO+LTtL41X0IwHwYGfKM4uqjQc6J8=; b=ANe1mH2TQ7652+hfoPSK64RggTlI00leWyujtAMlVk7aGlENV2y4iNCJIuepjjdVeU c7t/uz6OGyUACRY28HDvrc9l8HzkfOIbNKW89fcb0y2rjQw1VUH6Ry/aa2ZHu+KFsTjl XaufhD74BZVGaev/r42K985UDCNiQhEkNs+KeabLXm2GCjj74PUqT+ph5PftGE85ZoWm uYr+qvM1uGt9i56UPuSR+d3NgpBBJduKv9H6I83ButZmofeg8ePkz5cyvVEN7AUzpMaL Wdc+o4E98FCoNb3pPiLVWEtkbBfPaIaywAEtJhNLrwCwYruFuZpibGMnw2sHdNPkJT5V N4Bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706283736; x=1706888536; 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=9CoC0jYDEb7IzuBO+LTtL41X0IwHwYGfKM4uqjQc6J8=; b=JFDdA33AJgnI9ffPDSXRpXRTTcQerxUPUtW0A+C2R4HJqgM26z3HVatsqmYWBDQcHE VJy0KoGrGuMqOsv091hKwuqBGhXbQI4UGb1y45qvYta/o6kZlYJwBkr/dbZN2t9Jb5MZ Nj2y//2BehQ96uMsUVfklnghm05y1KrEiBg5vx+Dk1eOuAincj/74wyRv03bnD3+/Ena /S5eIRlSKWbQdHN7nU1ww1IjvM728AKxkRPEal3nQ5iVkJGvXBDuaGjYEZaWfZeMESjz I2OQ5o0BywT7jQcOAnSP6elAr56S9wbWnK6lb6u1NEE5TNHw4bOxU1BZ5eRLKBprIDKb u65g== X-Gm-Message-State: AOJu0Yxzs6JjwwImffUKP+AObwvX8V5Rm9DM2WJ70rLdhXesRDjX4YwG 6hhBz3baCbt/mbCk8w5OBTofLaEi5xyH0yT8ds+NlwP1Dn8tGrpL53WeKivs X-Google-Smtp-Source: AGHT+IHjD4GEuhO7ompOdwR9Fd6BoQjwV+WsrEoI/sNz6GEohRlCZPloaxtjJeShIRWVokLGuvgn/g== X-Received: by 2002:a19:f816:0:b0:510:c4a:a02d with SMTP id a22-20020a19f816000000b005100c4aa02dmr810864lff.122.1706283735722; Fri, 26 Jan 2024 07:42:15 -0800 (PST) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk Subject: [PATCH v7 6/7] xen/arm: switch Arm to use asm-generic/device.h Date: Fri, 26 Jan 2024 17:42:06 +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: 1706283758810100007 Content-Type: text/plain; charset="utf-8" Signed-off-by: Oleksii Kurochko --- xen/arch/arm/device.c | 5 ++ 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/arm/include/asm/device.h | 124 ------------------------------ 7 files changed, 14 insertions(+), 132 deletions(-) delete mode 100644 xen/arch/arm/include/asm/device.h diff --git a/xen/arch/arm/device.c b/xen/arch/arm/device.c index 1f631d3274..3e02cff008 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) { diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 46161848dc..085d88671e 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -1651,7 +1651,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 bf0e5c1b75..1cb1360606 100644 --- a/xen/arch/arm/gic-v3.c +++ b/xen/arch/arm/gic-v3.c @@ -1909,7 +1909,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 @@ -1924,12 +1924,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 505cb49090..4a4036c951 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 altp2m.h +generic-y +=3D device.h generic-y +=3D hardirq.h generic-y +=3D iocap.h generic-y +=3D paging.h diff --git a/xen/arch/arm/include/asm/device.h b/xen/arch/arm/include/asm/d= evice.h deleted file mode 100644 index b5d451e087..0000000000 --- a/xen/arch/arm/include/asm/device.h +++ /dev/null @@ -1,124 +0,0 @@ -#ifndef __ASM_ARM_DEVICE_H -#define __ASM_ARM_DEVICE_H - -enum device_type -{ - DEV_DT, - DEV_PCI, -}; - -struct dev_archdata { - void *iommu; /* IOMMU private data */ -}; - -/* struct device - The basic device structure */ -struct device -{ - enum device_type type; -#ifdef CONFIG_HAS_DEVICE_TREE - struct dt_device_node *of_node; /* Used by drivers imported from Linux= */ -#endif - struct dev_archdata archdata; - struct iommu_fwspec *iommu_fwspec; /* per-device IOMMU instance data */ -}; - -typedef struct device device_t; - -#include - -#define dev_is_pci(dev) ((dev)->type =3D=3D DEV_PCI) -#define dev_is_dt(dev) ((dev)->type =3D=3D DEV_DT) - -enum device_class -{ - DEVICE_SERIAL, - DEVICE_IOMMU, - DEVICE_GIC, - 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); -}; - -struct acpi_device_desc { - /* Device name */ - const char *name; - /* Device class */ - enum device_class class; - /* type of device supported by the driver */ - const int class_type; - /* Device initialization */ - int (*init)(const void *data); -}; - -/** - * acpi_device_init - Initialize a device - * @class: class of the device (serial, network...) - * @data: specific data for initializing the device - * - * Return 0 on success. - */ -int acpi_device_init(enum device_class class, - const void *data, int class_type); - -/** - * 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 \ -}; - -#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 /* __ASM_ARM_DEVICE_H */ - -/* - * Local variables: - * mode: C - * c-file-style: "BSD" - * c-basic-offset: 4 - * indent-tabs-mode: nil - * End: - */ --=20 2.43.0 From nobody Thu May 16 07:06:13 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=1706283758; cv=none; d=zohomail.com; s=zohoarc; b=nw2dT9P/sfmxSVCKm0zyiCzz0y/O8l0LpaPB+4k12g95291K2q4+Qzrd4LygVLJyFAqWyKeqfMIgEMroQEVaGfZY4qtYU4cvHJuZvmM0mVapV6Y6u3v4CEcvRYjaBz/VtPdSF4/L9fLeEo8X+UGBnA6VF2psFnTN9JKay27zSJo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1706283758; 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=oxncQDdI2JsFCsulM3gJxCAV4/X4oGnUu68SW6S52Lw=; b=YJbyOybcCHelmf74VWedn5lnXTibVpg9+qqHvYQJ44UrTLoGXOAV/rPjamUhEQ58ploVRiI+7P6hp4uyynYCNKA0oKmKRk3JpwQGn6jxaL/qiyDkbicHPqdpNzyTLaDakfpbwaoVEc8Oy7FQwnwNmRiiYAaDLqnSNTovi+OSDGE= 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 1706283758560961.7354273528256; Fri, 26 Jan 2024 07:42:38 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.672096.1045822 (Exim 4.92) (envelope-from ) id 1rTOLU-0004VB-M9; Fri, 26 Jan 2024 15:42:20 +0000 Received: by outflank-mailman (output) from mailman id 672096.1045822; Fri, 26 Jan 2024 15:42:20 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rTOLU-0004Uk-HH; Fri, 26 Jan 2024 15:42:20 +0000 Received: by outflank-mailman (input) for mailman id 672096; Fri, 26 Jan 2024 15:42:18 +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 1rTOLS-00039n-OJ for xen-devel@lists.xenproject.org; Fri, 26 Jan 2024 15:42:18 +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 7be94dd4-bc61-11ee-98f5-efadbce2ee36; Fri, 26 Jan 2024 16:42:17 +0100 (CET) Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-51028acdcf0so586918e87.0 for ; Fri, 26 Jan 2024 07:42:17 -0800 (PST) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id q5-20020ac25105000000b0050e7ec49881sm208351lfb.21.2024.01.26.07.42.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 07:42:16 -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: 7be94dd4-bc61-11ee-98f5-efadbce2ee36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706283736; x=1706888536; 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=oxncQDdI2JsFCsulM3gJxCAV4/X4oGnUu68SW6S52Lw=; b=Oi2pM2om6OLkLP621uCBSz9SMXLAGEF8BSGBrcL/NouvLd+Nd4oG3zi0WnORQ6LH70 PV7eXNx5agSUytgwllKcJro/bGvnVMHeADLhsHsG8FUGIOvBcWx6I+8QwfAStLuLAURV U0/I5Yrnm7JYeF+P7HMpyEFzlcWpSeEX9IijlrPWSJRHZTkd0G23OoWJ+QQ+dOTACReT VPHmBSxWheNJa4ELbEcR6PKYYqyYY2JjCmu8ZtwuJGEizby2XDmoF4A/GISeLuev9NP+ fTY+x7fXWyfvWwfPbYIrJ26bdpdcqS1MF/XLvsUrx2w0MmvMP94qEEkp9WH/dnfl6zRZ NTPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706283736; x=1706888536; 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=oxncQDdI2JsFCsulM3gJxCAV4/X4oGnUu68SW6S52Lw=; b=Y3KvSrzKiReYp4KGF3Zv7pTPAZHI/Hzj6gmmhyA5ifCjZN6g+8aopdFa8pKZP14xh6 lTDyxR6DRbtAoNklbVkFjIM+JjtRbtZ20UszeFFTyURVsWDuH8A0PTh8c3uhgR+lDNjd HlTmTVwgGCwsW2jT1N86IM0u3hn6F+RIByqBRHlxGJJM6ZC368tGJ3nskVP/R+M8Xvwe fRYcBg6swKxq9XyxejaGRT4Hx7itaV+itQAQPIvZw0VaHMcNLuiSH+cSay37kZL9HrPG H4prVFDMZFhOEiKySQB/uJZr3XIBlzON80oScw35FeAnwA0g6YFnfzR8IVvrcGgYWPi3 ELhg== X-Gm-Message-State: AOJu0YwEV8LnyoNdmCVT2YIXNJvKE86J1z4bXZ6KeOGrtoFXkbwUL+Ni Ih0d1pGqzpaV7zXKO++zxacJsLDJb+cbb7wHksBdYiyTHzgom0wLiXt/uNDO X-Google-Smtp-Source: AGHT+IEPm2wvGXW/m2TZujtontsPVNGD00z83SjsYXEflB16DV3EwQopzspD4Uir5bnYihScvnAzAA== X-Received: by 2002:a05:6512:4026:b0:50b:ea8e:b42c with SMTP id br38-20020a056512402600b0050bea8eb42cmr951242lfb.97.1706283736575; Fri, 26 Jan 2024 07:42:16 -0800 (PST) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Shawn Anastasio Subject: [PATCH v7 7/7] xen/ppc: switch PPC to use asm-generic/device.h Date: Fri, 26 Jan 2024 17:42:07 +0200 Message-ID: <216d88fefb56f0147b5796a3a0327bdaae8b0eb2.1706281994.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: 1706283758823100008 Content-Type: text/plain; charset="utf-8" Signed-off-by: Oleksii Kurochko --- Changes in V7: - newly introduced patch which is based on the previous version of the pat= ch: [PATCH v6 9/9] xen/asm-generic: introduce generic device.h --- xen/arch/ppc/include/asm/Makefile | 1 + xen/arch/ppc/include/asm/device.h | 53 ------------------------------- 2 files changed, 1 insertion(+), 53 deletions(-) delete mode 100644 xen/arch/ppc/include/asm/device.h diff --git a/xen/arch/ppc/include/asm/Makefile b/xen/arch/ppc/include/asm/M= akefile index 3fd893f3e0..ced02e26ed 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 altp2m.h +generic-y +=3D device.h generic-y +=3D div64.h generic-y +=3D hardirq.h generic-y +=3D hypercall.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__ */ --=20 2.43.0