From patchwork Fri Nov 9 15:21:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 150660 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp79594ljp; Fri, 9 Nov 2018 07:27:16 -0800 (PST) X-Google-Smtp-Source: AJdET5eVC2j5iKk8Ow9Jmhya9XceWV+dD1XRAEsWTE1vRC2EPdWsoqr9IISIK9ZjIaVg4ItJf+3D X-Received: by 2002:ac8:2e44:: with SMTP id s4mr9085460qta.355.1541777236045; Fri, 09 Nov 2018 07:27:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541777236; cv=none; d=google.com; s=arc-20160816; b=G8UzAIZswtIXpGfTNTimq3e3fHXWiiD38+JwShMEGqeBgyUN33tOWDf0v6uT5Qjf/h yL1i7msVqfqmXgrcwdzYpLFKBkgdSSzFtOwWlpoWVDo77fftz4Uzm4b88EXRTG5RfQ3i 88cQ2XXK8tU7I7fmYmPaZQ+PvUwNtSiGS0l/5vAijz8bQp+8M3vn37lj8o5WCXcQVHyJ Hg9geiDniSc0v5IcRIKfjKhasHOwGVNkUk4MQvBg9ctOG9yBm+JrzNqXXFabMuWzlGbw KH+RwZXH1jMXVORDwzC6KwyopDyTowC9youQjHTBg14XKCl5nN84VvzyFDSZj8CWTe7Y +MaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=pqkYK55xpellAhp9NIWacaAgqJ2jD6Y2qljTLUr2LBA=; b=jaZ4td6xiVtP2j41mfAdVDC+n3shrSu3ovTM5TPRLclyWTZVQa09Tj/v8CC645a5ou ojIQ6XLbvOJVl2AxWwPYAibIewmAxpbGpBjG8Fc0A0ga2ZB388CWO5xbQYEnie8/51Cv e8VhPbItnu8/sILK8k3prc5ci8EXVASqFCwu/F8WmabSnMfqctJ30wgz8uFkffqUlLs3 rLuPJKW0jumwgoVdk2gD1/wz79DAi8yGhTrdRq8ogBHy39eAlSAEmOaiCOoOobLYi+VQ BbVi2JbEMLRWjZmMZ+GMDPjIzRCx2EV3CHdpGwmsphm1AWifHbZYiwh2W5INu9P3cQhm X6rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=jf4bCFLg; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id c48si1125256qtc.275.2018.11.09.07.27.15 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 09 Nov 2018 07:27:16 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=jf4bCFLg; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:34742 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gL8gl-0007da-Dz for patch@linaro.org; Fri, 09 Nov 2018 10:27:15 -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) 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-Received: by 2002:a5d:47d2:: with SMTP id l18-v6mr9089110wrs.319.1541776882738; Fri, 09 Nov 2018 07:21:22 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn?= =?utf-8?b?w6ll?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson --- v2 - tweak commit msg for grammar --- target/arm/kvm64.c | 1 + 1 file changed, 1 insertion(+) -- 2.17.1 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_debug_exit_arch *debug_exit) cs->exception_index = EXCP_BKPT; env->exception.syndrome = debug_exit->hsr; env->exception.vaddress = debug_exit->far; + env->exception.target_el = 1; qemu_mutex_lock_iothread(); cc->do_interrupt(cs); qemu_mutex_unlock_iothread();