From nobody Sat Sep 6 14:44:48 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1756894119; cv=none; d=zohomail.com; s=zohoarc; b=InVPXTZ/o58KgXEW5wj03m6nnB4WQGvuu13Nur0mNgCB3dfmfpt/MK8z5K1pWrJ0939qP56oOCfem4YlSnfGW2tC/mQciIAEBtZHSZYvdCvKSIudKbKn/CoyKMEhKcqN+ZDPBvhTtttsdkVIBZ1Froe+eBiD+GqZcVRs9tU5/Gc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756894119; 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=Dc577sdHNizEE5xrXzfqcyEguN+DMomdpbX0f6y4H38=; b=AJdT2wtrL0hzZOwaf07beg1xfplToYuJDh9zWds/FUpb+cEcPRNwptACy9hFQ5ysXWr5wWDPst89k6z4lc/JP9Qyihvsfmj/LcnhJvOQzFgWt58M+bB4Zcv34Kotj9w7bUEowiw4cdmB0RLYumApMuc2CzPPwxZUyonrNUDcy88= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1756894119513969.9779060702358; Wed, 3 Sep 2025 03:08:39 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1utkPP-00083h-JS; Wed, 03 Sep 2025 06:08:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1utkPB-00081b-W1 for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:07:55 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1utkP8-00088E-S7 for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:07:52 -0400 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-3c68ac7e18aso4041747f8f.2 for ; Wed, 03 Sep 2025 03:07:50 -0700 (PDT) Received: from localhost.localdomain (98.red-88-29-180.dynamicip.rima-tde.net. [88.29.180.98]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3d0a1f807f9sm22209678f8f.38.2025.09.03.03.07.46 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 03 Sep 2025 03:07:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1756894068; x=1757498868; 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=Dc577sdHNizEE5xrXzfqcyEguN+DMomdpbX0f6y4H38=; b=ACMWP+i1B3e75/nCjWSLkw+5Ra7b4C27mh0yuS9Usx1Jh0Yst2yHdSd/EOF5BDWjT0 nM4VdPOtJtqxOyNe3Xc8itpb+LPQibuCY2vkevMJ4AvLfm1JIV/hthksKLMbm7D8bcLE 2Is0RoF/odZZgda8+f5jnJEizrp+blYqGabLoockiC72AtYsPrIdRT56/K1ar9KP2/Gk 7KGEXZbH/q1udVQnCETS9f7FcYbRprZMR0xfPoXcvLvQnDN2QPNSnX4v7DxcBDFHCgRy RAXztHUuHSf1WpqnNvYUdiTP8MpMFJsKDpl0noRASE8l/GdP15q2a2+jh2yf7G7uou/8 ZQpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756894068; x=1757498868; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Dc577sdHNizEE5xrXzfqcyEguN+DMomdpbX0f6y4H38=; b=iLG3BSCY5LoUyX8DpB4zvQdE2Xn6mXeUXYApuSyuT42d+NPa0zTsvy5FCmhoeWl437 0my+a/S2qj4fxHtDv9KUsLcOIgwwXe6JRiN3YYHuhrliIIm4HE7WYKU4rLIajOzDHObx I/nDJ9UN1JN+B1oRSG5S78Xzy/TXjX9U7wLVvYnrMdQcm8Ml4Dgh3DWlZAUsdnDSgK7Z HNEDtfOFV+omjls4q87IdpVoprTIvGdiBIIFtyXAvPsx9eeUFfy1sED7801ZxMcILuOj cYOZl00fvEP3/+VG9u+EDQ+o8038ju77uWSy/uT6KOd2Os7L2CXGY5gaemzbcJ8FPzNM IHHQ== X-Gm-Message-State: AOJu0YyPgrmJsYslhrs58+q2+zSuTthrHQeKl9gz0tT+Gb+aD2BUk0Km zmWbwiDxWr/Vy9gW0IZ2Xc6asXihH/6HBtJxOsvkjSnENr8JQF6YHTVhPVnJa9knVl60j9MOnMl mmGORdPE= X-Gm-Gg: ASbGncul3jb8IWQfbB1eQzrOgdxjM7p3oP4q7V+usBunF7vlLdlGticiqB+uqAmbAEq f9Eth5CKUnjTyQoTl4hgiHJvIfkMa+dEICKozqwRpQSOnsCR2P49UIYD0PSA5QKXk6O4CHPh7+R goOSbHfz7HabT4n9TEFgYlA1Q18lSfBuYQVJKB/rtPlKytawMDij+D2p+pONiQGuwpGvBAg4EK3 sY0zu2t0Ml8A9KZo+achh/qDwivh3A6g45Hw0sMUWYg+11/xaMMTveh/YfEw3q9fs8zdBWwrMtm DUz3HkReqSv1fIJhLRJIFnH1nwS22FBWX4TUwz9awl1FLYC6AJujz4NI1g264ZWi+cmIAcV7B+V AoGf8kLHyRI8qD2pAZHwfurwxWPmRv2CUjB6tKWGVlFp879FDqalsxLi7/w146dkjqin4G8tyor 3WW5SBIPRFROZaV97p X-Google-Smtp-Source: AGHT+IFtIgdxUByXzHWLwVWdk0EAygLsYu1MsTlpkiKO8Q9Fkx/wwDOhAL23xtp051NyXFX4+RQazQ== X-Received: by 2002:a05:6000:2dc2:b0:3d1:1328:450c with SMTP id ffacd0b85a97d-3d1def6a59emr10272671f8f.49.1756894068595; Wed, 03 Sep 2025 03:07:48 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexander Graf , Richard Henderson , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Mads Ynddal , Phil Dennis-Jordan , Stefan Hajnoczi , Cameron Esfahani , Roman Bolshakov , Paolo Bonzini Subject: [PATCH 01/24] target/arm/hvf: Release memory allocated by hv_vcpu_config_create() Date: Wed, 3 Sep 2025 12:06:37 +0200 Message-ID: <20250903100702.16726-2-philmd@linaro.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250903100702.16726-1-philmd@linaro.org> References: <20250903100702.16726-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=philmd@linaro.org; helo=mail-wr1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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 @linaro.org) X-ZM-MESSAGEID: 1756894123275124100 hv_vcpu_config_create() is documented in as: /*! @abstract Creates a vcpu configuration object. @result A new vcpu configuration object. This should be released with os= _release when no longer used. */ OS_OBJECT_RETURNS_RETAINED OS_WARN_RESULT hv_vcpu_config_t hv_vcpu_config_create(void); Release the memory allocated by hv_vcpu_config_create() with os_release(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/arm/hvf/hvf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index b77db99079e..d67372218de 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -150,6 +150,8 @@ void hvf_arm_init_debug(void) max_hw_wps =3D hvf_arm_num_wrps(config); hw_watchpoints =3D g_array_sized_new(true, true, sizeof(HWWatchpoint), max_hw_wps); + + os_release(config); } =20 #define HVF_SYSREG(crn, crm, op0, op1, op2) \ --=20 2.51.0 From nobody Sat Sep 6 14:44:48 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1756894511; cv=none; d=zohomail.com; s=zohoarc; b=kvd5lycdc+Xyk7ppJlhaG3jVTsW3uUL1zubFRl40aGy8/cqTdkbea4h9hnx0aH0Vh1PlddiVoDEVY3LNEXLtyUYI7qrhByL7bLx5YSJ+eAyZRWeULyynp1jVtC7H8dIW+HY760trKtPOOna+t/POEe+KgSuKemGyrlhMANx+oOw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756894511; 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=Yf4kdomIxvqW13orl0RD2fI/Yew6aBRirZc6xfkUNAY=; b=j9WkQokftczmj6bjm/m/MGKeuKnOK37VwCUxzHRT5XNrLXiC2eljX22/anpUntnfa2Or3byESNWvIIRfdp4Q8bednDJaxgxTf2zssPOny6nJsNI5u9t2cTmuIgc4sVflKf9QOlyi0VW5F/16AcZd2rOwHilomDSMHfGmCX94Vm8= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1756894511081102.03490345314572; Wed, 3 Sep 2025 03:15:11 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1utkVw-0007ek-5M; Wed, 03 Sep 2025 06:14:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1utkVt-0007Wj-GI for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:14:49 -0400 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1utkVq-0001O7-Ph for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:14:49 -0400 Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-61cbfa1d820so12646914a12.3 for ; Wed, 03 Sep 2025 03:14:46 -0700 (PDT) Received: from localhost.localdomain (98.red-88-29-180.dynamicip.rima-tde.net. [88.29.180.98]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3d60d93b949sm12824030f8f.2.2025.09.03.03.07.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 03 Sep 2025 03:07:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1756894484; x=1757499284; 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=Yf4kdomIxvqW13orl0RD2fI/Yew6aBRirZc6xfkUNAY=; b=euFLi2Rl6bGdQ+TlfY/+Irb984M8dd/SWxoHEtMhJfQogGDW/Z5hdmkJsYT4UGgbNi pgUt3n4WUO/w2pNS72/gvhLSQbWikxsPV0F83Gj09XpJas12Ts/P1kw3DXAREnU00bf3 /sIm3yq9VD2KaXs+jEN/ZEBDg+D6V3ikzQ3JiK5YOSptMqYRjaIeVBLO0evRs2p2XE8Z 8RSWBgYvr46tnaChlzhXbXaVf+h25AyETcK3VgPx0RB9dPPu7JMi5nVZT5UfkYSCzgNH 8ChidUNpZZtLRuDXZ+A0w/GWnmGYOUmazFBi0jGv86DQixx4x0BXPDtnyPN2u1cs0p/c ouNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756894484; x=1757499284; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Yf4kdomIxvqW13orl0RD2fI/Yew6aBRirZc6xfkUNAY=; b=Cr8JMEYMz2Alt/cV1WpfFqLUEV4pBoXPOPuLz5IO633O3pE14VWNcDAZIlUJKNIXmh 0hjaI6GRvjMumk77ZhKx7lNo4Dq2440OSMS37AFiTWu7nhjpi0YomUYlbcFJemB08xVB YuDA/Fs0wqObp9CVYkKwHB1Q5p7Moe5YL7GCZgaOh4X0AHpk6vOErHmDBfWqv7qV/oF8 17yiH9VN37AFOYcmSNE2sSma+4qbg0Pipoeco4XXHxQziyoTEJh6+7w5PEckpRENC9Eh nO+HafU5g8V7vLwHDNSWXLINQITnfJ8VipDGdhcxHYWCqUFplsAp663do231DcvtxKpB MKJQ== X-Gm-Message-State: AOJu0YxpcIrgHPwDCmaJMuk8WIHZEnQJgedP+Zf1KOzejEoeteF7QI2c 7o8fsndBx/DOQElSaRjAaNfWJdED22Q/ozkD4/PLNPDZe6DqBsMQcRwporGSykEaJ+fXgUQM+Pu QSo/estw= X-Gm-Gg: ASbGnctefbqlZiKHs9wPNTNzUCdYIcMonoTayk4+0cYTybx/Xm6bykZp1InUhna4pqZ on0iufFOaoHfIUrNZi350jcDN3T05IYmpbWRikxZRVtBPICVr/vqvf70Nh5zrHvfZyaIef/+HoM rW5ALWH+D/+QA9sF91keZHM9W7Wpq7bsV4vrl3kK54rj93wYbTZDeoOnUKsoZyxxxbBQn6S6G2l sTO9+CL9jf1IQyJV44nt+MsWe8MJ1AuBEGimv/sFL2nG4Lx/qFGz6XqYKfZYIYYGTnB/GVbceSX u3viMFE5C2lbRmqugjtjVmw78uorLaC0dVEFKEpAQMp2kjPpNWi/Cot0ytCCUjBGoMuw2eZ95VI MQu0uYOLQg4Dcu0/EikBlLiVcWwHPHo73gkCdxCMV/qG3jbRAKfd/zJwMdpRiecu1EjhwIojTKv 0e2MjV5TlIplfszcMd X-Google-Smtp-Source: AGHT+IHQOgMwHD6oDDKECAt5zmKDDOUqxGnAqaTm4KCbQto5aqr8CIpnQHtWWtxQVCkwUEfEsfRmDQ== X-Received: by 2002:a5d:584b:0:b0:3cd:4ff9:c4a3 with SMTP id ffacd0b85a97d-3d1dfa191d4mr12271536f8f.35.1756894075252; Wed, 03 Sep 2025 03:07:55 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexander Graf , Richard Henderson , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Mads Ynddal , Phil Dennis-Jordan , Stefan Hajnoczi , Cameron Esfahani , Roman Bolshakov , Paolo Bonzini , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH 02/24] target/arm/hvf: Check hv_vcpus_exit() returned value Date: Wed, 3 Sep 2025 12:06:38 +0200 Message-ID: <20250903100702.16726-3-philmd@linaro.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250903100702.16726-1-philmd@linaro.org> References: <20250903100702.16726-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::535; envelope-from=philmd@linaro.org; helo=mail-ed1-x535.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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 @linaro.org) X-ZM-MESSAGEID: 1756894513663124100 hv_vcpus_exit() returns a hv_return_t enum type (defined in ). Assert we succeeded, as we are not ready to handle any error path. Suggested-by: Alex Benn=C3=A9e Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/hvf/hvf.c | 5 ++++- target/arm/hvf/trace-events | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index d67372218de..65ac0bd71aa 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -1086,8 +1086,11 @@ int hvf_arch_init_vcpu(CPUState *cpu) =20 void hvf_kick_vcpu_thread(CPUState *cpu) { + hv_return_t ret; + trace_hvf_kick_vcpu_thread(cpu->cpu_index, cpu->stop); cpus_kick_thread(cpu); - hv_vcpus_exit(&cpu->accel->fd, 1); + ret =3D hv_vcpus_exit(&cpu->accel->fd, 1); + assert_hvf_ok(ret); } =20 static void hvf_raise_exception(CPUState *cpu, uint32_t excp, diff --git a/target/arm/hvf/trace-events b/target/arm/hvf/trace-events index b29a995f3d3..538af6e0707 100644 --- a/target/arm/hvf/trace-events +++ b/target/arm/hvf/trace-events @@ -12,3 +12,4 @@ hvf_psci_call(uint64_t x0, uint64_t x1, uint64_t x2, uint= 64_t x3, uint32_t cpuid hvf_vgic_write(const char *name, uint64_t val) "vgic write to %s [val=3D0x= %016"PRIx64"]" hvf_vgic_read(const char *name, uint64_t val) "vgic read from %s [val=3D0x= %016"PRIx64"]" hvf_illegal_guest_state(void) "HV_ILLEGAL_GUEST_STATE" +hvf_kick_vcpu_thread(unsigned cpuidx, bool stop) "cpu:%u stop:%u" --=20 2.51.0 From nobody Sat Sep 6 14:44:48 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1756894126; cv=none; d=zohomail.com; s=zohoarc; b=c8G1lC8X7PPf7Bx8wNhKtxa0gzXEIUB2aLs/TXJ25eJgBC5iQ7wKVT7/Fx/neee7dWA+OwfaebD2DRi4iBCQ9Y4el+hh/pNxdD+vbME4aOJdX2zVMsQ1ZHGJm4WPUgUuvcsKawy+Xhk2NAOKYDgCH+3kc81ScJFpx/qIsdc2SEI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756894126; 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=2DEdnXetstwiME2PMs47ROkMyVNCZIiKy5VUOukcBJ8=; b=MJ5W8tV0r0ts6nBuG/EBsjteJCkXQmFPpyumxX2qqYJKSJHYKFIT9rHO4FN/HtO+rUWrMbFx0clLkUzKbQw5aiRocYaHBrt06SR/oGTA4eULoGELX2x/VPJvCVACwhd+cyJkjD/uklb09FrueX7fBJ+eiNcSKmXZKsxj/IqyPEA= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1756894126103612.240366456242; Wed, 3 Sep 2025 03:08:46 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1utkPi-0008Ks-NR; Wed, 03 Sep 2025 06:08:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1utkPW-0008BB-PM for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:08:17 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1utkPP-0008A4-7s for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:08:13 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-45b79ec2fbeso42993305e9.3 for ; Wed, 03 Sep 2025 03:08:02 -0700 (PDT) Received: from localhost.localdomain (98.red-88-29-180.dynamicip.rima-tde.net. [88.29.180.98]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45b7e8ab093sm245312015e9.22.2025.09.03.03.07.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 03 Sep 2025 03:08:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1756894081; x=1757498881; 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=2DEdnXetstwiME2PMs47ROkMyVNCZIiKy5VUOukcBJ8=; b=KqVo+Maz2mXpYYxxDjA6+Io23lh63BA4oOFFmrk2q/LElsL5f6fRZUwwH+pAQwGtbo OaNXkK+ba6qozCB8B8utOxj19sNmVoSpT6iZY8coflr7mjLw33FuD7HRWnzsupErXY48 bohEJlbwCpDG/2j6c5nZmN5grh7nuCBZByJMjNH5MVK0iqNFIpidd70p2qH25xVrFAIa V7DoEc0YFPGB43oDg2L5CXWYTcNoIYFhwPrI/Wjcdg9zVT8s4yEzt7OiGdQv+4sRCfdu GMGg+Bwnsd+ohGwBTS0bFZSNOpEmK1RM7dvEbosuLFZG3i8Ni0D7OkBhtGQp/kc3Jv9T HyDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756894081; x=1757498881; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2DEdnXetstwiME2PMs47ROkMyVNCZIiKy5VUOukcBJ8=; b=hefqWtIm9fTSODAdVzH0lS8a4mJH3mEGuvqg8fihLJfr/jUG3zFSFFYmtEg2sqhLAC Cx/FSWKj4zkVKKTlWX0iYkmLd1pSMwNC6RzqoD1cwnZLUwzck9uqzGLTRlxunrpH8+b/ 92riIm5haROsCrKdNCwvtcbfA8RAYbV0Tf5JS7XKnxusPuvBkz4heZvkZnxrjMZ5g4wa 1vSSM7fKF9jNOGaHMDfLgPJMEwp/rh7hFbo4jBYx7pwDls2XwN8LHkRQ4lm926U+XCnS ZXveMxwaCD1ueokybNrRsoJr5xqLRvT/rNK5mdEYwtz3qtWv4kBENj6LWhUxuiDqzD3a 8FMQ== X-Gm-Message-State: AOJu0YwMQR9gfotHda7XWVTAW4w/4kIsp0H1CDf9KmFokhLDB/X9W6TS C5upcaZHu2ftz4jKNteoPPaMq2CUygx/tuPxB/1Xihx8GmQXSQVC7AXk1FVdKfYcxnqnnZ7EMX6 JzBh5GqM= X-Gm-Gg: ASbGnctRGmtM/Aqt683koVpTTsjRiFPN0WTti4cgEkq8nOn9l1wf+3nvYVMFtSdkOLe qDo/Wnft+WNXATy0T9Nafrqg7Ktt4WWHtg5TK5DoPDoOdKSxldhtwJFprVhtRbpVriAa70L1SB4 lotfCn2qlN/+pS5O1mMkPpAvz2sZOrz/Gj34IjpANuUcO30/dCMI3dJ5C161cohDAhP5V+RxZPb fGK3bB2Y4p5WUqXFFLtbsZl3moeBFEbMwDfIjL9K4mwUbE7JKG7XUO9ex2pjp6PYc7GSByS01I9 PRK23O9qPMBMi9Lcnl1EEEUuszICx5dxGvnlLenKNIU4Q39FVZqiDk04q1OK1l1nF4yz6TsqS0Y KrC0RqM+6DyrKMzDbR/vI6NrF1QMjdOw3jZUr6TIh4e6F4JUwvFGl5NnGfurEYq/pTkKb9sePzn szj/rqJQ== X-Google-Smtp-Source: AGHT+IH0sZUfnQmTQp0oWjjR1Ndf6XSsEI1Wriw4ISiO4FOqTOUjqjT43dbZ41Li00nA4nDt3osdRA== X-Received: by 2002:a05:600c:a46:b0:458:be62:dcd3 with SMTP id 5b1f17b1804b1-45b8558a78cmr139432685e9.17.1756894081370; Wed, 03 Sep 2025 03:08:01 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexander Graf , Richard Henderson , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Mads Ynddal , Phil Dennis-Jordan , Stefan Hajnoczi , Cameron Esfahani , Roman Bolshakov , Paolo Bonzini Subject: [PATCH 03/24] target/arm/hvf: Check hv_vcpu_set_vtimer_mask() returned value Date: Wed, 3 Sep 2025 12:06:39 +0200 Message-ID: <20250903100702.16726-4-philmd@linaro.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250903100702.16726-1-philmd@linaro.org> References: <20250903100702.16726-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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 @linaro.org) X-ZM-MESSAGEID: 1756894128062116600 hv_vcpu_set_vtimer_mask() returns a hv_return_t enum type (defined in ). Assert we succeeded, as we are not ready to handle any error path. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/arm/hvf/hvf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 65ac0bd71aa..1b59cc0eb04 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -1906,7 +1906,8 @@ static void hvf_sync_vtimer(CPUState *cpu) =20 if (!irq_state) { /* Timer no longer asserting, we can unmask it */ - hv_vcpu_set_vtimer_mask(cpu->accel->fd, false); + r =3D hv_vcpu_set_vtimer_mask(cpu->accel->fd, false); + assert_hvf_ok(r); cpu->accel->vtimer_masked =3D false; } } --=20 2.51.0 From nobody Sat Sep 6 14:44:48 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1756894122; cv=none; d=zohomail.com; s=zohoarc; b=FBimEnsNPNvK4hGFwaDzDlMC5rHYWfF+CtGPZgeej+VstbgTOYn0J0SBuV6ewgT00fCu1MAdbVYa98jGdTLStg5qajY7iEAEKSwZ0Q7gpSlHClIIkRNF7roy6y6VCsGXmq7kMd+e9a8NVqJySbEdJ2G2K9KMzFWm59zrBmxUE6k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756894122; 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=BkpDb8z8YS7VtUJswa/sv69zASL37yWTBrDRHNqbvzc=; b=WXT4DjbiDkU5AsF4EbY8YZPVY6qiKuVpvHf9pxdFTK1PiKQIwPcREyFjyHp6keUSb1G8GJrd3vd/suj5NE6+THzbO/gxkOkn4Z7GvuonNfiwwqDimQK0DpY1p72TvsmKw8+CbaO0ENOqBYUZ76aKo2HtlHIHev43NPNwFpMPxdE= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1756894122143578.4332299745518; Wed, 3 Sep 2025 03:08:42 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1utkPh-0008Jv-Bq; Wed, 03 Sep 2025 06:08:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1utkPX-0008DB-Ff for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:08:17 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1utkPU-0008Af-Si for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:08:14 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-45b86157e18so22704375e9.0 for ; Wed, 03 Sep 2025 03:08:09 -0700 (PDT) Received: from localhost.localdomain (98.red-88-29-180.dynamicip.rima-tde.net. [88.29.180.98]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45b98e77231sm61696815e9.12.2025.09.03.03.08.05 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 03 Sep 2025 03:08:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1756894088; x=1757498888; 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=BkpDb8z8YS7VtUJswa/sv69zASL37yWTBrDRHNqbvzc=; b=EGWTvNiLPS4qWHIgIGQDkHbJOIoV9p2GMkrN+rrnpzQ5ssklzUPGADN0BiPkLRTiRO u658/jPFFjBZMrJqeXa63w45lPZKTeAOpBeH+/fRlTAcE/dkgetTpETP5ofpFoEwnAyY 5q32Qb3olS7cKS7SwGrb+QubGfEzq9KAb9IWdQYPpVkXavY2oBRoYjzq3NzzRcrJ/XBS 8531UXC47kEqfNZNvYOdySoI0w2070am9aEr+5jEctHtKoSzqQstqQeGaOLBhczpXGnU EhJHv+HRqS4E7GrXfQVlZ3Y5WVK+6Zmo41sBl277gALkIayryfS3Y7S3u909BvqjXcnp UEUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756894088; x=1757498888; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BkpDb8z8YS7VtUJswa/sv69zASL37yWTBrDRHNqbvzc=; b=MS2IBRP8N+ZVB66wfVzDII1qKEbZm54Yz4KqBGQJUK4eH90CXznVPT8P1pJax5Mw1Q P7nfM5XF2a2+TBQgLrupb9Z5mZxcM9u/tIJ/ZWfEh3rqCSCZgY7asPgYZDXkLjBfv2cT VQ5TZOXKstVOv/QIE4IZG/k/7ABnLak449ExEeik6Y3lwqcvSibyIKbVtbdAF36SaHL8 W+ygC1h+W6YKptOtbxcTqewgnxUHXPziZkvo097+Jq0R68uKuy22xIaWadhTTp2EpArV fYZqeZB/y1j1AwzBCO5aPee8frXOlEBk78lC48lZ6K5/RS7qQ/rPqJOW/TVs1IIKA+Ss cahg== X-Gm-Message-State: AOJu0YyhjUQBI423DyhokGIHXODms+MjXRugq8RUP8i35AHtcZ0UeS93 piC2iKlfJ+ZV5b8lH7cOZoyrEB85H2hCbRy5vXMoDdsChbaH546uTmOg00kGRkEhWl+h/88iVSn w61If8BE= X-Gm-Gg: ASbGncu+hOc/9H0QrJB6T7x2ti0uUQqTE/vOfqVRmtkw+ep2Xt16VA7NdWlQl++TXkE nbMAIHmnZA9kM6GYK6vNFKf25tBKvWJQw+O5oS+NOvUijgjwdSIuWXWNotHqIXesYhG+nJmTVLj c1h157QOPCZDllyWbP7Vjnk+cJ5YNlEVUDQfRcLeak/jb1sg8BPCuRRUfPl0Pu4lEC4OKe8ob0K itHeugOpoHgsQTHeqRMJNhVsxVBLMrq8kurGmxkGVPfir7O/RjPjv+0xTKqLDtl99MMYcMB4I7Z yLwJRkkLoORDJBKR/4mRhuEjmD8oDRtFA2FUFCw7OYtcxpGA9vE57nHT0IoP0XemR6G9h66dIHU kEY64skL9ZTPf7n5dBj1AA2USJnza62qvbY1SymcKELS0hEgNcqxVoIC6aLrSXOwZ5cBGuCD1ut ybIJCOiQ== X-Google-Smtp-Source: AGHT+IFDmwPiwtIRc5G1keApTzjVKIsiVyva+mkkT9xFeKv4sZ2rdC3Loce/B+ZR5Add9rqIVnfM5w== X-Received: by 2002:a05:600c:1d24:b0:45b:81ef:c5d3 with SMTP id 5b1f17b1804b1-45b8554e2f4mr124133135e9.9.1756894087797; Wed, 03 Sep 2025 03:08:07 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexander Graf , Richard Henderson , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Mads Ynddal , Phil Dennis-Jordan , Stefan Hajnoczi , Cameron Esfahani , Roman Bolshakov , Paolo Bonzini Subject: [PATCH 04/24] accel/hvf: Rename hvf_vcpu_exec() -> hvf_arch_vcpu_exec() Date: Wed, 3 Sep 2025 12:06:40 +0200 Message-ID: <20250903100702.16726-5-philmd@linaro.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250903100702.16726-1-philmd@linaro.org> References: <20250903100702.16726-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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 @linaro.org) X-ZM-MESSAGEID: 1756894125567124100 hvf_vcpu_exec() is implemented per target, rename it as hvf_arch_vcpu_exec(), following the per target pattern. Since it calls hv_vcpu_run(), mention it must be called on the vCPU. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- include/system/hvf_int.h | 4 +++- accel/hvf/hvf-accel-ops.c | 2 +- target/arm/hvf/hvf.c | 2 +- target/i386/hvf/hvf.c | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/system/hvf_int.h b/include/system/hvf_int.h index a3b06a3e75b..32b32e1d024 100644 --- a/include/system/hvf_int.h +++ b/include/system/hvf_int.h @@ -73,12 +73,14 @@ int hvf_arch_init(void); hv_return_t hvf_arch_vm_create(MachineState *ms, uint32_t pa_range); int hvf_arch_init_vcpu(CPUState *cpu); void hvf_arch_vcpu_destroy(CPUState *cpu); -int hvf_vcpu_exec(CPUState *); hvf_slot *hvf_find_overlap_slot(uint64_t, uint64_t); int hvf_put_registers(CPUState *); int hvf_get_registers(CPUState *); void hvf_kick_vcpu_thread(CPUState *cpu); =20 +/* Must be called by the owning thread */ +int hvf_arch_vcpu_exec(CPUState *); + struct hvf_sw_breakpoint { vaddr pc; vaddr saved_insn; diff --git a/accel/hvf/hvf-accel-ops.c b/accel/hvf/hvf-accel-ops.c index 4ba3e40831f..c1415b0949a 100644 --- a/accel/hvf/hvf-accel-ops.c +++ b/accel/hvf/hvf-accel-ops.c @@ -194,7 +194,7 @@ static void *hvf_cpu_thread_fn(void *arg) do { qemu_wait_io_event(cpu); if (cpu_can_run(cpu)) { - r =3D hvf_vcpu_exec(cpu); + r =3D hvf_arch_vcpu_exec(cpu); if (r =3D=3D EXCP_DEBUG) { cpu_handle_guest_debug(cpu); } diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 1b59cc0eb04..7427ac240fb 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -1912,7 +1912,7 @@ static void hvf_sync_vtimer(CPUState *cpu) } } =20 -int hvf_vcpu_exec(CPUState *cpu) +int hvf_arch_vcpu_exec(CPUState *cpu) { ARMCPU *arm_cpu =3D ARM_CPU(cpu); CPUARMState *env =3D &arm_cpu->env; diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c index 8445cadecec..15f79e523e6 100644 --- a/target/i386/hvf/hvf.c +++ b/target/i386/hvf/hvf.c @@ -721,7 +721,7 @@ void hvf_simulate_wrmsr(CPUState *cs) printf("write msr %llx\n", RCX(cs));*/ } =20 -int hvf_vcpu_exec(CPUState *cpu) +int hvf_arch_vcpu_exec(CPUState *cpu) { X86CPU *x86_cpu =3D X86_CPU(cpu); CPUX86State *env =3D &x86_cpu->env; --=20 2.51.0 From nobody Sat Sep 6 14:44:48 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1756894158; cv=none; d=zohomail.com; s=zohoarc; b=fYokuqXY2VjYUCKee4a+ufIPm7ebTS/pVliM2lxXR4dRqoLjbXEFEPYKrX4fxVPepulzFFB1bGMFj4AsaDbyXk8wL87tO/OD9qrrDOz6RbOlAu4OpDEAgQ53if4XTc2vv9+bikNPtjyNej8tJTFEsfp2qkEj7hJBKzsQsa9r7D8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756894158; 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=6xIKx74hKoGIgNHpZV/Ej5B/b/1PDyxWy9u19GsHuyM=; b=i4xLaDDRmeDMp9H8Pb/rUkhDOGiEa8FlWa5xyixuJ8etTHWBDZfToTxmEbTf6DiOWZQu+lE9Yzm31u4J68kja9Ym30OHN7TYlh5QVoDbsbbiumASrEqtdcUicyZtTz1bUaJNr62XexhjGmYFfDtfORfU/ypNaXYJbwqtyP4Y7+k= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1756894158206626.646499538801; Wed, 3 Sep 2025 03:09:18 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1utkPk-0008PU-1W; Wed, 03 Sep 2025 06:08:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1utkPc-0008G6-Ea for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:08:20 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1utkPY-0008CU-E1 for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:08:18 -0400 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-45b7d485173so39281895e9.0 for ; Wed, 03 Sep 2025 03:08:16 -0700 (PDT) Received: from localhost.localdomain (98.red-88-29-180.dynamicip.rima-tde.net. [88.29.180.98]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45b7e7fec07sm228060375e9.10.2025.09.03.03.08.12 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 03 Sep 2025 03:08:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1756894094; x=1757498894; 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=6xIKx74hKoGIgNHpZV/Ej5B/b/1PDyxWy9u19GsHuyM=; b=tn23gcsBtoxiagMEjYKXp8jURsflucEM4kbXl9TyMQko9ugNdZv1VOMRp+4ZNKjGtr a57zM+V/2R0koSC3yTBPYmlGCVMmeMMRnjMtHbuL/dhwIH7skz2puaWl3FEZi6Av4pvR uMup6vGcKE+14rOHQaIR/Ea+3IGnMTyWQ1s4siBns6SK5E/SJKQATDlG2ABoHhJBUu67 n32DDyE9MfrOYgUoLhQREzxkQlE08e4/Oog6PI8fyVNb0Vycoh9GPb1J+cTIjmhs037f zeSZ2PwZqe4mU4/0i8jhRwJmr+h9vqSLLDxpOr1MnzmksF5JUf+n6soXTrQ6jMBi+9WV fMOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756894094; x=1757498894; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6xIKx74hKoGIgNHpZV/Ej5B/b/1PDyxWy9u19GsHuyM=; b=tdS9NYCg23ljXC9nudXTa6mM8Yp+wDFFPvZYMCvf9uAgYpSj5IQJTM1nSR6fMC9iUE cN83/F7akLUa0iNXH4uVVLBxra+FSobRZE3lMUVGIukx+OsdIjXfsGfAS6pyto3wTr7+ LDI9cOPHBZztO3Fj5vtWwfIpQmyR4hHgYprkBn+N/4cb/7/OMUQNLL9mAYN1IeTDgduR fddkxEOJb3HwfDCTZJhdnjGlXeulOL/qWTo3IXJ5J3t445Kbqtq3tQz8uIsIBAz3gR1O 415zhB5XJutIxZ3eZr8gStLdAJituCmGYuH8ZoI9/4Ls2fwMvMX78ErXwU2YnOYSLH9+ JYgg== X-Gm-Message-State: AOJu0YypwiiRBwxOCuy0ZgoiikXcG+F6N0Y5QZ4VklT+2WAhEw5exeDR ZG9T59UgBv1qwHtUp9T8r0PzchhMUBdgAL5VwrIeseYchqqn7XLwvkicLaeVys+Rp3bhxC0YmHQ jgVR0/5I= X-Gm-Gg: ASbGnculZF8nYE21CDeUa9u88WAKkwH/3TiqRr5gAZUhlZ7cf3rrAbIIGpvxk460Y8v hD/fIwZTeLgD1Xm8Db/dMtF9yaaM2P3ANMaLoc/LYtLzNT+MlvjfMfaqJ+LVq+ZiBlvrB4n4Bl9 CCb4E+FzgyKT05tfbPxXMTVF3qAi1kx2YS2tB/Y7Ax82FvxwiuOZWDRWDjpGCWm3dkxBPPFkPVf 4Y87Quclhk/yrjZPoR6PUMxQ3dOHvKEhy6xsk+6M9qkrSS296skZLar8qBGnWebwnfOgRUR1Fpv KJfXR5eVLBT8QsmqC7Fz7FpXMtuWPZKAStdrsQczCs3zLfGxaJldNsXbDMf8sdSFurv6Q0Nu69H 7pmDmNYAujqejw2naszjyQ3uPuVVGk8/5Y2JYJf9ytaQZKpk/OY3s3gy4s1MiUCnrLNST+J6s9j giTzxUgjLismU8HIxZ X-Google-Smtp-Source: AGHT+IH1mwV8Reth6QfjA32CG0rSB2IBb1Npxe6WxFKeltdz4jD4dGafLAxcotUYeu1Kwmzct1QW0w== X-Received: by 2002:a05:600c:c48f:b0:45b:71ac:b45a with SMTP id 5b1f17b1804b1-45b85533650mr116086415e9.11.1756894094370; Wed, 03 Sep 2025 03:08:14 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexander Graf , Richard Henderson , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Mads Ynddal , Phil Dennis-Jordan , Stefan Hajnoczi , Cameron Esfahani , Roman Bolshakov , Paolo Bonzini Subject: [PATCH 05/24] accel/hvf: Rename hvf_put|get_registers -> hvf_arch_put|get_registers Date: Wed, 3 Sep 2025 12:06:41 +0200 Message-ID: <20250903100702.16726-6-philmd@linaro.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250903100702.16726-1-philmd@linaro.org> References: <20250903100702.16726-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=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: 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 @linaro.org) X-ZM-MESSAGEID: 1756894160142116600 hvf_put_registers() and hvf_get_registers() are implemented per target, rename them using the 'hvf_arch_' prefix following the per target pattern. Since they call hv_vcpu_set_reg() / hv_vcpu_get_reg(), mention they must be called on the vCPU. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- include/system/hvf_int.h | 6 ++++-- accel/hvf/hvf-accel-ops.c | 2 +- target/arm/hvf/hvf.c | 8 +++++--- target/i386/hvf/hvf.c | 2 +- target/i386/hvf/x86hvf.c | 4 ++-- 5 files changed, 13 insertions(+), 9 deletions(-) diff --git a/include/system/hvf_int.h b/include/system/hvf_int.h index 32b32e1d024..8fce627b08c 100644 --- a/include/system/hvf_int.h +++ b/include/system/hvf_int.h @@ -74,12 +74,14 @@ hv_return_t hvf_arch_vm_create(MachineState *ms, uint32= _t pa_range); int hvf_arch_init_vcpu(CPUState *cpu); void hvf_arch_vcpu_destroy(CPUState *cpu); hvf_slot *hvf_find_overlap_slot(uint64_t, uint64_t); -int hvf_put_registers(CPUState *); -int hvf_get_registers(CPUState *); void hvf_kick_vcpu_thread(CPUState *cpu); =20 /* Must be called by the owning thread */ int hvf_arch_vcpu_exec(CPUState *); +/* Must be called by the owning thread */ +int hvf_arch_put_registers(CPUState *); +/* Must be called by the owning thread */ +int hvf_arch_get_registers(CPUState *); =20 struct hvf_sw_breakpoint { vaddr pc; diff --git a/accel/hvf/hvf-accel-ops.c b/accel/hvf/hvf-accel-ops.c index c1415b0949a..b6b7b462144 100644 --- a/accel/hvf/hvf-accel-ops.c +++ b/accel/hvf/hvf-accel-ops.c @@ -81,7 +81,7 @@ hvf_slot *hvf_find_overlap_slot(uint64_t start, uint64_t = size) static void do_hvf_cpu_synchronize_state(CPUState *cpu, run_on_cpu_data ar= g) { if (!cpu->vcpu_dirty) { - hvf_get_registers(cpu); + hvf_arch_get_registers(cpu); cpu->vcpu_dirty =3D true; } } diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 7427ac240fb..21002f419f5 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -549,7 +549,7 @@ static struct hvf_sreg_match hvf_sreg_match[] =3D { { HV_SYS_REG_SP_EL1, HVF_SYSREG(4, 1, 3, 4, 0) }, }; =20 -int hvf_get_registers(CPUState *cpu) +int hvf_arch_get_registers(CPUState *cpu) { ARMCPU *arm_cpu =3D ARM_CPU(cpu); CPUARMState *env =3D &arm_cpu->env; @@ -688,7 +688,7 @@ int hvf_get_registers(CPUState *cpu) return 0; } =20 -int hvf_put_registers(CPUState *cpu) +int hvf_arch_put_registers(CPUState *cpu) { ARMCPU *arm_cpu =3D ARM_CPU(cpu); CPUARMState *env =3D &arm_cpu->env; @@ -817,11 +817,12 @@ int hvf_put_registers(CPUState *cpu) static void flush_cpu_state(CPUState *cpu) { if (cpu->vcpu_dirty) { - hvf_put_registers(cpu); + hvf_arch_put_registers(cpu); cpu->vcpu_dirty =3D false; } } =20 +/* Must be called by the owning thread */ static void hvf_set_reg(CPUState *cpu, int rt, uint64_t val) { hv_return_t r; @@ -834,6 +835,7 @@ static void hvf_set_reg(CPUState *cpu, int rt, uint64_t= val) } } =20 +/* Must be called by the owning thread */ static uint64_t hvf_get_reg(CPUState *cpu, int rt) { uint64_t val =3D 0; diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c index 15f79e523e6..73c50175048 100644 --- a/target/i386/hvf/hvf.c +++ b/target/i386/hvf/hvf.c @@ -734,7 +734,7 @@ int hvf_arch_vcpu_exec(CPUState *cpu) =20 do { if (cpu->vcpu_dirty) { - hvf_put_registers(cpu); + hvf_arch_put_registers(cpu); cpu->vcpu_dirty =3D false; } =20 diff --git a/target/i386/hvf/x86hvf.c b/target/i386/hvf/x86hvf.c index a502437c303..afcf737759b 100644 --- a/target/i386/hvf/x86hvf.c +++ b/target/i386/hvf/x86hvf.c @@ -236,7 +236,7 @@ void hvf_get_msrs(CPUState *cs) env->tsc =3D rdtscp() + rvmcs(cs->accel->fd, VMCS_TSC_OFFSET); } =20 -int hvf_put_registers(CPUState *cs) +int hvf_arch_put_registers(CPUState *cs) { X86CPU *x86cpu =3D X86_CPU(cs); CPUX86State *env =3D &x86cpu->env; @@ -280,7 +280,7 @@ int hvf_put_registers(CPUState *cs) return 0; } =20 -int hvf_get_registers(CPUState *cs) +int hvf_arch_get_registers(CPUState *cs) { X86CPU *x86cpu =3D X86_CPU(cs); CPUX86State *env =3D &x86cpu->env; --=20 2.51.0 From nobody Sat Sep 6 14:44:48 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1756894164; cv=none; d=zohomail.com; s=zohoarc; b=PgQ9TYqUuta7orgYanJSAF3taBnoVQ/fm8Myeu5YbR5X6xaTgBNkEsTrI4TPSGevn4xOiqeNQ8AzEZw7vny7e1pbVQ6Mjs728VsOelhkblN9b9Icde0h4ryjiqzx5K9HzXTSY0+bXEVFVOrvIwWy+gKTyHD27hSD/M1MBxXIkag= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756894164; 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=WcDycBA98iC96XL5mALM8orqALEyJbh9hu7aJGRuIUw=; b=KApD6Ca4irQQJX23Myi/3EeaGZcyEQ/U2Uj96boc5q0TzbqNh+Uv38W+TscRHKe9WE3mztxjF3SvBB5NpGcBCE3Et6rE/dtabrXDg4Iw9ODHjzQpPS+py02AVZs7KLNOht+d6a1uZHCdbNH9dokBEjLUcbBoytp3mLv0DUdPDzw= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1756894164017970.1844812205284; Wed, 3 Sep 2025 03:09:24 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1utkPk-0008QS-Ul; Wed, 03 Sep 2025 06:08:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1utkPi-0008LC-3u for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:08:26 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1utkPg-0008Dg-CT for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:08:25 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-45b79ec2fbeso42995855e9.3 for ; Wed, 03 Sep 2025 03:08:23 -0700 (PDT) Received: from localhost.localdomain (98.red-88-29-180.dynamicip.rima-tde.net. [88.29.180.98]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45b87abc740sm168190995e9.7.2025.09.03.03.08.19 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 03 Sep 2025 03:08:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1756894102; x=1757498902; 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=WcDycBA98iC96XL5mALM8orqALEyJbh9hu7aJGRuIUw=; b=coBGjxyijVy/G5ySeyO0UoxxhDrD9tbRH3qg8q9laj/sEAC3/iI3TwmPteyimw5KhA 4tYh7Y2lhL/4WBtTFIr76FkqZGW5dGoZZkvmpubFmoCIi+iXs9TFko9yCm7urtDycusc 9Ug1o/TOBZb5jUfmxzeikf1G036vBou6QTM9RVFOQN5XeDtTJYlip2ZCvOYsxjGJ7psO dgRHRvoJnlj9YFaC15vulwxedPbxzY5UREGSWsDvymbQ6kiR343E0RWWrPNYqQ+YwYvD Rqj07R9DlibnVyavnw2uK+wh7uRnDE8T3VD4fgiJQ2IlFvQjHSq6yBdRUDFB5k6x/0Hx PFMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756894102; x=1757498902; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WcDycBA98iC96XL5mALM8orqALEyJbh9hu7aJGRuIUw=; b=MSL1jddqBIW+VuvXpPxxt46GUR/21KBvHgOQ1z0Jyz03UX7oj1v9Yg4/B1CWs6JQ1+ KgUyyQog9xJ2qI7z3eT1giP3Z7cxiFUp3QYOlfqEMvzNiHCDQSNfjeWlspDhfJwpZudB CaICTpW/VC4ubKODKRAmaO/bOdp08uohm9PL/vuxQDJ51yLrIcWA1CDX6KC9JIeBa/cI c8CdGIE3BoTUPPIiXo5OVF7cz17pFZObmQ5svcZSDkhjuQYx2p0oTZC7XKDKxVKgolRT c0bHT1PjmwB4ynRj5oaWWqVYVv/1Ixzdkxx99UNvfFdn4wLJ1VSMOG8skI5BKuPPUTFG xKbQ== X-Gm-Message-State: AOJu0YzArA199j8kO33i6qZ8UHYR0s2u4BufrHa3x1bjiwNYCg0P5qmt +DkIMP5wTPHCKAMz1zkRg/lbiMlAEKDT8Aa5cZIeutZDTZBzfA+yuzn1v7X4+RBls3YryTDxc0P HFRjeq2A= X-Gm-Gg: ASbGncvnppCS+SV8aaNrHTOE2AlfBQ5JRGT/+S9szw3tFuieyAC83UkK/nr02t+gwcI SGEo9ocClea0R8EIapgsA21CijhoqoD4JGR28wiADXPn0FM7qsrLkHsPp9lomWJTwpjXN8wXt59 ob4cRKpdy59rJUjsrZaFptJD+PT4xHMc2HcYj21Imfn+Scp5uyS84FEvDXdqM3EEgjDWplNFlJi f27b6dEq9Nm95FEJvYfFjmy5SQ3me8tfXxicp1qmpTkIf7p6MXNHEHQdPVS8UbEfSaKmn0itbxj /2LkHXzwOgiR2KclFM25DGK6Gu4i85yUAErTAl5Dn0k4IcTMdG+YIy1VoBkpIqb/dEXzQsGw1H5 ZzLpoaxD8hLMCHHBz98IN5SkVQf2EycQKoURF2Q1yk24mZx0WAtO9Y/QuuEMcuWKs0vFMSx/1PT Ki5dEl6w== X-Google-Smtp-Source: AGHT+IGhtpuKzPtrGO8wqDqzfI4uI4n77KDn1AGnJ9MQg6iG9Ouc2B1r0+XLR6JZlmcG04oDChLirg== X-Received: by 2002:a05:600c:1f1a:b0:456:1560:7c5f with SMTP id 5b1f17b1804b1-45b8554f88fmr108256385e9.14.1756894101036; Wed, 03 Sep 2025 03:08:21 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexander Graf , Richard Henderson , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Mads Ynddal , Phil Dennis-Jordan , Stefan Hajnoczi , Cameron Esfahani , Roman Bolshakov , Paolo Bonzini Subject: [PATCH 06/24] target/arm/hvf: Mention flush_cpu_state() must run on vCPU thread Date: Wed, 3 Sep 2025 12:06:42 +0200 Message-ID: <20250903100702.16726-7-philmd@linaro.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250903100702.16726-1-philmd@linaro.org> References: <20250903100702.16726-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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 @linaro.org) X-ZM-MESSAGEID: 1756894167223124100 Since flush_cpu_state() calls hvf_arch_put_registers(), which must run on a vCPU, it also must. Mention it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/arm/hvf/hvf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 21002f419f5..58934953c4a 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -814,6 +814,7 @@ int hvf_arch_put_registers(CPUState *cpu) return 0; } =20 +/* Must be called by the owning thread */ static void flush_cpu_state(CPUState *cpu) { if (cpu->vcpu_dirty) { --=20 2.51.0 From nobody Sat Sep 6 14:44:48 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1756894144; cv=none; d=zohomail.com; s=zohoarc; b=iY771diO3klybPPftGbI/axwHLO5rWBrSbIFAp6u7PxY+K8obn0LZA7W8IPagTVzny1Ziep3mwQXTMf5z4xR0KwM7k6sDycaxJeMrWeJSMqOPUdib5jS2U+/cha+OzzT/G82E17s1YpArBe/k4VBapSnkm7StfdNmcEw7waRH9I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756894144; 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=mfBUeAUwt+eqp/pj/TWibPsbie+q9qDh7Zc332DV0wI=; b=QDh9s5NKVnIDpz/HM97P2I/oDgU9jrZ47bPBjvNj40G6xueK8NMfze2v8o6Pb5QDVobKACwHxKHyvjtdMcQ2LMtMKW2tLfXd8mzhagR7otn2aQkKoIhrDlu1ZLFUQ3S56jYl0xhAj47uxLhayj6Dx3vTkAHbZB475WTSYD5uykI= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1756894144671230.02610058645712; Wed, 3 Sep 2025 03:09:04 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1utkPq-0000L9-AX; Wed, 03 Sep 2025 06:08:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1utkPo-0000B5-BI for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:08:32 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1utkPl-0008Eg-Lm for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:08:32 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-45b8b1a104cso30190735e9.2 for ; Wed, 03 Sep 2025 03:08:29 -0700 (PDT) Received: from localhost.localdomain (98.red-88-29-180.dynamicip.rima-tde.net. [88.29.180.98]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45b813816desm127741245e9.4.2025.09.03.03.08.25 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 03 Sep 2025 03:08:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1756894108; x=1757498908; 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=mfBUeAUwt+eqp/pj/TWibPsbie+q9qDh7Zc332DV0wI=; b=vkx1hRVVGa0hhjDY36JQG6H0nLZcViTlkd4yR37B1dOE3AWYPzc7CEmx7uL2cStfck 15zEoqRPuGmD9GqE+WayQojeMR5I/yFO99wLLITXIKzHfylJkJudwh6E0QCY6Lnd67XI j/BlDGBM5IoL/TINw7sguIDmmYI2EwgpjFmSaOgOK4EiPJFgcaTcjb0LD8XKwJeXUDON pPaNpKoZrBidEKQJXkjy7ufxhcUIKrbN/3WbAZN6B5wM1R6wyeSkjvvIhNkrmOJ3Imo7 LqVUqnjkDG2OwRb94xRz5I7IyzumBSjGH1/ewonfnrj2OQv8T/SV+/U5Yj5GrbWz5Avy DaWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756894108; x=1757498908; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mfBUeAUwt+eqp/pj/TWibPsbie+q9qDh7Zc332DV0wI=; b=UmIr1O9nBkJCmYVZ4RAY0BOpG2XNXmTjKOJLBAhzjUtj9fzgKdP9w5lY4qGTuoBxHa D2SQYKGQhlKFUHwKuGqVh23DOKhHS1dOH3pxhaUW8Ntc8ik6dIsc6w66mpZfeuwcjoSE lbjfYzwJnEYkOYQHskIjQBeqcnYysZM/vn6hokV2TOtdK8Qa8cDxwbT+X0ULLsVHeCwG 6qWmKN/lRWS4zR54XOITOliA6p+eVnxd1A8YfXL1KbqCFW/nZXwZkldnJTZ+EqRDJjrc vUCDHG6mMzDgBLbjYGdY/3q2/AYqTgQOiRa+oQJbFJhaSTopEdabNQHiv2X79KichQd7 pHQA== X-Gm-Message-State: AOJu0Yw1ocEakBAho1ECOgKu+c6YphsmK7Xnfv2V9+TZE8FapQyXCpaQ RTMrbzwt1P1XkSYkQI9k4q8McV3z773nkSkCZosATZCSHzeE3wCNVGSwfOv3BkuHISYpfkW14kr 5juxT7gs= X-Gm-Gg: ASbGncshHmu9hBnNTHk8Y1KdcD7eS4B/u8Ub+QKeT4bNmpRewR34I8XcWXL3uV8+7IE HSPPRkCxfCFC7tFW2veNBQkz3hdytcwPj0hykmC7C1ALBhsUHoZA5Mn+cNg+ncPxs3qTgiKaIYe iB+l4XvHQugYqg4nE2tnx+/25pCqKTUFSlenzYbk0cLa/kH4yqHOXaKVsBY6Dj5JcF/YQ03dlPj 958dEI0eYSVe4Lso7SAOqx4J6ZkgDE+SGy6hACFB5GB9lC9SXqLBK2cNPpvZbkyXtALDmpWsLPM HFoDvS4MSin9eujZyEkQre1WLbAXhMM5ex7HUsO8inaLm4vRqKj7ctfLFRzyOFtNXsAtAmcjvsC B9xiluZ9pzMfgdiKYu2VLoKc55esoslBtQoA1cNwDejK6b10kQpcXy2eKYekZYaO8RnzAgdgnlw lRx5SIKw== X-Google-Smtp-Source: AGHT+IHrZQWslXtIwFReCRNiCOlC1Ec2aBaEU1WWclLbkENvnuPBMNYygSJuQ75rsyGcP9LSqcQnNA== X-Received: by 2002:a05:600c:5486:b0:45b:8d2a:cd09 with SMTP id 5b1f17b1804b1-45b9bd607a7mr34954755e9.13.1756894107799; Wed, 03 Sep 2025 03:08:27 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexander Graf , Richard Henderson , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Mads Ynddal , Phil Dennis-Jordan , Stefan Hajnoczi , Cameron Esfahani , Roman Bolshakov , Paolo Bonzini Subject: [PATCH 07/24] accel/hvf: Mention hvf_arch_init_vcpu() must run on vCPU thread Date: Wed, 3 Sep 2025 12:06:43 +0200 Message-ID: <20250903100702.16726-8-philmd@linaro.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250903100702.16726-1-philmd@linaro.org> References: <20250903100702.16726-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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 @linaro.org) X-ZM-MESSAGEID: 1756894145891116600 hvf_arch_init_vcpu(), along with hvf_put_guest_debug_registers() and hvf_put_gdbstub_debug_registers(), calls hv_vcpu_set_sys_reg(), which must run on a vCPU. Mention they also must. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- include/system/hvf_int.h | 3 ++- target/arm/hvf/hvf.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/system/hvf_int.h b/include/system/hvf_int.h index 8fce627b08c..0c335facc3b 100644 --- a/include/system/hvf_int.h +++ b/include/system/hvf_int.h @@ -71,11 +71,12 @@ void assert_hvf_ok_impl(hv_return_t ret, const char *fi= le, unsigned int line, const char *hvf_return_string(hv_return_t ret); int hvf_arch_init(void); hv_return_t hvf_arch_vm_create(MachineState *ms, uint32_t pa_range); -int hvf_arch_init_vcpu(CPUState *cpu); void hvf_arch_vcpu_destroy(CPUState *cpu); hvf_slot *hvf_find_overlap_slot(uint64_t, uint64_t); void hvf_kick_vcpu_thread(CPUState *cpu); =20 +/* Must be called by the owning thread */ +int hvf_arch_init_vcpu(CPUState *cpu); /* Must be called by the owning thread */ int hvf_arch_vcpu_exec(CPUState *); /* Must be called by the owning thread */ diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 58934953c4a..d87a41bcc53 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -2244,6 +2244,7 @@ void hvf_arch_remove_all_hw_breakpoints(void) * consists of all hardware breakpoints and watchpoints inserted so far wh= ile * debugging the guest. */ +/* Must be called by the owning thread */ static void hvf_put_gdbstub_debug_registers(CPUState *cpu) { hv_return_t r =3D HV_SUCCESS; @@ -2282,6 +2283,7 @@ static void hvf_put_gdbstub_debug_registers(CPUState = *cpu) * Update the vCPU with the guest's view of debug registers. This view is = kept * in the environment at all times. */ +/* Must be called by the owning thread */ static void hvf_put_guest_debug_registers(CPUState *cpu) { ARMCPU *arm_cpu =3D ARM_CPU(cpu); --=20 2.51.0 From nobody Sat Sep 6 14:44:48 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1756894126; cv=none; d=zohomail.com; s=zohoarc; b=lXGnOK1+bQnPLgjAHEu4CLS+dc66BQj9AQVcjo6sVRPEZlwMKSXg0sQBE7+ymNZeaF90bq3rvjVi8fGDG9jyk61za9yhYNrh/NKsZGQ7CLzxxOOhYfscvvl0Ve+r18xWYv6vaqX7oE3BblI4xajcn3GWnV6WcDXnHt8LoW1dBBE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756894126; 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=KoGPe698wbL5728zFyk/gVxD2Onbdb37DNEf41ttDwM=; b=hhBBDe5GYfcmDOuOJWx5M2TtQYv7GayZOqT26KwwvaFI0PKKkp4wAR66BscMKckHHRGRQfM+GAVk7g9t13BFCuM/IhsJ0YzgHP/d6aL+0VuMfXb26jbH2+aJOGW5BV2G02QX+Xg676Pvk4ITnu+KSc0owfd0DzxzepEg+DGINqY= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1756894126933286.0248065958326; Wed, 3 Sep 2025 03:08:46 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1utkPw-0000jj-G7; Wed, 03 Sep 2025 06:08:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1utkPu-0000dm-Rj for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:08:39 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1utkPt-0008Fy-99 for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:08:38 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-45b7d87b90fso8274295e9.0 for ; Wed, 03 Sep 2025 03:08:36 -0700 (PDT) Received: from localhost.localdomain (98.red-88-29-180.dynamicip.rima-tde.net. [88.29.180.98]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3d690f2edf1sm12372871f8f.16.2025.09.03.03.08.32 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 03 Sep 2025 03:08:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1756894115; x=1757498915; 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=KoGPe698wbL5728zFyk/gVxD2Onbdb37DNEf41ttDwM=; b=EPcfMr/tQhRmIEx4Ohn7g8EQCfZfJdJfB4kZUtpEk70yzSXguVMz7LblUy8toNv8rJ iRDyhasepTJhj9mxlj1foSfenH5pVYFYPIsDI4AJUgc+/vAuevXDK+SzgidscP6SSBfl TefUk9ushSi+cEtLzNq1K3745Qy4z6I6qcPxtNzrKqXKowrZ7E0IEqgmpO2zR1BVHBnU U7WU1u25/mLRZHwT9AubzIMQtdU27YXouoR3KjIXQf84ChxT3eHdrn2MidVqKRtufzru FKprQmF435NyreG5xk1Ph5iNFF+qMtP4cwgLjtY4uXZDIPhQp+8dI6AqenNeIntwREjq 4wcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756894115; x=1757498915; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KoGPe698wbL5728zFyk/gVxD2Onbdb37DNEf41ttDwM=; b=YFccF+zzp0IvJE12QOHguMfjVWUVlUxU+nLURqpnsOvyWmEMiWRK9ZMuSnmsf86gfo iTxb/7qwZiO5CP90moYlUCQHZU0EyWjFfMQ1qroa06+yFMn3WIv8h81Ffgm2xJNAL3kW aELCMRCCUv81BqpOzwTImC7A7hE41oEJxXn1LDax34eXD0Yk272LnMvBvDQwdLVaSkoT ugPrOOPHUCrKNcFckJx9TPwKsYodnlClpGAjj18foL8WoyxM8O7oIg5bRM7v29je1aEn rouXDRNl7oXww6tqMkfPXWH5fIrEBkkMAUiUDUDa1kUtxtV7QYp2SpFYj2VtanL7QQVk s7DQ== X-Gm-Message-State: AOJu0Yw2bWeMidgCSYRwhcxatIy5nsUfl7IzezWoFzPdIb4qyaOaSWCf dcPaYgIWq3TkOEldYT1vqZZKvKgLXdkTqXMGvALOFgTcmo5QmSC9t8nJel7bFHNe1pEOqtyK6Bh dkdQCjIdHhw== X-Gm-Gg: ASbGncvfmauxIR/4+k4X2qxDTyyAXGHy4p71B9EQJ5rLZF1tgs3YNv//iTDJqeoJtBh Nq7LwcPj7tQiJuREM6VKN/aJMHoMQrENlcD9iB+Xc0vBQyqgnmBfUIknl9aOQdiCGBJMmof7qUe cxyGE1Ys7C/+b/rw5SeLWoFzVUC+Ioaqq4ApKCl0BOaVuMovT8RTnZRNHglGHDGB6uQijftAG5X oxWNtOZ+KCkWX5XisgarOdrRCA/leq8B2Sd+NOZ4GYh5TQvZnohuEAI0Ok2wHALuZv6EnsiRy0F 4bDQF/mqOpTYhHHx3E23ex1s8d2R3LmyDIK7D0xr4mM6o7/3R6kEIXR5wOGewBZ16K8vhzl2gTr FoSOKLFEzOCcjSENEiwxE2um/wPf7I0OEYlNlUR3HTXwqGPsuG9lTIM1PVFZkGaKckMRm0TRaIt 4vRsaOZqwJQFtmI6Cy X-Google-Smtp-Source: AGHT+IHikBdHwMbExZmGuTsIF9ghl6WPRpyo1sb50H3zEA5DtcAYH+Tee4ZUwUOgN2zm9tff99qG1A== X-Received: by 2002:a05:600c:a30c:b0:459:e002:8b1e with SMTP id 5b1f17b1804b1-45b8c05a036mr76784345e9.13.1756894114782; Wed, 03 Sep 2025 03:08:34 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexander Graf , Richard Henderson , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Mads Ynddal , Phil Dennis-Jordan , Stefan Hajnoczi , Cameron Esfahani , Roman Bolshakov , Paolo Bonzini Subject: [PATCH 08/24] target/arm/hvf: Mention hvf_wfi() must run on vCPU thread Date: Wed, 3 Sep 2025 12:06:44 +0200 Message-ID: <20250903100702.16726-9-philmd@linaro.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250903100702.16726-1-philmd@linaro.org> References: <20250903100702.16726-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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 @linaro.org) X-ZM-MESSAGEID: 1756894128928124100 Since hvf_wfi() calls hv_vcpu_get_sys_reg(), which must run on a vCPU, it also must. Mention it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/hvf/hvf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index d87a41bcc53..05fc591b523 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -1836,6 +1836,7 @@ static void hvf_wait_for_ipi(CPUState *cpu, struct ti= mespec *ts) bql_lock(); } =20 +/* Must be called by the owning thread */ static void hvf_wfi(CPUState *cpu) { ARMCPU *arm_cpu =3D ARM_CPU(cpu); --=20 2.51.0 From nobody Sat Sep 6 14:44:48 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1756894581; cv=none; d=zohomail.com; s=zohoarc; b=AevQ39LpEdbptBg1F9DAoi/VhUum0HxeDlpexscisqffInB/VsQLopiUhql1kRkeU1HBQd7q2ai6bFoVm/rIiYHe+bGRHNt/or0TbCNLoNDD9R6JI7vGCKKEEiXuA1s6zRnIIZwyz9vuInBscMoLVPv/kc8PDAVXcAO6tAOvEmw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756894581; 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=hBqK3PCTcJsYs4YDyMLp+uvoaCcL2zuVRl4bWVmO6DI=; b=XkrW8tP7xUxoENT7GtsQ3GsHtJ4cnFHklfsBcC9nCUC4X1kgYzu8yw2I2vXbv9EuD5DYgMmFOH0UbbAvSAO2XDTfN9kwllvZzcfXbfDt/4BJhNmYLDkCGxjW3uafJq//fgF0Zk/Jr7ULCl7daF8NEzaFkjb4R/7HaG7Vkq5GH5g= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1756894581837782.3672684428859; Wed, 3 Sep 2025 03:16:21 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1utkX6-0008TB-Os; Wed, 03 Sep 2025 06:16:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1utkX2-0008Rj-Jx for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:16:03 -0400 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1utkWv-0002fp-LE for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:15:55 -0400 Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-b042cc3954fso484351066b.0 for ; Wed, 03 Sep 2025 03:15:52 -0700 (PDT) Received: from localhost.localdomain (98.red-88-29-180.dynamicip.rima-tde.net. [88.29.180.98]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3cf33fb9cebsm22884059f8f.46.2025.09.03.03.08.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 03 Sep 2025 03:08:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1756894551; x=1757499351; 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=hBqK3PCTcJsYs4YDyMLp+uvoaCcL2zuVRl4bWVmO6DI=; b=k8suWKvpMC/u9/lyJU3iywXZZSIVG7H8+y8yELh55b6jK81YOMpEeM1UQ093Y5ilbt ktBOOlg1bGkHGRra//ZGRPbGJWu3O+OvFUFOIK8shBcQ5zMyNMJY9PVpg0NQ+SA4cgPL Oe/Uhb6I90WYv8AVqmy/z9c8ok/DFWnWKtPyshA62KBgxO3iHhlvLBTrNWiZljlmkT5/ 3Y9ReP0jpZzITGDUJz4O4KmLRCr4OndmRoAQRgza3tlXkf9xauad7OZyEJIL4YdeZO6X 2YEmcPZ/7+nlAj/8LuGjqGyjpcK0c23dg3c2h3nE1/s3VSBVwNkEmpLAPkXLT7gW9M66 CVJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756894551; x=1757499351; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hBqK3PCTcJsYs4YDyMLp+uvoaCcL2zuVRl4bWVmO6DI=; b=YIgCU27HIVTr/dmq2h5jd0jNIs/OHnOSU13KX7J+NKI1zx8mjcX6/n6mWUw4R4ORMH b5S5vfW99hKHga3t9cx6GnwhF6sX/Do+dqIbyZjYzwvblooDd28OZknOi6hB50CeAv6F UYsIi6pqJHhCIiKFDUVddCoeMgvGh5WhHAohJDRA5EvGBP8JI4EYQPvGkG0XHI/CWxH4 txsWDdAphwz0t5tpNX2Rl6MQMuqtAnHAqR9hco96rRW+xO7KrmUvlXjGRt3kY0kmKZDE 9U4thgYsZQRINKZXtebC+/hjT+CRXzgVmzbRlsqkqsRthaDBzC39tXy8LyGJMVKuXP+L YDFQ== X-Gm-Message-State: AOJu0Yy/ge2zsHHrafa4C5rWFtp9ULxgcgxQN856z65L4uednyvQzBVe MNt3r04fiu384/Gh9MtIrPa5Ot3FdeFUFFv0qCIvo8uhyNJeXVHvZdXpR9CJLzAloYQ+DyHnV/7 04428Xjg= X-Gm-Gg: ASbGncvL5tFVKwsp76Hi5gb8VRhtVOQ5ba3bFo0u7OwGr7U1vdraRvaGFsplp1b0UWE DMzSu6vETLKI1vMDRzvUuTnsSa/i/Cl9DpHdrDRlcN9fkOPYAKyckmp3MGf/EQs5g4PwjwW+ZfX CfcjOQCYYVeYhjozqCL+we2KUhl6OmIGWDOkczsr9W4LWptrKvkbfxm2CINn+g2Okch22W0c16C GSBg4lLIZx2zTb/bcLCIEZ+HEbDCZ98qfnpdSoGE/gnt0VZn/+5cJWfzrNdDPNeM3NGCTbg1DKN poMLr8etXYQelaEQducdPX60/CFExynrvtoBpahwLs4UzA5LFnsJ6ZLMhSgh8qIQbGrcQVHpcfX iYKRI6+RrAbKkIPdRfftFplOGUyLO9uKhp1x74lvkdDydQQAlW9XETswOLVpxvHD9G4NRYcEGA1 iKZc3uiEQR+Hi56VkO X-Google-Smtp-Source: AGHT+IEXvE2yxE0eDhnAD6kxIdMImk21KxggNU91CQLDrZPd5R3xnOfh9naqqPreTPYWWMr0eKNeaw== X-Received: by 2002:a05:6000:1a8e:b0:3dd:26b7:2838 with SMTP id ffacd0b85a97d-3dd26b72bd7mr1317336f8f.4.1756894121345; Wed, 03 Sep 2025 03:08:41 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexander Graf , Richard Henderson , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Mads Ynddal , Phil Dennis-Jordan , Stefan Hajnoczi , Cameron Esfahani , Roman Bolshakov , Paolo Bonzini Subject: [PATCH 09/24] target/arm/hvf: Mention hvf_sync_vtimer() must run on vCPU thread Date: Wed, 3 Sep 2025 12:06:45 +0200 Message-ID: <20250903100702.16726-10-philmd@linaro.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250903100702.16726-1-philmd@linaro.org> References: <20250903100702.16726-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=philmd@linaro.org; helo=mail-ej1-x634.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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 @linaro.org) X-ZM-MESSAGEID: 1756894598770124100 Since hvf_sync_vtimer() calls hv_vcpu_get_sys_reg(), which must run on a vCPU, it also must. Mention it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/hvf/hvf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 05fc591b523..a7e4b869b04 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -1889,6 +1889,7 @@ static void hvf_wfi(CPUState *cpu) hvf_wait_for_ipi(cpu, &ts); } =20 +/* Must be called by the owning thread */ static void hvf_sync_vtimer(CPUState *cpu) { ARMCPU *arm_cpu =3D ARM_CPU(cpu); --=20 2.51.0 From nobody Sat Sep 6 14:44:48 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1756894582; cv=none; d=zohomail.com; s=zohoarc; b=BCX9dr3SWEWX+jIzwopL3U+ifHyAdPGd24Efsvarbljo2eEhMRpTQS8pYx2GdVQgnhaVQTHUrXt+1uM9VbfVna4G8UrMY7K4O211Vm+BSrpsWblWl7e9mE5HJYcsyLTVifGsH8e7V/v/Zk4kwfmJJ1sWEXIL++dgXxRTQzzRtHI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756894582; 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=5XUv2o7XYM3Yj8bVioCcShOQTzM/BJdBEyBoIR/9VMY=; b=CfK2og2v4/tUL2puRpYQ6SR1fWWcOa3yKCg8IRha3M/pnvejR7My/Y+xUQkF+3xOREQBmlnkP4xbyV3tdhmE0oyRigLANwCI+lYJXcU4Tw4fZvyqGim3jmoSZOoNPMNfgtEawi8AUa6cOK9vAk+t/130au4qXw2kdpV+spYYAaQ= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1756894582054194.69565014943817; Wed, 3 Sep 2025 03:16:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1utkX7-0008Tf-CV; Wed, 03 Sep 2025 06:16:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1utkX5-0008SO-LT for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:16:03 -0400 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1utkX1-0002gM-HF for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:16:03 -0400 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-b03fa5c5a89so616287266b.2 for ; Wed, 03 Sep 2025 03:15:56 -0700 (PDT) Received: from localhost.localdomain (98.red-88-29-180.dynamicip.rima-tde.net. [88.29.180.98]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3d701622b92sm11754594f8f.58.2025.09.03.03.08.46 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 03 Sep 2025 03:08:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1756894554; x=1757499354; 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=5XUv2o7XYM3Yj8bVioCcShOQTzM/BJdBEyBoIR/9VMY=; b=JsWw1Sy3k410x3zRvV4ucOhTg5djPkmphhnE+pB0iO3D1UApSYR/RyxuYEu4gOHHt7 vS3SL/lxZAD6aOE+hC3stSzIAhrKO0Vm52QJSPE4MSSRey5STJhqy10cDY4uq8Unyk1o rdrsk/qyq228EVABu7HBtXfeS/ptEdGozjjYekmTYhvgugxmme/D2eqU1O2FAnHPIMd/ ffrvlH/9C3P2W2sDmD70PlPTC4gxg3AAwJP/UFJYGLkZ/n532QNTKdZG0FIZL9+HL2BT ETFXNv23vJL9ZZSCU44ooja8aDD3dC9RdKqTnMWZY848a/CXhpSj5XyAUKguHW7ckykk NXFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756894554; x=1757499354; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5XUv2o7XYM3Yj8bVioCcShOQTzM/BJdBEyBoIR/9VMY=; b=gAOJyg0s3IlUrI3GqptI+TsPgmY68IM2ZvOSJbx6BsE5JbxXzWx50tOKtMlVxVMD8p MH86l+rezpnJrIULGdg4rSS29MPCKskZsPJ1Xiu6A+cEQ1tBblmZF4reV6QYt12Doah4 262bebIMQRErEEnkDyqE3fNSkNQ5DEAkf5dlDWVrf8F/6yUWz1Le5XougCbh1GvidC3o vi0GAEWcOo+ZEEa70iisVF5/4CFMdgzHbTVDINXkqj7TapUYV/WKsNJXXSyFLE/fVv9k SQyAQhB6QNq0dHeNV/B4ETOehqQm84bH5XKF2UzJ7r/WvNPGh9Kdb2sKkCRtlrj5FAkH KiEw== X-Gm-Message-State: AOJu0Yw52Dvn2ycQ9pzXB3TNWn6NOhVXVmIhoH66QzY0hknwcuj8FvCZ T9qMjeGlDBzAGf/X4YMnOB+eoztAy58yrUO0e+LJ/XfHEE+4ih6b4oD+iHrUR1R48yd2XCia3Ee YtBp8sC4= X-Gm-Gg: ASbGncvNSvwxbccpUvHd62DMLAEs9A0SbqF0i7YvY0EsJGrRTp9wb5l5NvmdkYgZzJ2 FuxxAP9mdNM1NtIBy5RWxDEQq0UpfoVMQaJ3L1/jxTa8gltXypyIryIBGv9hVPSfyvDMGkj4nOD Shh8Y+WzmTmiCbGue9lpRABoBAISRIBABgwW8btjQ3F8jYmXIG5r1JzIv2/dEI12iSFzXYnZotp 07nXWDadpFF4DgR9sah4JrMCwZsOLKuKTf6PEjKkxbf0s6GDB/lOQ0B5FPMHcNdZi4D6uEqwypl ssi9sZ82KvcBCdNum6CONPvBkEsZtwOeBMk4NEBTnUm2e1FehDM9PT4ClYSg4Z6zkqucMR+FXeI eA3cGoHQNHuwdM1QTXHCsJjHln7LEx1a91kkHzorNmTAkWYI4c3kn3T09fqYzsMsGM4je85jGbS ZJMLaoPQ== X-Google-Smtp-Source: AGHT+IGKdrRh3wKSM6O6crTgtfB53HxsgLd5T4oN7jiPq7tKuTmdzD00tnwfs9knYbfO/yzbvm349A== X-Received: by 2002:a05:6000:2585:b0:3df:58c5:ef94 with SMTP id ffacd0b85a97d-3df58c6025emr765309f8f.40.1756894127917; Wed, 03 Sep 2025 03:08:47 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexander Graf , Richard Henderson , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Mads Ynddal , Phil Dennis-Jordan , Stefan Hajnoczi , Cameron Esfahani , Roman Bolshakov , Paolo Bonzini Subject: [PATCH 10/24] target/arm/hvf: Mention hvf_arch_set_traps() must run on vCPU thread Date: Wed, 3 Sep 2025 12:06:46 +0200 Message-ID: <20250903100702.16726-11-philmd@linaro.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250903100702.16726-1-philmd@linaro.org> References: <20250903100702.16726-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62e; envelope-from=philmd@linaro.org; helo=mail-ej1-x62e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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 @linaro.org) X-ZM-MESSAGEID: 1756894584812124100 Since hvf_arch_set_traps() calls hv_vcpu_set_trap_debug_exceptions() and hv_vcpu_set_trap_debug_reg_accesses(), which must run on a vCPU, it also must. Mention it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/hvf/hvf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index a7e4b869b04..a9793060579 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -2317,6 +2317,7 @@ static inline bool hvf_arm_hw_debug_active(CPUState *= cpu) return ((cur_hw_wps > 0) || (cur_hw_bps > 0)); } =20 +/* Must be called by the owning thread */ static void hvf_arch_set_traps(CPUState *cpu) { bool should_enable_traps =3D false; --=20 2.51.0 From nobody Sat Sep 6 14:44:48 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1756894191; cv=none; d=zohomail.com; s=zohoarc; b=Cdu5c3eSIVbdb3TOBHdVBw1xy7n7B7JQDiZ869/vuCKdlj1hEG+2CvNzc2OKEGkp3G269Xea10iD83HaVOdgdDosfYcwk4GoXVd5qNgF2dh3MH9EPCGaN77U6RnlM+OIQP+Yt8KmKqdMrVeV1XGJDosM82R27wOxAhBw5FoePe4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756894191; 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=0hJcWTbZNWpRlTWwFb3bqsHmH4PKWMku07t6H1FpspU=; b=OwSnF6t6uv21lqT2EyeK0OBbp/JMStKVHStJgj1TG14CAaUC0gEwEC9Z1u3zs1lSZhZPXUFpv7IVf974X7CatCUWZJqChXui3Se9NQ7QXpf+mtP6Eu4D3t3T1mNU7kgBRdWz1OfEtweqFMLLrYpFiEL33BfCgJ0KCnolNLjJDyk= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1756894191928487.9829065991685; Wed, 3 Sep 2025 03:09:51 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1utkQG-0001hl-3M; Wed, 03 Sep 2025 06:09:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1utkQE-0001Zt-7B for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:08:58 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1utkQC-0008IQ-GS for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:08:57 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-45cb6180b60so2333345e9.0 for ; Wed, 03 Sep 2025 03:08:56 -0700 (PDT) Received: from localhost.localdomain (98.red-88-29-180.dynamicip.rima-tde.net. [88.29.180.98]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45cb619f321sm9982315e9.1.2025.09.03.03.08.52 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 03 Sep 2025 03:08:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1756894135; x=1757498935; 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=0hJcWTbZNWpRlTWwFb3bqsHmH4PKWMku07t6H1FpspU=; b=Lsi9HKvGx5UTBIGULwTZ/LN6vk+sDxTS7xh0UZFYlklpccygh4aOnpSBU6SBOl/6RT 8oMMkTYwaTcee/5PHGnmLwB91owDfrSNP4gfLcx37E+nA102wK88l8u6nAhrGlLOD3iR m1dpV4JTUon+4kkDNOfU51JIhz9kTWbqdyEA5N/ufWDPCsAo9qm6BN9tAEeIf7MzWXs+ hSkKl+z2KZHDNxKTvfMKtrXTLmaF//ywETiPIkKBbU3maKCCbFb+udr1wrm8GoHz8/6j Ps0b40UwdAynTF7vw7WCuSlJT9Dx6D6gFyDXHiS3ITf8Clku3JswEcBng4D0yKZg32en BZlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756894135; x=1757498935; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0hJcWTbZNWpRlTWwFb3bqsHmH4PKWMku07t6H1FpspU=; b=V86tyKMjXEs55OyqMv/yZyq+mHFULuG50+kP5j3f46dR7kMO5VntOQEv1whOLmvjc6 GyKFXECdPtg4GqrQi07eOtLJRlF56SgQr13x4Xyum4gBCLryOI8NGh6m7RvVaeK87S9A Ur12bkWvTnV3vW14n4FaRMwSNCVzFDbFfzkEOyNsuvz3Ne631mXdezhuZxZ52iqlvwzC 0ZnNgg29/Hags/Ewoae6wcm87n0TVmJHfKoCtWEvhgZsQG9xuAET23UUBWKFXQktPXxp Ntno+p0VNEAuafJbCcLSi81cPjkGZ0uuiipdSUXPwXn+BHDfOGNeB/DGWFd64ZSgnOiG FXiw== X-Gm-Message-State: AOJu0Yyy3K+MvN+1G0gZEkCzV5mluyuzLLz5tSGJ6SVSYOqWA5D6bUbJ RczXwlqLGBXgGyrsfV+j1A5SR9e12U73T4ZXXnVjijtFiNFXKfhLCWYQDrdCaqghhettwRltbDA bPN+1tn1Ywg== X-Gm-Gg: ASbGncttQcFkyMHFqBmV1CW3DWYK7EzZVi3O8U3yAeEM3UY5YuE8HHeyCf/TJ8+CJiF WnMIlw+V0fSg6M/fQReZNkwbnU4gm78Qc4gFMfMrKWbQBzlUGHqFomcKKQ6weOibx7wCrUX/zyf pfVviTpUQcNECqz1LqB3/RTGndd1eavWCW1L+aWynGkBIB2isPk25U4KJXI7+E238t4rfy1PdTv yPAicUI8f7htUvUKXwHvsQceAKvzPHOEvIsT/lRY5pvRei/pUb4Y9cLy9O8dBrn37tQkH9EqCgB 3aWr9pSqEnsAz2TjbNGRRxU0wCmOMQwxdRQ4Uunhy2JeXGapqZeR00gniRYpQh5mhwZy2do3FK8 0kU6enXxbm8OOeAO7hV2lheVT9QJCp1cQsZvpyVyeJXTrK2HucCow8CIip9Et21MINSFuuBckAn nN+vIXuw== X-Google-Smtp-Source: AGHT+IHJ2weooLV9lXzOzpv/5FibQGep5h6i2FsMKbl5JvOAlYDlifGXspkVb9JaSIw0knHeVP5dlg== X-Received: by 2002:a05:600c:46c8:b0:450:d386:1afb with SMTP id 5b1f17b1804b1-45b85532ec8mr128525215e9.9.1756894134567; Wed, 03 Sep 2025 03:08:54 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexander Graf , Richard Henderson , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Mads Ynddal , Phil Dennis-Jordan , Stefan Hajnoczi , Cameron Esfahani , Roman Bolshakov , Paolo Bonzini Subject: [PATCH 11/24] accel/hvf: Mention hvf_arch_update_guest_debug() must run on vCPU Date: Wed, 3 Sep 2025 12:06:47 +0200 Message-ID: <20250903100702.16726-12-philmd@linaro.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250903100702.16726-1-philmd@linaro.org> References: <20250903100702.16726-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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 @linaro.org) X-ZM-MESSAGEID: 1756894193813124100 Since hvf_arch_update_guest_debug() calls hvf_arch_set_traps() and hvf_arch_update_guest_debug(), which must run on a vCPU, it also must. Mention it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/system/hvf_int.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/system/hvf_int.h b/include/system/hvf_int.h index 0c335facc3b..241c668795e 100644 --- a/include/system/hvf_int.h +++ b/include/system/hvf_int.h @@ -83,6 +83,8 @@ int hvf_arch_vcpu_exec(CPUState *); int hvf_arch_put_registers(CPUState *); /* Must be called by the owning thread */ int hvf_arch_get_registers(CPUState *); +/* Must be called by the owning thread */ +void hvf_arch_update_guest_debug(CPUState *cpu); =20 struct hvf_sw_breakpoint { vaddr pc; @@ -109,7 +111,6 @@ void hvf_arch_remove_all_hw_breakpoints(void); * handled by calling down to hvf_arch_update_guest_debug. */ int hvf_update_guest_debug(CPUState *cpu); -void hvf_arch_update_guest_debug(CPUState *cpu); =20 /* * Return whether the guest supports debugging. --=20 2.51.0 From nobody Sat Sep 6 14:44:48 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1756894333; cv=none; d=zohomail.com; s=zohoarc; b=doapX2eCtYZgDTRBBTMaRpMzJIu0SoMnX2yy2JYJHKESvsu8hbJb2NmHP5skWhkjQj2hMOZY7LKPpdGy79TCxYWIqDGS+nzu+V5eDt+GOoIRtgxw6qZaMtp8p1FVtwCaMxHS6wxetoG9V+LUcBrjzBgxHBHWUVeq/WGxW3of7eo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756894333; 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=C1utAIvfVfs8L6dutO06Y5T3knPnxj7CnsEJ7M337wQ=; b=fp9qNdDgQUJQgTZ77yXb1cXsVh2W+max+L2jHuuqyxgFcNFVOWzrwX3WDMfUXG/qzpSNfzKX5o10CVPN9hNujLfulVs7Tw7YzhMvnP+UJ2uULBonoAitq1DOy6pZQ1EJkMJQlTZ9RGF2bQ7X2ihJ9OI6CSrA2n9B6wLY5sR1DE8= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1756894333872494.91327575979165; Wed, 3 Sep 2025 03:12:13 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1utkQN-00024V-2q; Wed, 03 Sep 2025 06:09:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1utkQL-00020l-EN for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:09:05 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1utkQJ-0008Jj-OP for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:09:05 -0400 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-3d3f46e231fso2153645f8f.3 for ; Wed, 03 Sep 2025 03:09:03 -0700 (PDT) Received: from localhost.localdomain (98.red-88-29-180.dynamicip.rima-tde.net. [88.29.180.98]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3d0f85c287fsm21106877f8f.52.2025.09.03.03.08.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 03 Sep 2025 03:09:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1756894142; x=1757498942; 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=C1utAIvfVfs8L6dutO06Y5T3knPnxj7CnsEJ7M337wQ=; b=yt02F2Y0FLaje5O/+gtCSxsBmelC3SCdQZ9rULxg+GLpWSGn2swvTr5+zBZIDA7sFy 7xMMPhBUjWSuOD9TtYvnmAaNhpdd8zU9/C5Kv9lBuwLcUP3YDg8fJwJtVxZBNSxsA80I yvDp6iS+5XondE+U4F79r34e67XDie7LIma6lgq0fPcemRBen0KPFZW9NvU5+Gdnh1zA lfXHXS7N8ZdfJ02w/irwQ/L7E1W/s6jDKq0J1xgXc2B2ueWG7xlG/yWPtjGkdHFTbxkS r7a05N8gUfpaFjfB7d2F/EOG/TNgcfd0FNYax+rone14og2SfraQkDJvDKWI7sxXMBXD 0Riw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756894142; x=1757498942; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=C1utAIvfVfs8L6dutO06Y5T3knPnxj7CnsEJ7M337wQ=; b=aA9c7RIC+pjGdIgDrO9yOMY9i7YLAIP1XjT4wWrLyQajptX/KZSmC/tEHFyXUCm9ZC V7ydXq+DCUsBDGPTQIYMgicb3X3Uhxw9SqNvHoZOKjOvAWIph7HlTNgG1lHqKUUHe6Vf /Ia5Yvo99q0hkd4vuw9SBXLb+qlhAiq22XqQcLHwmOl0OAPown4zJ4ajpugi7/2a2AIm l+Ub2m5T14wG7gr8s+y/7d+AG6EPfp6HO1mIW5bTnLaNqTBJRh31fPg9KJ6wfuDfWKM4 SML1r3PqoDoyJJJ4/rIJGhR1AHT6BQqZOFlL7+h91rOVtaStdOi0moMRi1N1Xzs3CD5o ZKsA== X-Gm-Message-State: AOJu0Yz5qO3pvtv+3MjxxJ3GcsJnQpVErHdZDAV8d4iltcX1WfRnKnI8 rEpDqwYpC/49FQMDtcw0Ts2qc9giHS47Rme+eBicjbE0nFLhJywM+2V9OSmt21hvoza1sfIroyA SL2x2StcUQg== X-Gm-Gg: ASbGnct9UVP8vvoD3IkUj6EeakCOP1zp+W/VvpS9rBOXvSpMSA3aeK3T77M9KilqV/n sfGKa+u24/8dDPlWn6cvxcXsPzzp7BU2b32wVlvkzN5h7vD8l+Z63zwT0wI5ogvwMvlxpnywUEq QAwTUH3gmYxGt0ZHcMnIqPVQfsveCdOc6qPHJ+4w9oTXSMgkUnZmGnd0ISUUvOwJN9nthDp2+jd 9szElxvDNBr94ZV0PckMOWFMPJ4QAYoo2+NmyEcXRpNTjsaLsSmyOMLOT1xu71Aa76DX7/VOInE nbIL4wiKvlZTbjC2m2qXVD7Hmn9FA4/vU+J7xfeCXG+BB1qZINLaf+DUeb1a54ZmiTbD953EPIO /2NVjmELmD59JFHINfEEtK7jtn6DFNYgBk3pn3Q840ynGgg3fHRiuEp/2AueMJT42RGjYv1/F/T CkB1LOFQ== X-Google-Smtp-Source: AGHT+IGoftb1nGXPvfDYSp6o6GD/O8juWmGb7TE1EIXEQ2F0ztvvmCDO/+cEWuTz/83cOP2yiw1n4Q== X-Received: by 2002:a05:6000:25ca:b0:3b7:9629:ac9e with SMTP id ffacd0b85a97d-3d1df34d63dmr8950774f8f.50.1756894141649; Wed, 03 Sep 2025 03:09:01 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexander Graf , Richard Henderson , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Mads Ynddal , Phil Dennis-Jordan , Stefan Hajnoczi , Cameron Esfahani , Roman Bolshakov , Paolo Bonzini Subject: [PATCH 12/24] target/arm/hvf: Mention hvf_inject_interrupts() must run on vCPU thread Date: Wed, 3 Sep 2025 12:06:48 +0200 Message-ID: <20250903100702.16726-13-philmd@linaro.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250903100702.16726-1-philmd@linaro.org> References: <20250903100702.16726-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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 @linaro.org) X-ZM-MESSAGEID: 1756894335797116600 Since hvf_inject_interrupts() calls hv_vcpu_set_pending_interrupt(), which must run on a vCPU, it also must. Mention it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/hvf/hvf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index a9793060579..4a535d65b7e 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -1788,6 +1788,7 @@ static int hvf_sysreg_write(CPUState *cpu, uint32_t r= eg, uint64_t val) return 1; } =20 +/* Must be called by the owning thread */ static int hvf_inject_interrupts(CPUState *cpu) { if (cpu_test_interrupt(cpu, CPU_INTERRUPT_FIQ)) { --=20 2.51.0 From nobody Sat Sep 6 14:44:48 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1756894193; cv=none; d=zohomail.com; s=zohoarc; b=ChAy9UoZQgmcJt2eVkfq4YqeUSE0U4tFVrPjn+eoyE5r2aE1zujNcZcLolYxha+XDxejKh3O4PPOB07gbErtCVhTbvoqWvi9gboWcPP9CTnFjxnU2Ux82TJs/SENHBDsvVIebb2A+7RkoSy+T73R19Qbq++rxP1P6rt7HIBL+xw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756894193; 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=bNHTn0KvccVKCZ+jZd0T/OTVPh+oNI/bukFDQhXZRac=; b=m6EZqRHtWt8Vx1Lc9TkD530g5J2MrJx//yw15/7WBPMosl2zeLjMRStfFkgayiqLwRX6Rw8ryQsCWcndYO0XBJ2KbjyEXHWHvJmwgRhAYvO8259ann2xrBpXrT1xrQ4+7DqgjwCPk73SIgV2090BgaUuRE+sDbUbHgpyi9IMo74= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1756894193497902.2895099974758; Wed, 3 Sep 2025 03:09:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1utkQV-0002WV-9L; Wed, 03 Sep 2025 06:09:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1utkQT-0002OA-7X for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:09:13 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1utkQQ-0008LZ-5s for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:09:12 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-45b79ec2fbeso43000595e9.3 for ; Wed, 03 Sep 2025 03:09:09 -0700 (PDT) Received: from localhost.localdomain (98.red-88-29-180.dynamicip.rima-tde.net. [88.29.180.98]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45b6f0c6fe5sm315462575e9.5.2025.09.03.03.09.06 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 03 Sep 2025 03:09:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1756894148; x=1757498948; 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=bNHTn0KvccVKCZ+jZd0T/OTVPh+oNI/bukFDQhXZRac=; b=VgY6Z+sW6ztSsNaLpmFGoisj1W032Qg9f69d0jRBCe3kYAWKmM9YJL3A0jj/xmqOfZ SyB/8jHvAm6I4vCg2bw43HyTdtP5BQcyZ9K3XuDKflfATjD+vf+JW3XKtW93P+8pyIeg 8Ml0b+ehvSgcNSf4AcFsA0OnLMTTVc1Wdf0uKnZGnPwaxGvs0e+UZQc4w0coX027mk9P uaxwW1TKG+ASwIFgcX+8XQKkiVXYymgsfGe67c0frCLMCHPcexCwEb9Aa9joTw7d/xmf IQJv+Hn128B+0+DiuFwylWXJktO6Dik12cg8eGiaWQfZ7VbRyVsbambPHEyyIIaifW8k Sz/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756894148; x=1757498948; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bNHTn0KvccVKCZ+jZd0T/OTVPh+oNI/bukFDQhXZRac=; b=tGRLYZczf3I6TDyiFevZ7H/mD289WJ50wIVsKHzBCedLsk9Zres0PPilVk1oVTczNS 0+SLAYeylzT/v9todKtgBqo9uW7R2qbuLQ8KaO6tnda1Q7On23paEpDIJTm8YJHmw5Ky 1xB25+2irKgkrkfH843rRm3qBaRktT/rCKa+aDDAgUTj/rSd0LXfmQrMAdv5p395Vnjf jSmR/r9kd/TivwCAHmYfnPXt8VUUVhWfj/+9VXgPw1EZ+iXjgZPw827EIJk9w+FCMuHv lL03rkO+MhgMceu9T/pBZu8NWwbKlYVJtaQg6W3cPi+RVBbGYXf8WBT3uErA9OETi5yp wVlw== X-Gm-Message-State: AOJu0YwTWk0pLnQfZM2jItTS7ZoPBAgyIvqwSHnEL7WTIAXzWIgHWegY 6M5M1XyqH0z0CKOlgIvuLDbENM7C6RXlp7/cEDiuxVRjen/25ogm15xFF8AUaBHhDC6e9OXdcDE QxlDZHYgPgw== X-Gm-Gg: ASbGncuHF/Qkqm7QnTLujQvLy3zAglU2srlUCapJo0U0qFf2k7a5wMt8MCYEPu6RrpC 5L17p2OPWQYKRPScctBUBeyRTsjTYc8uLtt0pTj42DFOmJmYOZzndODaDJRNaMAKUAMp/G76we3 xsgreKtx0cI64I21GNQs938jZsbS1NXs0hs8y5qrV/5qEy/8yhFI+kLhJuxmETeDOcqkQanJjvB rGqNosPYK2hZcLMrhgg3eT1HHjps7L19ypwWsqOKPnwth9itSWCWzVGyovf/v1ValEzrvdUxtR6 zK3ffGZ2ca7cBeOChh/8lx9GPISHSCntw9UGA8ozZaMR7/Ke3VHqu2BR/RUaeTHrhABRd1e3fcm /fkKRlsTr4/g+a3kJepqVGp2zdHPuQjDoLKnhNkkZjOEQFsunb1rdZ7yTjj5Kip26YiFadDzlZ4 vo3VFTmw== X-Google-Smtp-Source: AGHT+IGZWM6zf2WfUIGHfOPxKSzZO5fWm8ny9h4ToR2KseI3tsEOcfBuS21Mp8kO1tRF0QbA7MPEXw== X-Received: by 2002:a05:600c:1c15:b0:458:f70d:ebd7 with SMTP id 5b1f17b1804b1-45b9353e81amr52455195e9.20.1756894148288; Wed, 03 Sep 2025 03:09:08 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexander Graf , Richard Henderson , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Mads Ynddal , Phil Dennis-Jordan , Stefan Hajnoczi , Cameron Esfahani , Roman Bolshakov , Paolo Bonzini Subject: [PATCH 13/24] accel/hvf: Implement hvf_arch_vcpu_destroy() Date: Wed, 3 Sep 2025 12:06:49 +0200 Message-ID: <20250903100702.16726-14-philmd@linaro.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250903100702.16726-1-philmd@linaro.org> References: <20250903100702.16726-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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 @linaro.org) X-ZM-MESSAGEID: 1756894195850124100 Call hv_vcpu_destroy() to destroy our vCPU context. As hv_vcpu_destroy() must be called by the owning thread, document hvf_arch_vcpu_destroy() also does. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- include/system/hvf_int.h | 3 ++- target/arm/hvf/hvf.c | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/system/hvf_int.h b/include/system/hvf_int.h index 241c668795e..195d64dcf18 100644 --- a/include/system/hvf_int.h +++ b/include/system/hvf_int.h @@ -71,13 +71,14 @@ void assert_hvf_ok_impl(hv_return_t ret, const char *fi= le, unsigned int line, const char *hvf_return_string(hv_return_t ret); int hvf_arch_init(void); hv_return_t hvf_arch_vm_create(MachineState *ms, uint32_t pa_range); -void hvf_arch_vcpu_destroy(CPUState *cpu); hvf_slot *hvf_find_overlap_slot(uint64_t, uint64_t); void hvf_kick_vcpu_thread(CPUState *cpu); =20 /* Must be called by the owning thread */ int hvf_arch_init_vcpu(CPUState *cpu); /* Must be called by the owning thread */ +void hvf_arch_vcpu_destroy(CPUState *cpu); +/* Must be called by the owning thread */ int hvf_arch_vcpu_exec(CPUState *); /* Must be called by the owning thread */ int hvf_arch_put_registers(CPUState *); diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 4a535d65b7e..5b3c34014a5 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -992,6 +992,10 @@ void hvf_arm_set_cpu_features_from_host(ARMCPU *cpu) =20 void hvf_arch_vcpu_destroy(CPUState *cpu) { + hv_return_t ret; + + ret =3D hv_vcpu_destroy(cpu->accel->fd); + assert_hvf_ok(ret); } =20 hv_return_t hvf_arch_vm_create(MachineState *ms, uint32_t pa_range) --=20 2.51.0 From nobody Sat Sep 6 14:44:48 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1756894279; cv=none; d=zohomail.com; s=zohoarc; b=GLONqS/XEypP3x+N7ZZnkVExU9TetCsoNyUFlPRyZ+OqnRYQJIIWFpzF7JpH/RYT6u0H92V3jSdYU9A0ddWPV7Np/JGLxzQB0uvjZ0vM9FoHd6HLuKhCUV7uqXYgsEsUBOKyzFNY2uDYkxS/rMj6NOBoJ7nVw87EK0u7IEQbiT4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756894279; 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=+9Lub0mG3fK9Mcfaw6km1T4/o3S1e+r00z5qFSzfzT4=; b=LM2nhkbDkhQKirOM28FQ/4LmSkXHGYTY+4oqgzLh5Q0LfyjAfjJPqOR8bUIOVLa9UstH/qVi7FhrIfy7SmfiOEACcJ4yHMcOcVHhz0XdR6LR7MgZ8xmjH2IwGWKFkcVyUXmAxojfTTYYZ1Z9km5NpDvM9e7R/gyJVdeuZKb6Orc= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1756894279782839.2071295957454; Wed, 3 Sep 2025 03:11:19 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1utkQb-0002zC-SC; Wed, 03 Sep 2025 06:09:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1utkQZ-0002oN-4K for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:09:19 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1utkQW-0008Nu-UV for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:09:18 -0400 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-3df35a67434so216970f8f.3 for ; Wed, 03 Sep 2025 03:09:16 -0700 (PDT) Received: from localhost.localdomain (98.red-88-29-180.dynamicip.rima-tde.net. [88.29.180.98]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45b7e8ab14esm254118825e9.21.2025.09.03.03.09.12 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 03 Sep 2025 03:09:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1756894155; x=1757498955; 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=+9Lub0mG3fK9Mcfaw6km1T4/o3S1e+r00z5qFSzfzT4=; b=nS+0CJqD0IYge4vvigSjvvoE7kurW7HA2ybHB0How2UbUVRrz0t480ogMEwDSC4JvB CHHYjZDUiD5k5+alOUmowUXGOwKrMKTeGrCsayQGtccDaoPn9b0WpzavLOFs9isWgiY+ wxgeT40wz+m6upC441a/YCHFFRwR7MP1BSM2l8rcl+bknIU46cOOfdUfrVan2OjIexUi NmqIB8YksXAehiV6GwflSChZYc+VzWR6yNmUXNgAY06vifEk8ovEXK2URJoX7RW1AySZ 5KmhRK3ZXUf0biKSKdCHfHUNe5NwsnVa+iP2pTzqDgll3zwVHpMPKC7r5aOGzqSOvZm4 5KGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756894155; x=1757498955; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+9Lub0mG3fK9Mcfaw6km1T4/o3S1e+r00z5qFSzfzT4=; b=ttvHKQTkUsIF/Kgw2FAFYvpar0NOZ3ABQ62KTVWjs6qxaXddEgm6D6xWAnCFSql6ub EBcdKaXz2beslMvVsK5b++XirO+Kkhs0bKotHgWTVjaQckneIHqhkFWgOtwcwBq9LlJM gY6mYoY05TXNRtx76IYpjNf8rA0Gx8S9SQtXgaxLZMk6yA1xrmrssM3js6sn8DyTw0M/ fU1fVJKIgKEhhREdUdcI825q1/ecf1uKgoKvQg8raDKLakNM5dOxy2U3CyVPinC/xI19 NgL3m2ljB+sgzuZWTYrSib2eKwdQVZBAvEKairTfTxHuA+mXqtIvaf5awWPCgMo7chsg 8JxA== X-Gm-Message-State: AOJu0Yx0anidbspDLBHhUeQXN4ZE6PenH1Cyq7iyF1wJ/+9YHJ0GJ0tV +dvdYl0FVKrHgGDvksKg/y4yUz1cj+c4ck6FYUc/1L5Nq7x2mLvqUGd4IxItBT6h98O3kqy5EzF mcbhshkLbdA== X-Gm-Gg: ASbGncsiIlnuqqVIA/OiCsXxtFmCCVrJJCTM/6+9HkdST2mdHMEqibkcp1JclT8Q0Ej 6krLbsKSAOPoZ5ycreufVrMqMwv3KI7GeEVeBDI4oTBZMHb72hJRd9mddiysLcDt21m79u3doWE 5qVPCGNKgixLfhIfbV6ZT68lGQA/OWXKlHtR4zboCgVrb0/JF/vjMewgdTjDstRgljq42pQ/HU9 IM6rStArYnUybf87FXGuXtzboaVStirXffmFt5GyA2eP1n8dPFZThkqvRuoEv3H5QDMp7iE7YMC NLI+3R2v0wDRjGqQ+KHspj3h5j0aw5VGToJS6vjq/ALLHAmn8Syw2zTny3W+VYJFI7cw9ZmxOY5 9dpISGpVpCNbKgYwV7hkTb9Y/tS7CUWE0De0kLXCTrpCApCvLBeTvlhGXpFAS5jvsQwPdTfl//V 1IFIV8RrVoeckK4Dgg X-Google-Smtp-Source: AGHT+IGF4hIbag1NsKAusk4447qTLxvqZ3JU4x7geZwtSI/vqGI63CV6F3zhhg0ohbVeQ2sqh49LJg== X-Received: by 2002:a05:6000:4210:b0:3d5:9efa:fbf2 with SMTP id ffacd0b85a97d-3d59efaff51mr8566501f8f.22.1756894154694; Wed, 03 Sep 2025 03:09:14 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexander Graf , Richard Henderson , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Mads Ynddal , Phil Dennis-Jordan , Stefan Hajnoczi , Cameron Esfahani , Roman Bolshakov , Paolo Bonzini Subject: [PATCH 14/24] target/arm/hvf: Hardcode Apple MIDR Date: Wed, 3 Sep 2025 12:06:50 +0200 Message-ID: <20250903100702.16726-15-philmd@linaro.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250903100702.16726-1-philmd@linaro.org> References: <20250903100702.16726-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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 @linaro.org) X-ZM-MESSAGEID: 1756894281162116600 From: Mohamed Mediouni Hardcode MIDR because Apple deliberately doesn't expose a divergent MIDR across systems. Signed-off-by: Mohamed Mediouni Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/arm/hvf/hvf.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 5b3c34014a5..3039c0987dc 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -887,6 +887,7 @@ static bool hvf_arm_get_host_cpu_features(ARMHostCPUFea= tures *ahcf) hv_vcpu_t fd; hv_return_t r =3D HV_SUCCESS; hv_vcpu_exit_t *exit; + uint64_t t; int i; =20 ahcf->dtb_compatible =3D "arm,armv8"; @@ -908,6 +909,17 @@ static bool hvf_arm_get_host_cpu_features(ARMHostCPUFe= atures *ahcf) r |=3D hv_vcpu_get_sys_reg(fd, HV_SYS_REG_MIDR_EL1, &ahcf->midr); r |=3D hv_vcpu_destroy(fd); =20 + /* + * Hardcode MIDR because Apple deliberately doesn't expose a divergent + * MIDR across systems. + */ + t =3D FIELD_DP64(0, MIDR_EL1, IMPLEMENTER, 0x61); /* Apple */ + t =3D FIELD_DP64(t, MIDR_EL1, ARCHITECTURE, 0xf); /* v7 or later */ + t =3D FIELD_DP64(t, MIDR_EL1, PARTNUM, 0); + t =3D FIELD_DP64(t, MIDR_EL1, VARIANT, 0); + t =3D FIELD_DP64(t, MIDR_EL1, REVISION, 0); + ahcf->midr =3D t; + clamp_id_aa64mmfr0_parange_to_ipa_size(&host_isar); =20 /* --=20 2.51.0 From nobody Sat Sep 6 14:44:48 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1756894174; cv=none; d=zohomail.com; s=zohoarc; b=GUo4zhfVbSuI1ZD7yhT3y4UQjdX/IZoeEMM4bV2fPdQgBi8aa4dy7cGubQLBvcoR7O8J+QHxQd+G0sfM/cjpSByWnGF83tqwxd7L6G8keQR4T++ormuOW7C8VKJdw1xWzRe4DtgCpljwxG7na6DZYPjC41w+i+0w28RAsSF8C8U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756894174; 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=DAbnTqr7urlPKbd55OQGFVEMN5LG+0p4EnC3m2XGl0s=; b=IMo+FC7HZMash3Zvaf9nvwS6yuu5d6DD+rsNGXpKjFUwYpAruMAcwVVjkJFBgbsT+gzpVlM2ylcUdQE0J+yD89lV/NOUFPqwritaB8jfa0XUHYBCfalRf2bK9DD442YnjKllwSiPFxkr/qdpT8/QYV7c49WduLi1o7GbHSgWNys= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1756894174043470.40502478445876; Wed, 3 Sep 2025 03:09:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1utkQk-0003YJ-Ax; Wed, 03 Sep 2025 06:09:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1utkQh-0003OO-N9 for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:09:27 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1utkQf-0008PF-O2 for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:09:27 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-45cb659e858so2754595e9.2 for ; Wed, 03 Sep 2025 03:09:25 -0700 (PDT) Received: from localhost.localdomain (98.red-88-29-180.dynamicip.rima-tde.net. [88.29.180.98]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45b7e886619sm230819655e9.15.2025.09.03.03.09.19 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 03 Sep 2025 03:09:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1756894164; x=1757498964; 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=DAbnTqr7urlPKbd55OQGFVEMN5LG+0p4EnC3m2XGl0s=; b=Hc78KnHRwgGgFgRPFcrRTkBYMbKGymT240iHb38on5brbWQtD7liFHZzoRZYvHOfST sIJePLuc8qYljJvTDpTwmOm1cm5dIjXJSwVSiyvvDrpn3KcbvTvg6Ojfh9+iP/U5PlYe /y20ImUcGc8nIFlokKbQQumWGZQhRIQJOQU/JF4yqgUPPMu9cViuSMikY9gxeBgNY9QC of4T+NQa+eXQMpHxrB2/UvHOU8/faOLoJdayHLV0VVaPAbHDNdeDNPLo4EZ8V8j0rUAn 5f555KlqTeXMJxgGQjuCFWmWfu/FKe+2gMvcNUwlC7EVOrMjRHP0+AJUO6jRtrDHb2GH 8GCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756894164; x=1757498964; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DAbnTqr7urlPKbd55OQGFVEMN5LG+0p4EnC3m2XGl0s=; b=gzKaQarbBdFKCPy6wev2IyjrF59gwIiCHx9572TjsrhJgw+GZlfBFYl6jswc/PH+rl R15MlseKL0aG40QBCh8kH3hVAwkNQYl+jIRNo6tyPAJdrSqfFH+0cmYtRIbFyu4tw15G 4ODPJajcyGRK6irqMR6IoIC8C7Z7O3TTPIIjOSytLOCDzjL4rDLmLVEG42ReqYnBaIbX 1LpOG3KA3gW7kzJY/QD9YGRa+FfQxRNCHXp0Se9Ggv9FtG6BX5c+Ygl0vFQW8i8/i38G iNFZYkPeBja3DSXX5wfzDxw17uxs+Z+zckC6JAWVFK8nL/DOsyrEd/xd/KMwayo27W9v Pl5g== X-Gm-Message-State: AOJu0YwRTeivp+x2Y7aHMvrxoDQT4EwxlyQyk7c+4JNt2x9YXDYxE0wN tP9xPYP/sZ31AC7Fc7ukh44EwPexmD+/hQkCWPlKbnMKeukCbpAuwsBkVBBSeuUvcEC0SDU9QUG ChBmuLfIUww== X-Gm-Gg: ASbGnctywV1sOgm+6hxA2c1RdGy8SEtmX9v8ur4LaNeH3tQglJIAxbLDezH6Wqe0Ppm Q/VTtWQL8yVzCTjBYnlagUL1f6A5ljhyHTlN02VQ5XY7TNOx3axr9yN1fC5rAoeg+wB6TnAQo4D mnzceJm/61voHxRvWOqZ0C+0CGjKm9unwxgZRpr/cax647vCVdSrXMfMJE5T+stFE0bxdckZiEd O7CDflCQUZkiy4aory3BqVjGHKu8X2U6KtQSSgcfR9f/P98M1lEC5iap6THwv3C8Yzk+gtkbqeN l8Elan6l8DxfhpFCG3N/t92KsWzLY+YycJ8eDDOY/7wy4uv3wKMZmzIZopdwei3L0rm6sPbzBGl aYfH8HWG7DsWJGLoPgiRdyG7IcuPICuZdaWGnE7ETiJk57hfvGNVlQONfw0npYEQZjyD8Yd4rzs 14v0xXSP6EOXZPJMJb X-Google-Smtp-Source: AGHT+IH9EBQxYGmAzbfNSc3Dm9S9kuoWybahIB8kswVh6cEh6kV9F4zeeG1tt3vK9CUL1Ju+NWB5TQ== X-Received: by 2002:a05:600c:6308:b0:45b:8600:2bd5 with SMTP id 5b1f17b1804b1-45b86002d22mr128754975e9.5.1756894161949; Wed, 03 Sep 2025 03:09:21 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexander Graf , Richard Henderson , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Mads Ynddal , Phil Dennis-Jordan , Stefan Hajnoczi , Cameron Esfahani , Roman Bolshakov , Paolo Bonzini Subject: [PATCH 15/24] target/arm/hvf: switch hvf_arm_get_host_cpu_features to not create a vCPU Date: Wed, 3 Sep 2025 12:06:51 +0200 Message-ID: <20250903100702.16726-16-philmd@linaro.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250903100702.16726-1-philmd@linaro.org> References: <20250903100702.16726-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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 @linaro.org) X-ZM-MESSAGEID: 1756894175628124100 From: Mohamed Mediouni Creating a vCPU locks out APIs such as hv_gic_create(). As a result, switch to using the hv_vcpu_config_get_feature_reg interface. Besides, all the following methods must be run on a vCPU thread: - hv_vcpu_create() - hv_vcpu_get_sys_reg() - hv_vcpu_destroy() Signed-off-by: Mohamed Mediouni Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20250808070137.48716-3-mohamed@unpredictable.fr> [PMD: Release config calling os_release()] Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/hvf/hvf.c | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 3039c0987dc..fd209d23c1e 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -869,24 +869,25 @@ static bool hvf_arm_get_host_cpu_features(ARMHostCPUF= eatures *ahcf) { ARMISARegisters host_isar =3D {}; const struct isar_regs { - int reg; + hv_feature_reg_t reg; uint64_t *val; } regs[] =3D { - { HV_SYS_REG_ID_AA64PFR0_EL1, &host_isar.idregs[ID_AA64PFR0_EL1_ID= X] }, - { HV_SYS_REG_ID_AA64PFR1_EL1, &host_isar.idregs[ID_AA64PFR1_EL1_ID= X] }, - { HV_SYS_REG_ID_AA64DFR0_EL1, &host_isar.idregs[ID_AA64DFR0_EL1_ID= X] }, - { HV_SYS_REG_ID_AA64DFR1_EL1, &host_isar.idregs[ID_AA64DFR1_EL1_ID= X] }, - { HV_SYS_REG_ID_AA64ISAR0_EL1, &host_isar.idregs[ID_AA64ISAR0_EL1_= IDX] }, - { HV_SYS_REG_ID_AA64ISAR1_EL1, &host_isar.idregs[ID_AA64ISAR1_EL1_= IDX] }, + { HV_FEATURE_REG_ID_AA64PFR0_EL1, &host_isar.idregs[ID_AA64PFR0_EL= 1_IDX] }, + { HV_FEATURE_REG_ID_AA64PFR1_EL1, &host_isar.idregs[ID_AA64PFR1_EL= 1_IDX] }, + { HV_FEATURE_REG_ID_AA64DFR0_EL1, &host_isar.idregs[ID_AA64DFR0_EL= 1_IDX] }, + { HV_FEATURE_REG_ID_AA64DFR1_EL1, &host_isar.idregs[ID_AA64DFR1_EL= 1_IDX] }, + { HV_FEATURE_REG_ID_AA64ISAR0_EL1, &host_isar.idregs[ID_AA64ISAR0_= EL1_IDX] }, + { HV_FEATURE_REG_ID_AA64ISAR1_EL1, &host_isar.idregs[ID_AA64ISAR1_= EL1_IDX] }, /* Add ID_AA64ISAR2_EL1 here when HVF supports it */ - { HV_SYS_REG_ID_AA64MMFR0_EL1, &host_isar.idregs[ID_AA64MMFR0_EL1_= IDX] }, - { HV_SYS_REG_ID_AA64MMFR1_EL1, &host_isar.idregs[ID_AA64MMFR1_EL1_= IDX] }, - { HV_SYS_REG_ID_AA64MMFR2_EL1, &host_isar.idregs[ID_AA64MMFR2_EL1_= IDX] }, + { HV_FEATURE_REG_ID_AA64MMFR0_EL1, &host_isar.idregs[ID_AA64MMFR0_= EL1_IDX] }, + { HV_FEATURE_REG_ID_AA64MMFR1_EL1, &host_isar.idregs[ID_AA64MMFR1_= EL1_IDX] }, + { HV_FEATURE_REG_ID_AA64MMFR2_EL1, &host_isar.idregs[ID_AA64MMFR2_= EL1_IDX] }, /* Add ID_AA64MMFR3_EL1 here when HVF supports it */ + { HV_FEATURE_REG_CTR_EL0, &host_isar.idregs[CTR_EL0_IDX] }, + { HV_FEATURE_REG_CLIDR_EL1, &host_isar.idregs[CLIDR_EL1_IDX] }, }; - hv_vcpu_t fd; hv_return_t r =3D HV_SUCCESS; - hv_vcpu_exit_t *exit; + hv_vcpu_config_t config =3D hv_vcpu_config_create(); uint64_t t; int i; =20 @@ -897,17 +898,10 @@ static bool hvf_arm_get_host_cpu_features(ARMHostCPUF= eatures *ahcf) (1ULL << ARM_FEATURE_PMU) | (1ULL << ARM_FEATURE_GENERIC_TIMER); =20 - /* We set up a small vcpu to extract host registers */ - - if (hv_vcpu_create(&fd, &exit, NULL) !=3D HV_SUCCESS) { - return false; - } - for (i =3D 0; i < ARRAY_SIZE(regs); i++) { - r |=3D hv_vcpu_get_sys_reg(fd, regs[i].reg, regs[i].val); + r |=3D hv_vcpu_config_get_feature_reg(config, regs[i].reg, regs[i]= .val); } - r |=3D hv_vcpu_get_sys_reg(fd, HV_SYS_REG_MIDR_EL1, &ahcf->midr); - r |=3D hv_vcpu_destroy(fd); + os_release(config); =20 /* * Hardcode MIDR because Apple deliberately doesn't expose a divergent --=20 2.51.0 From nobody Sat Sep 6 14:44:48 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1756894293; cv=none; d=zohomail.com; s=zohoarc; b=EiDSWtOeaRZXFJ+Mucq3uHOsoE0XY8vt/opW5q4pX3rlk/ULQhPoyeY6/62rxQXl+P9CgwTLi7yFyis4G1i4LbJMFYK56swdVomwMjUwRgiSXCvmhSCIkU3+RY/91kufeYSjnS+7UAIqcvorVAc29TBL774JEORz3S9a8eA+qeU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756894293; 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=Xk+PXZY+OrSjxbTyUUyA5YAPF4yrrrJhYOPYVhpA5O0=; b=QbfgydHVibPHdDXu1bgY/YKhEEPzadDBIrIbJA9Bp6Tb+Zr4YJDJ8/WQ1fv24KZQLoGjCuW3m35n7tzJzDZ19VMS61B7xeysOQjPxUNQhVcGACjeV7WsMh8nSVUm0jVjZWvlxq/OCb1F3/x0UWsNCGYP8nJg4yFK4Z2wGFKajxQ= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1756894293618788.5132289174657; Wed, 3 Sep 2025 03:11:33 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1utkQp-0003u8-6e; Wed, 03 Sep 2025 06:09:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1utkQm-0003k0-P7 for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:09:32 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1utkQk-0008Q4-P1 for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:09:32 -0400 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-3d19699240dso506039f8f.1 for ; Wed, 03 Sep 2025 03:09:30 -0700 (PDT) Received: from localhost.localdomain (98.red-88-29-180.dynamicip.rima-tde.net. [88.29.180.98]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3cf33fb9db4sm23044416f8f.47.2025.09.03.03.09.26 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 03 Sep 2025 03:09:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1756894169; x=1757498969; 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=Xk+PXZY+OrSjxbTyUUyA5YAPF4yrrrJhYOPYVhpA5O0=; b=dNv17TQtmJ0yRYB6rGAl7uTFO8JdptIzhMJ/zOrz526eOfswt3cN4wYlUHDyzbKXvA S4CDqhPjc6AdAMzGJusstZsKFHmyROKws1/qpEWOjDMHerCVQVwduuzRV3tmbqvycIAq +7RkSA6PWTJ2fPZN1v2mhIz8+B+0IWppFYeQ3w00Iv5EVcyoFQeBZDAQkkaNmp869dLs w5DKmWD5cLOSKWVPIu4JV1G1T49FmfmjoD6H17IQk6jYDdjrgJHqbp4YyHuNFZeHuCby awL8U6fMpgda5iqqxtWnjb0WoG01GYuqZmtKTi58xXtgzOD7CDqEkud0hf2Nh+eCUr61 vnGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756894169; x=1757498969; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Xk+PXZY+OrSjxbTyUUyA5YAPF4yrrrJhYOPYVhpA5O0=; b=MtSZjljksx7vbZ3cZC0IBTYGftukJae1ClRivMsOoBsqzsK7I0C6AfHZfeUKn4umvF 6HZl8u/rWw6oNqPbbeoMcam/NRLbio3G3hjF0aTTUdlgRKtOD0ggE9GPcROKo9o4thtD y2zCfMemXH46saDTaUzp502WPYkaMmxS8Mm48A2YDv+34dv7fCF6RLqYy98eyCKTQOJe C9rL1A9smTANaBX6+ZzkDa4uMe2m6TRt8XOGR+cdX7AkB0VRcci+Xc2M1b7qEANxdFWX oybQulY3soi+qpipOT1bTadXX023cSJexwjQgn2Pac8N/WoKzZEf2u6339P/YhCeDZqX iUwg== X-Gm-Message-State: AOJu0Yy8WGdhfjMew61Ci+0+3stm2RvOJlPctcQy3e5cG3GcTR9GxAwu njJ7QDwQ7rgnW0lok3P0Jg4rLKAN9dcNYHmebGoW6syV3W2Ne9VNnhqpiPq9V4k3hOZ4KfVGi/g d/9Inb+gW3g== X-Gm-Gg: ASbGncvaD9NaUdC+nQneq7ZZB64REjvOrVmOU791NManBbPag53HBxKAg4JHwmfp12V wyZn77GSsD01wgRrH/1CvWlf3ciJ3JnMZez2AKpRT0doFAn7JP9OV+PMtAF0Zix3mxulj9rBd3R ZV6Q7S0OaN/6ziXjTlB+Sl4HgeuNPQ5lascoC/IUw9pBfVw/OGkHQrc3OFxEZS84txVwXTpz3+w awEZt0Cda6OkObzBvN5SRrJde3/lOtbaNwsA1RVFpVZ2wGCsH5PCl0YOUJtWmnnhDQMOOdqrH71 82hQlc/JOjlIDX4mCjI24qArms63FJXlKNFT/VAE51iXxz8RU2GTMDucfInYTcoR7mTJx3bMJAo xp32bs1ruB3fT1dL1YwlzJytxFaAYVZq5FSppa+XrWcUMOyKMdG7JWVHFE/lGwRjaRW6yaB7RBT S6Km4yLQ== X-Google-Smtp-Source: AGHT+IECavjnrCt4eWovNHrsbc5jQxIYbAKH52HtSTbO27IG9KcuJv52dSkqE+aS1chsEUyFy4lwDg== X-Received: by 2002:a05:6000:1ac8:b0:3c7:244:a4be with SMTP id ffacd0b85a97d-3d1dd04e24bmr13123241f8f.10.1756894168836; Wed, 03 Sep 2025 03:09:28 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexander Graf , Richard Henderson , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Mads Ynddal , Phil Dennis-Jordan , Stefan Hajnoczi , Cameron Esfahani , Roman Bolshakov , Paolo Bonzini Subject: [PATCH 16/24] target/arm/hvf: Factor hvf_handle_exception() out Date: Wed, 3 Sep 2025 12:06:52 +0200 Message-ID: <20250903100702.16726-17-philmd@linaro.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250903100702.16726-1-philmd@linaro.org> References: <20250903100702.16726-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philmd@linaro.org; helo=mail-wr1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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 @linaro.org) X-ZM-MESSAGEID: 1756894295045124100 Factor hvf_handle_exception() out of hvf_vcpu_exec(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/hvf/hvf.c | 120 +++++++++++++++++++++++-------------------- 1 file changed, 64 insertions(+), 56 deletions(-) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index fd209d23c1e..3db0a8e288c 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -1928,61 +1928,16 @@ static void hvf_sync_vtimer(CPUState *cpu) } } =20 -int hvf_arch_vcpu_exec(CPUState *cpu) +/* Must be called by the owning thread */ +static int hvf_handle_exception(CPUState *cpu, hv_vcpu_exit_exception_t *e= xcp) { ARMCPU *arm_cpu =3D ARM_CPU(cpu); CPUARMState *env =3D &arm_cpu->env; - int ret; - hv_vcpu_exit_t *hvf_exit =3D cpu->accel->exit; - hv_return_t r; - bool advance_pc =3D false; - - if (!(cpu->singlestep_enabled & SSTEP_NOIRQ) && - hvf_inject_interrupts(cpu)) { - return EXCP_INTERRUPT; - } - - if (cpu->halted) { - return EXCP_HLT; - } - - flush_cpu_state(cpu); - - bql_unlock(); - r =3D hv_vcpu_run(cpu->accel->fd); - bql_lock(); - switch (r) { - case HV_SUCCESS: - break; - case HV_ILLEGAL_GUEST_STATE: - trace_hvf_illegal_guest_state(); - /* fall through */ - default: - g_assert_not_reached(); - } - - /* handle VMEXIT */ - uint64_t exit_reason =3D hvf_exit->reason; - uint64_t syndrome =3D hvf_exit->exception.syndrome; + uint64_t syndrome =3D excp->syndrome; uint32_t ec =3D syn_get_ec(syndrome); - - ret =3D 0; - switch (exit_reason) { - case HV_EXIT_REASON_EXCEPTION: - /* This is the main one, handle below. */ - break; - case HV_EXIT_REASON_VTIMER_ACTIVATED: - qemu_set_irq(arm_cpu->gt_timer_outputs[GTIMER_VIRT], 1); - cpu->accel->vtimer_masked =3D true; - return 0; - case HV_EXIT_REASON_CANCELED: - /* we got kicked, no exit to process */ - return 0; - default: - g_assert_not_reached(); - } - - hvf_sync_vtimer(cpu); + bool advance_pc =3D false; + hv_return_t r; + int ret =3D 0; =20 switch (ec) { case EC_SOFTWARESTEP: { @@ -2021,7 +1976,7 @@ int hvf_arch_vcpu_exec(CPUState *cpu) cpu_synchronize_state(cpu); =20 CPUWatchpoint *wp =3D - find_hw_watchpoint(cpu, hvf_exit->exception.virtual_address); + find_hw_watchpoint(cpu, excp->virtual_address); if (!wp) { error_report("EXCP_DEBUG but unknown hw watchpoint"); } @@ -2039,8 +1994,8 @@ int hvf_arch_vcpu_exec(CPUState *cpu) uint32_t cm =3D (syndrome >> 8) & 0x1; uint64_t val =3D 0; =20 - trace_hvf_data_abort(hvf_exit->exception.virtual_address, - hvf_exit->exception.physical_address, isv, + trace_hvf_data_abort(excp->virtual_address, + excp->physical_address, isv, iswrite, s1ptw, len, srt); =20 if (cm) { @@ -2054,11 +2009,11 @@ int hvf_arch_vcpu_exec(CPUState *cpu) if (iswrite) { val =3D hvf_get_reg(cpu, srt); address_space_write(&address_space_memory, - hvf_exit->exception.physical_address, + excp->physical_address, MEMTXATTRS_UNSPECIFIED, &val, len); } else { address_space_read(&address_space_memory, - hvf_exit->exception.physical_address, + excp->physical_address, MEMTXATTRS_UNSPECIFIED, &val, len); if (sse) { val =3D sextract64(val, 0, len * 8); @@ -2156,6 +2111,59 @@ int hvf_arch_vcpu_exec(CPUState *cpu) return ret; } =20 +int hvf_arch_vcpu_exec(CPUState *cpu) +{ + ARMCPU *arm_cpu =3D ARM_CPU(cpu); + hv_vcpu_exit_t *hvf_exit =3D cpu->accel->exit; + hv_return_t r; + + if (!(cpu->singlestep_enabled & SSTEP_NOIRQ) && + hvf_inject_interrupts(cpu)) { + return EXCP_INTERRUPT; + } + + if (cpu->halted) { + return EXCP_HLT; + } + + flush_cpu_state(cpu); + + bql_unlock(); + r =3D hv_vcpu_run(cpu->accel->fd); + bql_lock(); + switch (r) { + case HV_SUCCESS: + break; + case HV_ILLEGAL_GUEST_STATE: + trace_hvf_illegal_guest_state(); + /* fall through */ + default: + g_assert_not_reached(); + } + + /* handle VMEXIT */ + uint64_t exit_reason =3D hvf_exit->reason; + + switch (exit_reason) { + case HV_EXIT_REASON_EXCEPTION: + /* This is the main one, handle below. */ + break; + case HV_EXIT_REASON_VTIMER_ACTIVATED: + qemu_set_irq(arm_cpu->gt_timer_outputs[GTIMER_VIRT], 1); + cpu->accel->vtimer_masked =3D true; + return 0; + case HV_EXIT_REASON_CANCELED: + /* we got kicked, no exit to process */ + return 0; + default: + g_assert_not_reached(); + } + + hvf_sync_vtimer(cpu); + + return hvf_handle_exception(cpu, &hvf_exit->exception); +} + static const VMStateDescription vmstate_hvf_vtimer =3D { .name =3D "hvf-vtimer", .version_id =3D 1, --=20 2.51.0 From nobody Sat Sep 6 14:44:48 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1756894267; cv=none; d=zohomail.com; s=zohoarc; b=TSRfO0U6RZsZquCE3K+Hld0QsIRchC+SoCBh5yh6VZbSYDK5ZVUl7tOZI7TZY3XJ/U4SHHJ0rTLUHjAoUfmRVJszUg5auTk346cGOAn9YZ+mcK5YA6mZqZcJp8UOIWTE49ftAmMzcyoMaLLIHOWx4g1nN4ErgJKUmumboNqLq7U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756894267; 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=W6UGFBv7QtABA3WFkaPUA0uUav3GpS4iAJMcQFZCcBg=; b=e6SEkgVrxnLRqBJHoIi3nNyZW9+qgYbDJTzyXe0YnP1i33u8pMsnshwficAPMOZ+ww6VF3JF/ydLGq1U1a3evb7JZ82J6QKNeNXJllLc7rd9rM9IDxebBcLgqosz6GWCjzH71gu9NPE9b+pwhlKuFGgzsAhgdhgJ9iZnYpO5hn8= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1756894267863156.22781526499443; Wed, 3 Sep 2025 03:11:07 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1utkR0-0004TJ-1M; Wed, 03 Sep 2025 06:09:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1utkQt-0004Hi-EG for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:09:40 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1utkQr-0008Rd-Mp for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:09:39 -0400 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-3d1bf79d7acso2366916f8f.0 for ; Wed, 03 Sep 2025 03:09:37 -0700 (PDT) Received: from localhost.localdomain (98.red-88-29-180.dynamicip.rima-tde.net. [88.29.180.98]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45b6f0c6dc1sm316744055e9.1.2025.09.03.03.09.33 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 03 Sep 2025 03:09:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1756894175; x=1757498975; 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=W6UGFBv7QtABA3WFkaPUA0uUav3GpS4iAJMcQFZCcBg=; b=gAgpxahBzJNxvXfvPDzAC20jmWPrd2E4lS88xUe7uJ3MhoYbFrbvxKehQJ35vQsT2F CJtTSIU4xhXezivF4C5ifSNVXx8f8Nm4yt9VjsFwdvv7bcikPtFC3cuIiCf7YkSZPVgB fmOFh4gtuGsFJ/vQUIbwDbGBvUEsm1DAU5P+PpG5EqkeUj9S+HzKNWmU2MFEs8RYp70t jfQd6JeLan9BlzK/EVUXJINpB4q/THK3W+5cEyua6K2YZqX9S11O4lo++eopdK8invYd rsLYAXVdtE8CGsntwT5isSPJP2Zhi+3mCGRAcwTqIc0WTV3Rt8m3VHu+doaXzyz/72Wa m8yQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756894175; x=1757498975; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=W6UGFBv7QtABA3WFkaPUA0uUav3GpS4iAJMcQFZCcBg=; b=BGso+Us1seiX8EihrkhzACUdlSKaObFi9UoAx9ResqZoo5lgeXUJ8jy5y2WiaOkifq L3snX9XHkG44Az/0ktbcuOGjAHLv33hf6t6HEYCYVswBgMDqsoMYYK9BIMNJNmXzK3Rf 2TTSKt0qg0B6B+uTvWIdaJjyPiUZ0H/9C+s2m/lJ5oHLY/HWRuR5H+jmFBf0KuaLz89R WCr+dnDmSp/WzSmn/1/KlXHo20touEUwklT9hLVnA0BFouUYmKCIYLh7EDVrox0WRpIr wVfzcJZc0kxPUB38HMKtwexTNp3Kg+qOATgKFWFYGrGWrcFATw9TsKHMsXryTYYvrad2 hmiA== X-Gm-Message-State: AOJu0YwFLdtiQHGjTCj0x6G7LVWaNieDNH8ZZgs2erDwKYW/AVsOQIjD UtLP94EZ727YKSuKSSsr/EZLurTc+64s369zxmZGo5J0AAWEvfP63ohFDmpJQJ05JDJEtlgUw9K UfLlUDWdR3g== X-Gm-Gg: ASbGncuA6cT4LCtMK6PHcTXTbfaAhRaS1WVDEqM0nwZ8nvG358SCcgbmuUmwiGKMqxb 0LjsNHCVjq2UpapsbVk2t+SnbLRMMyhwOHmyZ0eE5A7Txq/yjh3m7P6uhbfP4fFvRYbeF67GHV4 j6lJXJOqlpaNeK/MPa2ZNsAFLFszhc0AokicpP5/fQDWbRW2eTTcaLPSMPHr3E7jaXtpQHX+dWR AHaUkVX04cH4JBc0m1F9TsNOiI6LPrZgGnfTPkSb+YL0NMfcrzI2W/B5bImUGfK4ZNNkRcQWIiY zmzR7guHM6PUqXs7WjQPmRqv2VUCV5bSaCy5uxWZNtWS1vSf2CQbFaNBi9EJFwymPcUGXuYnzdC nE8RR+SxMxL4oHvgJ/lWXYXkDT99Yl+kdUajqRY7nyTSePeRRvSPyompTkDc/pIkRs8OYbKpJRd g/WldBsmmcGKCL36nZ X-Google-Smtp-Source: AGHT+IGEjVimI8+MizAyDYl5SGJcK7K4/JM92msUcSztcGMPOkbzUd2GtuhDPJe1Sw+RFeT5xVbjpg== X-Received: by 2002:a05:6000:250a:b0:3d0:3eae:576d with SMTP id ffacd0b85a97d-3d1de4b1c23mr10459789f8f.22.1756894175503; Wed, 03 Sep 2025 03:09:35 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexander Graf , Richard Henderson , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Mads Ynddal , Phil Dennis-Jordan , Stefan Hajnoczi , Cameron Esfahani , Roman Bolshakov , Paolo Bonzini Subject: [PATCH 17/24] target/arm/hvf: Factor hvf_handle_vmexit() out Date: Wed, 3 Sep 2025 12:06:53 +0200 Message-ID: <20250903100702.16726-18-philmd@linaro.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250903100702.16726-1-philmd@linaro.org> References: <20250903100702.16726-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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 @linaro.org) X-ZM-MESSAGEID: 1756894270714124100 Factor hvf_handle_vmexit() out of hvf_vcpu_exec(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/arm/hvf/hvf.c | 51 ++++++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 3db0a8e288c..0cfe3066c23 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -2111,10 +2111,34 @@ static int hvf_handle_exception(CPUState *cpu, hv_v= cpu_exit_exception_t *excp) return ret; } =20 -int hvf_arch_vcpu_exec(CPUState *cpu) +/* Must be called by the owning thread */ +static int hvf_handle_vmexit(CPUState *cpu, hv_vcpu_exit_t *exit) { ARMCPU *arm_cpu =3D ARM_CPU(cpu); - hv_vcpu_exit_t *hvf_exit =3D cpu->accel->exit; + int ret =3D 0; + + switch (exit->reason) { + case HV_EXIT_REASON_EXCEPTION: + hvf_sync_vtimer(cpu); + ret =3D hvf_handle_exception(cpu, &exit->exception); + break; + case HV_EXIT_REASON_VTIMER_ACTIVATED: + qemu_set_irq(arm_cpu->gt_timer_outputs[GTIMER_VIRT], 1); + cpu->accel->vtimer_masked =3D true; + break; + case HV_EXIT_REASON_CANCELED: + /* we got kicked, no exit to process */ + break; + default: + g_assert_not_reached(); + } + + return ret; +} + +int hvf_arch_vcpu_exec(CPUState *cpu) +{ + int ret; hv_return_t r; =20 if (!(cpu->singlestep_enabled & SSTEP_NOIRQ) && @@ -2133,6 +2157,7 @@ int hvf_arch_vcpu_exec(CPUState *cpu) bql_lock(); switch (r) { case HV_SUCCESS: + ret =3D hvf_handle_vmexit(cpu, cpu->accel->exit); break; case HV_ILLEGAL_GUEST_STATE: trace_hvf_illegal_guest_state(); @@ -2141,27 +2166,7 @@ int hvf_arch_vcpu_exec(CPUState *cpu) g_assert_not_reached(); } =20 - /* handle VMEXIT */ - uint64_t exit_reason =3D hvf_exit->reason; - - switch (exit_reason) { - case HV_EXIT_REASON_EXCEPTION: - /* This is the main one, handle below. */ - break; - case HV_EXIT_REASON_VTIMER_ACTIVATED: - qemu_set_irq(arm_cpu->gt_timer_outputs[GTIMER_VIRT], 1); - cpu->accel->vtimer_masked =3D true; - return 0; - case HV_EXIT_REASON_CANCELED: - /* we got kicked, no exit to process */ - return 0; - default: - g_assert_not_reached(); - } - - hvf_sync_vtimer(cpu); - - return hvf_handle_exception(cpu, &hvf_exit->exception); + return ret; } =20 static const VMStateDescription vmstate_hvf_vtimer =3D { --=20 2.51.0 From nobody Sat Sep 6 14:44:48 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1756894204; cv=none; d=zohomail.com; s=zohoarc; b=AyI41K8aCtcvsw6WxJD9gfXa2ZfX6AMX+J9z4tPRmEZNYwegm7T5iTOxYm4b8Ia43PqZQyJtIaPmYUE/ykVwoMWidLrljLr8g2EDn+wpY3J6W4OZDAtwkWDpLBXWD/zxyrgKu1B/jLxChD6dvysIrybwrPn2peyvRsOyPJNeqOc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756894204; 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=bgrvAPRPeMpRVzKH2lCQLrXhLFRC0uspct1gvGRvd5o=; b=EERilJMGwilYZH7R1VHNOMqqsZlQGLHrw/ju45V+IEMjb8xO4cia/3scsjeymrlWJZP8qrkAuNlzwqhfLjK3ycj4JIQVLrtxkghKrZAFUJAmGVanVXc/zydyrlBVzQGNPr43O54PAek05BrRxh1wu7vVptG1xPRLzVa/MSMwVdQ= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 175689420466812.927306684039763; Wed, 3 Sep 2025 03:10:04 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1utkR5-0004zg-2O; Wed, 03 Sep 2025 06:09:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1utkR2-0004iP-TR for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:09:48 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1utkR1-0008TV-4N for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:09:48 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-45cb5e1adf7so4372445e9.0 for ; Wed, 03 Sep 2025 03:09:46 -0700 (PDT) Received: from localhost.localdomain (98.red-88-29-180.dynamicip.rima-tde.net. [88.29.180.98]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3d53fda847dsm13940922f8f.0.2025.09.03.03.09.40 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 03 Sep 2025 03:09:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1756894185; x=1757498985; 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=bgrvAPRPeMpRVzKH2lCQLrXhLFRC0uspct1gvGRvd5o=; b=adLAPqUGBweiWFPbxy0KrtGhUNoAUE9EnJ2CsOR/GiaaY9tjtx7NzIoHovBuey5JQA HOnsTjp3AfQhFI5wPrzHYWrYS6MS5qr6mbxRK+mjv3OKktVztdDRzaJH12u3vR8sT9xL r7U48jykutpf/OtOitSv4MrqfSZmqex44QPOtbW/uCbNQ3G2gxv5zU63yqjoySv4DQJ5 opJ6/uhI5niQqd3v8OOnR5lLgAMyS008tKtw+c1BK8GwNYhrUw+JjoQpTWrrirT7ahW3 D56RcvgSlcDyLzJXsZE58xAuL4y4bFpDQWSGhkHSnBB9tb7x/Z2fhFxkNhBtvdG6Y0FM P3vQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756894185; x=1757498985; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bgrvAPRPeMpRVzKH2lCQLrXhLFRC0uspct1gvGRvd5o=; b=HebsZMcZJeJdVR7IH/U4l9XFTwLXZe7viowAfJwu66wPmxBNlLq+EJaC5ybmVqI75E 5hUJa0JbrbY6o2ggd7XGRmtl88JLm73FR2SSyFtGQht94cvZKNudHSWBtooMcNITj/OG YrTj92Hl1t1nfnjRfLR5O0y82HNOFvtR35xawIi4dPYxFbpurmcSS1e6/S09UaI0htZp xk7aGJnJccqQarLL9go9PJvVLqIxe8WKVJvxPiophcUpUhD5Eum0+gA6PuE1SH0J76LS nfFfpDjewGR50OjD2a8DcopvGZ9zHi/LCTVxuODZ3v0nnRz4aBhpmbVW97pzzNhMmizm tH7Q== X-Gm-Message-State: AOJu0YyCzaSsoEwCHHeyVlNP6poAluJUxUL0RlPKebn3biVfHwOhPay1 uIRk3ad2CA2M73AcEc6p1BXe9AsmsPzYxnm6r2rkWJbwV5N5IbeJusvGI/2r6MemfFqzB09JgMp l1EfBS86hEQ== X-Gm-Gg: ASbGncvTXAL92wYitZqfFdqqcVS8Z4vg/7Yf727emRE9Zy9PLacQ+ICrd3UzoTeU3Zx tRfpjKgl3fYuhil3loSGsB0F63k+8+E+I1NczUQqfTOCQauLibUXD0csJ3uifr/ln4GDAa0uZ8s 0/DZgOR/9THDN8d3npUbcG0Mcy/E26Yq43l7j6lLdRwNdSaQM46UkyBj2aUl/O2MmkidhZ5tEQI IN0yvT+HNaz63SjGMmsIAJHBSdhTNxeSN21oLKvj2mHFjwot31sLuC7nPdzprMa44KAhIsSdnyH Vta56iv09SIWQ86Flv87ZNSDFrXw2owFAjBATw817ZlwtC7lBgXHSCMqIjHvhHfyTlZ+ozuv1Pw uc4dMFT3vXoT3zhbPo3oLsIiTZgNdVjzqT7EASx6cBC06Znw3ZTk1EfivA45pLvMj5Iv33ZnhT+ s73SjP7A== X-Google-Smtp-Source: AGHT+IGpAYTJvKczYgPz502O2hrnnyGSytgRVzbTcMu5SGbXAQoimSXFtd6+tdyLFjun6Wvu9GpRfg== X-Received: by 2002:a05:6000:2681:b0:3df:1a8b:ff40 with SMTP id ffacd0b85a97d-3df1a8c028amr755192f8f.43.1756894181967; Wed, 03 Sep 2025 03:09:41 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexander Graf , Richard Henderson , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Mads Ynddal , Phil Dennis-Jordan , Stefan Hajnoczi , Cameron Esfahani , Roman Bolshakov , Paolo Bonzini Subject: [PATCH 18/24] target/arm/hvf: Keep calling hv_vcpu_run() in loop Date: Wed, 3 Sep 2025 12:06:54 +0200 Message-ID: <20250903100702.16726-19-philmd@linaro.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250903100702.16726-1-philmd@linaro.org> References: <20250903100702.16726-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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 @linaro.org) X-ZM-MESSAGEID: 1756894205929124101 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/arm/hvf/hvf.c | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 0cfe3066c23..b60efdc1769 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -2141,30 +2141,32 @@ int hvf_arch_vcpu_exec(CPUState *cpu) int ret; hv_return_t r; =20 - if (!(cpu->singlestep_enabled & SSTEP_NOIRQ) && - hvf_inject_interrupts(cpu)) { - return EXCP_INTERRUPT; - } - if (cpu->halted) { return EXCP_HLT; } =20 - flush_cpu_state(cpu); + do { + if (!(cpu->singlestep_enabled & SSTEP_NOIRQ) && + hvf_inject_interrupts(cpu)) { + return EXCP_INTERRUPT; + } =20 - bql_unlock(); - r =3D hv_vcpu_run(cpu->accel->fd); - bql_lock(); - switch (r) { - case HV_SUCCESS: - ret =3D hvf_handle_vmexit(cpu, cpu->accel->exit); - break; - case HV_ILLEGAL_GUEST_STATE: - trace_hvf_illegal_guest_state(); - /* fall through */ - default: - g_assert_not_reached(); - } + flush_cpu_state(cpu); + + bql_unlock(); + r =3D hv_vcpu_run(cpu->accel->fd); + bql_lock(); + switch (r) { + case HV_SUCCESS: + ret =3D hvf_handle_vmexit(cpu, cpu->accel->exit); + break; + case HV_ILLEGAL_GUEST_STATE: + trace_hvf_illegal_guest_state(); + /* fall through */ + default: + g_assert_not_reached(); + } + } while (ret =3D=3D 0); =20 return ret; } --=20 2.51.0 From nobody Sat Sep 6 14:44:48 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1756894223; cv=none; d=zohomail.com; s=zohoarc; b=ExjwEF/uzcOnRpNvuseV2nPhbJqcBeIbkoPrlLytNXrsKuV2K+Gutp9sjRXj55TCvkxvYuFEDh4NIIX2Wc25Jv8kwpjGMLoZi+xnNUMuI12xgiKyOg6JIANq8bxFiaHgE6IDFdLb1LtDIz/Imb09wWmG1hQOfiuHpJj0wkuM7b8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756894223; 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=gEfPabvomn383Kvb9BVWwQgaJJGjCsfNW+1Gzb6ZBJ8=; b=gpYmeSgn1wetr6A+JIuQCaWSXmDx89ajwwOabXqInSb0OgJIAPrxj9pcvwgwIpCVIjmZ9VnrqGDrhzPngDLlzHTKQnWTLzT2Lnq3UhirUeg2JOl5Nx7DQaIKShnHSNISesjRDf/FXx8HihV1rHrWcg+KF47a5hgEB47SDT7/v9s= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1756894223639728.171011660442; Wed, 3 Sep 2025 03:10:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1utkRB-0005XF-D1; Wed, 03 Sep 2025 06:09:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1utkR7-0005Ii-Kx for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:09:53 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1utkR4-0008UH-Vf for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:09:53 -0400 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-3cf991e8c82so3585144f8f.3 for ; Wed, 03 Sep 2025 03:09:50 -0700 (PDT) Received: from localhost.localdomain (98.red-88-29-180.dynamicip.rima-tde.net. [88.29.180.98]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3cf276d5e5fsm23234058f8f.27.2025.09.03.03.09.46 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 03 Sep 2025 03:09:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1756894188; x=1757498988; 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=gEfPabvomn383Kvb9BVWwQgaJJGjCsfNW+1Gzb6ZBJ8=; b=Hd1ctOC6zKbMPpmxd4eN/1IxotdTudqg1Ml84TVzbfl3e/AZJkEvNhrPnv/WHaYHjj hYjPawjSQljSlb+7UV6+F55s2SfP0oZ3ZHwGT7APy3lzYTFu7GyJz31bdfcfOmGvPWep AOqGVyVubzkmQn3xx0rvaO4bMDIrQn8XHmqH3zCqVpRkCBSONKZGiOZ0V/ejwNS8t+fF PKiAxkF1W/hUfheSDJolRffPB0QGQ5Ch/IRqSB0Gj8ws4CKCN4MfmDMiYQ9Grprcybda gF27MhO+Vq3BW0qVQ8goTSFk0waEgWnxLPEYZdXNaRUKX+TTVVUfOmj9C9Aex9CC4BRg IdGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756894188; x=1757498988; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gEfPabvomn383Kvb9BVWwQgaJJGjCsfNW+1Gzb6ZBJ8=; b=ealJYqFZ2TrNw+Tdk78CT/bc404koSY3oAWsCuNaMQId3pEUn4xd23bKEr2yca9qUj iPfXdzJ9ZKGQFXxhtEGbtzTNZJ4f/70oLC4QbY2nbgNVEz7dvTHu3vQ9/0B4xLYmoxXs pW5v9h/ID+UzT0xLLyRlighb4hscnOWaqj92VwdVNFkZUJE5zGk2u5VBZ9V4BOYap/Au A5tq3O0NyeDBtZr8I580i/I2Wsl/bc93+PewSDP8CS7jpIfiJd+z8qWxZRIZNrdEYSHu ytxJiydQNSepjXjMOG8priX0kmG2Jw16eyDGez3Hco/36BTPNpg8/Hno2gJZN/GWROfL /OmQ== X-Gm-Message-State: AOJu0Yzn5zEj4AYSdzzXhgZhPr9cEn/WpwqHoAbcpHh7CSCTVhgfZ9dC 5FAeb1BaVU7erSVsQ9fQFpiz7MUKeYvmf5plE/uxXN/KeuD+Ske4hbm/dHpgCCaNJhw2CS/ShjX 8OjEvzd1DCw== X-Gm-Gg: ASbGncuVss7/k86Hqhpy0aF/GCE2Ju1r9jfkJ6kWZC2srlEJiiGtGI28WW1PlprVtsj sCmawALqsZPzwSYBHy97YrNBY/4G9O4Cw0fXL3RWV2YrPijZP/B5LZk4N1e5tYYylxWLphjGbF9 IP7GftN6+d2yuUO9SdrzRn070zZqFPx7QFMaDsJn4n2IhfQF7K/b1bKK8RwG/7l7V0/AUSMQlpf JvVJkIuPWv+Co3NHrSah784ThebJzVD74kKGbdGOBK0VVDdtohuDPByojqZbXpGDpJy5rOpZ3kk z9Ag4bseRND6btuhkM4KCkeAeDCYNN5tecR6tzOaUp+E9teiOhQ9E6Yy4usUvU1USbMZ+0rNAme +KjJwO0OnOPRYg4yc5b0UIs6OvZDKdbvbI57HW5j8H09Ys8/kUSQXsvqNz5mMhNgSWBAugJBN2w l2UwwFaNj9C+4cNm1S X-Google-Smtp-Source: AGHT+IHjeaXBZbON+AmbQcwUe0SBB9pAgd5tx8CaxlcG5omgkudltDqO1g1YjTt5ypja3T0r9Tow3A== X-Received: by 2002:a05:6000:2f84:b0:3cb:cc6f:734e with SMTP id ffacd0b85a97d-3d1dcb74345mr11728532f8f.14.1756894188421; Wed, 03 Sep 2025 03:09:48 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexander Graf , Richard Henderson , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Mads Ynddal , Phil Dennis-Jordan , Stefan Hajnoczi , Cameron Esfahani , Roman Bolshakov , Paolo Bonzini Subject: [PATCH 19/24] cpus: Trace cpu_exec_start() and cpu_exec_end() calls Date: Wed, 3 Sep 2025 12:06:55 +0200 Message-ID: <20250903100702.16726-20-philmd@linaro.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250903100702.16726-1-philmd@linaro.org> References: <20250903100702.16726-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=philmd@linaro.org; helo=mail-wr1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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 @linaro.org) X-ZM-MESSAGEID: 1756894224573116600 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- cpu-common.c | 3 +++ trace-events | 2 ++ 2 files changed, 5 insertions(+) diff --git a/cpu-common.c b/cpu-common.c index 152661df8e9..614391fb9bc 100644 --- a/cpu-common.c +++ b/cpu-common.c @@ -249,6 +249,8 @@ void end_exclusive(void) /* Wait for exclusive ops to finish, and begin cpu execution. */ void cpu_exec_start(CPUState *cpu) { + trace_cpu_exec_start(cpu->cpu_index); + qatomic_set(&cpu->running, true); =20 /* Write cpu->running before reading pending_cpus. */ @@ -319,6 +321,7 @@ void cpu_exec_end(CPUState *cpu) } } } + trace_cpu_exec_end(cpu->cpu_index); } =20 void async_safe_run_on_cpu(CPUState *cpu, run_on_cpu_func func, diff --git a/trace-events b/trace-events index 3ec8a6c7202..faeba6242fa 100644 --- a/trace-events +++ b/trace-events @@ -29,6 +29,8 @@ breakpoint_insert(int cpu_index, uint64_t pc, int flags) "cpu=3D%d pc=3D0x= %" PRIx64 " flags=3D0x%x" breakpoint_remove(int cpu_index, uint64_t pc, int flags) "cpu=3D%d pc=3D0x= %" PRIx64 " flags=3D0x%x" breakpoint_singlestep(int cpu_index, int enabled) "cpu=3D%d enable=3D%d" +cpu_exec_start(int cpu_index) "cpu=3D%d" +cpu_exec_end(int cpu_index) "cpu=3D%d" =20 # job.c job_state_transition(void *job, int ret, const char *legal, const char *s= 0, const char *s1) "job %p (ret: %d) attempting %s transition (%s-->%s)" --=20 2.51.0 From nobody Sat Sep 6 14:44:48 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1756894289; cv=none; d=zohomail.com; s=zohoarc; b=NyaugMh+wW/J6BBmgPpjF/F9+3aqBtVhkSWHiLv18GFUjbQSHgwNoYcppnrBRYpxMQsplKb+/0I2mgRh1HhFzYApcbo/1YgnctDw/aVsh1u2140EfEqeWjxpa6Cluc9sxBZIFybLQPTq2uV9nMGenmX8vAoUmY+68Lu+BPHOJzI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756894289; 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=oCaAK1U7AfzQjqZldPBE5RveEpShlRIboizZxhe2VkY=; b=OmVGAUxFvU2q1ksy0axNtIhIstXLaEMM3K21mGHyjjJeE3DVOr2KjXDCQM5M9l5Buin2p/67GOvoEL7MCLCcI0QUAv9Jm1FDnGpTfigqUniqGBZ3HmsnvA0gmJgSn1tkL+j6pDvpyRlwNMKJ0c1aVw880yclIZxO8OwzJyDlG0k= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1756894288942957.4263580190469; Wed, 3 Sep 2025 03:11:28 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1utkRG-0005rX-MF; Wed, 03 Sep 2025 06:10:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1utkRD-0005fc-5g for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:09:59 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1utkRB-0008VY-Co for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:09:58 -0400 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-3c46686d1e6so4317890f8f.3 for ; Wed, 03 Sep 2025 03:09:56 -0700 (PDT) Received: from localhost.localdomain (98.red-88-29-180.dynamicip.rima-tde.net. [88.29.180.98]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45cb687fe4esm11930835e9.23.2025.09.03.03.09.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 03 Sep 2025 03:09:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1756894195; x=1757498995; 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=oCaAK1U7AfzQjqZldPBE5RveEpShlRIboizZxhe2VkY=; b=h0bklGCQv/xiIteVzE4B+ytaBKY5ziCFDSVtfVemH5FW+XW9BOhZ876QYVxyMtlw9S ujNVpDWFta2NiCtThwUk6584X2OAcgxD96qox4Z9GXHsf91dheONKvJZpAmU/apd6gSx 1xiFwX97SGaLGPwFTv+yd3LWcbUD2vaNsl2u91z/64i0aTAYQhKScvqmjza37A5pon9+ 85fxmtrQgR5LdikhmekRjBfMLyexAv0uWR4pIROJOW0gdp8bPILfwla4w9CPOmWlVv5U Q/4BPpD0MQXdLwuuHLJvD2H4APfD9WoDLQ2z1Z+7hew+wl5opL40R27M64iY07Ut/fzF 2zYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756894195; x=1757498995; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oCaAK1U7AfzQjqZldPBE5RveEpShlRIboizZxhe2VkY=; b=YiAFL1mDuVmMn/Cyry6VMAca0W9SpWhmUmhkEJkIQ/FrJvIhwvdddhOIHsnXe0TNKa Zer90q2xzjWNJoat043plUEpo4I0j5DEGd3A6ayaJJRxDoWRyCxmGjBi6+3L5mfHygQ5 xmhxnhZ5MOB5dBKAUuDwGgAh+9zHr41L0qZxGrM1td6uFFd1go5H6SBXOsfKs48+y683 /da0OsPLJ0oZ9+5iIG7exBmrIyMQctQvtCLSKATeq/h6FnoOkBrPV97VwjaNnsnahURu VYuQwLCG1b2hmYUSzPZ2ibYF85gmRUQqVRzqXi9usjlCTIfhbrFzzIw/UPKKBIGqgjde F8Hw== X-Gm-Message-State: AOJu0YxyJsqAKRrL2wxGSiUcebxw13C8Jeme1aWCCTmVKqDoONRNQeAJ AOY8FUSkBJ8i0xb2jVXII3MTzE2HK77Rpl02n+p7Nq+qt/gNhRFcTnRUs13ceIV2yc2/xJ+1PZJ qthKyOKUtsQ== X-Gm-Gg: ASbGncvr3yXiLDYhDOSWbSv+tnwuwJTuTJaq3+CCnDx4KBl2j2saDfv6qXxK8Fsq+1h OiOV5CrNGmIzbfD5kPRmeXR9308irpqJkRQwrRAA5yDOD1JwWMaR4hwU9LmRJEz1Vso62xjd8Br aOob1GJOkGFINmld8nUEhh+FdfXUIewGxUneg1WQwYhEbo949PGYFWd4uFzaNhKi5sumJEB63Gl HeseEEhh27wYL1VZ/HgPXKdQaB1RJVOXw8unUDu3dh+XmDxHOkk7ODP2pgPXCZigy472QGwGflE QdxbslLYKZ4noaWFq1MuTF2ML6+pMsm1wJJQWM4OikrGZvyOYCnXtFHTyReYSBWasqlCq/KbEdQ GHZTM9r54X4d1wiBIq56DTkMprchVexaikrlxYmvqAdcQRKWjlf8Wl53hHlfgfd5dfzAF/ospM0 O97KnHsK2MmmPw/N+F X-Google-Smtp-Source: AGHT+IGU8BAg7tq431LWl+B0LEsfKkDkREYGOYoLoyFgBZgv+sRl6kcDrBAKCXXTt4l3HFRmI9CCoA== X-Received: by 2002:a05:6000:40ce:b0:3d5:f5ef:3bb with SMTP id ffacd0b85a97d-3d5f5ef0766mr8304072f8f.11.1756894195377; Wed, 03 Sep 2025 03:09:55 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexander Graf , Richard Henderson , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Mads Ynddal , Phil Dennis-Jordan , Stefan Hajnoczi , Cameron Esfahani , Roman Bolshakov , Paolo Bonzini Subject: [PATCH 20/24] accel/hvf: Guard hv_vcpu_run() between cpu_exec_start/end() calls Date: Wed, 3 Sep 2025 12:06:56 +0200 Message-ID: <20250903100702.16726-21-philmd@linaro.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250903100702.16726-1-philmd@linaro.org> References: <20250903100702.16726-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=philmd@linaro.org; helo=mail-wr1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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 @linaro.org) X-ZM-MESSAGEID: 1756894289280116600 Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/hvf/hvf.c | 2 ++ target/i386/hvf/hvf.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index b60efdc1769..40ec930d244 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -2154,7 +2154,9 @@ int hvf_arch_vcpu_exec(CPUState *cpu) flush_cpu_state(cpu); =20 bql_unlock(); + cpu_exec_start(cpu); r =3D hv_vcpu_run(cpu->accel->fd); + cpu_exec_end(cpu); bql_lock(); switch (r) { case HV_SUCCESS: diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c index 73c50175048..cb4af70e91d 100644 --- a/target/i386/hvf/hvf.c +++ b/target/i386/hvf/hvf.c @@ -749,9 +749,13 @@ int hvf_arch_vcpu_exec(CPUState *cpu) return EXCP_HLT; } =20 + cpu_exec_start(cpu); + hv_return_t r =3D hv_vcpu_run_until(cpu->accel->fd, HV_DEADLINE_FO= REVER); assert_hvf_ok(r); =20 + cpu_exec_end(cpu); + /* handle VMEXIT */ uint64_t exit_reason =3D rvmcs(cpu->accel->fd, VMCS_EXIT_REASON); uint64_t exit_qual =3D rvmcs(cpu->accel->fd, VMCS_EXIT_QUALIFICATI= ON); --=20 2.51.0 From nobody Sat Sep 6 14:44:48 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1756894342; cv=none; d=zohomail.com; s=zohoarc; b=G2vdpEQmTnfRc4xCzHgEMcCRqXE0ZXJIuymnFhL+G/XqhlrNnNW8mnDBFYLiRfEKZD72aqEOIwXeB+R/tPKxLpuj3WcKIc0e5sNfB7zLRD6O/7vHbB8ENxhFsFfNk6iTHIWxxunNs4QkD/jLFNgV+81EwyDaDAg6SGJsJB/uJvE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756894342; 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=wPrMzC7xkMP6BFGfr7/f+KLgzjkhoBLbvGsAwbo7XSI=; b=DxfHtJwUYLuVD3gUHkgGH/nKhr6QCI5iQh7oiSiRY2cjH500pQ40q/WunpSq3ymluIeqqSyjhd/lm3XsRIxu3TJ1UywOqMSbOcB1G3mYPwYM9v1WoPNEqao+ygTx5EUrHPVYeFQ4pYMkrCN9tfuc+x5vPoMe5c8HAdIW+EoXzIc= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1756894342664523.4848313476205; Wed, 3 Sep 2025 03:12:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1utkS8-0006eq-4A; Wed, 03 Sep 2025 06:10:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1utkRL-00069O-E9 for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:10:12 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1utkRJ-000064-FE for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:10:07 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-45b8b02dd14so20495435e9.1 for ; Wed, 03 Sep 2025 03:10:04 -0700 (PDT) Received: from localhost.localdomain (98.red-88-29-180.dynamicip.rima-tde.net. [88.29.180.98]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45b6f306c22sm320208935e9.13.2025.09.03.03.09.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 03 Sep 2025 03:10:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1756894202; x=1757499002; 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=wPrMzC7xkMP6BFGfr7/f+KLgzjkhoBLbvGsAwbo7XSI=; b=ShiMvimXdR2D3FTucQzD3ZDgQ74EJMemYdXNjwU0WSBTddigV22N2aHopr6+1BNQDY xts/k03eFoR4Hzm0+aB1wwpO4HI7hBiZniPBzmLOVaBC/BlqLYzsryfsw3+fig1TD2R0 VHEfqdX++itZSDdtMFQsanhgrvuj2xfWDgLcaFA0iFlTQ6iDphrnxlc0UvZN8DC78oVS yi1wdJnxtQqpCQUrE4IXrB0VCBy8p6/Lm6wywKR6sIrVn7+Zzx+vjD3nZG7IeUjFUvki Met+HeM9QTK3lQb68VQA/lUuBxLItGYyp3KIQSxyrBSVGrTB3OpRKwiNdPbvcPRaFsrp RE0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756894202; x=1757499002; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wPrMzC7xkMP6BFGfr7/f+KLgzjkhoBLbvGsAwbo7XSI=; b=jq6eTuiBFoS+YKWRK9A+klhWwgOH1tYKjr1Z4oI4lWRLZ9i2NAXyEI2k0+Wp+h4X9L M3ce7Y5GYnLHUUa3D7zjedBSs2bUgdPaIIWbzlzm3xEvR3pdXD3K5muH6uCTrDSY+ugk KZsSP2zwLhXu9m4q4awhi4T1IpMu/UxgrYymr+4T6rEoubINfiuhqHV5jj2R6taHO+TZ zlcHbZEql0xPYdz6sXLoLvHirsiPVECFkDnVu84TKpzzBOJ1nmqSIHNzcXNxNqjN593v fKxn//dYv1R+ruuvXEzU11En/PZc/DX7Eju3yu8WddfSdbQ6tGFIhz2vKi2SGv7W4+5o Zpyw== X-Gm-Message-State: AOJu0Yy1CJG1x7qD0y7uTK38+rtIwAQBlwHjpYZRyEWxWLWT8Oo6ahtK oF+rYfJ68Yfd1B0w/QVWH7y34CxGPTxq83/C8/CSOywaV3HjmG1i3UArDkL1ONhpmWy2IQbI5c6 4Zvifm6Af4A== X-Gm-Gg: ASbGnctErY3iWbsTPmLgwBz7t0Q4b3iKJVwxRNcojjZP4QxmZRGNGeXVPW0A1sL8OMc jNh7G/Nok5roig0QsigYgjhuCPqwc9s6K8rcK/N7woMojk2F9bOc1RPlAexEMXG8VcmI0z5+BZH NzcQKRdgs7o3+sMMqsnAsFTISe5N6tjdix1Mu2dD2H5B50OQpDHKD9u9Wc8u5Kf9/Z5cxf1PYq7 5h9xehSM4BCiLvizcXQI6Y9oP45nIknebrdZBzDvSf/vgWPOlnnYKWrvJHgGF4VlaaZ9UK5/ukT SLlWT5yoMfu64QfSex04TFiaX/7C6ugI5T6mWuCO7n1VeMoEHsrJrHeU6SzcBw3LQiC+Rkz5S/U jhPlTBIzEc5AvLy9N/1rG2fKoOkbTyZnzxAgz3FEa47nzWT8waT98Gb07mD3pVd0/MFPKu+H8a6 BEttbjY9AkmPTmpok7 X-Google-Smtp-Source: AGHT+IFqGkT1Nsdy6nEix3cmm2NK4/o8TXTxVSoc7EyZnEEYvN+6IEOCgtR2JSl/s6rnfy/fD6GTRg== X-Received: by 2002:a05:600c:1d10:b0:45b:891f:afcf with SMTP id 5b1f17b1804b1-45b891fb24dmr95642275e9.27.1756894202179; Wed, 03 Sep 2025 03:10:02 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexander Graf , Richard Henderson , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Mads Ynddal , Phil Dennis-Jordan , Stefan Hajnoczi , Cameron Esfahani , Roman Bolshakov , Paolo Bonzini Subject: [PATCH 21/24] target/arm: Call aarch64_add_pauth_properties() once in host_initfn() Date: Wed, 3 Sep 2025 12:06:57 +0200 Message-ID: <20250903100702.16726-22-philmd@linaro.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250903100702.16726-1-philmd@linaro.org> References: <20250903100702.16726-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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 @linaro.org) X-ZM-MESSAGEID: 1756894345586124100 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/arm/cpu64.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c index 26cf7e6dfa2..f81cfd0113c 100644 --- a/target/arm/cpu64.c +++ b/target/arm/cpu64.c @@ -762,20 +762,20 @@ static void aarch64_a53_initfn(Object *obj) =20 static void aarch64_host_initfn(Object *obj) { -#if defined(CONFIG_KVM) ARMCPU *cpu =3D ARM_CPU(obj); +#if defined(CONFIG_KVM) kvm_arm_set_cpu_features_from_host(cpu); if (arm_feature(&cpu->env, ARM_FEATURE_AARCH64)) { aarch64_add_sve_properties(obj); - aarch64_add_pauth_properties(obj); } #elif defined(CONFIG_HVF) - ARMCPU *cpu =3D ARM_CPU(obj); hvf_arm_set_cpu_features_from_host(cpu); - aarch64_add_pauth_properties(obj); #else g_assert_not_reached(); #endif + if (arm_feature(&cpu->env, ARM_FEATURE_AARCH64)) { + aarch64_add_pauth_properties(obj); + } } =20 static void aarch64_max_initfn(Object *obj) --=20 2.51.0 From nobody Sat Sep 6 14:44:48 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1756894318; cv=none; d=zohomail.com; s=zohoarc; b=aTAi4i9wZf0Ik+/aEk8LHGNLtkbPIeHH6RQ6D+eQ4XDczOVOOcJAAY2sOEtMujwl0J3WcgpO2PUTWTsPoaBO0bmzApwKBHSkiDgSv38OqxHxBuVxjD/a/DXBCJmz7YGoDCZtzGXd8vvtOFjs3FBtI2oXASZ3sOS0igBtxqVl9yU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756894318; 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=BpXbEQrpDK50SMvtUWoxzqhUJ4k4wz+AbgMYLSbErPw=; b=JGBlfC2iRFPwcXmCYqq7trBgowl+U7fH3javSV/jPVrCqDYBTf854zHbAzToD9/pI3yeVYP7u6FyKzrk6Mmaj2kc+ZlIEexDQxpC7ZWUcPewOuGeYoENNkFFALMOrVECk6pUPjievYwD8CHsD83y50YxQzKaymHHfNGscVEy6qo= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1756894318767979.411728873644; Wed, 3 Sep 2025 03:11:58 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1utkS9-0006gB-Hr; Wed, 03 Sep 2025 06:10:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1utkRT-0006FH-R9 for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:10:19 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1utkRR-00009c-P8 for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:10:15 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-45b84367affso36722235e9.3 for ; Wed, 03 Sep 2025 03:10:11 -0700 (PDT) Received: from localhost.localdomain (98.red-88-29-180.dynamicip.rima-tde.net. [88.29.180.98]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3d0a1f807f9sm22217368f8f.38.2025.09.03.03.10.06 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 03 Sep 2025 03:10:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1756894210; x=1757499010; 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=BpXbEQrpDK50SMvtUWoxzqhUJ4k4wz+AbgMYLSbErPw=; b=my2rq/M1EI4TW5A6prlqirdmwy+G1K8sQEOi+svI0PDo73XvHc6msaq0uk30HQkbY0 MGBVV6PDhs3/87RbGnEYM7spOYGkReTRNtRqSvaO0pyObs1E1NiguMphv8bppggI6Mi7 ldWFLYoHv7T8d4MDxeOdV9H/ygXM5CaQk/eLW8mSc5mjWW5alqmhFTCGHteULmupcLW6 H/L0cOFR8GbOltC6w02WMnEufYQTgW+QIg8VeShpTwWDtfYlcD26vhsS1UwKcL6qd7nB xkkkhachywE1LoiGr3YSkONbe078OqStXZ9Y/SpiWe9+E5MXZi5SsDk5LcVoVlKkHXIK opwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756894210; x=1757499010; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BpXbEQrpDK50SMvtUWoxzqhUJ4k4wz+AbgMYLSbErPw=; b=N9VKEWj5wG/629Smak81zQQjR5a7k5aYfYJjSHB47IB28YL5AhsPkg7OoQFlx2ya4F /xvaCrjspBnut6199Cm8dIwH+9MsN8N7UVAkPfZCGOGR+ZDuqB+hXKPMYR5rxueBK6fa geNz/oA2KaltMtMYLwx9IWzRO7j5QEf/6G012ZctyDojI9XuJPR5CjQyqS/DqeRi3hvf UIo8Kg/kA1dJ4gprm8axXC7n3hQp1jU1OpUniEgQpVLXiIHYh7Xp+NnI77wZ0OVe0B6N iGxRFLV8s2PDG+gHTSdUsIJa/H8X6f9qSTleJTEOZ+v42/Tn/nuwZJd2DmtxoZRouLq1 4F8Q== X-Gm-Message-State: AOJu0YzcKIpIESYThyel7wHukHjS+SbySjljJ3259CqYUvD85F+3kVb3 0jq6jLowKxEqx1KBQVKtrC6spPoW7gz5WlyuHt5nSJ60XXFDhZMRj1qj73UpWvwA+6unmPbCon1 SOxEptgRg7Q== X-Gm-Gg: ASbGncuIgaA/D/KvA+L4QpWEDjj0xfhYZOMZkItMOXE8usPHP6i6oODwt7DwiH03uD7 8ITsfa7Ddff6+yfsozds4if5zAbAu3OrAN2cJJo4wjoQRsHEn2pRr7GKawq8HTcv3cZDCS19DTH 1L7VyB6N6U9nmB54BFeHPxloNnPg535auDEWAfRotHN2fG67i0PBseziir6E9OIWxJQNZPo0you tDqH4+YMUSI+u4TVhFAAGgNI26cbIqG6k7dbSAZygLeFa8hXAn7XM4sXoluQqQp8g3hkGMnFBp8 ruYvjjIDVBXBgzC/WMxOYRogOAsDNDYsXY+E/79PS/QRqykI7NJTghlps4P3CNDzFxsNxNMKDDe lC7P4V1Jc+dZA6j1plFLiogKcZGxWlS5TTVrnxaZdzcYQAJ+C5Jd21VHuf+ekPcvF9smimtMHCV Wr1BU3Mw== X-Google-Smtp-Source: AGHT+IH9fcHFERGeULzOi6U7b9bTjsQMBq100wAXosiiqaMXG+O1tRl2V9v2vrhTxaNa/exK/C6c3Q== X-Received: by 2002:a05:600c:1d07:b0:45b:6b57:5308 with SMTP id 5b1f17b1804b1-45b855508e0mr126523875e9.7.1756894209562; Wed, 03 Sep 2025 03:10:09 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexander Graf , Richard Henderson , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Mads Ynddal , Phil Dennis-Jordan , Stefan Hajnoczi , Cameron Esfahani , Roman Bolshakov , Paolo Bonzini Subject: [PATCH 22/24] accel/hvf: Restrict ARM specific fields of AccelCPUState Date: Wed, 3 Sep 2025 12:06:58 +0200 Message-ID: <20250903100702.16726-23-philmd@linaro.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250903100702.16726-1-philmd@linaro.org> References: <20250903100702.16726-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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 @linaro.org) X-ZM-MESSAGEID: 1756894321659124100 Do not expose ARM specific fields to X86 implementation, allowing to use the proper 'hv_vcpu_exit_t' type. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- include/system/hvf_int.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/system/hvf_int.h b/include/system/hvf_int.h index 195d64dcf18..3d2be4092ef 100644 --- a/include/system/hvf_int.h +++ b/include/system/hvf_int.h @@ -59,10 +59,12 @@ extern HVFState *hvf_state; =20 struct AccelCPUState { hvf_vcpuid fd; - void *exit; +#ifdef __aarch64__ + hv_vcpu_exit_t *exit; bool vtimer_masked; sigset_t unblock_ipi_mask; bool guest_debug_enabled; +#endif }; =20 void assert_hvf_ok_impl(hv_return_t ret, const char *file, unsigned int li= ne, --=20 2.51.0 From nobody Sat Sep 6 14:44:48 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1756894281; cv=none; d=zohomail.com; s=zohoarc; b=XHuCgH2M5D1UszTX7+YilomTXGRouDsERMLA8s90oGmZpyAaGk/W04oD7lQVJU4sm2WIF8abW4DiCE3aV2c2odqXQ8pi66M7OrLzX+6J8exLLrAb4tgMGEA+oMHs4krC5sVSIKxRMRSIGMp6A6Befhr1Rvez6OR73hy5P7IQ1bA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756894281; 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=0fUgWLFNyRj4U87Ya1zFrmdpfoNfLiPoZL+nODXkG4k=; b=O3eu7wndnqh+NIf5lAdGhEigvDQbTlHg57KdRaBflLotALFFpJM4wpgXaQwEt0pS7f1YMB/mrilr+zCByPUsPO+Z6HdxWByTiSncVUxUUNfNDvE2Qle9UahXJ0SYOtvS4eHTNy8WeUjs+9Oe/4qid+Z4c4f/HRNsVGbAfYMIUqM= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1756894281963288.3125749880969; Wed, 3 Sep 2025 03:11:21 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1utkSC-0006vo-CE; Wed, 03 Sep 2025 06:11:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1utkRa-0006Pl-AQ for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:10:37 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1utkRX-0000Tm-IF for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:10:21 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-45cb659e858so2762975e9.2 for ; Wed, 03 Sep 2025 03:10:17 -0700 (PDT) Received: from localhost.localdomain (98.red-88-29-180.dynamicip.rima-tde.net. [88.29.180.98]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3cf33fba9fbsm23082809f8f.50.2025.09.03.03.10.14 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 03 Sep 2025 03:10:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1756894216; x=1757499016; 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=0fUgWLFNyRj4U87Ya1zFrmdpfoNfLiPoZL+nODXkG4k=; b=LS1qcCS/JSJ29D20UqRp+GY6a9L+r8G1Tdhi3B4gvwXUiDM2+1DMVY6Joal0We4e0z 1tZh39yZNHKcCJ815zeP4JESJWPVVWNU5bD1ITsHuk5o3bjQK27nofLfZViM/8egOmC/ kpDrN5bc3Q7yCALEs/prKJ5jY9gyor86fQyEAP5r4skYQ+/tQenELl82LBZ4lXyDKUJJ fS+FC+rkXVGxTU6rhVjxksvsuPEz+ECyf/iKmHiZuSSYjZDTSebwUAWtoViuVIYDDcBO mL5XwFZ8+/x1jYav5wc8R5sCmL0FgDEBanQpJmzORVc6Csb37r2T9Db+Tvj8PrNqIjMi +PYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756894216; x=1757499016; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0fUgWLFNyRj4U87Ya1zFrmdpfoNfLiPoZL+nODXkG4k=; b=ZpvSCc6htLF2SiEHU53o69yfOBlztNcI2ctZkovar7/WAzZU8yG4WlXPaJCpiXWmF7 ITOEr+ItWZuUweEeVJb2RU+X3VRBa/TbaH+0decplSgAPeCD3AEBSWF4fzraJJ8oezXV l+xXfQvoQ9T5VqTcmC0KoBotaIHM043AmcFao7cnp9i/y0ozxg0ww94kEICQL+sYaOl8 lbFdTZaDSWM3JZzrRd8lw+GZSwHa+NkdHzroeqQpVucB1lO7Io5NkIT3rsAHwUBSWwyh TEeQqacjEb9BqoG7cc4cLa26F7MCgGj84TZSUvRFnq5FQp5k5w9y1vPmzgg4Ci2UV9ME cMTg== X-Gm-Message-State: AOJu0Yxrmgw1/+iMsxd7we14DFrSWN8KWLLV0VymF7IsfPdLYrWx838c yEN3Un5PJ9RgjZOBlDyr0q/XX10bhxX+wo1EznryaN5Swmlqqcb5JOIZwPXI3QxLKWfpIoLo871 qaKKAzo1iDQ== X-Gm-Gg: ASbGncsd+QmKPhX6TwA/s835cwyby3wJXkzfyZ7JJCejjPnLW37f4sh6N1Um6wCrD80 iglweMny3y+nyzbxmCPGA5NQNuDxupMevp+KEh4gygmkdlg8njMb9rMKu841xrfQZlUPiJ0maqv mkxMtAXzkX7vJ8dO4QoQ6hlXHx10pVMNK36AqTPhvDufuXmSwAQrX1RwJ0sTXg7lCxktTRsex43 NT9J1SUaMfKyAtJOfeDShmRPRKYi5p+eB7bdvHQRG6DuuM6/29By1ct7YC39yy1j02cVj3lFzYm byd0AX+9f2TN4VrtcuM1tjXBFn89dLvoexcVzTVj1b9k39VNu58jp0TafBE3IZUbcyws/AA4STE IOD/kaTbQ3bZ8ON940Za/lyd8aGR5oExor3XrtUSMvPgLrJdkE+XcTvy5AL4Ap5/bAtggwNGEel xxcqWsmw== X-Google-Smtp-Source: AGHT+IGOhuq0u3nwM5iPLA36iAloZif9a/HS2UIgkB042U+7dAVQ7RbjlGPc6pyL/tEF6RfdU7N2Aw== X-Received: by 2002:a05:600c:4ecc:b0:459:da89:b06 with SMTP id 5b1f17b1804b1-45b8555b390mr145082195e9.16.1756894216308; Wed, 03 Sep 2025 03:10:16 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexander Graf , Richard Henderson , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Mads Ynddal , Phil Dennis-Jordan , Stefan Hajnoczi , Cameron Esfahani , Roman Bolshakov , Paolo Bonzini Subject: [PATCH 23/24] target/arm: Rename init_cpreg_list() -> arm_init_cpreg_list() Date: Wed, 3 Sep 2025 12:06:59 +0200 Message-ID: <20250903100702.16726-24-philmd@linaro.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250903100702.16726-1-philmd@linaro.org> References: <20250903100702.16726-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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 @linaro.org) X-ZM-MESSAGEID: 1756894284858124100 Prefix init_cpreg_list() with 'arm_'. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/internals.h | 2 +- target/arm/cpu.c | 2 +- target/arm/helper.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/target/arm/internals.h b/target/arm/internals.h index f0aa26c5117..400b4d670f6 100644 --- a/target/arm/internals.h +++ b/target/arm/internals.h @@ -374,7 +374,7 @@ static inline int r14_bank_number(int mode) void arm_cpu_register(const ARMCPUInfo *info); =20 void register_cp_regs_for_features(ARMCPU *cpu); -void init_cpreg_list(ARMCPU *cpu); +void arm_init_cpreg_list(ARMCPU *cpu); =20 void arm_cpu_register_gdb_regs_for_features(ARMCPU *cpu); void arm_translate_init(void); diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 633ec55a57c..1789890dea3 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -2141,7 +2141,7 @@ static void arm_cpu_realizefn(DeviceState *dev, Error= **errp) arm_cpu_register_gdb_regs_for_features(cpu); arm_cpu_register_gdb_commands(cpu); =20 - init_cpreg_list(cpu); + arm_init_cpreg_list(cpu); =20 #ifndef CONFIG_USER_ONLY MachineState *ms =3D MACHINE(qdev_get_machine()); diff --git a/target/arm/helper.c b/target/arm/helper.c index fb62742d983..0db3e05571f 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -237,7 +237,7 @@ static gint cpreg_key_compare(gconstpointer a, gconstpo= inter b, gpointer d) return 0; } =20 -void init_cpreg_list(ARMCPU *cpu) +void arm_init_cpreg_list(ARMCPU *cpu) { /* * Initialise the cpreg_tuples[] array based on the cp_regs hash. --=20 2.51.0 From nobody Sat Sep 6 14:44:48 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1756894290; cv=none; d=zohomail.com; s=zohoarc; b=K9DGnkPsASChjii1zHYAjM8OTeAEQ3h5Q44Ypd4AuRWnzu14NMP10xLRWv11a7XK5kevvzyzrZWJ/Ix8uvcYsCDeLC2SGOC9yloOu7ODslg/xdvEvTyW3lA/iXmCWHsnZFsevb3vmS5rTB0KSQwk8T5SlrofvDHOw1TRZ2gOtUw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756894290; 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=d5FGcGNnO5bFwKSGnQCLf0ZTA2SwcR6MoHg2PC3auVs=; b=j5BeWzHgFJONaN21YKWTMaxTF9C1W8GEH6Y+O93FQi89ahy9blrU1eHwASKx0cskWN0Gc2HEzxHgSoeKiVUnlysMfz8GYwtXu5WeK6UO0HKNeM0qnP+G9JutdMEgDzAxOAv0T7q0l5+xzLQYA7pdIVVHKOUJ9K4sT2zSGhBON4c= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1756894290604290.7050781874882; Wed, 3 Sep 2025 03:11:30 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1utkSG-0007TW-2y; Wed, 03 Sep 2025 06:11:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1utkRt-0006Wa-Vy for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:10:46 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1utkRc-0000XG-L6 for qemu-devel@nongnu.org; Wed, 03 Sep 2025 06:10:26 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-45b89147cfbso29736605e9.3 for ; Wed, 03 Sep 2025 03:10:24 -0700 (PDT) Received: from localhost.localdomain (98.red-88-29-180.dynamicip.rima-tde.net. [88.29.180.98]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3d690f2edf1sm12379106f8f.16.2025.09.03.03.10.20 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 03 Sep 2025 03:10:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1756894223; x=1757499023; 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=d5FGcGNnO5bFwKSGnQCLf0ZTA2SwcR6MoHg2PC3auVs=; b=s8SNLN5uH/pt0WKADoJgRLccczogKUm8KW/fRJtGn73f0IJLErKLKJgI6ZqUZ5RbNR /dp3Yd5JlpGhh6uY7Gj1gHfQzY29Vq+UeMgTe+VO5TJ3TETT5c2zOZ6Jwju5U3dGOIki BWtgnmDjaRdLE8nFsX3sWPnaqaPjwMasjd4Y/383GyDmxkhUOkHGssYVVOWq5yLNXi0b c5jjoWXTXjX2StGIU55/K/rrh0yfE4+3vd5gC1fI/7rXphJ7Z2wHeem0zs4e73z/dfwb /w99QKjIhoorlC6xFYVMDwdzjDTy9ufoTuIB2lo/jKjoMdyTc6JSYpUKrEJsIr885LUe +7lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756894223; x=1757499023; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=d5FGcGNnO5bFwKSGnQCLf0ZTA2SwcR6MoHg2PC3auVs=; b=tMjcP8BbImweCHxG6EiF+c3P1KLB+qEDj2bF5Q5Fghab7YhbhhZYM64W0Fv04ck6gA Rm9CvB2edoa8kGkxwC3p47v546l0xdSmkb0rdCQfEipaCTbAApEXHrlpKCHiEP/Mn17G mEKhdFGOq7AANpsiBPCrGkMP2yfvVKaQk1DU3WCSMom6tUL4O8XIiy6eBGmATbLOXJ15 c4VrQyx9E1hQdQaHWZxzKBWPEWb+WXgqHBMkvZpo7dqmd0AxpRiWocoGt8XBv8Tbq5ta /F3UBsE9+6rCRnTrnb8LU7HTY/tpxxyleUYpzMvU2fRwwtwcZhkoV1mSsjgz0h6q/i5+ wFqQ== X-Gm-Message-State: AOJu0Yz7VUk2fztM6AONc732Plzxyd8DULYtupCQoOuDewtk2SM5O934 QuSz6g7o5EVX4yLxSg4eh5PWyaVI7mLu5aoeMW+eAa2AKpCq0CFDr3qWoSsDhU1kqcoH2KJpI6i 6NSBkReU2xw== X-Gm-Gg: ASbGncv73f5BCIuk7EXVCAhpX5WRtgyDVs3dPOvRTOIhqj1mrwNUJbK1u065mVYO27/ rVGbU2kmHYDUmrRok4ZQwf6DOS4KlNLBAPXLEUKvILTUm3FLO8ngXGHA2EAC9AFffkEtzlAS3Sm msLQmZWQGXzHVwPCGsSg/e1ttUqJ2gACbr/3blCbcV63tEuDoU6UdyREqr127l+5SkGcZKt2syB RWR/XW6yLZ2m4cngzPyqyRSSxGBBYb6omu6RuDVvSIkjaTKqdAbCjkXeZKY5ZsndbCgvwK1+EfD nFB3WQzf5hG3JLxG9Z51wMTIs0POjb/YK0DzIuIQE9aW0XWuXuHFB4R8pAK/C5FXz6jAqIU6Jzc 5ZLeKs5w/CZk0TC3nimM79IGihMhrQRYpCzYG/hbzJ7wtbp3HmMfPvL4SAdfriiH++lpmn4alCJ ahByEN80FVy98WdsXa X-Google-Smtp-Source: AGHT+IG6FhdEfuIiSctR9fI6wgfSq73X17SaR0W0HqT47riT3b5U2isz3lWPnoyo7+ygKQAQAUu+2w== X-Received: by 2002:a05:600c:a43:b0:459:d3ce:2cbd with SMTP id 5b1f17b1804b1-45b8556a7acmr120350345e9.13.1756894222822; Wed, 03 Sep 2025 03:10:22 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alexander Graf , Richard Henderson , qemu-arm@nongnu.org, Mohamed Mediouni , Peter Maydell , Mads Ynddal , Phil Dennis-Jordan , Stefan Hajnoczi , Cameron Esfahani , Roman Bolshakov , Paolo Bonzini Subject: [PATCH 24/24] target/arm: Add arm_destroy_cpreg_list() helper Date: Wed, 3 Sep 2025 12:07:00 +0200 Message-ID: <20250903100702.16726-25-philmd@linaro.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250903100702.16726-1-philmd@linaro.org> References: <20250903100702.16726-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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 @linaro.org) X-ZM-MESSAGEID: 1756894291285116600 arm_destroy_cpreg_list() releases ressources allocated by arm_init_cpreg_list(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/internals.h | 2 ++ target/arm/helper.c | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/target/arm/internals.h b/target/arm/internals.h index 400b4d670f6..5af9b1110e8 100644 --- a/target/arm/internals.h +++ b/target/arm/internals.h @@ -375,6 +375,8 @@ void arm_cpu_register(const ARMCPUInfo *info); =20 void register_cp_regs_for_features(ARMCPU *cpu); void arm_init_cpreg_list(ARMCPU *cpu); +/* Release ressources allocated by arm_init_cpreg_list() */ +void arm_destroy_cpreg_list(ARMCPU *cpu); =20 void arm_cpu_register_gdb_regs_for_features(ARMCPU *cpu); void arm_translate_init(void); diff --git a/target/arm/helper.c b/target/arm/helper.c index 0db3e05571f..9b7a2b94bd3 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -268,6 +268,14 @@ void arm_init_cpreg_list(ARMCPU *cpu) g_list_free(keys); } =20 +void arm_destroy_cpreg_list(ARMCPU *cpu) +{ + g_free(cpu->cpreg_indexes); + g_free(cpu->cpreg_values); + g_free(cpu->cpreg_vmstate_indexes); + g_free(cpu->cpreg_vmstate_values); +} + bool arm_pan_enabled(CPUARMState *env) { if (is_a64(env)) { --=20 2.51.0