From nobody Tue Feb 10 04:02:15 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1541777203468523.0246600141305; Fri, 9 Nov 2018 07:26:43 -0800 (PST) Received: from localhost ([::1]:34738 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gL8gE-00070V-FI for importer@patchew.org; Fri, 09 Nov 2018 10:26:42 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42451) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gL8bC-0001CL-3y for qemu-devel@nongnu.org; Fri, 09 Nov 2018 10:21:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gL8b8-0002y3-Qb for qemu-devel@nongnu.org; Fri, 09 Nov 2018 10:21:29 -0500 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:34694) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gL8b6-0002mU-VF for qemu-devel@nongnu.org; Fri, 09 Nov 2018 10:21:25 -0500 Received: by mail-wr1-x444.google.com with SMTP id j26-v6so2303128wre.1 for ; Fri, 09 Nov 2018 07:21:23 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id q17-v6sm5985745wrw.17.2018.11.09.07.21.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 09 Nov 2018 07:21:21 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 512E83E04A5; Fri, 9 Nov 2018 15:21:19 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pqkYK55xpellAhp9NIWacaAgqJ2jD6Y2qljTLUr2LBA=; b=jf4bCFLgX0AD3lZYntqdN2qNEYv7VFyqHuj3YrvkC2KED57aUFNMAsw6C3lZPBEUvf apy/1y3AMJfqv/0leUDiezd4VA9lj2LJIeoO5Up76YYimNp+owOVREGC0p9XeZAxCP6o Thkl98iF/J0SiIR5uT4NQJ3umEYcI1gALjOAI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pqkYK55xpellAhp9NIWacaAgqJ2jD6Y2qljTLUr2LBA=; b=M98Oam7/8s5FYQiXI6N2I+hF1UNYuQ4yXPWrcVVB/sCymh5hdiT9GTWYwv+1jwWTge SFOnTsTYP85LZzZULc84MgdNkfahiI0SjuuEZKneotmhxJRrfYZhjGAnN2hCuf6oVUKE qDfbJ4fHTrzGxOCvym98B3QxeLEUo03LmO6YNNr1aZtp+jFHdkzYKl9iBTvwQapzNKid YKHz8OZuS40gQzBlROJK9ayBkep5lGFsvU5gIyo4dOqVDlBIcRz+pVPo8+a15rJgrNec 6VTmPdguSDw7Qq3JVs4cNRTDJ28Ryum8XkDzoN53Mybsz3OCPBB82ZhXc8GgvOcTCNI/ EA1A== X-Gm-Message-State: AGRZ1gJaSj/43s3Q1450BX4BcMLMY8E5NL4nf2RWGOb/j/Gs76lG5f5x ob2ek6ee7TbiGLYDTL8AAcb7QQ== X-Google-Smtp-Source: AJdET5ckmjLWnLQu2tvElkOmgcRC8SRnfo5vdSevhscXBORsGc4HTD6Rj+IHfo+lmcI19syX7zCexQ== X-Received: by 2002:a5d:47d2:: with SMTP id l18-v6mr9089110wrs.319.1541776882738; Fri, 09 Nov 2018 07:21:22 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Fri, 9 Nov 2018 15:21:15 +0000 Message-Id: <20181109152119.9242-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181109152119.9242-1-alex.bennee@linaro.org> References: <20181109152119.9242-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::444 Subject: [Qemu-devel] [PATCH v3 3/7] target/arm64: kvm debug set target_el when passing exception to guest X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, qemu-arm@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) When we are debugging the guest all exceptions come our way but might be for the guest's own debug exceptions. We use the ->do_interrupt() infrastructure to inject the exception into the guest. However, we are missing a full setup of the exception structure, causing an assert later down the line. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson --- v2 - tweak commit msg for grammar --- target/arm/kvm64.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c index c39150e5e1..46fbe6d8ff 100644 --- a/target/arm/kvm64.c +++ b/target/arm/kvm64.c @@ -1000,6 +1000,7 @@ bool kvm_arm_handle_debug(CPUState *cs, struct kvm_de= bug_exit_arch *debug_exit) cs->exception_index =3D EXCP_BKPT; env->exception.syndrome =3D debug_exit->hsr; env->exception.vaddress =3D debug_exit->far; + env->exception.target_el =3D 1; qemu_mutex_lock_iothread(); cc->do_interrupt(cs); qemu_mutex_unlock_iothread(); --=20 2.17.1