From nobody Sat Nov 29 10:15:17 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=1764170814; cv=none; d=zohomail.com; s=zohoarc; b=nK6VPDIGg4PyhU2iej9Lh90WWOuyG4ieVHTPfVEapHTKWVw5wB+qkVhG976/Z5LRywpC1Le4TXtMKt8Uwq6+80l64vxYbtfw/f0sMkz8LUCFJKRmee/HeIWFJcFSDJP5r+Jb/qA0J709pl31B2QxGjqmDXnLF/gAdoQgGop1mTs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1764170814; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=opiub8bHokm5FkeSx/igEXrcRHxOwN8/+eMddbC16cs=; b=bjglU9VXZTH/RzIpUg240gPv4ZJDsM71QHbzZZBtrxu1UolnlaABUx4rbie75rWHmb0uChNpVijsweTlfqyLTX9SebAYSnJFkKYMX5ky8JBgtHu4JZIO8AU3bGpycJ8iJRHG1AV/4CV97iz0MODvb3V04YuRgZ1JAZ0Gv79hahY= 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 1764170814743684.3369717671612; Wed, 26 Nov 2025 07:26:54 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vOFpJ-0002Vk-1T; Wed, 26 Nov 2025 08:44:57 -0500 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 1vOFp5-0002MF-6d for qemu-devel@nongnu.org; Wed, 26 Nov 2025 08:44:45 -0500 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 1vOFp0-0000eu-9P for qemu-devel@nongnu.org; Wed, 26 Nov 2025 08:44:40 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-4779aa4f928so55363225e9.1 for ; Wed, 26 Nov 2025 05:44:37 -0800 (PST) Received: from localhost.localdomain ([83.247.137.20]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4790b0c3a28sm46249025e9.9.2025.11.26.05.44.35 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 26 Nov 2025 05:44:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1764164676; x=1764769476; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=opiub8bHokm5FkeSx/igEXrcRHxOwN8/+eMddbC16cs=; b=cQ01svm9W0oV507pMmFdOWlbDEm+Y8XhFlZoAGNiPur1i6s0dRqz7QXNG44b20SzQR WWkfo0xecU1HRI6sgqD/PubvUzdD667j2W2mY2OhINWQWbMXScaBIhZHlLEQKShfedvr Htc31RGqo+FZqEHXOH32mJU8BULZRvDVmGaiXq+D60+Vpik9/vwPZiQNkSBDFp/IVqt0 B02pifwtgPi3UifveciBDlGUtT4/20yCPZjopTLyejgfRcYOzqWA0mx5SPgtKFn/p9dU imsfyNlNfR5kuTucYd/VWdgY0qFKPIezPb7YdHK3+DX4ZpTFTth49ujUTK/uzG5ZuMCP N72w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764164676; x=1764769476; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=opiub8bHokm5FkeSx/igEXrcRHxOwN8/+eMddbC16cs=; b=ZSs/q0T8JB9b3HTGRQOqylUhuunp7FjUyomKfZJ343PGhImTlVbuysIGQyEU7YqVV8 2WGSSNwK+VO+UMSANenp/uKrxU44rz4wrXo5QPZYzxS3YTkPj9nxXl1OF9aHpobsX5zE U7FwYKR2XuwixOtKQYmpaE8UlR7ujscWJx67+4G9muawjK7hDtKHF1JCje6S5TVC1N1u EaN5nwA7lrtKsK3oPoCr7HA/XnDx0tfUCnekIcHPBtReTqAOWuRjgZ2Yv8ICAxhFSmbN At3uucKHVzFP5H0BsCgzXLXbkfTQIIR8Bra365cR+/GHVWkhstKZYpveJLXtuK1Aq7m7 le5g== X-Gm-Message-State: AOJu0Yzm8OUcaG+W/OKTKpgKcRx+s/dy6OY5Cmj9oPL0uF3CuHreuIL5 x2HMEWRTs8O3WRu96Jq7zasFVMYY/CMeAR740nrLBgbyRpIcA556cX5tA2qWzRhb6VvYX69s42w FWpXCVlk= X-Gm-Gg: ASbGncs/GDN6qT8jZB8t4jQ3QmkIvBwq32guI/7Jjtie8MUa7ywCngFevzBIvOvqH5m gySZs/fVMkZ5R3RWxF52oM+GxHu4aopU4Meys0sniIeWsORxyoRDOZbWlnLGJUIN/wsKs7ZKWpJ wir7eHg3b+djoD6HXmsIEAcR7g8k7jkdcy3iLVHy+rTWwwSD0jc8qwquMHSLsNShStMAXkwamcP 1CYG29LiIZ923un2fp5eGXfhhdGc8pjQQLyCIYgFb2GGnX7dwPgrQFaQjrOLKV0vDg/zrzKsetV KsbGPqP6EtxQrrUHsA/lxTbCfxgL3rEQ5NWT5bp7mKuPYELY1p5I537UJq9WKx9hHBPqW4YYmnv k0O/AkvpYJFHQIu24qecKcHvtK37sWPKbWRnjgPJE2J8bkrucrbH/RGXpnWEgxcdBX5Kp1QOppS TlysZuBFpcqDynXV2u5u7ZCGNBzGN6QKaHH0mM74PQsglBKw== X-Google-Smtp-Source: AGHT+IFlEUSkVjYWrzoF/H17sSGosg+YvB4U7fgnsLLHm6YER2tSAKlnXy6cRQshcLeLKnkFkr96wA== X-Received: by 2002:a05:600c:1c87:b0:477:98f7:2aec with SMTP id 5b1f17b1804b1-47904acef12mr78375085e9.3.1764164676327; Wed, 26 Nov 2025 05:44:36 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Roman Bolshakov , Richard Henderson , Phil Dennis-Jordan , Cameron Esfahani , Mads Ynddal , Nguyen Dinh Phi , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH-for-10.2 v2] accel/hvf: Fix i386 HVF compilation failures Date: Wed, 26 Nov 2025 14:44:34 +0100 Message-ID: <20251126134434.14355-1-philmd@linaro.org> X-Mailer: git-send-email 2.51.0 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=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: 1764170815932019200 From: Nguyen Dinh Phi Recent changes introduced build errors in the i386 HVF backend: - ../accel/hvf/hvf-accel-ops.c:163:17: error: no member named 'guest_debug_= enabled' in 'struct AccelCPUState' 163 | cpu->accel->guest_debug_enabled =3D false; - ../accel/hvf/hvf-accel-ops.c:151:51 error: no member named 'unblock_ipi_mask' in 'struct AccelCPUState' - ../target/i386/hvf/hvf.c:736:5 error: use of undeclared identifier 'rip' - ../target/i386/hvf/hvf.c:737:5 error: use of undeclared identifier 'env' This patch corrects the field usage and move identifier to correct function ensuring successful compilation of the i386 HVF backend. These issues were caused by: Fixes: 2ad756383e1b (=E2=80=9Caccel/hvf: Restrict ARM-specific fields of Ac= celCPUState=E2=80=9D) Fixes: 2a21c9244740 (=E2=80=9Ctarget/i386/hvf: Factor hvf_handle_vmexit() o= ut=E2=80=9D) Signed-off-by: Nguyen Dinh Phi Reviewed-by: Philippe Mathieu-Daud=C3=A9 [PMD: Keep setting vcpu_dirty on AArch64] Signed-off-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Nguyen Dinh Phi --- Superseeded: <20251126094601.56403-1-phind.uet@gmail.com> Untested. Once tested, worth to apply as buildfix before tagging? --- accel/hvf/hvf-accel-ops.c | 5 ++--- target/i386/hvf/hvf.c | 6 ++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/accel/hvf/hvf-accel-ops.c b/accel/hvf/hvf-accel-ops.c index 3e5feecd8a7..e4c62522e10 100644 --- a/accel/hvf/hvf-accel-ops.c +++ b/accel/hvf/hvf-accel-ops.c @@ -148,10 +148,11 @@ static int hvf_init_vcpu(CPUState *cpu) sigact.sa_handler =3D dummy_signal; sigaction(SIG_IPI, &sigact, NULL); =20 +#ifdef __aarch64__ pthread_sigmask(SIG_BLOCK, NULL, &cpu->accel->unblock_ipi_mask); sigdelset(&cpu->accel->unblock_ipi_mask, SIG_IPI); + cpu->accel->guest_debug_enabled =3D false; =20 -#ifdef __aarch64__ r =3D hv_vcpu_create(&cpu->accel->fd, (hv_vcpu_exit_t **)&cpu->accel->exit, NULL); #else @@ -160,8 +161,6 @@ static int hvf_init_vcpu(CPUState *cpu) assert_hvf_ok(r); cpu->vcpu_dirty =3D true; =20 - cpu->accel->guest_debug_enabled =3D false; - return hvf_arch_init_vcpu(cpu); } =20 diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c index 16febbac48f..2023a7bfbb0 100644 --- a/target/i386/hvf/hvf.c +++ b/target/i386/hvf/hvf.c @@ -728,7 +728,8 @@ static int hvf_handle_vmexit(CPUState *cpu) uint64_t exit_qual =3D rvmcs(cpu->accel->fd, VMCS_EXIT_QUALIFICATION); uint32_t ins_len =3D (uint32_t)rvmcs(cpu->accel->fd, VMCS_EXIT_INSTRUCTION_LENGTH); - + CPUX86State *env =3D &x86_cpu->env; + uint64_t rip =3D 0; uint64_t idtvec_info =3D rvmcs(cpu->accel->fd, VMCS_IDT_VECTORING_INFO= ); int ret =3D 0; =20 @@ -966,10 +967,7 @@ static int hvf_handle_vmexit(CPUState *cpu) =20 int hvf_arch_vcpu_exec(CPUState *cpu) { - X86CPU *x86_cpu =3D X86_CPU(cpu); - CPUX86State *env =3D &x86_cpu->env; int ret =3D 0; - uint64_t rip =3D 0; =20 if (hvf_process_events(cpu)) { return EXCP_HLT; --=20 2.51.0