From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 749E7606A322 for ; Thu, 3 Dec 2026 12:03:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=cVup5ype Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xZ5Wc-0003bh-NX; Thu, 03 Dec 2026 07:03:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xZ5WX-0003aK-72 for qemu-arm@nongnu.org; Thu, 03 Dec 2026 07:02:54 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1xZ5WT-00075x-KO for qemu-arm@nongnu.org; Thu, 03 Dec 2026 07:02:52 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4a2d6d01ecbso76093085e9.0 for ; Thu, 03 Dec 2026 04:02:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1796299367; x=1796904167; darn=nongnu.org; h=content-type:content-transfer-encoding:mime-version:message-id :in-reply-to:references:user-agent:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to:content-type; bh=bL5AIILZ+6RhAElJiq2t75mmjML8wNnBDGxk2eIhTgw=; b=cVup5ypexqdXyb+HSof8qj3sqfPPtsTGEg8Jlbkb6gDr2kWKlbFlTNYiOBvwLzc67U CZpVsxeiwukSEJpbmo98FioAKsk/8TNgwBexr8O8fmj63OuhT49ScvKf+WdI1cUzQ5Tt UNvE4Ko4S3AFMisz+gqonUq+5ZhL0rV7Xo4crY1jGBWA9vV8ZuIS5+iKtHzU9wUaiZXe 4d/TDOqyzdatvJZ8df93clMKBVnW9CPgnIja5kIDjBH2WrIDbjX5oQxQY7n+CwU9Imob P4W5CUHDnhsGP3dyCynAx5TLD7tLfgQOBPtfDz2BilwqTL7rFBuvrrQmv99eKI/L94sC rgdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796299367; x=1796904167; h=content-type:content-transfer-encoding:mime-version:message-id :in-reply-to:references:user-agent:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=bL5AIILZ+6RhAElJiq2t75mmjML8wNnBDGxk2eIhTgw=; b=jE69iBWI/XlNab3ka4c0GMWNVksgQhx5eL0JddWjfcLTWuIVp1e03F7s9ixtaUgv7r drsBB9y9RxBVCBCcxvbmQ5kB/5U2nsHZ2ZzpMCG1wHvq8AqxDFogYjT8p6iqcAuQWGRg ysbDHcrgaMeL8U2AA4m3HQkvMAYplkYRMdk6GLKyqprFZ4myiBv1Qzvb8H1MOPoYUpY6 51aEpsBJad/EB8lMa7xAOLSs2eaFSXax1R6U+fictLO+HCOfzgQc0yt6WiDlkQ6spu0A dgkHeZRx0iegW/mgcPiIEXrz0XkedCPZ0Okci1HKTPWJOhovuo4+otsOdiWi0YGw2tlm jJ0g== X-Forwarded-Encrypted: i=1; AL+hErEbHb8tggELT0xhEdR4a8EQF7Gi6qyGfyCfJRfvxfJJwd7ZTnP+z0GAE5o0iBgC5f6cNOH9NdeRfw==@nongnu.org X-Gm-Message-State: APuU4Z+aWiru5pijq5zjjWIg+GT6PUtjXmM1HSwAURU2tacCjBa943is w/yxNWIeZpTkd/aNY5WQQvpttFG/KXuTZXvxLk9nLIznrKS9PdKqT9Y+acE1DfbGnzg= X-Gm-Gg: AZFdTZfSxSiHZu+me9xOjGgZnwMnUzCiacvydfXCe0tobDzjr4VMrDf83oCeIZdrjMs k8VG3Otpc2CXZhwzjLLa9cxkCEmOnrUK8ziBiD8ArJCo7cnvV9KlMAqBqTIr71dkq3QDJI+V3SQ 8xsLPU0S81Gb4AyZzaiwwJLq/oHbMmFYI4VFv6itL/xVAX6w1hLRbfGW+hDG+lGARZqYuQlIomV iDdG037hcqatVH5nfGskVY2/SpKzSCuiThBu5cbWUl1MDTP0PZYSWGsxzdlfZBoktLyqjeRboQz cx00gPs2T0cNzuOGMFNU7UKZCpSJWt3jZNVwHfoj/EOLULZWRNaqt4JFdSsnlNmpqwrxUynTt2Y ohtM1u7ZjFDN2Qe+iEel+41PMS6z6Fkr0PodAPe7bISKOL8OxiLLqYkjCHT6z1E/CYQhEtmG6ff Gg2DaKPPGTgI9R0FXJiFOtwABvN8UNa310Faj+I4ySYhRoXGrPN/XN/tHcZv0n9XyajK1rdP8FB 2urMHek4pYWPl9c+Q7F6g4lERkY8A3cQ89KJT1dEq/tEXdhCYD5HPZZX1Mc32641QaRXJBff8uG Bfkg8AqJvYuiw/xjCdljautSBjPr1vsHshnqly1B+cQQoxCyEt4PMTOoU2IIGwQooQdEw+vO84I McjQ3fjBb1zvT6GQP4miLeLVszNijh7I/Sg9+FDFwkIPUC9ZE+1KVgDjk6ZR8W2ABLl/ubpmZqu 905BUAFNOrteeezwpFwvl/XEWir5SXsBasn/KQOyJbzWOF+Ju33a8oMLR8dqU3liNxZyf1MtsP9 sIJv9p989fqAkSNNA== X-Received: by 2002:a05:600c:5246:b0:4a7:9006:b176 with SMTP id 5b1f17b1804b1-4bb887fe892mr897374805e9.7.1796299366871; Thu, 03 Dec 2026 04:02:46 -0800 (PST) Received: from meli-email.org (athedsl-4431069.home.otenet.gr. [79.129.140.205]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bbe005f3e6sm69720125e9.7.2026.12.03.04.02.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Dec 2026 04:02:46 -0800 (PST) Date: Thu, 03 Dec 2026 13:57:50 +0200 From: Manos Pitsidianakis To: Peter Maydell , qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Philippe Mathieu-Daud=?UTF-8?B?w6k=?= , Manos Pitsidianakis Subject: Re: [PATCH v2 07/77] target/arm: GICv5 cpuif: Implement ICH_PPI_DVIR_EL2 User-Agent: meli/0.9.0 References: <20261203111118.1380524-1-peter.maydell@linaro.org> <20261203111118.1380524-8-peter.maydell@linaro.org> In-Reply-To: <20261203111118.1380524-8-peter.maydell@linaro.org> Message-ID: X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8"; format=flowed Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=manos.pitsidianakis@linaro.org; helo=mail-wm1-x32d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-arm-bounces+qemu-arm=archiver.kernel.org@nongnu.org X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Thu, 03 Dec 2026 13:10, Peter Maydell wrote: >Implement ICH_PPI_DVIR_EL2, which is the register that controls >whether pending physical PPIs are directly injected as virtual PPIs >to the virtual interrupt domain. > >Bits in this register are RAZ/WI from EL1 and EL2 if the PPI is >not assigned to the current interrupt domain, but since we don't >yet implement EL3 GICv5 support yet all PPIs are always assigned >to the current interrupt domain. I doubt you will forget, but maybe just in case you could add read fn stubs for the RAZ case check to go in when this needs to be implemented. Reviewed-by: Manos Pitsidianakis > >In this commit we just implement the register access to the state; >actual injection of PPIs will be dealt with later. We give the >register a writefn because eventually writing to this will need >to trigger a recalculation of VIRQ/VFIQ. > >Signed-off-by: Peter Maydell >--- > target/arm/cpu.h | 1 + > target/arm/tcg/gicv5-cpuif.c | 27 +++++++++++++++++++++++++++ > 2 files changed, 28 insertions(+) > >diff --git a/target/arm/cpu.h b/target/arm/cpu.h >index 3944a2ef104..384c15586eb 100644 >--- a/target/arm/cpu.h >+++ b/target/arm/cpu.h >@@ -601,6 +601,7 @@ typedef struct CPUArchState { > uint64_t ich_ppi_active[GICV5_NUM_PPIS / 64]; > uint64_t ich_ppi_pend[GICV5_NUM_PPIS / 64]; > uint64_t ich_ppi_enable[GICV5_NUM_PPIS / 64]; >+ uint64_t ich_ppi_dvi[GICV5_NUM_PPIS / 64]; > uint64_t ich_ppi_priority[GICV5_NUM_PPIS / 8]; > } gicv5_cpuif; > >diff --git a/target/arm/tcg/gicv5-cpuif.c b/target/arm/tcg/gicv5-cpuif.c >index 24065274690..233adc42440 100644 >--- a/target/arm/tcg/gicv5-cpuif.c >+++ b/target/arm/tcg/gicv5-cpuif.c >@@ -487,6 +487,12 @@ static void gic_ich_ppi_priority_write(CPUARMState *env, const ARMCPRegInfo *ri, > raw_write(env, ri, value); > } > >+static void gic_ich_ppi_dvi_write(CPUARMState *env, const ARMCPRegInfo *ri, >+ uint64_t value) >+{ >+ raw_write(env, ri, value); >+} >+ > /* > * ICC_APR_EL1 is banked and reads/writes as the version for the > * current logical interrupt domain. >@@ -961,6 +967,27 @@ static const ARMCPRegInfo gicv5_cpuif_reginfo[] = { > .accessfn = access_gicv5_ich_reg, > .fieldoffset = offsetof(CPUARMState, gicv5_cpuif.ich_apr_el2), > }, >+ /* >+ * Note that DVIR bits RAZ/WI when the PPI isn't assigned to the >+ * current domain, so we will need to mask them when we implement >+ * EL3 support and ICC_PPI_DOMAINR_EL3 >+ */ >+ { .name = "ICH_PPI_DVIR0_EL2", .state = ARM_CP_STATE_AA64, >+ .opc0 = 3, .opc1 = 4, .crn = 12, .crm = 10, .opc2 = 0, >+ .access = PL2_RW, .type = ARM_CP_IO | ARM_CP_NO_RAW, >+ .nv2_redirect_offset = 0xb40, >+ .accessfn = access_gicv5_ich_reg, >+ .fieldoffset = offsetof(CPUARMState, gicv5_cpuif.ich_ppi_dvi[0]), >+ .writefn = gic_ich_ppi_dvi_write, >+ }, >+ { .name = "ICH_PPI_DVIR1_EL2", .state = ARM_CP_STATE_AA64, >+ .opc0 = 3, .opc1 = 4, .crn = 12, .crm = 10, .opc2 = 1, >+ .access = PL2_RW, .type = ARM_CP_IO | ARM_CP_NO_RAW, >+ .nv2_redirect_offset = 0xb48, >+ .accessfn = access_gicv5_ich_reg, >+ .fieldoffset = offsetof(CPUARMState, gicv5_cpuif.ich_ppi_dvi[1]), >+ .writefn = gic_ich_ppi_dvi_write, >+ }, > { .name = "ICH_PPI_ENABLER0_EL2", .state = ARM_CP_STATE_AA64, > .opc0 = 3, .opc1 = 4, .crn = 12, .crm = 10, .opc2 = 2, > .access = PL2_RW, .type = ARM_CP_IO | ARM_CP_NO_RAW, >-- >2.43.0 >