From nobody Sun Jul 26 13:28:57 2026 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=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1781637493; cv=none; d=zohomail.com; s=zohoarc; b=nw6fHGyv87BM0oIF1oFLMm0uXCPa/o5iqRi0tzCtGSBkWog0GaTDxeAB0VoYzNlkunlmN8QrrbsFecfhSyyNnM4nPPuTmVxFp1yscTZk/6TffAefimJzBomkPiqp6EPe8DQHSOoep1v9b36+19HEZumt8wS2b/TGcwYE2Lw5Drw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781637493; h=Content-Type: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=gMjZZHZJ89izwlDeOSHN+o2bLfcBDraY3E0lQg0dK+c=; b=UgAdXsMF6ZOBTvoLu55bOy2SRHnKA6Tx86WTSQSxE97Kkhg49V+s1UIBl2/qIrjxSDXihHUKzI/Pi5Uc9moBsQ0gmYbo/7zgDglwZu8FloSMDSnkn8Zx/52R3SpIbcn1Akjz97opOi3A4S6787ICtYQSwZpXBvN1/anxfuA8S8E= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781637493318863.1587838604005; Tue, 16 Jun 2026 12:18:13 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZZI8-00082v-W1; Tue, 16 Jun 2026 15:17:45 -0400 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 1wZZHu-0007IW-2x for qemu-devel@nongnu.org; Tue, 16 Jun 2026 15:17:31 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZZHs-0004aG-Fq for qemu-devel@nongnu.org; Tue, 16 Jun 2026 15:17:29 -0400 Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65GIOZ6T303258 for ; Tue, 16 Jun 2026 19:17:27 GMT Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eu1epbda5-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 16 Jun 2026 19:17:26 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-9157c8eb597so776887785a.2 for ; Tue, 16 Jun 2026 12:17:26 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4606f20e77asm49226353f8f.0.2026.06.16.12.17.24 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Jun 2026 12:17:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= gMjZZHZJ89izwlDeOSHN+o2bLfcBDraY3E0lQg0dK+c=; b=MSvIn/p/Se/71vFW mglrkgv2wzZy3sXxuQg5MQs3VovA5c34JdgpMd54RSZWWTUWT5NTW4B1O1uQA/PS ragSL53T/h85Jb+CwfnedvmXFAXBFqVEebibS+qxu4ZFgw2IPq70m/3KjPAGt7W6 m1WGOEIdLpeLO0CdUGGpoXOsNXAj4RX1Jy4DR27VNe7Ns1kgnhUs70l67eql2Ox/ owgNIVIVm/61rUgYZXuq252wENI4nhZcJU1kkSSQ8PZLXeKHczuosoVoyyiDDlMC AdpOKT7rghk0J/uuizBSohJd6/PsZc4Sgyj8To302EpsUQn5oJ6Bi/LyytFIAWnp jKMHAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781637446; x=1782242246; darn=nongnu.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=gMjZZHZJ89izwlDeOSHN+o2bLfcBDraY3E0lQg0dK+c=; b=kMKA9TWpX8ZbBslFxoYcmPVvfjc0J+RXB1Ize4mvKOVU5zuh3OlQOZ9ICNkEdCZX4+ q3H4oXj3APIOsBfA9Qvyf/LFQvaWHd8j376ItG/VUQ/0Md9ra+gFwJhxvEiXlC39ywNe mKUKQlH+Q6q+SxeLmW2fK9bq8aQgyjGkTkiUIVlpNanIEzXFCVy6i1Gr4pKXdmLbeXzz E6Qv4ydXpZ85kQQn9UXgomkQnYWTRprkFmZmVIafJOVcm3itRMkxc3fiRLLby+aJvBVg RZih0GzOaMfzaQiMVVjh7Sl0WoVmr7coXhYtuLcGV93CGxJD+d216VgiLdgoeydqpz0v 70qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781637446; x=1782242246; 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=gMjZZHZJ89izwlDeOSHN+o2bLfcBDraY3E0lQg0dK+c=; b=X7lBVmc4ZmGQz5FSe6tF4/MLizoTY8POIcUK8yRqOEMkvaIQc5x1RE4e5GzOsSxfFx gJz0HDHNou5Uw/+mFHtSgNVQEx9jU8nQYHZ2sChs99JnMiWFWFPhptk1hSZyw4uK5a/e UZeTYy8tH0kHK/gUOO/RQbg9mDWhFlVFb2mHh6Z/C+E8qYkq6yEuyMlOe9WuaeVrJ8n4 4WsMfa75zZEwBcHRcNPY/buPA6uuvSWZX/iUwVBCAHOI4lQUGmELIkgSJwrrBk5GLqU3 sepWmqJaLBI7NE1t6e/EQhh9VawhEZYuprQB8Y9hSQFxcpaDi/rJVD0FzUfIK4cRS9Qr zzHw== X-Gm-Message-State: AOJu0YwtLuCDh6SOZePmeq9IgOcc0oDmpu6grw+WtkCVz/F8F3TrMMET RO63ayGjVC2kYyNi2NgiMiYgp7EMJPIxUAFkAsE3/JbKMYU4lfNvk/FP6kYANUst+X1rn6fVN1f O76Wmf3L6zlUqI4ntoyQKNovG+VshHJxWKcq4PBSiQmS3EpvV7SjvboLR71KGeiBd5Q== X-Gm-Gg: Acq92OFcvKrdbWPiSc+uMoWPRvZfzV1bkfviNZu3aaKTrvQZ3/2LntxVHNqY8kZ0+ER VKWy7GyXtuO0m0vCw2EA4WCeRUhyP2tJeAeWwgTF1+LNmYG5t7sDv4k9rJRhV0jrIohMstgn2AF is+6zJGwOOdIkpvNs6kKlcpg7cAzo2Xw7n/u3gSa1ydSIBPH8jqOlcbk3Xzda6nmIPVekyIrvPl 7LOWfc9bdMI9Rh5dw9RNMWMjyvhHnl7lH4FyM/f/C17XI8kui76xNujt34Chti5s7fdS7wWw8uy 6zrSVO7JNhUNJkRNG6xOeLN6q+vpW5km4aO124FZzrydJdJtFedet8qvhkp8f5v5LQUnYl+Ds4l fiBugqdAZBD3pDcV5yNMx28XXDRZ4JPuQEOraATpOcl+z12judjKIrVx+LHe0iu/ERtV5OEyogc yjFn4= X-Received: by 2002:a05:620a:28d1:b0:915:a457:bf94 with SMTP id af79cd13be357-91d8b8addffmr187021785a.48.1781637446065; Tue, 16 Jun 2026 12:17:26 -0700 (PDT) X-Received: by 2002:a05:620a:28d1:b0:915:a457:bf94 with SMTP id af79cd13be357-91d8b8addffmr187016585a.48.1781637445634; Tue, 16 Jun 2026 12:17:25 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Richard Henderson Subject: [PATCH 01/10] target/arm: Restrict TCG specific headers Date: Tue, 16 Jun 2026 21:17:07 +0200 Message-ID: <20260616191716.12932-2-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260616191716.12932-1-philmd@oss.qualcomm.com> References: <20260616191716.12932-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=I/ZVgtgg c=1 sm=1 tr=0 ts=6a31a146 cx=c_pps a=HLyN3IcIa5EE8TELMZ618Q==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=EUspDBNiAAAA:8 a=bdUS605pY9qKDrP44OoA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=bTQJ7kPSJx9SKPbeHEYW:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDE5NiBTYWx0ZWRfX6d3Pq5dBihn8 URgcYMafRLldxdcGfac+Ong/AXaqrIVDC3ceOgekSeeP4LRn1NIVKO395iKUGfHqxmBWRfNuzPQ kpXh5n10DynCPmMWJ6Sptn442pcbm04= X-Proofpoint-ORIG-GUID: HewU9jl1cdCI0yfxdWRtaYHkxLypwsuY X-Proofpoint-GUID: HewU9jl1cdCI0yfxdWRtaYHkxLypwsuY X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDE5NiBTYWx0ZWRfX/8Di9LekEHgZ H37QlCZ+TcGD51Ix4PfDCTi4BbCwmOrslTHSwqD4hCLTRv+bBBZEEC5V3OVYjisksBxEEtyD8cZ kvANth60hpEPPxLNevnyuqdtuXjveLEDVsvtCZ86kgxldooakt3TcpqFWlYtGblxULMYndt8Q/1 4dY7HjiXyrsh4h+JPCep2IKPysstJfQ4pJzyPg3yjjPoAMYl1p46EhOludp7TW77qVFa4uTbRrs gZjDVb/e1iMaNDqegTt7FyCJlos6P01FI55rOAHvt4AWq6fD0CjQLMVZlgzBWpVbA106urpSnQ5 JtaKUYVYnYdawCRAfqgGf3GOSaSC/9k/w7GZiH+2JvGYAmcQ2ILMmQnVy5T5yQgU7FcLjmnQKY5 r+B6yuywsC805QRcfpZzv71s8NkFbsWx9toWEraXEBSdXpCNHlvn+axHWkf1Hjingi9dz6HbH1h DHSscaH8FTCR2LwEh0w== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-16_05,2026-06-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 priorityscore=1501 lowpriorityscore=0 phishscore=0 adultscore=0 malwarescore=0 spamscore=0 clxscore=1015 suspectscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160196 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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-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 @qualcomm.com) X-ZM-MESSAGEID: 1781637494616158500 Avoid including TCG-specific headers in non-TCG builds. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/arm/internals.h | 4 +++- target/arm/cpu-irq.c | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/target/arm/internals.h b/target/arm/internals.h index f7a57d3ea70..fcce3804f34 100644 --- a/target/arm/internals.h +++ b/target/arm/internals.h @@ -29,9 +29,11 @@ #include "exec/vaddr.h" #include "exec/breakpoint.h" #include "exec/memop.h" +#ifdef CONFIG_TCG #include "accel/tcg/tb-cpu-state.h" -#include "hw/core/registerfields.h" #include "tcg/tcg-gvec-desc.h" +#endif +#include "hw/core/registerfields.h" #include "system/memory.h" #include "syndrome.h" #include "cpu-features.h" diff --git a/target/arm/cpu-irq.c b/target/arm/cpu-irq.c index fe514cc93af..883e8a176c3 100644 --- a/target/arm/cpu-irq.c +++ b/target/arm/cpu-irq.c @@ -8,10 +8,11 @@ =20 #include "qemu/osdep.h" #include "cpu.h" -#include "accel/tcg/cpu-ops.h" #include "internals.h" =20 #ifdef CONFIG_TCG +#include "accel/tcg/cpu-ops.h" + static inline bool arm_excp_unmasked(CPUState *cs, unsigned int excp_idx, unsigned int target_el, unsigned int cur_el, bool secure, --=20 2.53.0 From nobody Sun Jul 26 13:28:57 2026 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=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1781637505; cv=none; d=zohomail.com; s=zohoarc; b=QH7A5S/FJC0ybZx63W+DvJZembIgzVyYL9M/Luf4kCM5OQsiPrpQYuxzK1OpUcLlnnuJhViqw6D21rUyi0Lp7+gd2tKUhq11U6knEzLsoWz15ICCjClSahXHXGr4m3ADuLYzXI8Lz75/dtnxpVarcSMUJ5jOpavFb+Ls48GCWgc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781637505; h=Content-Type: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=Wl/l58jF266TXr78IqsbM7hWW/TfYtT8wj4jmm3NV1I=; b=P2PF/FBocA69ich19Wiedj9k9y295m2vUZQKfGSAUjABEqNFSFj8/tl2tCShTl4cUyYxoviXPp1ekkn4/WAjV3f+bjfttLMS2zNaW243KaxGMVS1TWQaIyWW8J9AFl5JzJdbzRJ4gEfnEQyM4x1Nk/gLe+3CBqao+hw9uRqhASw= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781637505088240.73752178310656; Tue, 16 Jun 2026 12:18:25 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZZI8-00082G-S0; Tue, 16 Jun 2026 15:17:44 -0400 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 1wZZI3-0007Qv-F1 for qemu-devel@nongnu.org; Tue, 16 Jun 2026 15:17:39 -0400 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZZI1-0004eH-CA for qemu-devel@nongnu.org; Tue, 16 Jun 2026 15:17:39 -0400 Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65GIOMr93965396 for ; Tue, 16 Jun 2026 19:17:34 GMT Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4etx8kcd3b-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 16 Jun 2026 19:17:34 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-915d3261c5cso1001888185a.3 for ; Tue, 16 Jun 2026 12:17:34 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-462236047c8sm2124542f8f.10.2026.06.16.12.17.31 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Jun 2026 12:17:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= Wl/l58jF266TXr78IqsbM7hWW/TfYtT8wj4jmm3NV1I=; b=FNQE2GOcQTvAw2JN 7XeOHWTp04ik0fIsyQusEX0TR/hFsGMGDi8i5n5yPsSBP0YmDoAauuVW15EQruNk 6HBJT6yyQCEwIX8R4kfVineT++L0P7/QSvVYPMklkEsrnUoZUxM8EbqKPu67nb0D Kj9zm03GZ7qst9LkQAD1sn0KxRV1Wm3Yaa60DnCiqPKw5DKq9YKrJEYHDpsNwLTo dG4PPCS7WSv1rhIb6Qze4+Ey/TIeuqY+94FTXfOWRyL7n8PkBypJcsUiNNivbRLy bFyPkK4oK68YGIgvjSgL4geE4YccYeupLpmuaZV957QXoh8GEyeHyWIvdMBmA2Da LRi9TQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781637453; x=1782242253; darn=nongnu.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=Wl/l58jF266TXr78IqsbM7hWW/TfYtT8wj4jmm3NV1I=; b=U6g6M2einPGI628vqPqMbjnDDiibsSKbmji6TU5AoAo9n5LV+Zd0Ad3L0xm0udvKAc CAHL6LwvREAoJKevDFXk5nJL7Ids1Gm442R4gqLETJoQbgLJulGjYAr1ep3f6XE+lXBW pGo0yLrsL86flwhASrVQ9I2vaFnfelw0CMnDlhGUwKWX+AfYh2/lWT0fCvIec7B5JkYV grS8GRjbRIl3HipyEZEDAu6xYQaWJr6b2gqcoLlgCPvKUQeeXpmY5dZVcTwMEoQftN6R 9Qm35qry+KBVowx4xGp68BggJf8dLDwCxQBJ+4gsX3wkAotIN4zyo2z7VOhHeZ8p8SzD gnwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781637453; x=1782242253; 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=Wl/l58jF266TXr78IqsbM7hWW/TfYtT8wj4jmm3NV1I=; b=awr6nq+FZ92kV0JcAlmYCzLsyWT1IDqZkdJr6/1fq3Ns2ObKvvwu5SWypuKlrXZjBP MDgO97xp4TLmERkMhtb95tuu0oBHUD3vdYskFSg2w24GNZW5gY2mYqtySqpXugdWBGq3 Hxr94F85sHlZMuoh+l+bVeGdv/RfyY0NB9ZuY3E/+tsYUUNAFq1QKC7/mUSARh4wGZOX 0W2SzYMp6bX4sAq50otxajRBVoxUviUyYmPdoaV/w7NH7zj+l3zPMOBNtU4X3w/X6hA5 Q5dNIGwpNx2jAYXzi8HAZLn5XG6HsRlEWzb6kJPhxoUgLieWAZeJwVheCzFJ7nYo8oG5 xRLQ== X-Gm-Message-State: AOJu0YyZ3pL78x9h9R1qqeZ6EnlotUkfovuoamnxJpQI3YX97Z0i6M7o U0Vm4E1HrJA/J3sOImP6l7Ug8r5w8VYwBk7kOdRGB1nRnv8573VHNRkacHuw7a88SFGsEfHSZXY snkjzZDj1cVgDaouizvlVg9tcKk/DM7SL36tWn1ADKWMUWrNQ8wv53ChD/6zksu36ww== X-Gm-Gg: Acq92OEPkt4BpDMVeWc1a+wo0SUlXljWD58Fr61wJ3haCv6ksdOActG8adgqh4bw73x XeuZp/iTTlUE6o3QXcv2Rdw/nHtwvgoDlWvYXcIWSIykQyy6QSh5q03TuQ42iOwsKitG8AMDS1i gHP1Mpyn6w2mA6T7JXhiwN6FJaxUrDbiKxBaWrOj4jsYqXiA0LBm8mihC2QHpmsGjF4DlbDWtMj /R71eXlw5j/y0Dh1RzQwz/ZokWJM7GMGKxkM46vQTF+lEO6HaOzPt8uGlk9dRUY4J9lzQCVz2ee uF0DOfzaUNSVYVpBK3CwkF8S7BE9Oucn2EySDUMdopiYi5Z3itkcGDg+IQxpVA36d++O0tQ7ula grXZQZTmLdyu/sOXfhg3KG/nRKudy0UM3/ggPauMklgrZsER6fblhRSDg+wpjq3bWiw9PGbVatX dRpOs= X-Received: by 2002:a05:620a:f0b:b0:90f:7732:4bcd with SMTP id af79cd13be357-91d8aadf83fmr179315985a.27.1781637452996; Tue, 16 Jun 2026 12:17:32 -0700 (PDT) X-Received: by 2002:a05:620a:f0b:b0:90f:7732:4bcd with SMTP id af79cd13be357-91d8aadf83fmr179310385a.27.1781637452523; Tue, 16 Jun 2026 12:17:32 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Richard Henderson Subject: [PATCH 02/10] hw/s390x/ipl: Remove TCG dependency in handle_diag_308() Date: Tue, 16 Jun 2026 21:17:08 +0200 Message-ID: <20260616191716.12932-3-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260616191716.12932-1-philmd@oss.qualcomm.com> References: <20260616191716.12932-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDE5NiBTYWx0ZWRfXwK137k43I3L5 ykUiUb3yO6LHTANYzXvWpfXIsc4WqI0g0xMTWHeRRWGuoCx/BYK3Eix50sK1IFz8DIlErqtL+zX XUGbXfMbbzWEV0TAKrxwqdNYAD4GsyqPKOSY0gcPzL/IABNe84wZbkai436voGyA2Zpcp0TH9BV SHGNlFdt4HCAxtqAZms/SdhCALA39qlGYrGCaVVRj+zxyLZ8RvnBww56cS1T7xc1FLopDsak+6W JeUbI0p8K+C/3J27y9UB8RHhXIgOzw1htQ9hUHLH/Z0Yl62XM6gB/pb4F5TvVwl6637G3mi7csS 9zcfMqdmpqd8+R2/lFuc/CwlRaBZLL4MVhL5ofTM/AI4VCLHjpfXkgZoBh8DAlLuxPZ4tJvYc/o 8VKZuoa+Hr4ZrGGxO99c8oRB5mEK6p8xsPWsNpfYCYl9Jws+gb2JQukMAZWauhmqxlnMX67BDpv +8U0TZ8a2R4wmZIDfpg== X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDE5NiBTYWx0ZWRfX82NkS05DWLfp ML1ii3VE04sXJiZKmFRaPW0WqAP6XVoKRwWUUTk7l1KKo6lzvEqDDiNEsaubyk8tx0NSeoOzMTk tY8f14kyJvig0O2Wp44t6WLu8Nt3eSI= X-Proofpoint-ORIG-GUID: j4w0vrSK6CbdRFk--d0yw7fuKOfWBHyg X-Authority-Analysis: v=2.4 cv=dZawG3Xe c=1 sm=1 tr=0 ts=6a31a14e cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=EUspDBNiAAAA:8 a=O4nC0eKGiR0KFeLeyJoA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=NFOGd7dJGGMPyQGDc5-O:22 X-Proofpoint-GUID: j4w0vrSK6CbdRFk--d0yw7fuKOfWBHyg X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-16_05,2026-06-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 lowpriorityscore=0 clxscore=1015 impostorscore=0 suspectscore=0 phishscore=0 priorityscore=1501 malwarescore=0 bulkscore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160196 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0a-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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-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 @qualcomm.com) X-ZM-MESSAGEID: 1781637506710158500 Rather than calling a TCG specific method in s390_ipl_reset_request(), have handle_diag_308() return whether a vCPU reset is pending, and use that in the TCG DIAG helper to return to the main loop. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/s390x/s390x-internal.h | 3 ++- hw/s390x/ipl.c | 5 ----- target/s390x/diag.c | 30 +++++++++++++++++++----------- target/s390x/tcg/misc_helper.c | 5 ++++- 4 files changed, 25 insertions(+), 18 deletions(-) diff --git a/target/s390x/s390x-internal.h b/target/s390x/s390x-internal.h index e7e4f2b45d4..35d1e34ef4d 100644 --- a/target/s390x/s390x-internal.h +++ b/target/s390x/s390x-internal.h @@ -385,7 +385,8 @@ int mmu_translate_real(CPUS390XState *env, hwaddr raddr= , int rw, =20 /* misc_helper.c */ int handle_diag_288(CPUS390XState *env, uint64_t r1, uint64_t r3); -void handle_diag_308(CPUS390XState *env, uint64_t r1, uint64_t r3, +/* Return whether a CPU reset is pending */ +bool handle_diag_308(CPUS390XState *env, uint64_t r1, uint64_t r3, uintptr_t ra); =20 =20 diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c index fa50749a7d3..4cca21c6217 100644 --- a/hw/s390x/ipl.c +++ b/hw/s390x/ipl.c @@ -18,7 +18,6 @@ #include "system/physmem.h" #include "system/reset.h" #include "system/runstate.h" -#include "system/tcg.h" #include "elf.h" #include "hw/core/loader.h" #include "hw/core/qdev-properties.h" @@ -690,10 +689,6 @@ void s390_ipl_reset_request(CPUState *cs, enum s390_re= set reset_type) } else { qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET); } - /* as this is triggered by a CPU, make sure to exit the loop */ - if (tcg_enabled()) { - cpu_loop_exit(cs); - } } =20 void s390_ipl_get_reset_request(CPUState **cs, enum s390_reset *reset_type) diff --git a/target/s390x/diag.c b/target/s390x/diag.c index 01cc802eaed..618ae41289b 100644 --- a/target/s390x/diag.c +++ b/target/s390x/diag.c @@ -95,44 +95,49 @@ static void s390_ipl_write(CPUS390XState *env, uint64_t= addr, } } =20 -void handle_diag_308(CPUS390XState *env, uint64_t r1, uint64_t r3, uintptr= _t ra) +bool handle_diag_308(CPUS390XState *env, uint64_t r1, uint64_t r3, uintptr= _t ra) { bool valid; CPUState *cs =3D env_cpu(env); uint64_t addr =3D env->regs[r1]; uint64_t subcode =3D env->regs[r3]; IplParameterBlock *iplb; + bool reset_requested; =20 if (env->psw.mask & PSW_MASK_PSTATE) { s390_program_interrupt(env, PGM_PRIVILEGED, ra); - return; + return false; } =20 if (subcode & ~0x0ffffULL) { s390_program_interrupt(env, PGM_SPECIFICATION, ra); - return; + return false; } =20 if (subcode >=3D DIAG308_PV_SET && !s390_has_feat(S390_FEAT_UNPACK)) { s390_program_interrupt(env, PGM_SPECIFICATION, ra); - return; + return false; } =20 + reset_requested =3D false; switch (subcode) { case DIAG308_RESET_MOD_CLR: s390_ipl_reset_request(cs, S390_RESET_MODIFIED_CLEAR); + reset_requested =3D true; break; case DIAG308_RESET_LOAD_NORM: s390_ipl_reset_request(cs, S390_RESET_LOAD_NORMAL); + reset_requested =3D true; break; case DIAG308_LOAD_CLEAR: /* Well we still lack the clearing bit... */ s390_ipl_reset_request(cs, S390_RESET_REIPL); + reset_requested =3D true; break; case DIAG308_SET: case DIAG308_PV_SET: if (diag308_parm_check(env, r1, addr, ra, false)) { - return; + break; } iplb =3D g_new0(IplParameterBlock, 1); s390_ipl_read(env, addr, iplb, sizeof(iplb->len)); @@ -159,11 +164,11 @@ void handle_diag_308(CPUS390XState *env, uint64_t r1,= uint64_t r3, uintptr_t ra) env->regs[r1 + 1] =3D DIAG_308_RC_OK; out: g_free(iplb); - return; + break; case DIAG308_STORE: case DIAG308_PV_STORE: if (diag308_parm_check(env, r1, addr, ra, true)) { - return; + break; } if (subcode =3D=3D DIAG308_PV_STORE) { iplb =3D s390_ipl_get_iplb_pv(); @@ -172,30 +177,33 @@ out: } if (!iplb) { env->regs[r1 + 1] =3D DIAG_308_RC_NO_CONF; - return; + break; } =20 s390_ipl_write(env, addr, iplb, be32_to_cpu(iplb->len)); env->regs[r1 + 1] =3D DIAG_308_RC_OK; - return; + break; case DIAG308_PV_START: iplb =3D s390_ipl_get_iplb_pv(); if (!iplb) { env->regs[r1 + 1] =3D DIAG_308_RC_NO_PV_CONF; - return; + break; } =20 if (kvm_enabled() && kvm_s390_get_hpage_1m()) { error_report("Protected VMs can currently not be backed with " "huge pages"); env->regs[r1 + 1] =3D DIAG_308_RC_INVAL_FOR_PV; - return; + break; } =20 s390_ipl_reset_request(cs, S390_RESET_PV); + reset_requested =3D true; break; default: s390_program_interrupt(env, PGM_SPECIFICATION, ra); break; } + + return reset_requested; } diff --git a/target/s390x/tcg/misc_helper.c b/target/s390x/tcg/misc_helper.c index 3d13c8bd8ea..036be93fb32 100644 --- a/target/s390x/tcg/misc_helper.c +++ b/target/s390x/tcg/misc_helper.c @@ -135,7 +135,10 @@ void HELPER(diag)(CPUS390XState *env, uint32_t r1, uin= t32_t r3, uint32_t num) case 0x308: /* ipl */ bql_lock(); - handle_diag_308(env, r1, r3, GETPC()); + if (handle_diag_308(env, r1, r3, GETPC())) { + /* As reset is triggered by the CPU, make sure to exit the loo= p */ + cpu_loop_exit(CPU(env_archcpu(env))); + } bql_unlock(); r =3D 0; break; --=20 2.53.0 From nobody Sun Jul 26 13:28:57 2026 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=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1781637500; cv=none; d=zohomail.com; s=zohoarc; b=EeG00brTUArTzL8sz9OhzvIe1L9m15rDD7WeKQhYz4Kc3IaUOROuNkUW8rKNK/i7z9ow8r4GCrrF3TWf6OY08w9xSowf79dCzfl736FD/ff76UXoTiBdlXtI880qeifS8+8jB+6efsXdMh6TwuZQjirCr9cl4q9KY+LcQg8G3ac= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781637500; h=Content-Type: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=+AN7stYLK7JPdjPiEG66VSBt9lEsW5E/TgBGfmi/f5Y=; b=hFdMS0SXQumIeU5RTOGW0OINBETtNR9PnQ+m4FmrC7aKGUIaN4pgtrdpKLUV0CG/h3oNmZuQlHj+UjU7mZ4LJk3SJFSScHuuOtfafvOrS3scv4U6eufmcu7VaMJBjU2NZE5xc/iSHrvRm6NRxjaSzBqYNBjzJfoT/hi7iuHkYXY= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781637500573970.6473036105021; Tue, 16 Jun 2026 12:18:20 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZZIB-0008KO-4y; Tue, 16 Jun 2026 15:17:47 -0400 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 1wZZI8-00081w-M2 for qemu-devel@nongnu.org; Tue, 16 Jun 2026 15:17:44 -0400 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZZI6-0004g0-6L for qemu-devel@nongnu.org; Tue, 16 Jun 2026 15:17:44 -0400 Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65GIOhvN4037923 for ; Tue, 16 Jun 2026 19:17:41 GMT Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eu1763gcs-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 16 Jun 2026 19:17:40 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-915757be497so706825885a.2 for ; Tue, 16 Jun 2026 12:17:40 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4606f2c3fcfsm41831484f8f.26.2026.06.16.12.17.38 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Jun 2026 12:17:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= +AN7stYLK7JPdjPiEG66VSBt9lEsW5E/TgBGfmi/f5Y=; b=UlvVLiLNtPlp/t1h 1ERI8GmcIz/W3LVSGHHQqCzU6Pd5IhXBiPllDTvn1YDVrbC5orKfy3bXbCTxWhEZ hG/iFsYgLKx4JE2yGU65+wzfWIVNb0bN+DcZLhBOt2jnMrzmvqhrjyEdQygYX8G8 bT/d5HysiglhhcWEMZtJNBc9LBAfd3gXAmQ1ze9LRZuONUgAn77ud38hNqtzad1s w2+pT4wx+w9indBXXQV+Qou2xZPOO/0X8JSo34iFY+Zf9IPX6LJ3mSucoMCR+1w5 NC4G1qVepY8Ei9V6ycs5s3mOxEnmzgsYyDH6nngipcUu6SRF8mVkBAwh8tbftlQl YdUcow== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781637460; x=1782242260; darn=nongnu.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=+AN7stYLK7JPdjPiEG66VSBt9lEsW5E/TgBGfmi/f5Y=; b=GOubqqZZT5di+NZt7ZtnWxSbv3s5z+227Fq1hkff/HvDfWB+rF3KrH40Dme4Bs5maA 848vmybClxOOJnPrSNGcoXdeUk1PwORf6c3ggLEsTKMYfvaXqnJe+G7gEHB/DpfAZieJ m+NgYwOpJ66MEBCCMeWFD+mTiJWo564w+s6NN3DaNp/YHSElgs+Pexg3FedHm7rVaCf1 0BxS5Itx6rz537BHugEyKr8kNGDSWCqE3njLLqhlg6FaXR/JfY1tSzkNwHdHP4A6sDTi wCMayWxrCRJUFczjCgcqZ9h0I+Q0L+1Tel6mAGx2Zgtt0EuvqTe/F6Lge1DrWWLxsMbK yQ7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781637460; x=1782242260; 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=+AN7stYLK7JPdjPiEG66VSBt9lEsW5E/TgBGfmi/f5Y=; b=Vb1ZoVf7uULYOkFIQP2DGXhZmiPS8neyB0lOEfrrZP6gI3uLvQUlsjXwHQy89eFe8J CrzU6e4BGx57S0adcB2ihQcWyXWQnnRz5YAWmLp1fI6W1NqPwjTDj9g09pAw64IqBKFq cujnyaSWlzGdwly1HJY7jf4a+e9eZIrL/NB+QgyD0ET/Ogu7XVyRPVr074Vrwa+wZASx 9cMC8B9wI4Mqv230F+ov3vRkQ9uuDW3CejpRBxSCjQi+My3/7WNJCmokBAM87C5BR1zp vk2Wo0HQQc5RCMg6oJvq4nGfeYAh0EyF5pqSqOsje/px96HgcVNitjqzSDLKnUGXj9oN qTHQ== X-Gm-Message-State: AOJu0Yy6/vFwzuA0rMVQGimk29X9D+3VTjvXMx8+H/V1FvpeWMwwdtW8 4Ux1wiCK0uz5ACqp7fWkK1hFplfnTjxyrB/aUC8YLkKHPjbAMPEoenWFHSlhyuWjStsVvo6iUH8 qdk936+5lOkWJzD0VuG8oZ6+FfSg2QpnvJ1aSBeRR+8LFKGcmFZpvbDJPa7GI5RaARg== X-Gm-Gg: Acq92OGDdS7P3yP2tDIEQbQcaD+1T+10vl9aWS4cx2fZkoZFQVVlN8s94G54/4HslCE 9Tfd4R1zvEMl0lvYHdvR9UQmXwIFwmHNn9sdaQS05j//XCxT8n6Clj5LA8zv1IiGaDDzPNbeE0x mD9rGvy63dt3uJROsN8Nzrc+AlOe/hQ4wsfRy3dg4MPEdOg6mqWkHEY0PGI3YoqsDSliN6KGcEY uTG2HuYuHNPCkXBhX4zwfim33b0GpfNGhNR9WZMzW9u0IbNyLkV+sOrkCPjqJ1e2gxBTgHYeZWi PKHDgTvYJdMJsrFVB4HgfZUsBOasmJyHa3n63qn0hxdaGiRxpoSbR84NvERBer3bTFqGuzEXt7L 5eT6PJeYpQayJjIbMJgbvLqOpr9V+nqZei65kPjdraP8p0BP2p1fBEu6y6TS3jVvvOHbw1us5Aq YaV3A= X-Received: by 2002:a05:620a:46a4:b0:915:820f:c78e with SMTP id af79cd13be357-91dbcc17463mr43955085a.52.1781637459891; Tue, 16 Jun 2026 12:17:39 -0700 (PDT) X-Received: by 2002:a05:620a:46a4:b0:915:820f:c78e with SMTP id af79cd13be357-91dbcc17463mr43949785a.52.1781637459407; Tue, 16 Jun 2026 12:17:39 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Richard Henderson Subject: [PATCH 03/10] accel/tcg: Remove cpu_loop_exit() stub Date: Tue, 16 Jun 2026 21:17:09 +0200 Message-ID: <20260616191716.12932-4-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260616191716.12932-1-philmd@oss.qualcomm.com> References: <20260616191716.12932-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: U5zAQYVpNGp0v-sNWLXmbDFGQr2XuouU X-Proofpoint-ORIG-GUID: U5zAQYVpNGp0v-sNWLXmbDFGQr2XuouU X-Authority-Analysis: v=2.4 cv=I4RVgtgg c=1 sm=1 tr=0 ts=6a31a154 cx=c_pps a=HLyN3IcIa5EE8TELMZ618Q==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=eoimf2acIAo5FJnRuUoq:22 a=EUspDBNiAAAA:8 a=20KFwNOVAAAA:8 a=nTtTSeO8Bg4HjSiC9DoA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=bTQJ7kPSJx9SKPbeHEYW:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDE5NiBTYWx0ZWRfX2xlqdsiKGwzu v4KVtlmTvmEB5zC0NJU1x2HbAX2gjRFG4IBu9VCUZJ6pB3CWY2ALNIRGaR8CYTxcQLINQAW8nN2 QVO4+i0UhXg2P3wIZlOhOltibHwKors= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDE5NiBTYWx0ZWRfXwkPBdH7E4ncm sD9eKLxAvRdcp5RglafrPjQgmP2mKCzsBsAsLFsW6N/Aod9bLWCTpAbGcQe0yIussOHeYLfB9mY H/Mqx2BH4AbGyTRsDCTWO7TCmpwxejElEjj9FmBALvcO/uRe33yiWlSfmmnAchmicMa8ByZI/xN 760eXrZ1jATcTdQtz+4VebrJSPNXCYcvWGA0IyVotksl77Dwx1v2tWIKf9dMFmkfF55ctXcqfHA z3P2FN8y73kuj7jrB4j+AAUUWmu4Co/xhxWzay7jZegrzcezIdaj7Ndsa0hhqtu9JxPNQaESWFS QWWusuJY4PuVcJfWWWxYhXtR0bpmEGNayfveAycc36DI8zaLoNHWNIjU4tCwBuSwDLSKT4uaMsV VzLGCqzKRCUXzHkMKXbFwWApTVuo+ZGxbpqQ4DYLunF19YIJtYeytT+cT9vFJckfUj1C+eh9DOV HtYm7kGNJPBIpCNkIPQ== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-16_05,2026-06-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 phishscore=0 spamscore=0 suspectscore=0 lowpriorityscore=0 priorityscore=1501 clxscore=1015 bulkscore=0 malwarescore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160196 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0a-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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-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 @qualcomm.com) X-ZM-MESSAGEID: 1781637502668158500 Last commit removed the last non-TCG use of cpu_loop_exit(). This method is now only called within TCG files, so we can remove its stub for non-TCG accelerators. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- accel/stubs/tcg-stub.c | 20 -------------------- accel/stubs/meson.build | 1 - 2 files changed, 21 deletions(-) delete mode 100644 accel/stubs/tcg-stub.c diff --git a/accel/stubs/tcg-stub.c b/accel/stubs/tcg-stub.c deleted file mode 100644 index 855e5d43171..00000000000 --- a/accel/stubs/tcg-stub.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * QEMU TCG accelerator stub - * - * Copyright Red Hat, Inc. 2013 - * - * Author: Paolo Bonzini - * - * This work is licensed under the terms of the GNU GPL, version 2 or late= r. - * See the COPYING file in the top-level directory. - * - */ - -#include "qemu/osdep.h" -#include "system/tcg.h" -#include "exec/cpu-common.h" - -G_NORETURN void cpu_loop_exit(CPUState *cpu) -{ - g_assert_not_reached(); -} diff --git a/accel/stubs/meson.build b/accel/stubs/meson.build index ccad583e647..7c6d7ad9432 100644 --- a/accel/stubs/meson.build +++ b/accel/stubs/meson.build @@ -4,7 +4,6 @@ stub_ss.add(files( 'nitro-stub.c', 'mshv-stub.c', 'nvmm-stub.c', - 'tcg-stub.c', 'whpx-stub.c', 'xen-stub.c', )) --=20 2.53.0 From nobody Sun Jul 26 13:28:57 2026 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=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1781637489; cv=none; d=zohomail.com; s=zohoarc; b=fPAW+CK1ZwojUUOTrVNOcWbfJXIgqh4J9OGtDgwPQXMv+sEuqNa+vCwEqHqP5mkTAtWNurXXL5kDVfTInHZ/EjEO+jayLOmaNykt2lXR8aHd3uzidZcosrIqK1epm3nkEwN4KaXS8Q6hu8yA0yt8A/L87QJHB3jdpoC7P0xM7IU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781637489; h=Content-Type: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=/FrGaTt6kayuLx9k3LRHujapTadzTFWbY4tka7scFnA=; b=lSJIUXkAc45eoeZBlb2zVUASdrTsx33Y8+IjtW/UueimKA4wJTL7Sw1l3r7cvA9RU3Q9lhWEoB6GSFVuuGJ1qtDbtCjUpZpVMm29fPx6FPZuqvxRaefO+5+TniLs98mqVq39y722+LzJuQfJtWFniObhRDFHJd/UAY/trydcpN8= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781637489604633.7947494853536; Tue, 16 Jun 2026 12:18:09 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZZII-0000j1-3A; Tue, 16 Jun 2026 15:17:54 -0400 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 1wZZIE-0000OP-IA for qemu-devel@nongnu.org; Tue, 16 Jun 2026 15:17:50 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZZIC-0004iX-Ny for qemu-devel@nongnu.org; Tue, 16 Jun 2026 15:17:50 -0400 Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65GIOohF303511 for ; Tue, 16 Jun 2026 19:17:47 GMT Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eu1epbdc4-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 16 Jun 2026 19:17:47 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-915c8347cd5so970957985a.0 for ; Tue, 16 Jun 2026 12:17:47 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4922fa97a07sm167857455e9.14.2026.06.16.12.17.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Jun 2026 12:17:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= /FrGaTt6kayuLx9k3LRHujapTadzTFWbY4tka7scFnA=; b=fQyZYZ3+FIujdDw2 iImY6PYo5xefJ5s3Abuez93/n8oeJiQGhbDep2vzQq2kay3nj3sWk4qMfmTjkhlB SPuKElUZXKrGIRzp4ZdL7E8Zvlp7SWMT61D1qSCk5TXz9/Bi6Nlu5LPypmrfFwfy phSKmVceW5cZDKSfs3rcVQtcurUj+MTqEEaXTsTeVrEJ8mR2epN3UGiScbVJi9GK rPOCvLmXv7fcaBjFIbK2bd65Oyei7X1pxsqqbHEjHLnXtS2PTLyOCsLhiO7eKAsn 8SsOFj+HZNyGj+B/yr1CY1gbw98ZqaQh24lUakII1mnmKTfNQbXfpy4XIvuxoznU B9d7mw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781637467; x=1782242267; darn=nongnu.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=/FrGaTt6kayuLx9k3LRHujapTadzTFWbY4tka7scFnA=; b=F3DlzJj1q94SjXf52C/HSWQ1davhPUK04EmmX/qYEh9dt1Q3V3MY6Oa5UWv7Ifz5bj f03d3o+oJ5zb1I/z6A5MVWOM+v35O1mNo7rAZrjeUrR/pgaq3CunUT2piVOgqH/u6iP9 Xlbc3HwLhbdUJNwFUltqrFu1MQqr1yReUyUC02QwKfs5/tM12n9JY0AnRdtcjpVz2gp7 u3Ts+QRnbsVjs9A/imXr5ycIkwXezpUhcaqF8trWd08Pr3raItQjF6lNewlvySQP0AM2 6Y+OmQzduLzxvuBPWXYMPNIpndSPDrqzTT79pXExDUT/VuTTSXwk6S7478faKf9e4iFu lfZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781637467; x=1782242267; 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=/FrGaTt6kayuLx9k3LRHujapTadzTFWbY4tka7scFnA=; b=ZsfMopgi4OE5FdyUaOOHi1te58NN66mK7KJQETMfIe6obkeG1uIjGKy1V7LVHdOFVX CDUhjIPU0fRkWly6vVufPmX+/jorIRNKRkyhbN6omIMmbqOf9zCPehaJ0jq154MEWKUg MYDEgEWRVmbERVTfg+V7R1z6n22EYTeorCj5CG6aw1WC0lxjJSF5BqrVW3kEcGmLNIWd TeSS+vamnMJQ7+3536t5VtGowXFJjh5Cytj/OfezrOJmoMP/jWzBmO4V83OWQx0e0PYM IP3Q35/XaAkHeBvD636PRfvMsJqtKG2+/vQpOuCfLiUHm1XIR+JXF1zQbH1T8YQxjX6s Db5g== X-Gm-Message-State: AOJu0YxTYNoq4DUxPDZKjlaaWkaEqOFlaLwcLFTHUu4wfF/LsACq/sfG O4Ow5Xu2L9bu8d3J7WBFz4UoryNgAH3EMNtpvshFTM2Wfnt2rc9Jp8L1AqX08o5VFcyZhAjlYGR eS4ampLSfW1jAJGCphBIpIczmpEaLFIJ9Cr8tXEIteSMpQfoT3qnBlqkT3JZvFjl2Qg== X-Gm-Gg: Acq92OGLRkw2/bVN6zXPpRpClhX55kGJTUgARybFnOTj6c6kpz0JZxT2DIPnkygz4dA 4/G6tXbNB8KZKMtLD+3b79E6gaU1W6ItGxvT8q8jAM+oFN+LJIMpahQdEn0Ie1Mz9J2VPLJ7gzQ mzns7Se/fqsUxB3ROKGWIzQjIAtGr/50rwvmIIwKzT4dn3jFpNyjFGqiT11pRLHUi8N/u2IgHBf tQ1QVFi1atOOFZqtBAVVAF5xU3yhQiBwtA3aj5PGaZxGefkeLZgbGJeppLLo8U5wOP1ib0wfgqS sN26xEWxdChbdo2m8rO/S6nRqDcVQTPQ9F19eJUKA/edG8JsYYrmQSa6bF5e98DyOcrtfsT/8e/ Q6Tr7kBGD0bePIJ58zP5tCSSZafHbfxDcFfcTWdqVz266IX/Gk4hKAS+1IdyfCBgEtDykFu3MA/ /Us1g= X-Received: by 2002:a05:620a:29d5:b0:915:bf79:3e0a with SMTP id af79cd13be357-91d8ccb259dmr177018185a.26.1781637466886; Tue, 16 Jun 2026 12:17:46 -0700 (PDT) X-Received: by 2002:a05:620a:29d5:b0:915:bf79:3e0a with SMTP id af79cd13be357-91d8ccb259dmr177011785a.26.1781637466429; Tue, 16 Jun 2026 12:17:46 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Richard Henderson Subject: [PATCH 04/10] accel/tcg: Move cpu_exec() out of 'exec/cpu-common.h' Date: Tue, 16 Jun 2026 21:17:10 +0200 Message-ID: <20260616191716.12932-5-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260616191716.12932-1-philmd@oss.qualcomm.com> References: <20260616191716.12932-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=I/ZVgtgg c=1 sm=1 tr=0 ts=6a31a15b cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=EUspDBNiAAAA:8 a=JBFRhVxWIrjttJGYeT4A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=O8hF6Hzn-FEA:10 a=NFOGd7dJGGMPyQGDc5-O:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDE5NiBTYWx0ZWRfX5vzGZeBifLuy FHp6mPEzcni+49sxcjBFopRGHhpbt9j2cFtnxQ9Az5jl+JSikRGh4qEhUg8wAUmfKox4rlElgPX aKqjZCvlCi/J9JhWhQKOHUv10H9y5sg= X-Proofpoint-ORIG-GUID: J_br4pYj2yfKsc9bUOugA_8DZkCni29T X-Proofpoint-GUID: J_br4pYj2yfKsc9bUOugA_8DZkCni29T X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDE5NiBTYWx0ZWRfX1rR1uYVvXMVv w+wKDQqQZ2ceDNc9fc+gT0471TfBYJwAQ5Mbio9Rs6bbLBOFnuvPXtbrKD7TyrHhb90pD4IuBb3 wTgUq2z1euPlYpun2H/L4uRW2J4vgMyZYQRQ2V3XJnCQLD9xRyxlXZ+RqnBUrSbXph4ngPHKT1g KBmaN0CI9WJDXUUtdXuyQ9gun3mGZf2NtoDXfxRXL3so0orXHzsbYlNGvC6BRbtEBvTSym+7fbV ywDJO+SlrSe/7FDyRLqP5EmZyhYjN4eD90eQRuisZhDfP0h7q3d0NXlFC6ZJ+umX4qdpM7+nHyq o2AT8ck4Qa18nzMABELK3QUQb2/eyGtXXwpwimxfD6GvUXUNuAZWrc+sXS2TMp9/ZqQDuZ3bHb/ YU2O2vy8owU8783/Bf15OnjsYeGnAWUuVc/71ivfWN52NU0izxk7klqb1SgLxiAMYwQxcAJKmLx VFXkHmwOhEwHq55FyqA== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-16_05,2026-06-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 priorityscore=1501 lowpriorityscore=0 phishscore=0 adultscore=0 malwarescore=0 spamscore=0 clxscore=1015 suspectscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160196 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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-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 @qualcomm.com) X-ZM-MESSAGEID: 1781637490573158500 In order to keep TCG-specific functions under a TCG API namespace, add the "accel/tcg/cpu-loop.h" header and move cpu_exec() declaration to it. Add a bit of documentation. Include "accel/tcg/cpu-loop.h" where appropriate. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- bsd-user/freebsd/os-proc.h | 1 + include/accel/tcg/cpu-loop.h | 16 ++++++++++++++++ include/exec/cpu-common.h | 3 --- include/user/cpu_loop.h | 2 +- accel/tcg/cpu-exec.c | 1 + accel/tcg/tcg-accel-ops.c | 1 + bsd-user/main.c | 1 + 7 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 include/accel/tcg/cpu-loop.h diff --git a/bsd-user/freebsd/os-proc.h b/bsd-user/freebsd/os-proc.h index 72ccf23e17e..1cf3c43de34 100644 --- a/bsd-user/freebsd/os-proc.h +++ b/bsd-user/freebsd/os-proc.h @@ -14,6 +14,7 @@ #include #include =20 +#include "accel/tcg/cpu-loop.h" #include "target_arch_cpu.h" =20 pid_t safe_wait4(pid_t wpid, int *status, int options, struct rusage *rusa= ge); diff --git a/include/accel/tcg/cpu-loop.h b/include/accel/tcg/cpu-loop.h new file mode 100644 index 00000000000..528adb5588c --- /dev/null +++ b/include/accel/tcg/cpu-loop.h @@ -0,0 +1,16 @@ +#ifndef ACCEL_TCG_CPU_LOOP_COMMON_H +#define ACCEL_TCG_CPU_LOOP_COMMON_H + +#ifndef CONFIG_TCG +#error Can only include this header with TCG +#endif + +/** + * cpu_exec: + * @cpu: the cpu context + * + * Returns one of the EXCP_* definitions (see "exec/cpu-common.h"). + */ +int cpu_exec(CPUState *cpu); + +#endif diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index 883389b0abf..ac3ab0e1cdf 100644 --- a/include/exec/cpu-common.h +++ b/include/exec/cpu-common.h @@ -114,9 +114,6 @@ G_NORETURN void cpu_loop_exit_restore(CPUState *cpu, ui= ntptr_t pc); #endif /* CONFIG_TCG */ G_NORETURN void cpu_loop_exit(CPUState *cpu); =20 -/* accel/tcg/cpu-exec.c */ -int cpu_exec(CPUState *cpu); - /** * env_archcpu(env) * @env: The architecture environment diff --git a/include/user/cpu_loop.h b/include/user/cpu_loop.h index 346e37ede8b..c9d49398f01 100644 --- a/include/user/cpu_loop.h +++ b/include/user/cpu_loop.h @@ -22,7 +22,7 @@ =20 #include "exec/vaddr.h" #include "exec/mmu-access-type.h" - +#include "accel/tcg/cpu-loop.h" =20 /** * adjust_signal_pc: diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 7292ff15060..9c754b03656 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -22,6 +22,7 @@ #include "qapi/error.h" #include "qapi/type-helpers.h" #include "hw/core/cpu.h" +#include "accel/tcg/cpu-loop.h" #include "accel/tcg/cpu-ops.h" #include "accel/tcg/helper-retaddr.h" #include "trace.h" diff --git a/accel/tcg/tcg-accel-ops.c b/accel/tcg/tcg-accel-ops.c index 3bd98005042..c179cd4adeb 100644 --- a/accel/tcg/tcg-accel-ops.c +++ b/accel/tcg/tcg-accel-ops.c @@ -28,6 +28,7 @@ #include "qemu/osdep.h" #include "accel/accel-ops.h" #include "accel/accel-cpu-ops.h" +#include "accel/tcg/cpu-loop.h" #include "system/tcg.h" #include "system/replay.h" #include "exec/icount.h" diff --git a/bsd-user/main.c b/bsd-user/main.c index 73aae8c3274..4f1544342eb 100644 --- a/bsd-user/main.c +++ b/bsd-user/main.c @@ -39,6 +39,7 @@ #include "user/guest-base.h" #include "user/page-protection.h" #include "accel/accel-ops.h" +#include "accel/tcg/cpu-loop.h" #include "tcg/startup.h" #include "qemu/timer.h" #include "qemu/envlist.h" --=20 2.53.0 From nobody Sun Jul 26 13:28:57 2026 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=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1781637534; cv=none; d=zohomail.com; s=zohoarc; b=nGdwk0TusmcD2ITfEZnX6gZqHruJC6oC28KhCBDIIvs90djJF35BHCii+UHFNOgLct8Wt2ZilOb3h8y0RhSS83R95ctUBjhzYBBOd2fiW0LBP+dl3zsO+o0zgjQ38W/j7XdKa5/cpGyG9C/xlne95EX6dROriNf7Y/abDqCNEzE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781637534; h=Content-Type: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=6I90FZKzeXxQeHa4NO1mSr3S6KLKHal2UGWPSx8REB8=; b=bhVy1O/lBco8z91Q5d+jppsBQsbdc9IiE+W5ZQ8y7LvFYkcghaNEC2eN+ssjoC8nxL1uM3slTUak7BJc7npTZvR4PqjSXLSK1DWgeHRewm+O00uJ1OEOFhKeo5tNoJL+BZiJKbfOkcvD9Qajz/byC8DMobecrwqtM33W+nDekdM= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781637534032405.85219964415865; Tue, 16 Jun 2026 12:18:54 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZZIO-0001jS-Kb; Tue, 16 Jun 2026 15:18:00 -0400 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 1wZZIL-0001Ju-KH for qemu-devel@nongnu.org; Tue, 16 Jun 2026 15:17:57 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZZIJ-0004ke-S9 for qemu-devel@nongnu.org; Tue, 16 Jun 2026 15:17:57 -0400 Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65GIPDLc173829 for ; Tue, 16 Jun 2026 19:17:54 GMT Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eu09kbqp4-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 16 Jun 2026 19:17:54 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-9157f1be083so826281585a.3 for ; Tue, 16 Jun 2026 12:17:54 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49233434c66sm8085735e9.0.2026.06.16.12.17.52 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Jun 2026 12:17:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 6I90FZKzeXxQeHa4NO1mSr3S6KLKHal2UGWPSx8REB8=; b=lpTuemNkiKz2VpuA XhPVVUk3JOtorErMVSAZuToZ2Lr9MaZSVe1/aqBrzoPoCHyruep3kH5J0YOEaPxW I6HXo1Ngl7C1tlP7jpRi+2G8rzV+K64LP9TV5oXGFduLMgJnNhEOaBK1SJbskBQJ FGPbWPkm8UU2TT9RmvrL+uBsp2xiHDkMhSrc4bMGBo+JhDum+vqYXUDSzlwuNti4 qHG0ioc/uIhR1/ftlIfIA5FzOhrxS5P2nMqb10rERSoFpVvI02ulQaMk2PE2n4dT C61OA0/4rCByE7qk87/xd5+BuMwrckAPF/2Sa2vKKhBV4SB1jbDJGpSsVmzM2Hvb jwTY0w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781637474; x=1782242274; darn=nongnu.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=6I90FZKzeXxQeHa4NO1mSr3S6KLKHal2UGWPSx8REB8=; b=BIhkQdmv17f6QmI4DPnYtdhiHCdC220+pkFqRJcVCfK+kWtzpUmV4IpHL6roIPWj90 jTljeN2ZSblg0eDI3xgr3+ntdneDu/IJZN4wjOC9fq/BvYqOh3sjbibVCArqtyBPII6t nsjO0Rv0b1b6u2u7DdTh3XJ0YlKML+gPyX34VXJtk+xs+EgSLRmNcXbm2cdHmMiKRBQH hdp9hjoXzNvsWwzfgYPiZPETHudjGggXK1fuZudobEkcf5fGilrCXX0Ep0/I8/yDabxC O7SpgB9sKxJE20YFCXN516zQcMKXIBgnbhWAEsyc6//VCF2fSEdQzU/jcXD+6OHjCsEl 19kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781637474; x=1782242274; 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=6I90FZKzeXxQeHa4NO1mSr3S6KLKHal2UGWPSx8REB8=; b=ErvwdbDRtr/WzyusZFA5jRxjJ64+eIKLQjHPbG5/4zitRf0ofRZgyHjJq3nOvLa7FX lp2czkhykLSUdyf1i+6JfKrZlluPxIu4om3wxyNFzjJ/BKdqfRDm43CzCV7cR+E5OH1j 2w9bG8BV/wWHWIVAUrQMl1s6UknSZ9C11shyV6+EO14z9fIAjIzYW8cVYlrshpUXaqME 6TUy/MrQZQa17UgRc0i1wbwll0fgJnxNEq5HXo+h7/UxZW5XJnAkzH85wTadVIN3rw/E xbTT0DnyqtEZX1nz3p3OzLKZ4MNWQU+QY/XAeazlZD00Pgth6WE/FFp36Q7fsqqi+/fL D3cw== X-Gm-Message-State: AOJu0Yz3X1LnqURcaopVFi/9YfUKjlINVTBV3UioDrQwQ6YuxHEcp/Uc 1xkcVJPzEKCE7Czll4dul4/JWfaycF3Qq6yOUXb1MjwXOA3DhKwwEc09tMZDSg+qndvygliUXno XJ7v51l8wW+uccTm10aroBzGJoJqOa1zWfwM8f3x6Zfldyt6TW+N9FqY9KvrlOpRSGA== X-Gm-Gg: Acq92OGPOa6TDqSxhuLDlYQWgp0yqkhbCNZAoVzxPPNLhOpyeymmqzaJ6A/X4XwamRb 80/+V6E6NBryGn6Nw4MSdDhykDy7gw2Rf2dmNrrm4crcQ0hIq12O+xL/rAfW2TN4hxjQEV+LXay tKCcI2WYPq/y2ZgnO9JdlsnQSTk83bwBfY82KOmAtO+njHQX0SlU9LMVqhcOmQEXa4PpChcaNP4 3lBPcOfXsZcL0Rmw+oXn+13zumNvyH0tTaLGt/jgDtVSJZSOx2hrTpjCwKVdkZr2rGJhoGCR9vw 30LQSjR4siIfKrCT6eHGzh+tIPqzPq/OAqCwZXwBnbkUahj+UMxaRwlewvSkZBA/rw7ITyXJ2vO uCzG8Ef7K7C/g613IxiiywvnRaKLJau+pQKeEiAn880MUYu4rg8ZpEqIU10pUjcKpYAcCW/HXLx 1nm7c= X-Received: by 2002:a05:620a:4148:b0:915:94c7:5841 with SMTP id af79cd13be357-91d88b50195mr188423485a.12.1781637473725; Tue, 16 Jun 2026 12:17:53 -0700 (PDT) X-Received: by 2002:a05:620a:4148:b0:915:94c7:5841 with SMTP id af79cd13be357-91d88b50195mr188418085a.12.1781637473314; Tue, 16 Jun 2026 12:17:53 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Richard Henderson Subject: [PATCH 05/10] accel/tcg: Move cpu_exec_step_atomic() out of 'exec/cpu-common.h' Date: Tue, 16 Jun 2026 21:17:11 +0200 Message-ID: <20260616191716.12932-6-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260616191716.12932-1-philmd@oss.qualcomm.com> References: <20260616191716.12932-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDE5NiBTYWx0ZWRfX+H0W6xb+sBHh qWID28TLvOhqDH1X9t53BVTJNkXiQjvvysRrEu3+OyzMhcXhvkhBaSMUKKIGT8EZG7mBGlZiJzf /KsBIPzOpw3r4dc8Ga0nPui0gPlPVjo= X-Proofpoint-GUID: vIV9JLMRhjVaqaqqREY1F47i3aD8doFV X-Authority-Analysis: v=2.4 cv=DoZmPm/+ c=1 sm=1 tr=0 ts=6a31a162 cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=EUspDBNiAAAA:8 a=Rbkf6VTxm-UGKecmB1kA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=O8hF6Hzn-FEA:10 a=NFOGd7dJGGMPyQGDc5-O:22 X-Proofpoint-ORIG-GUID: vIV9JLMRhjVaqaqqREY1F47i3aD8doFV X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDE5NiBTYWx0ZWRfX2zupyYDkRoAs 6CLCNDQa/yhJZEj40jcfvYJfA7Wng9tIXQdjE7LV+Dksq/uQph6sBkFlIU3x5rti6h6Rd+eCOuw ppqaLSy4czN6YfNPZNfUnQGDzy2HrhynZqv6eQpsYh7xvlGTMcgQ3Hxc8VjKYgnW8WJCg8me3gd ieiw9MjcTVOa7Fqn+T5lpU9nPEAOBBZYhNzaDco/6I4OsS+xn7AThWiC53zttjZ8ZZn/i1xLSr+ k5MdA9TeEzx/j19xX3qGtIFgZ9TKBYe69hNl9rDohshHklQj9bvPDqERW2+bAh9RzAc6IG+oaEe b8Mf2T1L93MfS+Bo8XrCxtrmu0OeOaqVR2IQoU0FEJVHzPyQXnKVppc9K0ubHumwkAl9FyIiYO5 Mvcw6CkdONuO896XZ+KCpevHxDATRyEsy/nhJWbX55O0krWk6pGPCUchz2EP9OI6Frk2rSX4UOU g3B2qmImOZA5tzvnUZQ== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-16_05,2026-06-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 phishscore=0 adultscore=0 impostorscore=0 suspectscore=0 priorityscore=1501 spamscore=0 bulkscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160196 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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-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 @qualcomm.com) X-ZM-MESSAGEID: 1781637534852158500 Move the TCG-specific cpu_exec_step_atomic() declaration out of the generic "exec/cpu-common.h" header, to the recently created "accel/tcg/cpu-loop.h" one. Include "accel/tcg/cpu-loop.h" where appropriate. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- include/accel/tcg/cpu-loop.h | 2 ++ include/exec/cpu-common.h | 2 -- accel/tcg/tcg-accel-ops-mttcg.c | 1 + accel/tcg/tcg-accel-ops-rr.c | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/accel/tcg/cpu-loop.h b/include/accel/tcg/cpu-loop.h index 528adb5588c..d8a5f98f9cf 100644 --- a/include/accel/tcg/cpu-loop.h +++ b/include/accel/tcg/cpu-loop.h @@ -13,4 +13,6 @@ */ int cpu_exec(CPUState *cpu); =20 +void cpu_exec_step_atomic(CPUState *cpu); + #endif diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index ac3ab0e1cdf..ea9a49a1435 100644 --- a/include/exec/cpu-common.h +++ b/include/exec/cpu-common.h @@ -21,8 +21,6 @@ #define EXCP_YIELD 0x10004 /* cpu wants to yield timeslice to another= */ #define EXCP_ATOMIC 0x10005 /* stop-the-world and emulate atomic */ =20 -void cpu_exec_step_atomic(CPUState *cpu); - #define REAL_HOST_PAGE_ALIGN(addr) ROUND_UP((addr), qemu_real_host_page_si= ze()) =20 /* The CPU list lock nests outside page_(un)lock or mmap_(un)lock */ diff --git a/accel/tcg/tcg-accel-ops-mttcg.c b/accel/tcg/tcg-accel-ops-mttc= g.c index 4160e2ba947..69560fdb9d8 100644 --- a/accel/tcg/tcg-accel-ops-mttcg.c +++ b/accel/tcg/tcg-accel-ops-mttcg.c @@ -32,6 +32,7 @@ #include "qemu/notify.h" #include "qemu/guest-random.h" #include "hw/core/boards.h" +#include "accel/tcg/cpu-loop.h" #include "tcg/startup.h" #include "tcg-accel-ops.h" #include "tcg-accel-ops-mttcg.h" diff --git a/accel/tcg/tcg-accel-ops-rr.c b/accel/tcg/tcg-accel-ops-rr.c index f84342e0449..5b132d3d5d8 100644 --- a/accel/tcg/tcg-accel-ops-rr.c +++ b/accel/tcg/tcg-accel-ops-rr.c @@ -32,6 +32,7 @@ #include "qemu/notify.h" #include "qemu/guest-random.h" #include "exec/cpu-common.h" +#include "accel/tcg/cpu-loop.h" #include "tcg/startup.h" #include "tcg-accel-ops.h" #include "tcg-accel-ops-rr.h" --=20 2.53.0 From nobody Sun Jul 26 13:28:57 2026 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=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1781637533; cv=none; d=zohomail.com; s=zohoarc; b=QJ3RTq3+LvSdowmWihINENTN22K/3X3xvGGJlO7cRKfoxgVEBIJexBCMwj3shYh/PDr2YdDAB5Mz0xmNrT6zlX27SaWOQumgR0E+to33j55GC0ccLuXZv2ERklIR8xjXBVoIducQQ0bR2qtL3IMlqaEZFIh/lWn+IxOgHbfedBU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781637533; h=Content-Type: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=VptE4oZJvr8TC2P8IEMdtdrX8C5LfG/QPGq6pGa9UsQ=; b=MntIQZXm8jag1vikqn27Zt+g1NaOZe2mXZhWVA02CeGgeCpY9Hnqwka+KqUGGzd6xdFvpeJWz17Nfdfc6JxFCZ2OCBhMJKB5qBhKRzzLCsR/+m9koWguSalF5YKWkT0VakNQdb9PIagHlgFMp9HRJZyex0KH9hQX13+zQaDttVM= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781637533356508.6977445102656; Tue, 16 Jun 2026 12:18:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZZIW-0002e6-5Y; Tue, 16 Jun 2026 15:18:08 -0400 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 1wZZIT-0002Ll-L6 for qemu-devel@nongnu.org; Tue, 16 Jun 2026 15:18:05 -0400 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZZIR-0004pr-JB for qemu-devel@nongnu.org; Tue, 16 Jun 2026 15:18:05 -0400 Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65GIOKk51376137 for ; Tue, 16 Jun 2026 19:18:02 GMT Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eu2xsb2k2-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 16 Jun 2026 19:18:01 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-915f7bd027eso1280641985a.0 for ; Tue, 16 Jun 2026 12:18:01 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4606f2e592csm49769277f8f.36.2026.06.16.12.17.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Jun 2026 12:17:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= VptE4oZJvr8TC2P8IEMdtdrX8C5LfG/QPGq6pGa9UsQ=; b=ZvaLeZJ6vMK4hhkX acHEeOvfEXnWOiApuxftMmv80YWQkWkalD85gb+Ufzcv3hzOA4X+WLEGhQD5v2GV C/WRe6nPFcI6rgH7Okb9eb3mKPszrsEeJboFlyFJ1wttkRb+FNYzDGixygvTDCHm XcXLY2EXOMm1DU4omcGe3WBAy3jyetAUMYa4iL1yt89iN+vA7sDFPjVmFxkF2VfZ SlhUngvEWCi/flDwhU/4I0g+nAxaXkPS+qzwM+lUaTsG6YrQXQ9ThZq7PFY6JSb8 Fw3/Bnk4WVsiTkClho1W2wufQ7F2xxuDHt0RDKBSAtCanu2dO9AubN5QV3qtdzW6 XR9eZw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781637481; x=1782242281; darn=nongnu.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=VptE4oZJvr8TC2P8IEMdtdrX8C5LfG/QPGq6pGa9UsQ=; b=WSFwUdzvbzKKpbiU5o1PEKjUO9HXrW0U7zuzrXrgld1LdLYOm4q6qkVG7BYfEholSd VqQfqcK8k+d08IbAZ97gpNsD8vpTQCQv9RuOlcZa34OXGtU5mITjBp7Lzd+auubGUMOc 4sunz2TQCmSFG8Cg6s9VDc6Y8TFzTgy5uFXZjj+Hn7pdgRLmuWtlLLx1kdqiG5JETBdT uc1ivkXe/W39zvnFP6yY84iLfjIYHBtKhNMN7pBNW3j7b2tkjwolWjOT6UTvZjgFMcNC renkQNEb2red6zJ78akXLnX6gUaL8Fec0oicJdBhjuBv3gkkysu9SVpUVZY8H9vlJSzy SHbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781637481; x=1782242281; 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=VptE4oZJvr8TC2P8IEMdtdrX8C5LfG/QPGq6pGa9UsQ=; b=TF/b+/+i1ezWMtBHdsjTsm7hnHLh9vaovIP8vpsaWzyC0kOWWp3KTh903sLD74i+iq yJ2wqTUzOCUGAJp/jPbv23HR54NjeEgq4BIsqoENpOfYNp5dXnsN8oVGaBhLVInaXBkd vYONM4DkklnjOCDg1l6H83BrKYRqbxYCReG1kIwbKtJaz443iRedV7dfjFLBJZ5cUNfh YgIGW/GaPicEDm0tHlqbdRgGT2w0iPHDVHimuhTOJzJyDjcq5rtFJIz8+2DpQoNntjge 9BOQJPHWDAOwKNrngSL4E0W+CtEwlWXD/yybA5b/y4zebtKUYOh36tS8mCbRDPCIWMls k9UQ== X-Gm-Message-State: AOJu0YxVkURkHzi6GjPmRaW1NKiXeg2gvuSU1R508lsGS5NM7JqjbA0m XH+1knge0i1zf3HXJy74KOlHno+pQNMQrjQo8d4F/qz9FcXE+VI9xaeqwmTHzj+4UQDWcN4PFnS BURvGnLzJmUvt3aP4l9rKE/tAO+bG36Hjwjs7koHvLpZYurF77R9tko33HuHF3wfLhA== X-Gm-Gg: Acq92OEQFbb6S1E0v15bjyEoy2Tc3eSdUGmq3Qe9TZMq3kQfbj8BZWWu9DYwhLdy4rZ 2MF8PepPEOgnxv23C8xuUHBWp4iZ4M75YTmoFWfiL0d3+hrZk1P0h+E2tITvBDykqRV938GnPzK 8AUBzbcgtMV/ogrLrdn9eqaA7ztWQWycYJCQ/HTR2dE/DRqv3tCCdpRk4PsaYXZhWHLttFx9Zy2 90TNSRwcc48wbxFgTcco0UwQvAKjT+R97Xfi4MtEWc+6yDs6ZGHNcwVRzjxDIxkto9jejUUP33U xjwPpkbD9UK4g78HnKLMKmeGY9mgTO4WHJBsqpmRp018ED+vVhY15lW+zwn64v+AKtOv0EoEMqG /zs6L0x5GaslwdukXrAfLMddvqlHNabslrZlSc9kLORCW1UPjvcbhqDh9yKxBxWJAIjn1XtN2Sg oOwxw= X-Received: by 2002:a05:620a:1a07:b0:915:c7ad:8bd2 with SMTP id af79cd13be357-91d8acdb52fmr172598185a.30.1781637480769; Tue, 16 Jun 2026 12:18:00 -0700 (PDT) X-Received: by 2002:a05:620a:1a07:b0:915:c7ad:8bd2 with SMTP id af79cd13be357-91d8acdb52fmr172594385a.30.1781637480268; Tue, 16 Jun 2026 12:18:00 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Richard Henderson Subject: [PATCH 06/10] accel/tcg: Move cpu_unwind_state_data() out of 'exec/cpu-common.h' Date: Tue, 16 Jun 2026 21:17:12 +0200 Message-ID: <20260616191716.12932-7-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260616191716.12932-1-philmd@oss.qualcomm.com> References: <20260616191716.12932-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-ORIG-GUID: ji1DEsGhEoh0h4eg8pRYH5jasMzRrAOK X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDE5NiBTYWx0ZWRfXypcaduoojj3E sAc7vwsHREfwux7RLmNzhmddKUhroflb47rdMCkKI6VHm0JfvhL2/KCCNHQMZoBkPtLaGYP1lZj 2amll7IdZrbU/xxZM8DI0c6WToVYFp9nGmVlJEARC8EA4yY5z4s8Gg8hokC5HZoPY1d5BzX04Oj WUc2NCTCL9429cTcgmGHE/A5y9jogRScpOzJ84VxAzlQeHV5nQS02gcIRrhPqR9B+zUdJbrvfWK ObPRZERTa1IrGUd9d+nMNxUGHkgp9r2+zMvnjWK4YPo2pySE7KVHxy1PajKn40jgPBtUUCt+zXJ 7yfWaYZBbVUMgldSl3nUnJNMdeJvfSyqS/+WqhbKg1FuhEi3yYytZZz4q2hDEogYK7OVlNoccY+ 57ecbz3nuXQbKwBDxWRnLJNN4cXuMv3vftqdiGIxp1WJ0LcRKoqJmaqCGtkaHmN6Qp965BZqhyj qa3dBAf2iXf6NtrIHHg== X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDE5NiBTYWx0ZWRfX0c9QefFVk0Gb X9k/nClEif2Ww3mA141aUbDVLTdCG5Z6Ut+Aum8tSufS4YvqC4C1HGEy3mbz8ntVaN0kVG+z2gE xFR2KhlwvjPsG9hkOWP8A7N3loIJ3no= X-Authority-Analysis: v=2.4 cv=MdJcfZ/f c=1 sm=1 tr=0 ts=6a31a169 cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=EUspDBNiAAAA:8 a=yZywUPRysb3OgPdCrAMA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=O8hF6Hzn-FEA:10 a=IoWCM6iH3mJn3m4BftBB:22 X-Proofpoint-GUID: ji1DEsGhEoh0h4eg8pRYH5jasMzRrAOK X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-16_05,2026-06-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 impostorscore=0 adultscore=0 lowpriorityscore=0 clxscore=1015 malwarescore=0 spamscore=0 priorityscore=1501 phishscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160196 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0a-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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-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 @qualcomm.com) X-ZM-MESSAGEID: 1781637534872158500 Move the TCG-specific cpu_unwind_state_data() declaration out of the generic "exec/cpu-common.h" header, to the recently created "accel/tcg/cpu-loop.h" one. Include "accel/tcg/cpu-loop.h" where appropriate. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- include/accel/tcg/cpu-loop.h | 13 +++++++++++++ include/exec/cpu-common.h | 13 ------------- accel/tcg/translate-all.c | 1 + target/i386/helper.c | 1 + target/or1k/sys_helper.c | 1 + target/riscv/csr.c | 1 + 6 files changed, 17 insertions(+), 13 deletions(-) diff --git a/include/accel/tcg/cpu-loop.h b/include/accel/tcg/cpu-loop.h index d8a5f98f9cf..f328aaa0377 100644 --- a/include/accel/tcg/cpu-loop.h +++ b/include/accel/tcg/cpu-loop.h @@ -15,4 +15,17 @@ int cpu_exec(CPUState *cpu); =20 void cpu_exec_step_atomic(CPUState *cpu); =20 +/** + * cpu_unwind_state_data: + * @cpu: the cpu context + * @host_pc: the host pc within the translation + * @data: output data + * + * Attempt to load the unwind state for a host pc occurring in + * translated code. If @host_pc is not in translated code, the + * function returns false; otherwise @data is loaded. + * This is the same unwind info as given to restore_state_to_opc. + */ +bool cpu_unwind_state_data(CPUState *cpu, uintptr_t host_pc, uint64_t *dat= a); + #endif diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index ea9a49a1435..ba98304c5fa 100644 --- a/include/exec/cpu-common.h +++ b/include/exec/cpu-common.h @@ -64,19 +64,6 @@ void list_cpus(void); #ifdef CONFIG_TCG #include "qemu/atomic.h" =20 -/** - * cpu_unwind_state_data: - * @cpu: the cpu context - * @host_pc: the host pc within the translation - * @data: output data - * - * Attempt to load the unwind state for a host pc occurring in - * translated code. If @host_pc is not in translated code, the - * function returns false; otherwise @data is loaded. - * This is the same unwind info as given to restore_state_to_opc. - */ -bool cpu_unwind_state_data(CPUState *cpu, uintptr_t host_pc, uint64_t *dat= a); - /** * cpu_restore_state: * @cpu: the cpu context diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 05d9ce512a4..78c560c7980 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -29,6 +29,7 @@ #include "qemu/target-info.h" #include "exec/log.h" #include "exec/icount.h" +#include "accel/tcg/cpu-loop.h" #include "accel/tcg/cpu-ops.h" #include "tb-jmp-cache.h" #include "tb-hash.h" diff --git a/target/i386/helper.c b/target/i386/helper.c index c3cba04e142..68362141621 100644 --- a/target/i386/helper.c +++ b/target/i386/helper.c @@ -32,6 +32,7 @@ #endif #include "qemu/log.h" #ifdef CONFIG_TCG +#include "accel/tcg/cpu-loop.h" #include "tcg/insn-start-words.h" #endif =20 diff --git a/target/or1k/sys_helper.c b/target/or1k/sys_helper.c index ca627bd7194..8ffa31b84fd 100644 --- a/target/or1k/sys_helper.c +++ b/target/or1k/sys_helper.c @@ -23,6 +23,7 @@ #include "exec/cputlb.h" #include "exec/target_page.h" #include "exec/helper-proto.h" +#include "accel/tcg/cpu-loop.h" #include "exception.h" #ifndef CONFIG_USER_ONLY #include "hw/core/boards.h" diff --git a/target/riscv/csr.c b/target/riscv/csr.c index 5514e0f455f..de583396f29 100644 --- a/target/riscv/csr.c +++ b/target/riscv/csr.c @@ -26,6 +26,7 @@ #include "time_helper.h" #include "exec/cputlb.h" #include "exec/icount.h" +#include "accel/tcg/cpu-loop.h" #include "accel/tcg/getpc.h" #include "qemu/guest-random.h" #include "qapi/error.h" --=20 2.53.0 From nobody Sun Jul 26 13:28:57 2026 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=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1781637618; cv=none; d=zohomail.com; s=zohoarc; b=liGNz21k7tnN14dClPDZnyf91rS75WwF6ha6AyMNkfFJFUa5gd4MI+2TcPb9s1HYI07sQsWRQ8gs9221gG+3OqnqUoYb2Djrmy7PX7u9AAIWSibByG44KpYL7OxHfD+JYNQ9ngf+rt/WoJAGutNOOXhHrZ+P8XUphqB8ObKBOdE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781637618; h=Content-Type: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=K+7vQkmZEx5hLsUpa5c7U/zOGIraZiiT7l/D8vb+OWU=; b=DtV9v4wSOVpkRnOnVaKxkgiy0HLKEgTnKY5x1QpqVpPWCPkbjVaptugoRsnmRkfrNNLR21nsWtDKPmxSIJNZ0a4KQTbxVeXSeCotz3qQe2S5F21S2HYUSKCaMOh5MwikT9xfqJGmSicSKXPp6dw0uWWyGo+dzQvqzjtggKUIWj8= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 178163761827761.626314014557806; Tue, 16 Jun 2026 12:20:18 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZZIf-0003WP-If; Tue, 16 Jun 2026 15:18:17 -0400 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 1wZZIc-0003Hh-1W for qemu-devel@nongnu.org; Tue, 16 Jun 2026 15:18:14 -0400 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZZIZ-0004to-ID for qemu-devel@nongnu.org; Tue, 16 Jun 2026 15:18:13 -0400 Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65GIOiKW3914081 for ; Tue, 16 Jun 2026 19:18:09 GMT Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eu0a7urxh-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 16 Jun 2026 19:18:08 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-9157d38ab37so491157985a.1 for ; Tue, 16 Jun 2026 12:18:08 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4922fa890d8sm112657555e9.10.2026.06.16.12.18.06 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Jun 2026 12:18:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= K+7vQkmZEx5hLsUpa5c7U/zOGIraZiiT7l/D8vb+OWU=; b=npBBpCwpAy/kM8nt u+xcUgb33y1rg8zibKsTGDNHdiQVdFX39fsO5hig4NcXMI+sk7S9IQaPb2tdWuEu XzK5ARXRlw7AgCBBbkO6+q8MdVIHpJlZIVhiV0kzUBeBhnzes2fwtOn0nBGDhzlI fzW+32uszIzHaYQXwcyetLxeGjNTC63y3tBPNfwG+2383kUfKO7u4VmqApqR+Ysk TVIRe1yQiG5jn3n4HbcD725jYRq+CmdYcaIxyWXnwrKkD4iesTgh2QD7kX1pTzqI vU0+62jqQxC1Kd34VsYopEfQj6fTFMq7qOnljxE1FLyP6xTbdOHBOgQE9d7pEc1U Ywq33A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781637488; x=1782242288; darn=nongnu.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=K+7vQkmZEx5hLsUpa5c7U/zOGIraZiiT7l/D8vb+OWU=; b=Rh7IjkNzQARbOMF5nZ3ORGtUBqKD139ssP2FAIwRggXuZWKJkvZcB6Dc69sUEvzYyg z/eaRSF3uqO0ak9HvUQwoZRR5IppWKIQpTnlIZXHPl7DwMo4i5bnzX99+o5z02O1/I0p iv5H0W0LdPkzHiezjSvfCeZgagZ1RYQbRqHSxioXQlEWGGb8MLbToq4rSLXJoUVWiJWh gVR2q1JloXTh7L31padhq7DP/gm6R6UuBP57R3EeS7nxtBYwA+nPBL33WvTeri3cYmJk AkCKV0LfnPWlLJU9DZHJ40jmHFgE6EMno7FdzrcZ2Y1YG5QfD4HON8PsxQj9DRzI2swK PPwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781637488; x=1782242288; 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=K+7vQkmZEx5hLsUpa5c7U/zOGIraZiiT7l/D8vb+OWU=; b=tWf7N7LfoYzKufaw2BGyx8NjUViyJGVKlA+6PzoiZOdwGOW8HFM/EUVw4rgWh+D+KF D63b7HrQWdEEbcL9RzFaBvQS6mSqNGM+JbiUJWmq4W9o7b2K6cgpe9c0yPEBgvBqA09M KI+o5vVvccipJukuc8IZtq/kVW4gdgVDesX+v1XVFAWX3MPJ+xd8AdZnHGlegpvADbsk FcCu1hJvuXmaLpYq79a9jjWWlX6iq2ACud7Lbmgo5G9nxRnqwOiYRHkkll6zhPxdyaNd sWBgU/UrK1a8NOTl2hkEmUCmx23Lr3aZsGnQ14zHaF2p2KqiqJ0TAUrMQNCEhAZZXsbf aUkQ== X-Gm-Message-State: AOJu0Yx9bvSDVTiJN69Dp+lH15nFtMqLIDk1GaQ2yD6T67d+cQDqvMfx mWMvKSitenfpLM3r7UQOfFOzXtga5uncH4R8Y8c9DK3CloCxm9xvASnYzTNB8staIdRVQt1jdxx pcOiMWkAPcCFwVjEERqJXaOHbf8FXJpgoLh2fqNmzR1sz3JPeu4BVTMNBhJ7OsItVuQ== X-Gm-Gg: Acq92OGTtKiu3fZPfRk0snbeOV8qYSrGatB+oWabYO0yTWecDut9yWZdJC5Gw3wp7a3 nHWgU+wn7xg2y1fv9wJ0tBgFZonHKV4DPgttSBP58s3Mr6f4OKuqVie+XFLZTohcK27zx00HH9M BOiDEFOrozmC4qfAP3fEUaCCcMG04X9SZ7mE4gHeF+iajbRS3a5762BfMlOZUzVu/HbqWGKRxAq ABG5vSud5GvMazussSTVoKngl5tc5ZOZvfOWBj5kJpicSZrgkEBQYNUh8iGHI6EqicMWoCd0RgM h4KLUUXTVp47BhtvnRv7wCPVUmagIErZNHRVVx0PcRFO0am2PMFfVQagmroy1Dzru+PuEdYM+nQ bB9kFuBmqV3JntVeBndlirEoI6i6xwjIz47f8i1R/UgPTYgK4GWnHE1VIOHHmK8lrNZzMeXQkWE +kjx0= X-Received: by 2002:a05:620a:4442:b0:915:f664:2568 with SMTP id af79cd13be357-91d8dea67femr159971685a.50.1781637487757; Tue, 16 Jun 2026 12:18:07 -0700 (PDT) X-Received: by 2002:a05:620a:4442:b0:915:f664:2568 with SMTP id af79cd13be357-91d8dea67femr159965085a.50.1781637487142; Tue, 16 Jun 2026 12:18:07 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Richard Henderson Subject: [PATCH 07/10] accel/tcg: Move cpu_restore_state() out of 'exec/cpu-common.h' Date: Tue, 16 Jun 2026 21:17:13 +0200 Message-ID: <20260616191716.12932-8-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260616191716.12932-1-philmd@oss.qualcomm.com> References: <20260616191716.12932-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDE5NyBTYWx0ZWRfX/BwY/fZ3Y19u aCUlQeZScQ5jf54GWASE5gNadxZhNBUKGAB/RR9gfs3JMyMzX9TK6yJ/HUVh2ILvpk4/VXooioh MIIQiJ2uQJYdE5F+4dnes6OV72Rl9/2nyj+zFd8RpsMrFXpAN7gqAXMC9UbRiR0hVFEPTeIjmVC haR8FHbz0zVXXOHkhaKmblwWkDp6rSGI3cQKHk3WsKHh85G4Q18q0RYu5bZOG07DAftc2BcGDo5 huWl9PVKOcq+S11Y4JlfHL/hZ++k5Mn9tmXSk+iXAjs9TiGUs2iAVIqVut8Wj1aXoJmpY/hyVUt FSLI94rDU1B9Nzx0KceQPdDwLSMs/kwqjela4R93cdZzrNVkD93fjIKHrGRf5rZEwG7WPzUSo0j d3UxS2cognaScEQ0+XhE1gsMv0YnGQX+wa9RpkQS/69EMkYgXqPY1Zn90pX0plIpadyWvA034rl 6ecSsiQ0NheNbI6B3jQ== X-Authority-Analysis: v=2.4 cv=JKALdcKb c=1 sm=1 tr=0 ts=6a31a170 cx=c_pps a=HLyN3IcIa5EE8TELMZ618Q==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_K5XuSEh1TEqbUxoQ0s3:22 a=EUspDBNiAAAA:8 a=mtRK1ZlsaID05NlGe3IA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=bTQJ7kPSJx9SKPbeHEYW:22 X-Proofpoint-ORIG-GUID: QZZBgH68wUDPeeom0uFOSsqUnfHqszCY X-Proofpoint-GUID: QZZBgH68wUDPeeom0uFOSsqUnfHqszCY X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDE5NyBTYWx0ZWRfX37Gb83v36cbl yxLVGwJLrq/Q1rt56axtQQHzuqL67aDgR1xnwYRXmROgFl8X7va5EPMqvpz4Hn2nZ7wFYQya1bS uAPGbUfM3tdbZHK8jG23HXl7N7C8NQk= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-16_05,2026-06-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 lowpriorityscore=0 bulkscore=0 impostorscore=0 spamscore=0 priorityscore=1501 adultscore=0 clxscore=1015 suspectscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160197 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0a-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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-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 @qualcomm.com) X-ZM-MESSAGEID: 1781637619735158500 Move the TCG-specific cpu_restore_state() declaration out of the generic "exec/cpu-common.h" header, to the recently created "accel/tcg/cpu-loop.h" one. Include "accel/tcg/cpu-loop.h" where appropriate. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- include/accel/tcg/cpu-loop.h | 12 ++++++++++++ include/exec/cpu-common.h | 12 ------------ accel/tcg/user-exec.c | 1 + target/alpha/helper.c | 1 + target/alpha/mem_helper.c | 1 + target/arm/tcg/op_helper.c | 1 + target/arm/tcg/tlb_helper.c | 1 + target/hppa/cpu.c | 1 + target/hppa/mem_helper.c | 1 + target/hppa/op_helper.c | 1 + target/i386/tcg/system/svm_helper.c | 1 + target/m68k/op_helper.c | 1 + target/microblaze/helper.c | 1 + target/ppc/tcg-excp_helper.c | 1 + target/s390x/tcg/excp_helper.c | 1 + target/sh4/op_helper.c | 1 + target/tricore/op_helper.c | 1 + target/xtensa/helper.c | 1 + 18 files changed, 28 insertions(+), 12 deletions(-) diff --git a/include/accel/tcg/cpu-loop.h b/include/accel/tcg/cpu-loop.h index f328aaa0377..2fc38c8f1c4 100644 --- a/include/accel/tcg/cpu-loop.h +++ b/include/accel/tcg/cpu-loop.h @@ -28,4 +28,16 @@ void cpu_exec_step_atomic(CPUState *cpu); */ bool cpu_unwind_state_data(CPUState *cpu, uintptr_t host_pc, uint64_t *dat= a); =20 +/** + * cpu_restore_state: + * @cpu: the cpu context + * @host_pc: the host pc within the translation + * @return: true if state was restored, false otherwise + * + * Attempt to restore the state for a fault occurring in translated + * code. If @host_pc is not in translated code no state is + * restored and the function returns false. + */ +bool cpu_restore_state(CPUState *cpu, uintptr_t host_pc); + #endif diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index ba98304c5fa..3757ab15967 100644 --- a/include/exec/cpu-common.h +++ b/include/exec/cpu-common.h @@ -64,18 +64,6 @@ void list_cpus(void); #ifdef CONFIG_TCG #include "qemu/atomic.h" =20 -/** - * cpu_restore_state: - * @cpu: the cpu context - * @host_pc: the host pc within the translation - * @return: true if state was restored, false otherwise - * - * Attempt to restore the state for a fault occurring in translated - * code. If @host_pc is not in translated code no state is - * restored and the function returns false. - */ -bool cpu_restore_state(CPUState *cpu, uintptr_t host_pc); - /** * cpu_loop_exit_requested: * @cpu: The CPU state to be tested diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index d283d3cc724..7704e4017dd 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -25,6 +25,7 @@ #include "qemu/bitops.h" #include "qemu/rcu.h" #include "accel/tcg/cpu-ldst-common.h" +#include "accel/tcg/cpu-loop.h" #include "accel/tcg/helper-retaddr.h" #include "accel/tcg/probe.h" #include "user/cpu_loop.h" diff --git a/target/alpha/helper.c b/target/alpha/helper.c index 2abf07c1919..c3614ecafda 100644 --- a/target/alpha/helper.c +++ b/target/alpha/helper.c @@ -28,6 +28,7 @@ #include "exec/helper-proto.h" #include "qemu/qemu-print.h" #include "system/memory.h" +#include "accel/tcg/cpu-loop.h" #include "qemu/plugin.h" =20 =20 diff --git a/target/alpha/mem_helper.c b/target/alpha/mem_helper.c index 572ea9cb418..b3988417e4b 100644 --- a/target/alpha/mem_helper.c +++ b/target/alpha/mem_helper.c @@ -21,6 +21,7 @@ #include "cpu.h" #include "exec/helper-proto.h" #include "accel/tcg/cpu-ldst.h" +#include "accel/tcg/cpu-loop.h" =20 static void do_unaligned_access(CPUAlphaState *env, vaddr addr, uintptr_t = retaddr) { diff --git a/target/arm/tcg/op_helper.c b/target/arm/tcg/op_helper.c index 504526153a6..9f9ea39be5a 100644 --- a/target/arm/tcg/op_helper.c +++ b/target/arm/tcg/op_helper.c @@ -23,6 +23,7 @@ #include "helper.h" #include "internals.h" #include "cpu-features.h" +#include "accel/tcg/cpu-loop.h" #include "accel/tcg/probe.h" #include "cpregs.h" =20 diff --git a/target/arm/tcg/tlb_helper.c b/target/arm/tcg/tlb_helper.c index f90765cb597..2ce63734099 100644 --- a/target/arm/tcg/tlb_helper.c +++ b/target/arm/tcg/tlb_helper.c @@ -8,6 +8,7 @@ #include "qemu/osdep.h" #include "cpu.h" #include "helper.h" +#include "accel/tcg/cpu-loop.h" #include "internals.h" #include "cpu-features.h" =20 diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index 6443122cf1a..a68152f9682 100644 --- a/target/hppa/cpu.c +++ b/target/hppa/cpu.c @@ -29,6 +29,7 @@ #include "fpu/softfloat.h" #include "tcg/tcg.h" #include "hw/hppa/hppa_hardware.h" +#include "accel/tcg/cpu-loop.h" #include "accel/tcg/cpu-ops.h" =20 static void hppa_cpu_set_pc(CPUState *cs, vaddr value) diff --git a/target/hppa/mem_helper.c b/target/hppa/mem_helper.c index f5076492264..01e6149c811 100644 --- a/target/hppa/mem_helper.c +++ b/target/hppa/mem_helper.c @@ -21,6 +21,7 @@ #include "qemu/log.h" #include "cpu.h" #include "exec/cputlb.h" +#include "accel/tcg/cpu-loop.h" #include "accel/tcg/cpu-mmu-index.h" #include "accel/tcg/probe.h" #include "exec/page-protection.h" diff --git a/target/hppa/op_helper.c b/target/hppa/op_helper.c index f961046e4c5..76a8d8a0d34 100644 --- a/target/hppa/op_helper.c +++ b/target/hppa/op_helper.c @@ -22,6 +22,7 @@ #include "cpu.h" #include "exec/helper-proto.h" #include "accel/tcg/cpu-ldst.h" +#include "accel/tcg/cpu-loop.h" #include "accel/tcg/probe.h" #include "qemu/timer.h" #include "trace.h" diff --git a/target/i386/tcg/system/svm_helper.c b/target/i386/tcg/system/s= vm_helper.c index d5ffabc2f4d..52a234e7fac 100644 --- a/target/i386/tcg/system/svm_helper.c +++ b/target/i386/tcg/system/svm_helper.c @@ -23,6 +23,7 @@ #include "exec/helper-proto.h" #include "exec/cputlb.h" #include "accel/tcg/cpu-ldst.h" +#include "accel/tcg/cpu-loop.h" #include "tcg/helper-tcg.h" =20 /* Secure Virtual Machine helpers */ diff --git a/target/m68k/op_helper.c b/target/m68k/op_helper.c index 8148a8852e7..38f7a689814 100644 --- a/target/m68k/op_helper.c +++ b/target/m68k/op_helper.c @@ -21,6 +21,7 @@ #include "cpu.h" #include "exec/helper-proto.h" #include "accel/tcg/cpu-ldst.h" +#include "accel/tcg/cpu-loop.h" #include "semihosting/semihost.h" #include "qemu/plugin.h" =20 diff --git a/target/microblaze/helper.c b/target/microblaze/helper.c index 6a982c18c0f..05a90f5ecb2 100644 --- a/target/microblaze/helper.c +++ b/target/microblaze/helper.c @@ -21,6 +21,7 @@ #include "qemu/osdep.h" #include "cpu.h" #include "exec/cputlb.h" +#include "accel/tcg/cpu-loop.h" #include "accel/tcg/cpu-mmu-index.h" #include "exec/page-protection.h" #include "exec/target_page.h" diff --git a/target/ppc/tcg-excp_helper.c b/target/ppc/tcg-excp_helper.c index 5e6c1e326d4..b04f07a6377 100644 --- a/target/ppc/tcg-excp_helper.c +++ b/target/ppc/tcg-excp_helper.c @@ -21,6 +21,7 @@ #include "qemu/log.h" #include "target/ppc/cpu.h" #include "accel/tcg/cpu-ldst.h" +#include "accel/tcg/cpu-loop.h" #include "exec/helper-proto.h" #include "system/runstate.h" =20 diff --git a/target/s390x/tcg/excp_helper.c b/target/s390x/tcg/excp_helper.c index 05e448d3f20..d952bb20cf1 100644 --- a/target/s390x/tcg/excp_helper.c +++ b/target/s390x/tcg/excp_helper.c @@ -24,6 +24,7 @@ #include "exec/helper-proto.h" #include "exec/cputlb.h" #include "exec/target_page.h" +#include "accel/tcg/cpu-loop.h" #include "s390x-internal.h" #include "tcg_s390x.h" #ifndef CONFIG_USER_ONLY diff --git a/target/sh4/op_helper.c b/target/sh4/op_helper.c index cf0f80e4a54..90c065b217b 100644 --- a/target/sh4/op_helper.c +++ b/target/sh4/op_helper.c @@ -20,6 +20,7 @@ #include "cpu.h" #include "exec/helper-proto.h" #include "accel/tcg/cpu-ldst.h" +#include "accel/tcg/cpu-loop.h" #include "fpu/softfloat.h" =20 #ifndef CONFIG_USER_ONLY diff --git a/target/tricore/op_helper.c b/target/tricore/op_helper.c index 3cff5000c73..46b17da2bc6 100644 --- a/target/tricore/op_helper.c +++ b/target/tricore/op_helper.c @@ -19,6 +19,7 @@ #include "qemu/host-utils.h" #include "exec/helper-proto.h" #include "accel/tcg/cpu-ldst.h" +#include "accel/tcg/cpu-loop.h" #include "qemu/plugin.h" #include /* for crc32 */ =20 diff --git a/target/xtensa/helper.c b/target/xtensa/helper.c index 2d93b45036d..5a0e8655146 100644 --- a/target/xtensa/helper.c +++ b/target/xtensa/helper.c @@ -32,6 +32,7 @@ #include "exec/target_page.h" #include "gdbstub/helpers.h" #include "exec/helper-proto.h" +#include "accel/tcg/cpu-loop.h" #include "qemu/error-report.h" #include "qemu/qemu-print.h" #include "qemu/host-utils.h" --=20 2.53.0 From nobody Sun Jul 26 13:28:57 2026 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=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1781637615; cv=none; d=zohomail.com; s=zohoarc; b=Ioyf04zylP1FPB1SPgPnLiwQZKRwb2F8otixPbC5v0MHWHOowXxfoWT1vkxpJWQ4PF+0S6hJgAOvTNzTDC5Y8RAv1NeSEQckkffP7MUsiFnNyZQLjed6CtkhkNclFfiyJIoAwkQ97fRCWQPGMo/EuqP29m8toG7h+aKfQq2TA3U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781637615; h=Content-Type: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=kipyd6hfI/Thn7Mt2xUvLhyrhjzSfp+Bw1snorWptjo=; b=iLTgKb8sb/OthqwWk0sHMwOButb3PwFh5G5Tyz7sdkyYI6sJ/8kt1++QeWPjkCzH/GtfR5gBCVKQHRGkt7qbhRSgry0ALqqdGawKt9Shrk9TD68mV/1DrmLRm4a9Vik5E20DavLjaXC07VK2dWKcfl/G3tP8eIfr3a5edeR8P8A= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781637615842174.82109642989894; Tue, 16 Jun 2026 12:20:15 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZZIp-0004Ra-4o; Tue, 16 Jun 2026 15:18:27 -0400 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 1wZZIg-0003iN-RB for qemu-devel@nongnu.org; Tue, 16 Jun 2026 15:18:19 -0400 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZZIf-0004wf-2E for qemu-devel@nongnu.org; Tue, 16 Jun 2026 15:18:18 -0400 Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65GIOd0I3914063 for ; Tue, 16 Jun 2026 19:18:15 GMT Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eu0a7ury2-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 16 Jun 2026 19:18:15 +0000 (GMT) Received: by mail-qv1-f70.google.com with SMTP id 6a1803df08f44-8cce42a4e75so99912776d6.3 for ; Tue, 16 Jun 2026 12:18:15 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4922fa47da9sm122857995e9.5.2026.06.16.12.18.13 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Jun 2026 12:18:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= kipyd6hfI/Thn7Mt2xUvLhyrhjzSfp+Bw1snorWptjo=; b=OwFkTkkm05doCxF0 /CCilL81rn5cnFGm1TjcMWvTyM80CQ7yLNvsnhqcKQWyFuoKpjl+6elYC7DpIP3g 8Sl622JYyHkpIMMbQFkU58Ah3U67EGfB8jDLBz266u42aZU5797hJIv/Z8dIUOEK ARQ5scFzh7e7fFqG3seBSSm+g8YjMrfTKtHLBQG4uLKBthZ3cRJUlIxA8VpSao1U BaON/TPrgU/Sbcfwb3Mqiz2cqB6BMkoaCstYd3Huq0ZIwHxWMF+LUgbTN5hpEx0H FwR9TYZc7vvmILO6VSEK70qbcVvPFfrSJDKdbC+x0tj4jSfD+M+XzqC46WCzduPL C1xfGw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781637494; x=1782242294; darn=nongnu.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=kipyd6hfI/Thn7Mt2xUvLhyrhjzSfp+Bw1snorWptjo=; b=ELOahBi0XQVuW1/nB/U/mOzsnR4oFyVoDzQFjQO+usZ2BCEbQiK083Si6yNaQ5is0P p8txWfdj4MGLqGJksB9AQiNz63DdTCzKsChMGa68VtJyBh4/x9O2Y5LjrD4emcwavbSz Wok4eYU8h8cYTZTX+WlemxqLBuxstdoBxhE6sW/5cxk+vmGvbLirIRjzJ3BSLy+dcYvq 6+qEzcQmmpViI8lE2wg2bKZV5XLadyea+7EaUC+hEtmU+RIkvwP2IAJAf4h/7oqmSWAB tTdBD2wg/pOWdUYS0bUSI3oySalip35kaZDtxgRdFR97jYXduxAPjUoFDr9kfLA1cxpy bbQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781637494; x=1782242294; 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=kipyd6hfI/Thn7Mt2xUvLhyrhjzSfp+Bw1snorWptjo=; b=hoku0X1J4+htSKalrd5KLw1Fa/CHJ1fK81N2cRFI1QxZ4dro82AS0PV2SliBuzS+oF sJRPjvK8d2JwKcOmZQjuOm3KLBkyKv+pVahNOJtLfoc9OAt0QKHRxlFVB8PmW6uFwdQ1 uSYndcOjv99ExrkRnOSEMqfT/GQpZrCN5mK9rXB4SMAFAtN5NMP8GaOZXKFQPRkTYYR7 f7sKSG8FmHAoqCIaWc2Iy4ebmiVJmwUI1PZow8GgBAU2e3dbtcE7ROpTRrKpkIFBqsqg aEwuoEqp/xjmp1EvZ8n0UsQkDuZG0BtZtur1dZqDcbdtI0oHdkJjvaFTClZtnrDEX/bE 7J6g== X-Gm-Message-State: AOJu0YyG3S+eHz+P+mzuw8hFhZaw96PjLaew/rjtyyJupUNL2qPpDfB7 GunOJigjOCz87zBbrsQCGdqQGP40TvihLW4wHF0ijoxRC9VcoHhDGyAR7vt70y+KkKs0nFISCzn oIUGVrf0qIBms/jcy6++P1UMSnMQKPbaIEq+bib7km41gqtW7heOplK5MCpfv3Qa4QQ== X-Gm-Gg: Acq92OGbrD+B1zV5jxpISPMkR8AAKw+kA+TOL5xcl1jS8HDbjh3VbzQ1oz5YwoG3LgK o4DnYF6sJunHgJg8dX0xtQ1zZSe3zebh79Szx82ED+9+bTVAIvdY55sXubmtRCEFQzpBksAkWA6 XqkrjgrXr80SIMLX+kNzO0TlSKnUE9/p726fHv8rqJj68izlAlcHoTP1ksIhpOujZl8Ny8PfMOz ChqlhDCjUIRbwABCC8mcQSxhf9KLS4C5HSxTrj+eZCidhT66ZVs/+nrPgyQSNE848laomrKymYQ gzHwAKFMmVPfKg0RipCQB5d4eKzVibtHMBs2pI0TuEK3lHn9dwebwz3JR2caVZEf5uuIuD4zgJu OTLNS/RvrUPdG3ff7io/yglD8XAmyJ5ux+Jt2BRShQ8DslU1OW7fD48NF3uMy5a+i7+QneMPt21 /M/08= X-Received: by 2002:a05:620a:880f:b0:914:7b4f:cf5b with SMTP id af79cd13be357-91d8b7b0e6amr170277085a.16.1781637494521; Tue, 16 Jun 2026 12:18:14 -0700 (PDT) X-Received: by 2002:a05:620a:880f:b0:914:7b4f:cf5b with SMTP id af79cd13be357-91d8b7b0e6amr170273185a.16.1781637494095; Tue, 16 Jun 2026 12:18:14 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Richard Henderson Subject: [PATCH 08/10] accel/tcg: Have cpu_loop_exit_requested() take const cpu and un-inline Date: Tue, 16 Jun 2026 21:17:14 +0200 Message-ID: <20260616191716.12932-9-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260616191716.12932-1-philmd@oss.qualcomm.com> References: <20260616191716.12932-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDE5NyBTYWx0ZWRfX+/+Z/CnV9SbK VgxCAIFZQMC5MTzxF2AzyNFASNwJsJSMrAKF31iwpUzwcHzpGyhoSjE+DcGNdYyOMqgTaBEOzBE OSHLk50sy0QB2Dihj6dzBnSKawMXMBZanhMHzvcRjsPxvwJZ00EBuqcxwWmz3sEclqvI6hcq7rC wK4xpKbRR9XCiGBtT63FzOmQyl2OHvxkk11HSQArUGgot1YraIVWfAaUyo+oVDmmyCPRYLNknep J1vfmdkGR9jYoSWP9HoyQ8E9v77298MWzLb3A8DgQeUsSRS1dWPCBC9GbcBWyHAVr8KZHEcydEi nnLjRMMztOVOBw+Ns67R/lB9uSgS4yxt5CY0oDWmAfZw2RPuDQ3KwUG2o/XU8bWYA6C+NEk5gP+ gtuYFuYZurjVTidWIgYU/+HIaqtk8MB/KeG2Jo1PjLG5tOjF08tnzTURKDUYrLor8Ww9OkbRgbK fe34FDYzNSw4aZu3HEQ== X-Authority-Analysis: v=2.4 cv=JKALdcKb c=1 sm=1 tr=0 ts=6a31a177 cx=c_pps a=oc9J++0uMp73DTRD5QyR2A==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_K5XuSEh1TEqbUxoQ0s3:22 a=EUspDBNiAAAA:8 a=EN0NE8wA606m7JOjE_AA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=iYH6xdkBrDN1Jqds4HTS:22 X-Proofpoint-ORIG-GUID: X6GqwntUPzuigiCkAMQ2PZYpr5U5a9hg X-Proofpoint-GUID: X6GqwntUPzuigiCkAMQ2PZYpr5U5a9hg X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDE5NyBTYWx0ZWRfX05Mc7AHmvMSz 9E56l1a1aPOEr8QI6izG+wXa2M0bDh3K2DNwq4kr8NvP8GP7xP5InUaVcl+f5Lg7mWERE+kV5pB RPJgUiLtCqwwOCtKDF6bqbjlj9enq0A= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-16_05,2026-06-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 lowpriorityscore=0 bulkscore=0 impostorscore=0 spamscore=0 priorityscore=1501 adultscore=0 clxscore=1015 suspectscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160197 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0a-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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-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 @qualcomm.com) X-ZM-MESSAGEID: 1781637617470158500 Of the 5 calls in our codebase, 4 are unlikely(), so not worth inlining in header. Since the CPUState is simply read-only accessed, make the argument const. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/exec/cpu-common.h | 6 +----- accel/tcg/cpu-exec-common.c | 6 ++++++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index 3757ab15967..664e21e0b6c 100644 --- a/include/exec/cpu-common.h +++ b/include/exec/cpu-common.h @@ -62,7 +62,6 @@ void cpu_destroy_address_spaces(CPUState *cpu); void list_cpus(void); =20 #ifdef CONFIG_TCG -#include "qemu/atomic.h" =20 /** * cpu_loop_exit_requested: @@ -76,10 +75,7 @@ void list_cpus(void); * call can be used to check if it makes sense to return to the main loop * or to continue executing the interruptible instruction. */ -static inline bool cpu_loop_exit_requested(CPUState *cpu) -{ - return (int32_t)qatomic_read(&cpu->neg.icount_decr.u32) < 0; -} +bool cpu_loop_exit_requested(const CPUState *cpu); =20 G_NORETURN void cpu_loop_exit_noexc(CPUState *cpu); G_NORETURN void cpu_loop_exit_atomic(CPUState *cpu, uintptr_t pc); diff --git a/accel/tcg/cpu-exec-common.c b/accel/tcg/cpu-exec-common.c index c5c513f1e4a..b571488be9e 100644 --- a/accel/tcg/cpu-exec-common.c +++ b/accel/tcg/cpu-exec-common.c @@ -20,6 +20,7 @@ #include "qemu/osdep.h" #include "exec/log.h" #include "system/tcg.h" +#include "qemu/atomic.h" #include "qemu/plugin.h" #include "internal-common.h" =20 @@ -88,3 +89,8 @@ void cpu_loop_exit_atomic(CPUState *cpu, uintptr_t pc) cpu->exception_index =3D EXCP_ATOMIC; cpu_loop_exit_restore(cpu, pc); } + +bool cpu_loop_exit_requested(const CPUState *cpu) +{ + return (int32_t)qatomic_read(&cpu->neg.icount_decr.u32) < 0; +} --=20 2.53.0 From nobody Sun Jul 26 13:28:57 2026 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=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1781637619; cv=none; d=zohomail.com; s=zohoarc; b=m1AeLKWBBX/vqeDlValaXqbnSlAhFGTbbA7ptQsbLu+EZ0C83i2GqQsMmJ67BvLZgWq+W+bt+vUZNKjzcyZ5ZBOFUClJBG78Y2hML7AhcfNWuxDQ30cbXDKtVJMXiZVod97vXSeB1fDzg3xyAzYOVAgoG8fIlwE7ktZaTQOEBHw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781637619; h=Content-Type: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=rDPBpbn3NrFJ9h2c6whQdKT87AiX1bT3S9Z9eVC3rNE=; b=PF3hzdFwUEMPnrJJjcn2Uwq4qMdGcK827gyNuqmC+z0baujzzqD44/LXRJBTcMrCPCAfeIeqIqFo4O4jAwGw5AjtGRzua+3avyPYOdIbu4wbPUfjgkhtQr9E2NovtGdVeG0Cvi+yvn5r9JCn1CNE1CYn1ngrGl9nP4eHgTeiPXA= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781637619120403.47148362214614; Tue, 16 Jun 2026 12:20:19 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZZIx-0004YQ-CT; Tue, 16 Jun 2026 15:18:37 -0400 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 1wZZIp-0004UE-FO for qemu-devel@nongnu.org; Tue, 16 Jun 2026 15:18:27 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZZIl-00050D-RJ for qemu-devel@nongnu.org; Tue, 16 Jun 2026 15:18:27 -0400 Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65GIOXhi397506 for ; Tue, 16 Jun 2026 19:18:22 GMT Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ety52v27a-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 16 Jun 2026 19:18:22 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-9158f07f5eeso786999285a.0 for ; Tue, 16 Jun 2026 12:18:22 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4606f2e592csm49771436f8f.36.2026.06.16.12.18.19 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Jun 2026 12:18:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= rDPBpbn3NrFJ9h2c6whQdKT87AiX1bT3S9Z9eVC3rNE=; b=Du1kjJpMMDn3sC19 cITPSpM9MqC+uzYvO5DlJ+UYSIX2aM+6X6axWgrHQiNIKh4PiBAzn9WwpVjRlcIA V3CRzLcxd3dDPzcjD8NI21IjAMeU6N44BR/3Ynh3fQHycfszSVECW6AC45zMv3zy UblgtPRqsvqDv9sySdLRFBzt0JztLzszQFG+ho/dEvkRGVQKlMoNxI/WS04mWf67 k0paxjAhEyoDS3riIYexu/sy+GQ8x0u2avxzR0Ick1LtttNExBb5/W/ZVllGV8la aRrAS1TNqcUyhd8W9uRxeg9lyCz4A0y/jjeor92YHxfRLqYbxHgyEPD6ep0nm7u+ +eeugg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781637502; x=1782242302; darn=nongnu.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=rDPBpbn3NrFJ9h2c6whQdKT87AiX1bT3S9Z9eVC3rNE=; b=dfdeylhlb3xDnTYb9ZeUtXhYRLKLeML9O0QADyj5cLVwrWGnh15svXmgb6bhN+QSzz JAv99FoTDu7SsRJyz84/IFrFFOg7o3Gc37RU1d0TKBOJsoahDVBHMTF0u/KLoIzeVdcd O3KziRQH3+mBqEI9b+wov4++nJXQb/NRQOsX1ywOQIC87OLPfsmT8lT5r9HrRVZ5RYyj e/Jw3ysKr1jfv0mn7msDYXdiovd+zAuopexy+frtS7qAtsNnbFpQU5+mtNBRg3TSDSuX vpQ7E3UNYdzEzMctN6yrCRv+/8qZjf97w8WaCziTdheAxMklJcVIJ5xYc8O5gqThjVT7 6g6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781637502; x=1782242302; 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=rDPBpbn3NrFJ9h2c6whQdKT87AiX1bT3S9Z9eVC3rNE=; b=kuMyTMhwbHz/bjV3+rXiKQJiDPI/ESMl0Zhuq+CHoUIXEy0lkWLIpA8L0ld9jBWeJd EtxhCcyP9BdQZZGExzWfiXnQZgAWiRgVhmcQqHzQkO7tRwjabTQl+5cNUQhygvFP2k2n Sqwk9YgRhkDrIOK4Kp3Wbimk9LVZKxG1pxiJ31ifXn6AFTDq6mF4CfevUPqypj0gyDaK Ha6HEy9hN6jVK+b5vrNArIFXAmh9vxRzSA407B3T02l+Y2cYeONgcFKusuxbdHF1YBOL GiskI3+T6ky3fOXCU+ZtF6nURFv+XCb5WQMgXsN4SSw+czMmtRXY/sEKe5tvUsb7DUii cYKg== X-Gm-Message-State: AOJu0YxwHLRb4OcORWGCTiNiydeqUA3ji3eOKckNrZNYOXX6/fuR2Pru ZQbz+FVPpFb+l4Tx7YsnlUyu6I5oU8qyk6J5yKL4Piv47pQX/9CrbAPDjsOD7qczARhgbew8gS4 2kdrVcuEKuPnMMfeP+9cHrMcxa0MutRRUCx6jlpb/3x1C05D4MqTkKR2Syc4Tb4ltzQ== X-Gm-Gg: Acq92OGskZvAnyF8QSQayCAgrWRwE1IncwCqZrqXMzb/PG7covMHjb/BUul5CtQ9RqE 9rKfDt5l68JGBTcgbfFIcHjJYWZjK1p6ccClslvbnPhw8G5VxstDZJhaglbxQVoRlt6b02qzV9k VodnvP3GBcqwYC7LXz3skBD1RA85a599FIHi6GIgDROvBBeaVCYg2LyDdRZMUVVidcQxBcsyJp4 geEVLXNEih4vInDllVYEBWV8sEKQnbhirL953nZIMhl4BXMLBH7H0nnPgsJ01a9HzlyqdyMwjKs 1Ggt5Ny0adERS4WJpRWNtR9H2sN7gDrvGcTWkFltff3+O4S6Ggm/t9uprvTDgw/Rcfj3bo5jPPe Hgb38pywcKPSkyMniWsAr3ADxX4J7J92yOU1Q2mKw8y5FZfOa2i3MMlW1g9CfX/0XkHiR5aHpp7 f7drs= X-Received: by 2002:a05:620a:25cf:b0:914:7e9a:2716 with SMTP id af79cd13be357-91dbcb1d710mr42380585a.38.1781637501612; Tue, 16 Jun 2026 12:18:21 -0700 (PDT) X-Received: by 2002:a05:620a:25cf:b0:914:7e9a:2716 with SMTP id af79cd13be357-91dbcb1d710mr42374085a.38.1781637500904; Tue, 16 Jun 2026 12:18:20 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Richard Henderson Subject: [PATCH 09/10] accel/tcg: Move cpu_loop_exit_*() out of 'exec/cpu-common.h' Date: Tue, 16 Jun 2026 21:17:15 +0200 Message-ID: <20260616191716.12932-10-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260616191716.12932-1-philmd@oss.qualcomm.com> References: <20260616191716.12932-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDE5NyBTYWx0ZWRfX4z62yIwpZfM8 c8jqq3wyE4hfSNnY9GcvPrxpFARZ2BfTq6WZwzaFHLZbtE6dUPrhDaA2cKOsfKWYrlDyo6LHyDq iFra8tFVaeqZ1SBycL1g2IllmOJwhDQ= X-Authority-Analysis: v=2.4 cv=FJwrAeos c=1 sm=1 tr=0 ts=6a31a17e cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=EUspDBNiAAAA:8 a=JcJdSHE08ybhFAncEmoA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=NFOGd7dJGGMPyQGDc5-O:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDE5NyBTYWx0ZWRfX38krbvwM9lW5 yVk4Fwt6Lkme1SIB3YMTYeoolooXtb72NGAHoS09Vi2AZNuwZ9oajBQGQW4S007EpsoWnR7g/4y aJRxIb54HNb02O69qNyw+tQfwnHWD8O4DGymCewbbEGSG1EYGgII8jBWCi70LREaat/OWw/U4oM PCF06Rj1BjBwBdM+zL+bCPyyka28ZkdHK9ruv4Rh5wAWYmsJxcPwQtV6rAlZd7WMSYNru5uR9MM cIOl/DGx0OoqxIHdw6Ob9orl2pvGv2js3jv/bhgdidLvS5cLGo6S3lGP+RgaRhw3IoSxvcJTZgp QSffm2vxIW5LFgIa8CRIT298mTgofgN7AymgARpL+YEWGpDkvP4MrWoTQG9bF73xoK2DmCAZFvR mQltslnJcETKt1QjDD/hJz4RItzGh/DNswRX7uizmX5f4XiQ82SWe0U9lgsGxhJUgOYsswtLmay 9VaTEL6p/QYrs2wqtnA== X-Proofpoint-ORIG-GUID: 2Pfi1K7FdAyT6ma7pcpSdouFMJEI4Fpf X-Proofpoint-GUID: 2Pfi1K7FdAyT6ma7pcpSdouFMJEI4Fpf X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-16_05,2026-06-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 lowpriorityscore=0 spamscore=0 phishscore=0 malwarescore=0 impostorscore=0 adultscore=0 suspectscore=0 bulkscore=0 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160197 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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-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 @qualcomm.com) X-ZM-MESSAGEID: 1781637619731158500 Move the following TCG-specific cpu_loop_exit_*() declarations out of the generic "exec/cpu-common.h" header, to the recently created "accel/tcg/cpu-loop.h" one, documenting them: - cpu_loop_exit_requested() - cpu_loop_exit_noexc() - cpu_loop_exit_atomic() - cpu_loop_exit_restore() - cpu_loop_exit() Include "accel/tcg/cpu-loop.h" where appropriate. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- include/accel/tcg/cpu-loop.h | 42 ++++++++++++++++++++++++++++ include/exec/cpu-common.h | 22 --------------- accel/tcg/cpu-exec-common.c | 1 + accel/tcg/cputlb.c | 1 + accel/tcg/tb-maint.c | 1 + accel/tcg/tcg-runtime.c | 1 + accel/tcg/watchpoint.c | 1 + hw/misc/mips_itu.c | 1 + plugins/api.c | 1 + semihosting/console.c | 1 + target/arm/tcg/helper-a64.c | 1 + target/avr/helper.c | 1 + target/hexagon/op_helper.c | 1 + target/i386/tcg/excp_helper.c | 1 + target/i386/tcg/misc_helper.c | 1 + target/i386/tcg/system/bpt_helper.c | 1 + target/i386/tcg/system/misc_helper.c | 1 + target/i386/tcg/user/excp_helper.c | 1 + target/i386/tcg/user/seg_helper.c | 1 + target/loongarch/tcg/tcg_cpu.c | 1 + target/loongarch/tcg/tlb_helper.c | 1 + target/m68k/helper.c | 1 + target/microblaze/op_helper.c | 1 + target/mips/tcg/exception.c | 1 + target/mips/tcg/system/tlb_helper.c | 1 + target/or1k/exception_helper.c | 1 + target/or1k/fpu_helper.c | 1 + target/or1k/mmu.c | 1 + target/ppc/user_only_helper.c | 1 + target/riscv/cpu_helper.c | 1 + target/riscv/op_helper.c | 1 + target/rx/op_helper.c | 1 + target/s390x/mmu_helper.c | 3 ++ target/s390x/tcg/cc_helper.c | 1 + target/s390x/tcg/debug.c | 1 + target/s390x/tcg/mem_helper.c | 1 + target/s390x/tcg/misc_helper.c | 1 + target/sh4/helper.c | 1 + target/sparc/helper.c | 1 + target/sparc/mmu_helper.c | 1 + target/tricore/helper.c | 1 + target/xtensa/exc_helper.c | 1 + 42 files changed, 84 insertions(+), 22 deletions(-) diff --git a/include/accel/tcg/cpu-loop.h b/include/accel/tcg/cpu-loop.h index 2fc38c8f1c4..0b5ac412d4a 100644 --- a/include/accel/tcg/cpu-loop.h +++ b/include/accel/tcg/cpu-loop.h @@ -40,4 +40,46 @@ bool cpu_unwind_state_data(CPUState *cpu, uintptr_t host= _pc, uint64_t *data); */ bool cpu_restore_state(CPUState *cpu, uintptr_t host_pc); =20 +/** + * cpu_loop_exit_noexc: + * @cpu: the cpu context + * + * Exit the current TB, but without causing any exception to be raised. + */ +G_NORETURN void cpu_loop_exit_noexc(CPUState *cpu); + +/** + * cpu_loop_exit_restore: + * @cpu: the cpu context + * @host_pc: the host pc within the translation + * + * Attempt to restore the state for a fault occurring in translated + * code. If @host_pc is not in translated code no state is + * restored. Finally, exit the current TB. + */ +G_NORETURN void cpu_loop_exit_restore(CPUState *cpu, uintptr_t host_pc); +G_NORETURN void cpu_loop_exit_atomic(CPUState *cpu, uintptr_t host_pc); + +/** + * cpu_loop_exit: + * @cpu: the cpu context + * + * Exit the current TB. + */ +G_NORETURN void cpu_loop_exit(CPUState *cpu); + +/** + * cpu_loop_exit_requested: + * @cpu: The CPU state to be tested + * + * Indicate if somebody asked for a return of the CPU to the main loop + * (e.g., via cpu_exit() or cpu_interrupt()). + * + * This is helpful for architectures that support interruptible + * instructions. After writing back all state to registers/memory, this + * call can be used to check if it makes sense to return to the main loop + * or to continue executing the interruptible instruction. + */ +bool cpu_loop_exit_requested(const CPUState *cpu); + #endif diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index 664e21e0b6c..da359ee3128 100644 --- a/include/exec/cpu-common.h +++ b/include/exec/cpu-common.h @@ -61,28 +61,6 @@ void cpu_destroy_address_spaces(CPUState *cpu); /* vl.c */ void list_cpus(void); =20 -#ifdef CONFIG_TCG - -/** - * cpu_loop_exit_requested: - * @cpu: The CPU state to be tested - * - * Indicate if somebody asked for a return of the CPU to the main loop - * (e.g., via cpu_exit() or cpu_interrupt()). - * - * This is helpful for architectures that support interruptible - * instructions. After writing back all state to registers/memory, this - * call can be used to check if it makes sense to return to the main loop - * or to continue executing the interruptible instruction. - */ -bool cpu_loop_exit_requested(const CPUState *cpu); - -G_NORETURN void cpu_loop_exit_noexc(CPUState *cpu); -G_NORETURN void cpu_loop_exit_atomic(CPUState *cpu, uintptr_t pc); -G_NORETURN void cpu_loop_exit_restore(CPUState *cpu, uintptr_t pc); -#endif /* CONFIG_TCG */ -G_NORETURN void cpu_loop_exit(CPUState *cpu); - /** * env_archcpu(env) * @env: The architecture environment diff --git a/accel/tcg/cpu-exec-common.c b/accel/tcg/cpu-exec-common.c index b571488be9e..8e7d986e191 100644 --- a/accel/tcg/cpu-exec-common.c +++ b/accel/tcg/cpu-exec-common.c @@ -22,6 +22,7 @@ #include "system/tcg.h" #include "qemu/atomic.h" #include "qemu/plugin.h" +#include "accel/tcg/cpu-loop.h" #include "internal-common.h" =20 bool tcg_allowed; diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 31c8351231a..6860ac97081 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -20,6 +20,7 @@ #include "qemu/osdep.h" #include "qemu/main-loop.h" #include "qemu/target-info.h" +#include "accel/tcg/cpu-loop.h" #include "accel/tcg/cpu-ops.h" #include "accel/tcg/iommu.h" #include "accel/tcg/probe.h" diff --git a/accel/tcg/tb-maint.c b/accel/tcg/tb-maint.c index 0c7ac5a72c0..d9801a34275 100644 --- a/accel/tcg/tb-maint.c +++ b/accel/tcg/tb-maint.c @@ -26,6 +26,7 @@ #include "exec/mmap-lock.h" #include "exec/tb-flush.h" #include "exec/target_page.h" +#include "accel/tcg/cpu-loop.h" #include "accel/tcg/cpu-ops.h" #include "tb-internal.h" #include "system/tcg.h" diff --git a/accel/tcg/tcg-runtime.c b/accel/tcg/tcg-runtime.c index f483c9c2ba2..7c0aab98a80 100644 --- a/accel/tcg/tcg-runtime.c +++ b/accel/tcg/tcg-runtime.c @@ -25,6 +25,7 @@ #include "qemu/host-utils.h" #include "exec/cpu-common.h" #include "exec/helper-proto-common.h" +#include "accel/tcg/cpu-loop.h" #include "accel/tcg/getpc.h" =20 #define HELPER_H "accel/tcg/tcg-runtime.h" diff --git a/accel/tcg/watchpoint.c b/accel/tcg/watchpoint.c index cfb37a49e72..c75ed278459 100644 --- a/accel/tcg/watchpoint.c +++ b/accel/tcg/watchpoint.c @@ -25,6 +25,7 @@ #include "exec/translation-block.h" #include "system/tcg.h" #include "system/replay.h" +#include "accel/tcg/cpu-loop.h" #include "accel/tcg/cpu-ops.h" #include "hw/core/cpu.h" #include "internal-common.h" diff --git a/hw/misc/mips_itu.c b/hw/misc/mips_itu.c index 82c0a90f704..c20eca28a1e 100644 --- a/hw/misc/mips_itu.c +++ b/hw/misc/mips_itu.c @@ -25,6 +25,7 @@ #include "hw/core/cpu.h" #include "hw/misc/mips_itu.h" #include "hw/core/qdev-properties.h" +#include "accel/tcg/cpu-loop.h" #include "target/mips/cpu.h" =20 #define ITC_TAG_ADDRSPACE_SZ (ITC_ADDRESSMAP_NUM * 8) diff --git a/plugins/api.c b/plugins/api.c index 2d5fe9327f7..690b5994f62 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -40,6 +40,7 @@ #include "qemu/plugin.h" #include "qemu/log.h" #include "system/memory.h" +#include "accel/tcg/cpu-loop.h" #include "tcg/tcg.h" #include "exec/cpu-common.h" #include "exec/gdbstub.h" diff --git a/semihosting/console.c b/semihosting/console.c index a4db8d8e76d..91e5d50d502 100644 --- a/semihosting/console.c +++ b/semihosting/console.c @@ -18,6 +18,7 @@ #include "qemu/osdep.h" #include "semihosting/semihost.h" #include "semihosting/console.h" +#include "accel/tcg/cpu-loop.h" #include "exec/cpu-common.h" #include "exec/gdbstub.h" #include "qemu/log.h" diff --git a/target/arm/tcg/helper-a64.c b/target/arm/tcg/helper-a64.c index a0f9215f1c9..05ab9ab6d31 100644 --- a/target/arm/tcg/helper-a64.c +++ b/target/arm/tcg/helper-a64.c @@ -31,6 +31,7 @@ #include "qemu/crc32c.h" #include "exec/cpu-common.h" #include "accel/tcg/cpu-ldst.h" +#include "accel/tcg/cpu-loop.h" #include "accel/tcg/helper-retaddr.h" #include "accel/tcg/probe.h" #include "exec/target_page.h" diff --git a/target/avr/helper.c b/target/avr/helper.c index f3be8483b27..f452c9d9040 100644 --- a/target/avr/helper.c +++ b/target/avr/helper.c @@ -23,6 +23,7 @@ #include "qemu/error-report.h" #include "cpu.h" #include "accel/tcg/cpu-ops.h" +#include "accel/tcg/cpu-loop.h" #include "exec/cputlb.h" #include "exec/page-protection.h" #include "exec/target_page.h" diff --git a/target/hexagon/op_helper.c b/target/hexagon/op_helper.c index 368391bb846..0a946433644 100644 --- a/target/hexagon/op_helper.c +++ b/target/hexagon/op_helper.c @@ -18,6 +18,7 @@ #include "qemu/osdep.h" #include "qemu/log.h" #include "accel/tcg/cpu-ldst.h" +#include "accel/tcg/cpu-loop.h" #include "accel/tcg/probe.h" #include "exec/helper-proto.h" #include "fpu/softfloat.h" diff --git a/target/i386/tcg/excp_helper.c b/target/i386/tcg/excp_helper.c index 32f2784e923..1eaa602c91d 100644 --- a/target/i386/tcg/excp_helper.c +++ b/target/i386/tcg/excp_helper.c @@ -18,6 +18,7 @@ */ =20 #include "qemu/osdep.h" +#include "accel/tcg/cpu-loop.h" #include "cpu.h" #include "qemu/log.h" #include "system/runstate.h" diff --git a/target/i386/tcg/misc_helper.c b/target/i386/tcg/misc_helper.c index 2b5f092a23f..f7342871ded 100644 --- a/target/i386/tcg/misc_helper.c +++ b/target/i386/tcg/misc_helper.c @@ -19,6 +19,7 @@ =20 #include "qemu/osdep.h" #include "qemu/log.h" +#include "accel/tcg/cpu-loop.h" #include "cpu.h" #include "exec/helper-proto.h" #include "exec/cputlb.h" diff --git a/target/i386/tcg/system/bpt_helper.c b/target/i386/tcg/system/b= pt_helper.c index aebb5caac37..2feea69c8a1 100644 --- a/target/i386/tcg/system/bpt_helper.c +++ b/target/i386/tcg/system/bpt_helper.c @@ -18,6 +18,7 @@ */ =20 #include "qemu/osdep.h" +#include "accel/tcg/cpu-loop.h" #include "cpu.h" #include "exec/helper-proto.h" #include "exec/watchpoint.h" diff --git a/target/i386/tcg/system/misc_helper.c b/target/i386/tcg/system/= misc_helper.c index bb79d4e470e..2998b1aae75 100644 --- a/target/i386/tcg/system/misc_helper.c +++ b/target/i386/tcg/system/misc_helper.c @@ -22,6 +22,7 @@ #include "cpu.h" #include "exec/helper-proto.h" #include "accel/tcg/cpu-ldst.h" +#include "accel/tcg/cpu-loop.h" #include "system/address-spaces.h" #include "system/memory.h" #include "exec/cputlb.h" diff --git a/target/i386/tcg/user/excp_helper.c b/target/i386/tcg/user/excp= _helper.c index 6c5df5e0e88..0957ad2e9ec 100644 --- a/target/i386/tcg/user/excp_helper.c +++ b/target/i386/tcg/user/excp_helper.c @@ -18,6 +18,7 @@ */ =20 #include "qemu/osdep.h" +#include "accel/tcg/cpu-loop.h" #include "cpu.h" #include "tcg/helper-tcg.h" =20 diff --git a/target/i386/tcg/user/seg_helper.c b/target/i386/tcg/user/seg_h= elper.c index 28bbef1bbae..3a4a6d5a745 100644 --- a/target/i386/tcg/user/seg_helper.c +++ b/target/i386/tcg/user/seg_helper.c @@ -22,6 +22,7 @@ #include "cpu.h" #include "exec/helper-proto.h" #include "accel/tcg/cpu-ldst.h" +#include "accel/tcg/cpu-loop.h" #include "tcg/helper-tcg.h" #include "tcg/seg_helper.h" =20 diff --git a/target/loongarch/tcg/tcg_cpu.c b/target/loongarch/tcg/tcg_cpu.c index f556234d9d2..8dc4bb15a1d 100644 --- a/target/loongarch/tcg/tcg_cpu.c +++ b/target/loongarch/tcg/tcg_cpu.c @@ -10,6 +10,7 @@ #include "qemu/log.h" #include "qemu/plugin.h" #include "accel/tcg/cpu-ldst.h" +#include "accel/tcg/cpu-loop.h" #include "accel/tcg/cpu-ops.h" #include "exec/translation-block.h" #include "exec/target_page.h" diff --git a/target/loongarch/tcg/tlb_helper.c b/target/loongarch/tcg/tlb_h= elper.c index 7623f4f9bdb..a4b90beca65 100644 --- a/target/loongarch/tcg/tlb_helper.c +++ b/target/loongarch/tcg/tlb_helper.c @@ -17,6 +17,7 @@ #include "exec/page-protection.h" #include "exec/target_page.h" #include "accel/tcg/cpu-ldst.h" +#include "accel/tcg/cpu-loop.h" #include "exec/log.h" #include "cpu-csr.h" #include "tcg/tcg_loongarch.h" diff --git a/target/m68k/helper.c b/target/m68k/helper.c index 2dd9ec1bdcb..5f91d206f59 100644 --- a/target/m68k/helper.c +++ b/target/m68k/helper.c @@ -25,6 +25,7 @@ #include "exec/target_page.h" #include "exec/gdbstub.h" #include "exec/helper-proto.h" +#include "accel/tcg/cpu-loop.h" #include "system/memory.h" #include "gdbstub/helpers.h" #include "fpu/softfloat.h" diff --git a/target/microblaze/op_helper.c b/target/microblaze/op_helper.c index 84c60c2636e..3da0c68da39 100644 --- a/target/microblaze/op_helper.c +++ b/target/microblaze/op_helper.c @@ -24,6 +24,7 @@ #include "exec/helper-proto.h" #include "qemu/host-utils.h" #include "accel/tcg/cpu-ldst-common.h" +#include "accel/tcg/cpu-loop.h" #include "fpu/softfloat.h" =20 void helper_put(uint32_t id, uint32_t ctrl, uint32_t data) diff --git a/target/mips/tcg/exception.c b/target/mips/tcg/exception.c index d32bcebf469..630b8b809fa 100644 --- a/target/mips/tcg/exception.c +++ b/target/mips/tcg/exception.c @@ -24,6 +24,7 @@ #include "internal.h" #include "exec/helper-proto.h" #include "exec/translation-block.h" +#include "accel/tcg/cpu-loop.h" =20 target_ulong exception_resume_pc(CPUMIPSState *env) { diff --git a/target/mips/tcg/system/tlb_helper.c b/target/mips/tcg/system/t= lb_helper.c index c850ddd9650..4398c6f80b4 100644 --- a/target/mips/tcg/system/tlb_helper.c +++ b/target/mips/tcg/system/tlb_helper.c @@ -26,6 +26,7 @@ #include "exec/page-protection.h" #include "exec/target_page.h" #include "accel/tcg/cpu-ldst.h" +#include "accel/tcg/cpu-loop.h" #include "exec/log.h" #include "exec/helper-proto.h" =20 diff --git a/target/or1k/exception_helper.c b/target/or1k/exception_helper.c index 3e76acae9c3..eeb82bc49f4 100644 --- a/target/or1k/exception_helper.c +++ b/target/or1k/exception_helper.c @@ -18,6 +18,7 @@ */ =20 #include "qemu/osdep.h" +#include "accel/tcg/cpu-loop.h" #include "exec/helper-proto.h" =20 #include "target/or1k/cpu.h" diff --git a/target/or1k/fpu_helper.c b/target/or1k/fpu_helper.c index 39b6195dd7d..e680606d4da 100644 --- a/target/or1k/fpu_helper.c +++ b/target/or1k/fpu_helper.c @@ -19,6 +19,7 @@ */ =20 #include "qemu/osdep.h" +#include "accel/tcg/cpu-loop.h" #include "cpu.h" #include "exec/helper-proto.h" #include "fpu/softfloat.h" diff --git a/target/or1k/mmu.c b/target/or1k/mmu.c index 3ff288a1f94..3fc56e1b771 100644 --- a/target/or1k/mmu.c +++ b/target/or1k/mmu.c @@ -24,6 +24,7 @@ #include "exec/cputlb.h" #include "exec/page-protection.h" #include "exec/target_page.h" +#include "accel/tcg/cpu-loop.h" #include "qemu/host-utils.h" #include "hw/core/loader.h" =20 diff --git a/target/ppc/user_only_helper.c b/target/ppc/user_only_helper.c index ae210eb8474..cc6d7ee88aa 100644 --- a/target/ppc/user_only_helper.c +++ b/target/ppc/user_only_helper.c @@ -19,6 +19,7 @@ */ =20 #include "qemu/osdep.h" +#include "accel/tcg/cpu-loop.h" #include "cpu.h" #include "internal.h" =20 diff --git a/target/riscv/cpu_helper.c b/target/riscv/cpu_helper.c index 17305e1bb75..97fea4d0c7e 100644 --- a/target/riscv/cpu_helper.c +++ b/target/riscv/cpu_helper.c @@ -29,6 +29,7 @@ #include "system/memory.h" #include "instmap.h" #include "tcg/tcg-op.h" +#include "accel/tcg/cpu-loop.h" #include "accel/tcg/cpu-ops.h" #include "trace.h" #include "semihosting/common-semi.h" diff --git a/target/riscv/op_helper.c b/target/riscv/op_helper.c index 81873014cb8..987ef67d177 100644 --- a/target/riscv/op_helper.c +++ b/target/riscv/op_helper.c @@ -23,6 +23,7 @@ #include "internals.h" #include "exec/cputlb.h" #include "accel/tcg/cpu-ldst.h" +#include "accel/tcg/cpu-loop.h" #include "accel/tcg/probe.h" #include "exec/helper-proto.h" #include "exec/tlb-flags.h" diff --git a/target/rx/op_helper.c b/target/rx/op_helper.c index ca3e9e85fc7..36df7d377e5 100644 --- a/target/rx/op_helper.c +++ b/target/rx/op_helper.c @@ -21,6 +21,7 @@ #include "cpu.h" #include "exec/helper-proto.h" #include "accel/tcg/cpu-ldst.h" +#include "accel/tcg/cpu-loop.h" #include "fpu/softfloat.h" #include "tcg/debug-assert.h" =20 diff --git a/target/s390x/mmu_helper.c b/target/s390x/mmu_helper.c index 255271b9d34..2f886d424a1 100644 --- a/target/s390x/mmu_helper.c +++ b/target/s390x/mmu_helper.c @@ -24,6 +24,9 @@ #include "system/kvm.h" #include "system/tcg.h" #include "system/memory.h" +#ifdef CONFIG_TCG +#include "accel/tcg/cpu-loop.h" +#endif #include "exec/page-protection.h" #include "exec/target_page.h" #include "hw/core/hw-error.h" diff --git a/target/s390x/tcg/cc_helper.c b/target/s390x/tcg/cc_helper.c index 6595ac763c3..e538a75d713 100644 --- a/target/s390x/tcg/cc_helper.c +++ b/target/s390x/tcg/cc_helper.c @@ -20,6 +20,7 @@ =20 #include "qemu/osdep.h" #include "cpu.h" +#include "accel/tcg/cpu-loop.h" #include "s390x-internal.h" #include "tcg_s390x.h" #include "exec/helper-proto.h" diff --git a/target/s390x/tcg/debug.c b/target/s390x/tcg/debug.c index 50d2853d443..99140b1ac9a 100644 --- a/target/s390x/tcg/debug.c +++ b/target/s390x/tcg/debug.c @@ -7,6 +7,7 @@ #include "qemu/osdep.h" #include "exec/breakpoint.h" #include "exec/watchpoint.h" +#include "accel/tcg/cpu-loop.h" #include "target/s390x/cpu.h" #include "target/s390x/s390x-internal.h" #include "tcg_s390x.h" diff --git a/target/s390x/tcg/mem_helper.c b/target/s390x/tcg/mem_helper.c index 8474a694110..414e6838c87 100644 --- a/target/s390x/tcg/mem_helper.c +++ b/target/s390x/tcg/mem_helper.c @@ -28,6 +28,7 @@ #include "exec/cputlb.h" #include "exec/page-protection.h" #include "accel/tcg/cpu-ldst.h" +#include "accel/tcg/cpu-loop.h" #include "accel/tcg/probe.h" #include "exec/target_page.h" #include "exec/tlb-flags.h" diff --git a/target/s390x/tcg/misc_helper.c b/target/s390x/tcg/misc_helper.c index 036be93fb32..09a45e58a5d 100644 --- a/target/s390x/tcg/misc_helper.c +++ b/target/s390x/tcg/misc_helper.c @@ -28,6 +28,7 @@ #include "qemu/timer.h" #include "exec/cputlb.h" #include "accel/tcg/cpu-ldst-common.h" +#include "accel/tcg/cpu-loop.h" #include "accel/tcg/cpu-mmu-index.h" #include "exec/target_page.h" #include "qapi/error.h" diff --git a/target/sh4/helper.c b/target/sh4/helper.c index b3ec7ce64d0..b6b057f104b 100644 --- a/target/sh4/helper.c +++ b/target/sh4/helper.c @@ -24,6 +24,7 @@ #include "exec/page-protection.h" #include "exec/target_page.h" #include "exec/log.h" +#include "accel/tcg/cpu-loop.h" #include "qemu/plugin.h" =20 #if !defined(CONFIG_USER_ONLY) diff --git a/target/sparc/helper.c b/target/sparc/helper.c index c5d88de37c9..8de261b0e30 100644 --- a/target/sparc/helper.c +++ b/target/sparc/helper.c @@ -21,6 +21,7 @@ #include "cpu.h" #include "qemu/timer.h" #include "qemu/host-utils.h" +#include "accel/tcg/cpu-loop.h" #include "exec/cpu-common.h" #include "exec/helper-proto.h" =20 diff --git a/target/sparc/mmu_helper.c b/target/sparc/mmu_helper.c index e441ffb8f7e..07ba25dfcea 100644 --- a/target/sparc/mmu_helper.c +++ b/target/sparc/mmu_helper.c @@ -21,6 +21,7 @@ #include "qemu/log.h" #include "cpu.h" #include "exec/cputlb.h" +#include "accel/tcg/cpu-loop.h" #include "accel/tcg/cpu-mmu-index.h" #include "exec/page-protection.h" #include "exec/target_page.h" diff --git a/target/tricore/helper.c b/target/tricore/helper.c index ce1693622b7..273713a1473 100644 --- a/target/tricore/helper.c +++ b/target/tricore/helper.c @@ -20,6 +20,7 @@ #include "hw/core/registerfields.h" #include "cpu.h" #include "exec/cputlb.h" +#include "accel/tcg/cpu-loop.h" #include "accel/tcg/cpu-mmu-index.h" #include "exec/page-protection.h" #include "exec/target_page.h" diff --git a/target/xtensa/exc_helper.c b/target/xtensa/exc_helper.c index fdc522698dc..7cb67d179a8 100644 --- a/target/xtensa/exc_helper.c +++ b/target/xtensa/exc_helper.c @@ -28,6 +28,7 @@ #include "qemu/osdep.h" #include "qemu/log.h" #include "qemu/main-loop.h" +#include "accel/tcg/cpu-loop.h" #include "cpu.h" #include "exec/helper-proto.h" #include "qemu/host-utils.h" --=20 2.53.0 From nobody Sun Jul 26 13:28:57 2026 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=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1781637617; cv=none; d=zohomail.com; s=zohoarc; b=M9iLXZ69gtbI3rhgrm56/anqykzbmt7HbZUl462DFtPUoQhGCGxFp3AeAB5ghFW2GDWfws+vIpcey+P48RBDJcSmYGBVdsrzagHll08B4L4rYSRDwqzV/PJfn+Xd/81WNmCNnX10la0czvOiNEJIaJKPiXKzHjrgTg1WMwv7trw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781637617; h=Content-Type: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=PzGuDivMFQvrcrfSgzBoX4ZsCu+rODkQK0sz1jfhVNQ=; b=j/EVnu1CKr4P51RdZkxuNIB59xqhsxDboMmD27CoTHErzwuIXIizA+qEclX4kNq7AB3qVej/Tvqf/uvgWGHcURsSW9JdRZyid267Tv00Sgn+Hfpi7sdF2QBCHvLsqiDMxHa2ldM3GgDUQzv125E2q9UpwUwDl+I/GvH+U9Aghzo= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781637617824718.8150978624284; Tue, 16 Jun 2026 12:20:17 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZZJA-0004ub-7q; Tue, 16 Jun 2026 15:18:48 -0400 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 1wZZIt-0004YV-CD for qemu-devel@nongnu.org; Tue, 16 Jun 2026 15:18:33 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZZIr-00053W-SE for qemu-devel@nongnu.org; Tue, 16 Jun 2026 15:18:31 -0400 Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65GIOe2E303370 for ; Tue, 16 Jun 2026 19:18:29 GMT Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eu1epbdff-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 16 Jun 2026 19:18:28 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-915f7c37734so1055861885a.1 for ; Tue, 16 Jun 2026 12:18:28 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4922fa8b423sm99732205e9.11.2026.06.16.12.18.26 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 16 Jun 2026 12:18:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= PzGuDivMFQvrcrfSgzBoX4ZsCu+rODkQK0sz1jfhVNQ=; b=mrnC8CZgYY+HmBOS 8NVF5Zs5paI6r0D8g+7YwoiKTk7XgKmbzSSJV5d+C3k/floxXheh0PKJB3EWTIwr KaiktwgGoSyfuVZksSIb8AWIsaC4y4ov1gueHuukNSU/ARdcYbLaLAYFCurRP+Ea wzwY6SFf6ZWHogRzQrvRQNCfxkfkBMicsbPb/sMnq8pHM3jnSIqn0BpcnYkhjK8X V/se5A2TBRNrIvP4vGUW48mPNAc0S4z/K9atOtMAelfh288gfuIyVd+QOhdalAE2 WsKIuoHkGc8KL36WsQ8zE49XQRRTt4csRTgXV6Bg1Ut1MS0tle43qpVQq0erg0lZ Z65p2A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781637508; x=1782242308; darn=nongnu.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=PzGuDivMFQvrcrfSgzBoX4ZsCu+rODkQK0sz1jfhVNQ=; b=bo8GL/3jGhU23/t3wmzgI+L9nrXggGI46u9qrnr4YGu7uo4VcvKrdhDIJpWUhIoOd6 tqrS7WGDj3HWi6KBxelCFpg/Oy0gKu3YUD/rkl5MTKKlBEAKdPnIo8+1PQ1ogJCEbvzO dGzLyhGp3K2pEvvyRXYxRz+yXTlLSsDcY5n6no8TAvs9gsMksks2ZoSAh3aHeYE+0NIq IsiLA3uerg5vlH/jMzBfMJEjtPukRTRbPR5Gmk1gbugRqOezjNj/cYc6XzGCPcjcmLTX Z5S2gKIUEnoDgbJMoN1Kbo5c4RDBI4S5GJbzOUNn4e6W6itffZbKWbmqYq54HPqkfD7t FLFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781637508; x=1782242308; 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=PzGuDivMFQvrcrfSgzBoX4ZsCu+rODkQK0sz1jfhVNQ=; b=OXqpJGiCITSksY56n65wC2QvkFK0fHhy7LViPiyfMuEmxxD78AwK10DY2bz/MWFkg9 DAeX0/QF0R5LSLXxazAnbhtNRzgdihqmj3Xpje1YvBApQV2Tt5NpthR/3HdFO16S9F5b axTgB2jiJsn/IS0YaygTjIrVA6+AfvEqn+FDQgGeE7dgAuJEEm/d9yo82SrugQsbVCyf nAN+KNeVWPgMABBFTWfxIsUi0o6RhilZYoREXFKgb6DKNSq4Y5W9pSCxYQ82T+xSTJva h3x3644KtWvndo6w9bJB6/dhkELf1E522Bg4KnMyByOd2Eh1rsrusKbAbpQYL6Bq3maz 3LuQ== X-Gm-Message-State: AOJu0YzKBbo//5PcSX8M0tNyreKIXWnZJvqpidskVe04a8KEl4G4q80U hVCLXiXn75VeTj3fHkZjk7W3hRGNdyQfo3CHJ23m+XQSuisU3TyM0tc/B0aEO3sDd7tyykLFaRk /fKsXnWysgdmqwQKJ3KJJadPE4nSxyKFgd14kGfYPlwUT7XKjQFkBhBjO8xLc+zsaow== X-Gm-Gg: Acq92OEmPwQGpNwDSYve044J3XIzbys62kOplwkTPtdKNFx6BfqNS8U6FioyB63lg/G O7Zi3T9t+74Qe8Xb489lRrAc098rCNpzWnSYgZ4JOlw4S5kwo6VxD+5F2PYxJcOqHStOEDFJWIW GDB92g59teH0A7c/xrxYxXgLQ629g0FnsGfY/ZwQuLXo+YLVPyCzGgKiXCNyBnBKHIlMtGM6u7/ cyRUxWmJu9u0/p5mVftp3MRQ9jWN3PfgYWwY1qxtzo2YwDoweApwPwwSoYIajXOmoyXxnl2IYtG JVBrlgienLEDb83YlCmcnnSU9Dmj02hRCNn9Tn/27/4afdvFEhmGAPjhMgwWlM/iU6kK4gNhLAu B87s6pgq8QYMi+RNV9Dn3smtu4vIqyWaxu1VB7tIwdP2tzROhnjBrCpehF/lO+YlVMVhXirjlTu OdqJc= X-Received: by 2002:a05:620a:4109:b0:917:fcec:cfe0 with SMTP id af79cd13be357-91d8afcb0bemr175607685a.33.1781637508208; Tue, 16 Jun 2026 12:18:28 -0700 (PDT) X-Received: by 2002:a05:620a:4109:b0:917:fcec:cfe0 with SMTP id af79cd13be357-91d8afcb0bemr175602885a.33.1781637507777; Tue, 16 Jun 2026 12:18:27 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Richard Henderson Subject: [PATCH 10/10] accel/tcg: Restrict headers being TCG specific Date: Tue, 16 Jun 2026 21:17:16 +0200 Message-ID: <20260616191716.12932-11-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260616191716.12932-1-philmd@oss.qualcomm.com> References: <20260616191716.12932-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=I/ZVgtgg c=1 sm=1 tr=0 ts=6a31a184 cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=4s3hRJSeHn4rkQlkrse1kQ==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=EUspDBNiAAAA:8 a=RUGg7TPni0CDwnB1NisA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=NFOGd7dJGGMPyQGDc5-O:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDE5NyBTYWx0ZWRfX6SSoSdQaXR/W UMlSda++fd6AkUvGBfLDXnhwAYexbzVl8VTbUtwd7tJq+jaia6rYMGchN8I3MzoA37KYoQFXRMM BFYCeWh9dVdtwGE7YGDgz+n9nkQnqlU= X-Proofpoint-ORIG-GUID: hK7pkhBD4nXL3Ik2KShxMfcTWL0IXrSR X-Proofpoint-GUID: hK7pkhBD4nXL3Ik2KShxMfcTWL0IXrSR X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDE5NyBTYWx0ZWRfX9AI6VyoSwNr4 S+yGePXLED6MPYGK4X862xVCdkSf3UjW4aw+sIrszUr/hQwEMs8HOP4jS8wrJg8QlSqBSrYCSNG 4jdI58ISsuSClH/+7oUpw+IpLHkGseecMnExY3HgGGvgK6ne9BTDOuOJbV3rvEfaZcXMbdiWbQX PZNiMnLICMVG3YVp8wOrB715If/Ih1WK1UVhfedxpi2sHCyxYkJt+I5ubijAAp9bf+2SefPnfov YFTVv7tEiBoM3+lwMxjSl/adSFhz70D+O1orezCsQujRcj6+IK3lpexJFn+1VR2CpChmm8cIUKB ffv/4dvhhTXVdKcIGOqNiId3tb4GjQctd6eNaD12nBNOp5UbDdg9JXIKheqKZ5SlTOrYOqKJy7N 7/yn/uEjYhWxPzUvMX3zg82goC82FMqGOpoghVjckKxZZ5enCF3EeqknOwkTz9qWUsjIjrfF3qi o1OKbxQxixDs9dAZH2A== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-16_05,2026-06-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 priorityscore=1501 lowpriorityscore=0 phishscore=0 adultscore=0 malwarescore=0 spamscore=0 clxscore=1015 suspectscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160197 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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-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 @qualcomm.com) X-ZM-MESSAGEID: 1781637619635158500 Forbid including TCG-specific headers in non-TCG builds. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- include/accel/tcg/cpu-mmu-index.h | 4 ++++ include/accel/tcg/cpu-ops.h | 4 ++++ include/accel/tcg/getpc.h | 4 ++++ include/accel/tcg/helper-retaddr.h | 4 ++++ include/accel/tcg/probe.h | 4 ++++ include/accel/tcg/tb-cpu-state.h | 4 ++++ 6 files changed, 24 insertions(+) diff --git a/include/accel/tcg/cpu-mmu-index.h b/include/accel/tcg/cpu-mmu-= index.h index e681a90844c..e0fb6ef91c8 100644 --- a/include/accel/tcg/cpu-mmu-index.h +++ b/include/accel/tcg/cpu-mmu-index.h @@ -9,6 +9,10 @@ #ifndef ACCEL_TCG_CPU_MMU_INDEX_H #define ACCEL_TCG_CPU_MMU_INDEX_H =20 +#ifndef CONFIG_TCG +#error Can only include this header with TCG +#endif + #include "hw/core/cpu.h" #include "accel/tcg/cpu-ops.h" #include "tcg/debug-assert.h" diff --git a/include/accel/tcg/cpu-ops.h b/include/accel/tcg/cpu-ops.h index 5950cdcaab1..710da12b828 100644 --- a/include/accel/tcg/cpu-ops.h +++ b/include/accel/tcg/cpu-ops.h @@ -10,6 +10,10 @@ #ifndef TCG_CPU_OPS_H #define TCG_CPU_OPS_H =20 +#ifndef CONFIG_TCG +#error Can only include this header with TCG +#endif + #include "exec/breakpoint.h" #include "exec/hwaddr.h" #include "exec/memattrs.h" diff --git a/include/accel/tcg/getpc.h b/include/accel/tcg/getpc.h index 0fc08addcf3..8a97ce34e76 100644 --- a/include/accel/tcg/getpc.h +++ b/include/accel/tcg/getpc.h @@ -8,6 +8,10 @@ #ifndef ACCEL_TCG_GETPC_H #define ACCEL_TCG_GETPC_H =20 +#ifndef CONFIG_TCG +#error Can only include this header with TCG +#endif + /* GETPC is the true target of the return instruction that we'll execute. = */ #ifdef CONFIG_TCG_INTERPRETER extern __thread uintptr_t tci_tb_ptr; diff --git a/include/accel/tcg/helper-retaddr.h b/include/accel/tcg/helper-= retaddr.h index 037fda2b83d..ebdc8b378d4 100644 --- a/include/accel/tcg/helper-retaddr.h +++ b/include/accel/tcg/helper-retaddr.h @@ -6,6 +6,10 @@ #ifndef ACCEL_TCG_HELPER_RETADDR_H #define ACCEL_TCG_HELPER_RETADDR_H =20 +#ifndef CONFIG_TCG +#error Can only include this header with TCG +#endif + /* * For user-only, helpers that use guest to host address translation * must protect the actual host memory access by recording 'retaddr' diff --git a/include/accel/tcg/probe.h b/include/accel/tcg/probe.h index dd9ecbbdf11..0b788901ba0 100644 --- a/include/accel/tcg/probe.h +++ b/include/accel/tcg/probe.h @@ -7,6 +7,10 @@ #ifndef ACCEL_TCG_PROBE_H #define ACCEL_TCG_PROBE_H =20 +#ifndef CONFIG_TCG +#error Can only include this header with TCG +#endif + #include "exec/mmu-access-type.h" #include "exec/vaddr.h" =20 diff --git a/include/accel/tcg/tb-cpu-state.h b/include/accel/tcg/tb-cpu-st= ate.h index 8f912900ca6..1903af4c2a2 100644 --- a/include/accel/tcg/tb-cpu-state.h +++ b/include/accel/tcg/tb-cpu-state.h @@ -6,6 +6,10 @@ #ifndef EXEC_TB_CPU_STATE_H #define EXEC_TB_CPU_STATE_H =20 +#ifndef CONFIG_TCG +#error Can only include this header with TCG +#endif + #include "exec/vaddr.h" =20 typedef struct TCGTBCPUState { --=20 2.53.0