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 CFD46606A692 for ; Fri, 4 Dec 2026 07:53:23 +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=AHGzFYs1 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xZO6R-0008Q2-UV; Fri, 04 Dec 2026 02:53:11 -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 1xZO6P-0008PT-0c for qemu-devel@nongnu.org; Fri, 04 Dec 2026 02:53:09 -0500 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1xZO6N-0006Pw-8F for qemu-devel@nongnu.org; Fri, 04 Dec 2026 02:53:08 -0500 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-4c3f0acc1easo400756f8f.0 for ; Thu, 03 Dec 2026 23:53:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1796370785; x=1796975585; 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=Z9+bp/4urCQRNvH12ylA/nfiqNFsQdcaIEcT1fcfvqE=; b=AHGzFYs1W5Q8+z61rULztLZMkDOn+ZwkTPQMhqMO+eQMNHN+q43cV3K5g6PUcJ1ZDC R3zeUnskj9qUBfW2JXHo2hBkS74Oj2uLYd1Hs1Lhv0QztTbGGE3zODLvoveJgAcM8DL+ PwD+3Ty61sEVYGrOWh3DwkAlLixGbVzIbK8xYUjgZkwwRRY4L6ZnI5iKkEj0zlGz00j4 4+mnG5fycqthNYFQU2ykTtv7g9B+EAid10B2ZzrBQYjvFW78kPr3F5saLznb0B/NAAzs S9Flx8UNMsH9CdNA6y77RmJAWPBD1FwfFOx/BMFZmy1WxH10/koy2Xx7thEBgWg952PN aTZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796370785; x=1796975585; 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=Z9+bp/4urCQRNvH12ylA/nfiqNFsQdcaIEcT1fcfvqE=; b=Sy+v6diDuDcozhz0D/lbXocjZqYbRIji8aQYzKK+pmbG3i+NfVyk04X+RDb+t5+ouB FCzmCHXF5FYZX8Q3bv1nbRj/uf+6z75rkGTclJhoi7PFgdXPqeaGqz7J6J9UCH8wdhxi y4ZPNmkxMGX9MFlSoTXI3C71iRLeehrqFFUevmK7KNNvvG14kc/9OUSthiL3N5RG+NgX ezviwVfzJhixHppAPgFN5if4EeHY2ksgGb0OLyYzeqINjYk5Htr8JIwF53AfK76nyERA HYIUOlYNNE/Ff2FBE3rsRKW8wmMfz2ZConiavFwrvSzMUx/bQ/UmLtDtNdTrpnxTXKcB XRMw== X-Forwarded-Encrypted: i=1; AL+hErHd18lPXkbhfCUopttnmYxbLp7geCK83wU9f6FbksKwo6jqgEs6b1AObP3Bfe2BDk4SKP4uyBHKYxeO@nongnu.org X-Gm-Message-State: APuU4Z+Pwr5AWY3Qeb0Q2iOHw1M898vunX9kyUDSuqbM6j8mwAGdk6qW OeHdzkjOjhuwtDZ8ZAGLGpKbtlfwYnQtmTZluohwFlOrRhqPUnH9K4x4XTS7PiOvYuo/yEkbMIX WkrLLasg= X-Gm-Gg: AZFdTZfRFLQf8daS0hpRQQbiHP3p1H4FyUMHkOyOARcWukB80ShPkjFic86oPDULN6C rWpdx/UIU5/O8hxMKN6lcL+Sq9W8jCVcw0PiCm45zOHVVoeLs713l6F9JDahgY9Uz/vGu8JU6J7 2CwGlwEudp5Q0g4ADc4K0G5LnFtq3q5oWSkV2DwXyxMaXJOBkvIRti3jwWs1RgHvtPENKPG0uk4 X+Pcv6VOCGDQSEYwPM1ZK0TpGgav5Ju4Viq+v9gObSlOtlBha2YniBa/QCRSSh1hC2a20gjNJow yHv2J5/M3+e7u9G3ms8Igci1FVASroiOenFwAzq4Hy77Fhs26Y7yIvOqbVzkPeU6SNS/SJF0tNU OH3hn77vYTutMyCIEiVMt/TfctbZG0hGcNUR/dCXKSBFkPlzx5cUuoVhcB8cHVubSPOjuejJms2 fpdVssgqRFJ/l1ccjyVkPqiTqhQm9Xjl4WW8fYJuGFVF3Ee40JmCcr1J+rl3Y+heGb5AArIuqJC 6mhe0hGbmAErEyJ/5YH5XK8yU0MhWwjsMrThZScRNVGndegulhyGzN5l8fvUwAvYRVDGZ6pQCaF nZDDYeLtq3LGEdjt4yie8RurAsGJiM5xq8FT+r92fp0W7oURwTFos4hH4McW4m3PTYJv+i8ueGz e11pj3ExgW8KUcAi+uZ5HFbO5iHl33AzfRKFe03TKnNUisul1sm4Ggldn4M8OUe+tYg4CFDRczW q4gXREnARy/4dQq4fdVYnws6m8bQ1xK5GUmsH445qjyj6IfiP+y1aVVV2Hw8Q9otlnenWk X-Received: by 2002:a05:6000:290a:b0:48a:f4d4:e1f3 with SMTP id ffacd0b85a97d-4d1ea1d5cafmr2758749f8f.13.1796370785452; Thu, 03 Dec 2026 23:53:05 -0800 (PST) Received: from meli-email.org (athedsl-4431069.home.otenet.gr. [79.129.140.205]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4d174ef2372sm3871476f8f.59.2026.12.03.23.53.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Dec 2026 23:53:05 -0800 (PST) Date: Fri, 04 Dec 2026 09:52:10 +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 27/77] target/arm: GICv5 cpuif: ask the GIC for the virtual HPPI User-Agent: meli/0.9.0 References: <20261203111118.1380524-1-peter.maydell@linaro.org> <20261203111118.1380524-28-peter.maydell@linaro.org> In-Reply-To: <20261203111118.1380524-28-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::432; envelope-from=manos.pitsidianakis@linaro.org; helo=mail-wr1-x432.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-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=-16.0 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=unavailable 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: >Now that we have an implementation of ICH_CONTEXTR_EL2 and the API to >the IRS provides a way to query the virtual HPPI candidate, we can >fix the TODO remark in gic_virt_hppi() by making the cpuif ask the >IRS for its virtual HPPI candidate. > >Signed-off-by: Peter Maydell >--- > target/arm/tcg/gicv5-cpuif.c | 27 +++++++++++++++++++++------ > 1 file changed, 21 insertions(+), 6 deletions(-) > >diff --git a/target/arm/tcg/gicv5-cpuif.c b/target/arm/tcg/gicv5-cpuif.c >index e862afa966f..6d90f3133c9 100644 >--- a/target/arm/tcg/gicv5-cpuif.c >+++ b/target/arm/tcg/gicv5-cpuif.c >@@ -214,6 +214,19 @@ static GICv5PendingIrq gic_hppi(CPUARMState *env, GICv5Domain domain) > return best; > } > >+static bool gic_get_irs_virt_hppi(CPUARMState *env) >+{ >+ /* >+ * Return true if we should ask the IRS for its candidate virtual >+ * HPPI. We do this only if we have a resident VPE and are not >+ * ignoring IRS candidate HPPIs because of IRICHPPIDIS. >+ */ You could move the doc comment above the function instead of in the body. Regardless: Reviewed-by: Manos Pitsidianakis >+ uint64_t ich_contextr_el2 = env->gicv5_cpuif.ich_contextr_el2; >+ >+ return (ich_contextr_el2 & R_ICH_CONTEXTR_EL2_V_MASK) && >+ !(ich_contextr_el2 & R_ICH_CONTEXTR_EL2_IRICHPPIDIS_MASK); >+} >+ > static GICv5PendingIrq gic_virt_hppi(CPUARMState *env) > { > /* >@@ -236,12 +249,14 @@ static GICv5PendingIrq gic_virt_hppi(CPUARMState *env) > return GICV5_PENDING_IRQ_NONE; > } > >- /* >- * TODO: When we implement ICH_CONTEXTR_EL2, we need to check >- * IRICHPPIDS and if it is 0 get the IRS candidate HPPI. For now, >- * set irs_hppi to "no candidate". >- */ >- irs_hppi = GICV5_PENDING_IRQ_NONE; >+ if (gic_get_irs_virt_hppi(env)) { >+ GICv5Common *gic = gicv5_get_gic(env); >+ GICv5Domain domain = gicv5_logical_domain(env); >+ >+ irs_hppi = gicv5_get_hppi(gic, domain, true, env->gicv5.cpuidx); >+ } else { >+ irs_hppi = GICV5_PENDING_IRQ_NONE; >+ } > > /* > * If the best PPI and the best interrupt from the IRS have the >-- >2.43.0 >