From patchwork Wed Sep 26 11:20:47 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: 147568 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp604602lji; Wed, 26 Sep 2018 04:37:38 -0700 (PDT) X-Google-Smtp-Source: ACcGV61bubYsZESbn+MNxpsEglfaI0N2SzpiW92cB6vwVB7EMySQe0fQ5z5laCmTyukKJ8xOX66j X-Received: by 2002:ac8:7145:: with SMTP id h5-v6mr4152468qtp.270.1537961858685; Wed, 26 Sep 2018 04:37:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537961858; cv=none; d=google.com; s=arc-20160816; b=vCw0RyvzLMA9laKfYxLMS6Tg0p0fk6RRN5pWWhWSfGtJ7P9wfXh8lWIuXMREME6d6Q bywXEL65onUeR7e3YIK8FLhi1p9iclJeBva/9RzrQK3QfoWAeHM00nuSr3XvNcpixFA4 uwkiLmubPay9vOM/1djbT1Gmsg/Tx0HzwlBwkNyyedds1E/mCspbdLTo/UCtoaGzwwSn V4PntcliSwG9ZiM7kyjsRvgDiO3ymBbGSzlY1UNDogOnw16Put6EJmIzx/tzJGeEGzor 34eQ2+M6rdoXQVRbzsH/mGlZWxhFjFj6238Lrr4mDwEU4RgTYqwxSEjDBh6wUw01/Bkg ErNg== 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=fj5xCb/gmUTk4UnTjYc00kyhkvcZJIju6oudisUoi/w=; b=MV13x33Ufn4LfjGXZkkfXrvg2471IBnVoRkcknjfM2AoTud87a8+Z6wEOi18Xt1RCk vOHlQgVeDN+POjTtW5eqlwPZi9q6cGeSnih2ix2q+bUF3dBNbFdWLMynaO+3qQ5p5C2S 5JmWEEv9dq6CXw27KBmnyj4T24UhXmrwhWiSGw7dlHEwMHf58UbOBBZEUtFZAFY1wk+H bkH9WUi8qgi4mOXfCCD7jjWG7FYJL2VrkF9KufZlQRWj4iDUiPAszU5CG1Pz/uOlKjXc xjfwcj+blSicrlqjN3V6NHP2FQuB6RwrZAfXDJk1QUqwWnhduNdU9x8889K0vbL0yP0s 9hKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=iyFuw28d; 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 g28-v6si589589qta.395.2018.09.26.04.37.38 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 26 Sep 2018 04:37:38 -0700 (PDT) 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=iyFuw28d; 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]:57756 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g588Q-0003Bu-4m for patch@linaro.org; Wed, 26 Sep 2018 07:37:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51382) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g582a-0006Gr-G7 for qemu-devel@nongnu.org; Wed, 26 Sep 2018 07:31:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g57sD-000173-Kh for qemu-devel@nongnu.org; Wed, 26 Sep 2018 07:20:55 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:53054) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g57sD-00015o-Ar for qemu-devel@nongnu.org; Wed, 26 Sep 2018 07:20:53 -0400 Received: by mail-wm1-x32d.google.com with SMTP id l7-v6so1858408wme.2 for ; Wed, 26 Sep 2018 04:20:53 -0700 (PDT) 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=fj5xCb/gmUTk4UnTjYc00kyhkvcZJIju6oudisUoi/w=; b=iyFuw28dx9Hu903wsLhHW0U1YTHAkPvbFxLUPGYMtrNcOd+uGDvpsinAyX+3d9ppgC MPxsPW2lIrKX3EcbowooBouHpleML0lmE6JzjKWyE8bwJXQ4zjOOgyrV4DnbqOY008jZ 2OiExnBAeVUVIWT8udRLQfa8QklitYbi/2clQ= 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=fj5xCb/gmUTk4UnTjYc00kyhkvcZJIju6oudisUoi/w=; b=p4wKBVIiV1LloHycvUIVEXVxqCzvkxO0TP/HK6sK36puowve/axWzr/yQDpvXch8Xe r35Yk1UgUJFD1TvSsa5k3odfqihNPxD2ORY7zoRzzTEcysQ+K+metgQc+dvvZJL65H61 oRMF2TKcJnlwLMZmd2MuI2TyO8e9TFq2rZ0zLqLJKdBs9bCdwkirOcjBGWbroyvxPrju pNUKyopH+rS+OD7EnnhsPlf6CMnnZKFiHN/kupIYUCIiMrF7UUxqKb2v3+6tJqH0I4b6 2YLXx4rldkhtDnDm+dvToVtxtxQ99JcVjE6m2JZzdnSegAaitrdw0W8cwcBiJr+lmxkS +dSQ== X-Gm-Message-State: ABuFfojX1rQhaPTIayhOQeyHqVk9IrWfPHWOfHZqipzJ8zv0+/ebr1yw iW8jqRt9KDmn/KIIsn8NK+gBCA== X-Received: by 2002:a1c:5f54:: with SMTP id t81-v6mr4180726wmb.67.1537960852270; Wed, 26 Sep 2018 04:20:52 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id j27-v6sm6139787wmc.17.2018.09.26.04.20.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 26 Sep 2018 04:20:49 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id CEDC73E0489; Wed, 26 Sep 2018 12:20:48 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Wed, 26 Sep 2018 12:20:47 +0100 Message-Id: <20180926112048.17778-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180926112048.17778-1-alex.bennee@linaro.org> References: <20180926112048.17778-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::32d Subject: [Qemu-devel] [PATCH v1 3/4] 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: ard.biesheuvel@linaro.org, Peter Maydell , qemu-arm@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , omair.javaid@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" When we are debugging the guest all exception come our way but might be for the guests own debug exceptions. We use the ->do_interrupt() infrastructure to do this however we are missing a full setup of the exception structure causing an assert later down the line. Signed-off-by: Alex Bennée --- target/arm/kvm64.c | 1 + 1 file changed, 1 insertion(+) -- 2.17.1 Reviewed-by: Peter Maydell diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c index 346e1f1a73..9ceff1884c 100644 --- a/target/arm/kvm64.c +++ b/target/arm/kvm64.c @@ -984,6 +984,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();