From nobody Wed Aug 26 03:46:11 2026 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=1783353560; cv=none; d=zohomail.com; s=zohoarc; b=cDYhxdFyjWZkjKIWoAiYqOzSrm+IGfjak1uPWcz1onsk+C5ivrddxCXkeeOXeI7xoRdoCb00/8teTrjBhdSBNKezsXcfOkzs6SPu88GS7OTESCLpIt4JyzOsgNp9GYTRSHC7MzBaerz/9pKVUYDAZGwfnNV3AZzuR84X2FSrdH0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1783353560; 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=A/ZtxrvuTd4UkEQ4i2TfmlJT/OYOaHL0n4xPwr38eXk=; b=BcVDGvIjPT8zIgjSGMhQ78LdYpIy84PTarcFGHMH+GKjGkCU+csS8Cg8QPY73LcpDIDua7OcKvdfNvilWn6g17kIzc5+Nz6Cs1pzV5WE3n1Gx952N7VuDo1tP9YNjHk8cz2bY11K6/k7A74rqXzlYpP9bFMLTDgukflvMRJy3TE= 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 1783353560455406.51399958262914; Mon, 6 Jul 2026 08:59:20 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1355511.1610383 (Exim 4.92) (envelope-from ) id 1wgliT-0001mN-FC; Mon, 06 Jul 2026 15:58:41 +0000 Received: by outflank-mailman (output) from mailman id 1355511.1610383; Mon, 06 Jul 2026 15:58:41 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wgliS-0001kD-VJ; Mon, 06 Jul 2026 15:58:40 +0000 Received: by outflank-mailman (input) for mailman id 1355511; Mon, 06 Jul 2026 15:58:39 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) id 1wgliR-0001Kf-50 for xen-devel@lists.xenproject.org; Mon, 06 Jul 2026 15:58:39 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wgliQ-003COz-IH for xen-devel@lists.xenproject.org; Mon, 06 Jul 2026 17:58:38 +0200 Received: from [10.42.69.1] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6a4bd0ae-2eae-0a2a0a5409dd-0a2a4501d5ae-0 for ; Mon, 06 Jul 2026 17:58:38 +0200 Received: from [209.85.128.49] (helo=mail-wm1-f49.google.com) by tlsNG-d62444.mxtls.expurgate.net with ESMTPS (eXpurgate 4.57.1) (envelope-from ) id 6a4bd0ae-400f-0a2a45010019-d1558031ace5-3 for ; Mon, 06 Jul 2026 17:58:38 +0200 Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-493b6f1b14bso12910525e9.0 for ; Mon, 06 Jul 2026 08:58:38 -0700 (PDT) Received: from fedora (user-109-243-144-234.play-internet.pl. [109.243.144.234]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-493cce03fa1sm284910325e9.11.2026.07.06.08.58.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jul 2026 08:58:37 -0700 (PDT) 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" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=20251104 header.d=gmail.com header.i="@gmail.com" header.h="Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783353518; x=1783958318; 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=A/ZtxrvuTd4UkEQ4i2TfmlJT/OYOaHL0n4xPwr38eXk=; b=O7xUXLmdEFb2iG0NZzUNX/7tcnd9rBHg3OfF3uS2ah1HiMMUZJk5adcWywRlYQRxpl /YNcEhj/+U3cd6LpLt4GOfA7NpHq1HHVrtRTJYZI7GEDcnExh3G8eQ6hOfy99x1FiBGT Gq+0XVG4u2DBYiOxCcmb0Qk3RrZVjXJJugMfrlhD4lRGYmyitSullRh9enY38pX3xPXf IMs8+qLA5cYauqpjub4q6ieVaUy7qCApwC0R9faHEaG1M5tktCZ1sAHLq/0BqgtfA+MB CJueG2a2XSDiPC/j3/WxJqIr+BkBBqCLIttSOVb0y26mkNyjvaKNCGNLeZVpgxEGSBbf Z8jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783353518; x=1783958318; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=A/ZtxrvuTd4UkEQ4i2TfmlJT/OYOaHL0n4xPwr38eXk=; b=kUpkabMgxHYp3UPZJeggzWire7uZoXJmTS5BW7mE4/1l3WF+k2FbsLY23r1jvp+Z3Q SV8bbpavhmIDWZCPHJUvtmQgkq9hl1XBQADhySb5CNyf9bN26kXNCGUIF+ydv7rBzHpn QnLh+a932BoHA/n9kDrG6T5YPSZ2eHgc8gQBzT+bZxms0CA5yeH7o60yuqt6fx5btaDJ ujItJeM1Ws/zD8RWqhDpkq6fJQwjFUz+AnosdJtv3SQalJJXjalQmDj7e7ztbpOMzBmA 2MFdtAoVtIyVAXngCGMj08P5ultmlbP/169EgI+ypfjl+Njw9taZ80MwUnuYykGdrh/1 ewAg== X-Gm-Message-State: AOJu0Yx+KTtavx4mQQU4SEWlkyKFeW57U9aodgo/5zRQdj4EQcdSZ57l zxbP+YA2Zgw8HdwvoyG62Hn1G/MOk7NoWsr2N37X9mvPPT/52/bBWA0x62wE+w== X-Gm-Gg: AfdE7cl3tEeCrde5gK9jVGmAtZVF2U5Ip0K3plgZCOuEwtJOMN0FXKilLUeX56W0xUJ vg31B7Ea5AxUAS9xrFrGLTM83HaPDB1Oo/VZMn516i8Q+Pxfd0F+BLUrFx/QISeQUFgJLu1/caR QRSCTp110nhxFAqAjEs3pADJCwMumw0VXPffUKH2+rUNgziQ0jHZnKQozalMEMY89eNm5dOOd12 9z9cQXlns7W6EZqN+NbStd+3812Ngt/ZwdpA/nJoabCpCk5psj5/SUgfkHA+lF+yF2MA1sxJNEf vFUJ4IelERluUBz7RqVTGYc/21nucreQFKTlzhTps9r8uXKVzehFwoi3fcypbJ33MDiKCUY7L/1 2qhnrcCupgj5xN68h8RBkk0U7sibuRKNtu9NvmM0UjUoZXu0OnxT8twvG5E7idqHOcPuZr7tSuN ubnO9ARfVS578L1ju/gnnscswJUY59dtFoD+3AFgWZvK/wUZ1sUfbPAplgYzryjhzh90lO X-Received: by 2002:a05:600c:820f:b0:493:aa28:38ad with SMTP id 5b1f17b1804b1-493df06a2d2mr13017205e9.10.1783353517711; Mon, 06 Jul 2026 08:58:37 -0700 (PDT) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Romain Caritey , Baptiste Le Duc , Oleksii Kurochko , Alistair Francis , Connor Davis , Andrew Cooper , Anthony PERARD , Michal Orzel , Jan Beulich , Julien Grall , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Stefano Stabellini Subject: [PATCH v5 14/26] xen/riscv: implement make_intc_domU_node() Date: Mon, 6 Jul 2026 17:57:55 +0200 Message-ID: X-Mailer: git-send-email 2.54.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-purgate-ID: tlsNG-d62444/1783353518-822DD1E0-05FB12CC/10/73395122804 X-purgate-type: spam X-purgate-size: 3451 X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1783353560853158500 Content-Type: text/plain; charset="utf-8" Introduce a RISC-V specific function to create an interrupt controller Device Tree node for DomU domains during dom0less build. Add make_intc_domU_node() to the dom0less build path and wire it to a new generic helper, intc_make_domu_dt_node(), which delegates DT node creation to the active interrupt controller implementation via vintc_init_ops. Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Changes in v5: - Nothing changed. Onlye rebase. --- Change in v4: - Made local variable vintc pointer-to-const. - Add Acked-by: Jan Beulich --- Changes in v3: - Use const struct vintc_init_ops *init_ops in struct vintc. - Drop redundant intc_hw_ops check in make_intc_domU_node(). - Drop NULL pointer checks in make_intc_domU_node() as we can't start domU without properly created interrupt contoller node. --- Changes in v2: - s/intc_make_domu_dt_node/make_intc_domU_node. - introduce separate intc_hw_init_ops structure for init operations. - Return -EOPNOTSUPP instead of -ENOSYS. - Drop const for kinfo argument as it could be changed by interrupt controller node creation code. - Refactor make_domu_dt_node(). - Make make_domu_dt_node part of vintc structure as it looks more logical = to be there. --- --- xen/arch/riscv/include/asm/domain.h | 2 ++ xen/arch/riscv/include/asm/intc.h | 10 ++++++++++ xen/arch/riscv/intc.c | 8 ++++++++ 3 files changed, 20 insertions(+) diff --git a/xen/arch/riscv/include/asm/domain.h b/xen/arch/riscv/include/a= sm/domain.h index 235b20f8a6ba..bdc6086a1752 100644 --- a/xen/arch/riscv/include/asm/domain.h +++ b/xen/arch/riscv/include/asm/domain.h @@ -97,6 +97,8 @@ struct arch_domain { struct paging_domain paging; =20 DECLARE_BITMAP(isa, RISCV_ISA_EXT_MAX); + + struct vintc *vintc; }; =20 #include diff --git a/xen/arch/riscv/include/asm/intc.h b/xen/arch/riscv/include/asm= /intc.h index d7b34fc15ad1..a4e678fad90b 100644 --- a/xen/arch/riscv/include/asm/intc.h +++ b/xen/arch/riscv/include/asm/intc.h @@ -16,6 +16,7 @@ enum intc_variant { =20 struct cpu_user_regs; struct irq_desc; +struct kernel_info; =20 struct intc_info { enum intc_variant hw_variant; @@ -47,6 +48,15 @@ struct intc_hw_init_ops { int (*init)(void); }; =20 +struct vintc_init_ops { + /* Create interrupt controller node for domain */ + int (*make_domu_dt_node)(struct kernel_info *kinfo); +}; + +struct vintc { + const struct vintc_init_ops *init_ops; +}; + void intc_preinit(void); =20 void register_intc_ops(const struct intc_hw_init_ops *init_ops); diff --git a/xen/arch/riscv/intc.c b/xen/arch/riscv/intc.c index 3600d23bdb5b..e63da5e22efc 100644 --- a/xen/arch/riscv/intc.c +++ b/xen/arch/riscv/intc.c @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -72,3 +73,10 @@ void intc_route_irq_to_xen(struct irq_desc *desc, unsign= ed int priority) intc_set_irq_type(desc, desc->arch.type); intc_set_irq_priority(desc, priority); } + +int __init make_intc_domU_node(struct kernel_info *kinfo) +{ + const struct vintc *vintc =3D kinfo->bd.d->arch.vintc; + + return vintc->init_ops->make_domu_dt_node(kinfo); +} --=20 2.54.0