From nobody Sat Nov 15 09:08:45 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=unpredictable.fr ARC-Seal: i=1; a=rsa-sha256; t=1753710538; cv=none; d=zohomail.com; s=zohoarc; b=lCqn3g5QZvQP8Ff0r6Ics44yDaBSIVeVBiyhn5oITh32mXGxM/OzAuAsKtKo653x0TaoCcgQMbmgUfVPZOIJOx5fuUigW+9l9mtSV9+M6fRZ5JaZ7OrIvCUw29nmlycpCYGB6Zw7SqLC7ZNfRHnje3ZgEnHTomfBODHr1nl/CBM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1753710538; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=mPWTN385R6FZfouZZinJrVOLlU3HnBlA0ntuqA5utf4=; b=kqP1PEIB7/rs72GDqDrFnGapxear/bM53p4JxBQHI6ErBO7B33YigYGvUMxVAXzdMApHP25DctFhrxM50ZqWllB7kmHJW1y6itejfhdT0xXUZEolKITg2nNK0xLJCncDuYC7DhvdW8P1XE8H6zg7IaI881h6Z7+52aa9aYUk1MI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1753710538233570.154157892116; Mon, 28 Jul 2025 06:48:58 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ugO7U-0000qB-Qe; Mon, 28 Jul 2025 09:42:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ugO6s-0005G8-Tk for qemu-devel@nongnu.org; Mon, 28 Jul 2025 09:41:47 -0400 Received: from p-east3-cluster3-host8-snip4-7.eps.apple.com ([57.103.86.80] helo=outbound.qs.icloud.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ugO6q-0004KU-Du for qemu-devel@nongnu.org; Mon, 28 Jul 2025 09:41:46 -0400 Received: from outbound.qs.icloud.com (unknown [127.0.0.2]) by p00-icloudmta-asmtp-us-east-2d-100-percent-3 (Postfix) with ESMTPS id 3FE0018001FF; Mon, 28 Jul 2025 13:41:42 +0000 (UTC) Received: from localhost.localdomain (qs-asmtp-me-k8s.p00.prod.me.com [17.57.155.37]) by p00-icloudmta-asmtp-us-east-2d-100-percent-3 (Postfix) with ESMTPSA id 3FDB9181977E; Mon, 28 Jul 2025 13:41:40 +0000 (UTC) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unpredictable.fr; s=sig1; bh=mPWTN385R6FZfouZZinJrVOLlU3HnBlA0ntuqA5utf4=; h=From:To:Subject:Date:Message-Id:MIME-Version:x-icloud-hme; b=PM1a2xEEwolU2+5eKrhBQxeH+mSMpucsCO/gH88ootLxi6U1C9YW+h7hAUo0AyaQ/3AKu8q9kIam+60FraliCkrJOHT7c474I8BvQL8dC7btg6OBytnQyjlPSegugPECSSa1cmrvmNo872em9VBFjglDM1mrmbNT/7C9jkQU3OT6YmUZPNGUi/UmsFBM/e6be8J2K/orNQMA50Sywx9hnoz71LuNiYMI5DJAaCWt/F4F4rAfgGNuotXujALeSh3TIJ0Y+IfgGaGea5dbh+Wf+85HlucLWR6FY+c5jCtl+A4JGRepsAjUQcxnaTh9ValCKFpbIRPpzkPdoxujAVdqJQ== X-Client-IP: 46.189.47.18 From: Mohamed Mediouni To: qemu-devel@nongnu.org Cc: Mads Ynddal , Paolo Bonzini , Shannon Zhao , Phil Dennis-Jordan , Igor Mammedov , qemu-arm@nongnu.org, Alexander Graf , Roman Bolshakov , Peter Maydell , "Michael S. Tsirkin" , Ani Sinha , Cameron Esfahani , Mohamed Mediouni Subject: [PATCH v5 13/13] target/arm: hvf: add asserts for code paths not leveraged when using the vGIC Date: Mon, 28 Jul 2025 15:41:14 +0200 Message-Id: <20250728134114.77545-14-mohamed@unpredictable.fr> X-Mailer: git-send-email 2.39.5 (Apple Git-154) In-Reply-To: <20250728134114.77545-1-mohamed@unpredictable.fr> References: <20250728134114.77545-1-mohamed@unpredictable.fr> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: nJNUOC_nKv69xIiTKz7zF6d1AL153m2b X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNzI4MDEwMSBTYWx0ZWRfX4Sbx6cIziteL 41iyb0PE/An3eG9IFDfHRUMMY/PCn12hcszyfXwAkso3VoaUDj0x42a5rV1IMjtY676n2pBfvAl WRQvYRDnhXOZpZQWBQ4brlvTzN+qVieMMg/6TXf5pD6URaN9CujIhGlv+hKGkwu5pnJ5Cu9A027 3dF/F8bfGzRd0tu2Juvy1Jo+HFBygnq8Psfr+j+6YI5iY4m9SWpCVNV1Khzi71dnyPQ3+pP/oRN a0Uf33ghfCB5hIWdXmiymYHu78rpIdwz0p7rTgMQ+GrJJzv0x0uGBOAmdXESy+/w8ENZFSwrA= X-Proofpoint-ORIG-GUID: nJNUOC_nKv69xIiTKz7zF6d1AL153m2b X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-07-28_03,2025-07-28_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 clxscore=1030 bulkscore=0 mlxscore=0 mlxlogscore=588 spamscore=0 suspectscore=0 phishscore=0 malwarescore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.22.0-2506270000 definitions=main-2507280101 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=57.103.86.80; envelope-from=mohamed@unpredictable.fr; helo=outbound.qs.icloud.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_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @unpredictable.fr) X-ZM-MESSAGEID: 1753710540070116600 Content-Type: text/plain; charset="utf-8" When using the vGIC, timers are directly handled by the platform. No vmexits ought to happen in that case. Abort if reaching those code paths. Signed-off-by: Mohamed Mediouni --- target/arm/hvf/hvf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 1fd9517f3e..12cdcb3f2c 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -1476,6 +1476,7 @@ static int hvf_sysreg_read(CPUState *cpu, uint32_t re= g, uint64_t *val) case SYSREG_ICC_SGI1R_EL1: case SYSREG_ICC_SRE_EL1: case SYSREG_ICC_CTLR_EL1: + assert(!hvf_irqchip_in_kernel()); /* Call the TCG sysreg handler. This is only safe for GICv3 regs. = */ if (hvf_sysreg_read_cp(cpu, reg, val)) { return 0; @@ -1802,6 +1803,7 @@ static int hvf_sysreg_write(CPUState *cpu, uint32_t r= eg, uint64_t val) case SYSREG_ICC_SGI0R_EL1: case SYSREG_ICC_SGI1R_EL1: case SYSREG_ICC_SRE_EL1: + assert(!hvf_irqchip_in_kernel()); /* Call the TCG sysreg handler. This is only safe for GICv3 regs. = */ if (hvf_sysreg_write_cp(cpu, reg, val)) { return 0; @@ -2065,6 +2067,7 @@ int hvf_vcpu_exec(CPUState *cpu) /* This is the main one, handle below. */ break; case HV_EXIT_REASON_VTIMER_ACTIVATED: + assert(!hvf_irqchip_in_kernel()); qemu_set_irq(arm_cpu->gt_timer_outputs[GTIMER_VIRT], 1); cpu->accel->vtimer_masked =3D true; return 0; --=20 2.39.5 (Apple Git-154)