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 7E4A0606A32C for ; Thu, 3 Dec 2026 11:53:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=rf6lMA/P Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xZ5NX-0000UV-9R; Thu, 03 Dec 2026 06:53:35 -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 1xZ5NU-0000UC-66 for qemu-devel@nongnu.org; Thu, 03 Dec 2026 06:53:32 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1xZ5NS-0006Si-9K for qemu-devel@nongnu.org; Thu, 03 Dec 2026 06:53:31 -0500 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-4bba60271d7so78722585e9.2 for ; Thu, 03 Dec 2026 03:53:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1796298807; x=1796903607; 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=Yog0vh4oKZyJ8/ID6jYGDLH76Oy7U2L1b7c0UiR7fbE=; b=rf6lMA/PqVM5sANemdWr44bSKuSvafl30uCiUuPqeOT5iJFt/Kja9I6erZ8AUyB+R9 kDz2qs3nffrgfN21eEsbH/K+RgBazM5OuQ1Mpz1UgfV1gAZ7w3lFGxaV7TmzlnyWO2X8 6OBRK9uwUTdRGjE3FK7hXc3+AjDqk3PFb09ALt/LFULAPWovUUVJQff5OG34pP7slKx5 GV7nwX6Tr3yO+FBlj7Tll1D8iL8cjbSSgtFXPIxaunqW9RvUHAYaeLBu9OKoA5QTQ5yw nyn4ag3t8l9asp62ZMGfibJhdFOh/PUiGt3N5s2LCcN9i99Yrr8xflPbh/JpSbpBjQXp wgPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796298807; x=1796903607; 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=Yog0vh4oKZyJ8/ID6jYGDLH76Oy7U2L1b7c0UiR7fbE=; b=IVyxqyoDMqr2T73x/+MtoK/MA8DShCWhLbmVLlKCKV85re32kSyPsMSg/BiohOaBZI ChQNjJHIoBiMlKNQfxKrXKOSwlaNyWps21vuKZscs679SdJQpV51AGrIjvuQnamtCrd8 zOylDJCWcny4pgYSiBV712RrEuGk2mBW2RyyskXlmfpVG1MYFzWcVbVLITV5pApsn3vF arMD0booEYaYHPpUOnMfakqvLdpkBTmM+7m9mWcVIeSpealtw31Q+4SQTvS4Fy6j9Dqp nyQ2rDyHB/hfyrHRpYxEAzxhJrcNXCk+9Ar/K183fdf3EO4TWWeEpin3yE5vgGHSuVT1 nhdQ== X-Forwarded-Encrypted: i=1; AL+hErHwpsL/lqDsMJfTvRNlVGjAxo2cDw9DsRcJLqdyHk12gZBVh/CFuK2iR/6HCdwe91P2KuaWmleeoUK8@nongnu.org X-Gm-Message-State: APuU4Z8LUt21SGz1F6lpHpO5OIqpwfA+15tOdwvWXbKXLURq5o+ht82N EbZT0BRk4m32UOyGMHr4+QpXYyS44Yn/LP2CpdmylA2WKXvd+G7cQGtpbAXWRWwFjdc= X-Gm-Gg: AZFdTZfP64SSFpprDkmnjw999r+4kBB06kLl0pC7npF7HoPP34xOBdc5BDOGdXqIUYp QYdqqrnuTJUqy3aZqrSpQNfFJyA53WPAU9QKUdCHpJldfjMSLybpX/HsfMdiAqCehvMugsSnu4+ mHfhZyfYqdYllVDXcVPiy80nmaa0uXUWWcAiX36JDZq+qH+n5F2q3/rz4E8Nyv7Ro3mxrsG4f82 NQGTD6zxurszQg2znDCyuU9b6K1Xbt+E7T8QN3uJ0aIBkxfXWv2CHIC+Nnr4newrrdIyb0Ga3RF CYKFrIWpOWO/AXOMlvO8943c8IJ8i0tlB1f3QhufkIiIgB4oZhhXDHxmslTk1bgd8T9EYNr6azG jfNWMeTwvK3/3EKincHTALqU8y1d0MA//W/mnN6KwarP1oWZW7mwGUMtC8zOFADRz6q7u/TfaT3 h59eWHUJ7WayRGFKIQteBf5h/ECwv2yiSYzZh5j59P/VX/LuKn2lofSOQOWkM3SvsWZduV37gk/ LYv+bOtmws1QMzQJ9IJZ8XrsGR1XSa8R+hf/roD5S5fZhzO0zu2oAnEfAJgulP0LMrVuMue7i4/ hIfT4+nFbqsPYTBqRNwbRfr4vRMWMNUr8xveucckukGZesmSBUw6cmaRdXUNGPp+SXAjwjyFsC1 uFpsotmqWMG5RrJ1KxfaiV6noLTv1Rd0E40+kOMXGYnZWjFKFIuDv7ZIEmXDSENujSlw49fNEcC QTYW4Y0iHodISiTQdsIEW3AmL9LLg88m9FEZUIHdpezp2kISNcb3J1z5CdaYDDZlJOLZ5/Kg== X-Received: by 2002:a05:600c:8486:b0:4ac:aae6:6401 with SMTP id 5b1f17b1804b1-4bb8880606fmr865073795e9.12.1796298807144; Thu, 03 Dec 2026 03:53:27 -0800 (PST) Received: from meli-email.org (athedsl-4431069.home.otenet.gr. [79.129.140.205]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4ab65cb41f4sm81519882f8f.7.2026.12.03.03.53.26 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Dec 2026 03:53:26 -0800 (PST) Date: Thu, 03 Dec 2026 13:43:25 +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 05/77] target/arm: GICv5 cpuif: Implement ICH_PPI_{ENABLE, PEND, ACTIVE} regs User-Agent: meli/0.9.0 References: <20261203111118.1380524-1-peter.maydell@linaro.org> <20261203111118.1380524-6-peter.maydell@linaro.org> In-Reply-To: <20261203111118.1380524-6-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::331; envelope-from=manos.pitsidianakis@linaro.org; helo=mail-wm1-x331.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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 the ICH_PPI_ENABLERn_EL2, ICH_PPI_PENDRn_EL2 and >ICH_PPI_ACTIVERn_EL2 registers. These are the hypervisor interface >to the underlying state of its guest's PPI interrupts. Unlike the >ICC PPI registers, these don't have set and clear register pairs. > >We mark these as ARM_CP_IO and give them a writefn, even though right >now the only thing the writefn does is a raw_write to the underlying >CPU struct field, because eventually hypervisor writes to these >registers will need to trigger recalculation of the highest priority >pending PPI and possible signalling of VIRQ. > >Signed-off-by: Peter Maydell >--- > target/arm/cpu.h | 3 ++ > target/arm/tcg/gicv5-cpuif.c | 64 ++++++++++++++++++++++++++++++++++++ > 2 files changed, 67 insertions(+) > >diff --git a/target/arm/cpu.h b/target/arm/cpu.h >index 5985e0a86e1..fc919deeaa3 100644 >--- a/target/arm/cpu.h >+++ b/target/arm/cpu.h >@@ -598,6 +598,9 @@ typedef struct CPUArchState { > GICv5PendingIrq ppi_hppi[NUM_GICV5_DOMAINS]; > > uint64_t ich_apr_el2; >+ 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]; Nit: ich_ppi_activer[..], ich_ppi_pendr[..] etc would fit the spec more clearly. > } gicv5_cpuif; > > struct { >diff --git a/target/arm/tcg/gicv5-cpuif.c b/target/arm/tcg/gicv5-cpuif.c >index a9308d8b2eb..2f9da181d58 100644 >--- a/target/arm/tcg/gicv5-cpuif.c >+++ b/target/arm/tcg/gicv5-cpuif.c >@@ -463,6 +463,24 @@ static void gic_ppi_priority_write(CPUARMState *env, const ARMCPRegInfo *ri, > gic_recalc_ppi_hppi(env); > } > >+static void gic_ich_ppi_enable_write(CPUARMState *env, const ARMCPRegInfo *ri, ditto and on other write fns either way is fine with me Reviewed-by: Manos Pitsidianakis >+ uint64_t value) >+{ >+ raw_write(env, ri, value); >+} >+ >+static void gic_ich_ppi_pend_write(CPUARMState *env, const ARMCPRegInfo *ri, >+ uint64_t value) >+{ >+ raw_write(env, ri, value); >+} >+ >+static void gic_ich_ppi_active_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. >@@ -937,6 +955,52 @@ static const ARMCPRegInfo gicv5_cpuif_reginfo[] = { > .accessfn = access_gicv5_ich_reg, > .fieldoffset = offsetof(CPUARMState, gicv5_cpuif.ich_apr_el2), > }, >+ { .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, >+ .nv2_redirect_offset = 0xb50, >+ .accessfn = access_gicv5_ich_reg, >+ .fieldoffset = offsetof(CPUARMState, gicv5_cpuif.ich_ppi_enable[0]), >+ .writefn = gic_ich_ppi_enable_write, >+ }, >+ { .name = "ICH_PPI_ENABLER1_EL2", .state = ARM_CP_STATE_AA64, >+ .opc0 = 3, .opc1 = 4, .crn = 12, .crm = 10, .opc2 = 3, >+ .access = PL2_RW, .type = ARM_CP_IO | ARM_CP_NO_RAW, >+ .nv2_redirect_offset = 0xb58, >+ .accessfn = access_gicv5_ich_reg, >+ .fieldoffset = offsetof(CPUARMState, gicv5_cpuif.ich_ppi_enable[1]), >+ .writefn = gic_ich_ppi_enable_write, >+ }, >+ { .name = "ICH_PPI_PENDR0_EL2", .state = ARM_CP_STATE_AA64, >+ .opc0 = 3, .opc1 = 4, .crn = 12, .crm = 10, .opc2 = 4, >+ .access = PL2_RW, .type = ARM_CP_IO | ARM_CP_NO_RAW, >+ .accessfn = access_gicv5_ich_reg, >+ .fieldoffset = offsetof(CPUARMState, gicv5_cpuif.ich_ppi_pend[0]), >+ .writefn = gic_ich_ppi_pend_write, >+ }, >+ { .name = "ICH_PPI_PENDR1_EL2", .state = ARM_CP_STATE_AA64, >+ .opc0 = 3, .opc1 = 4, .crn = 12, .crm = 10, .opc2 = 5, >+ .access = PL2_RW, .type = ARM_CP_IO | ARM_CP_NO_RAW, >+ .accessfn = access_gicv5_ich_reg, >+ .fieldoffset = offsetof(CPUARMState, gicv5_cpuif.ich_ppi_pend[1]), >+ .writefn = gic_ich_ppi_pend_write, >+ }, >+ { .name = "ICH_PPI_ACTIVER0_EL2", .state = ARM_CP_STATE_AA64, >+ .opc0 = 3, .opc1 = 4, .crn = 12, .crm = 10, .opc2 = 6, >+ .access = PL2_RW, .type = ARM_CP_IO | ARM_CP_NO_RAW, >+ .nv2_redirect_offset = 0xb30, >+ .accessfn = access_gicv5_ich_reg, >+ .fieldoffset = offsetof(CPUARMState, gicv5_cpuif.ich_ppi_active[0]), >+ .writefn = gic_ich_ppi_active_write, >+ }, >+ { .name = "ICH_PPI_ACTIVER1_EL2", .state = ARM_CP_STATE_AA64, >+ .opc0 = 3, .opc1 = 4, .crn = 12, .crm = 10, .opc2 = 7, >+ .access = PL2_RW, .type = ARM_CP_IO | ARM_CP_NO_RAW, >+ .nv2_redirect_offset = 0xb38, >+ .accessfn = access_gicv5_ich_reg, >+ .fieldoffset = offsetof(CPUARMState, gicv5_cpuif.ich_ppi_active[1]), >+ .writefn = gic_ich_ppi_active_write, >+ }, > }; > > void define_gicv5_cpuif_regs(ARMCPU *cpu) >-- >2.43.0 >