From patchwork Tue Sep 27 18:05:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 9352471 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3EFE86077B for ; Tue, 27 Sep 2016 18:06:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3696229250 for ; Tue, 27 Sep 2016 18:06:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2AFA629272; Tue, 27 Sep 2016 18:06:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C777E29250 for ; Tue, 27 Sep 2016 18:06:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935819AbcI0SGh (ORCPT ); Tue, 27 Sep 2016 14:06:37 -0400 Received: from mail-wm0-f53.google.com ([74.125.82.53]:37967 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934109AbcI0SGI (ORCPT ); Tue, 27 Sep 2016 14:06:08 -0400 Received: by mail-wm0-f53.google.com with SMTP id l132so26944498wmf.1 for ; Tue, 27 Sep 2016 11:06:08 -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; bh=NitPJ/LKyEaKszUGwn2ebJtNm5T1087UVbpPw628IKQ=; b=bLH7dG7dbNnRHESKFnUCKufMsIUXTEAfXBe7OzTNauqghTOqhnRwV/QncB/ZqEeYVI PcwsRDnB66Ipk5unO29af5z18hJXRaEzPutDbqhmFKMyIk9t9cZpnsv+bhXOKzhOVjCg oiv7Ib3edr8VZTqAsfafnsNQqryovfWwm5rDM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=NitPJ/LKyEaKszUGwn2ebJtNm5T1087UVbpPw628IKQ=; b=ZLhngUFo20jow8/fsx7OVXWauITpRQnqqFzpt2ee2Fdznc8fHG0y7PERCWeFlAs/cF j2d9Ll74l51pp+v5sXFOItAgTe0TTxiDt9GhH6RXXx2ODEkvOQETB3aoZrmkVUkE6L+I BD26HgN4TW8XmHWX4nQHs2ZTo0cRMKVVMb8GagK8tWD/ZFzuQDqTLok/KGkHKKtGsiG+ fPcsaaaMXiYFhBSLiVNkHOazWoCCEQM1lvkgDO8Ed0RPPYhPoVRyqHf7IueAX9mq9vFI LG+zhMj7KLtr1EURJp/pIB7nrY/bCPf67GpE5UGKdEScuSV/jVjh2EZZy5bTCML1U65w OHig== X-Gm-Message-State: AA6/9RlEb+QVXmeLnFjHY9oM/IF9tFVAKtaCysAmAUXTed28IP+kGAyoj8+4NAH4ZEDPEjD6 X-Received: by 10.194.126.196 with SMTP id na4mr12777420wjb.134.1474999567496; Tue, 27 Sep 2016 11:06:07 -0700 (PDT) Received: from localhost.localdomain ([94.18.191.146]) by smtp.gmail.com with ESMTPSA id k2sm17932539wmg.23.2016.09.27.11.06.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 27 Sep 2016 11:06:06 -0700 (PDT) From: Christoffer Dall To: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= Cc: Marc Zyngier , kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Christoffer Dall Subject: [PULL 22/50] arm64: KVM: Route asynchronous aborts Date: Tue, 27 Sep 2016 20:05:30 +0200 Message-Id: <20160927180558.14699-23-christoffer.dall@linaro.org> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160927180558.14699-1-christoffer.dall@linaro.org> References: <20160927180558.14699-1-christoffer.dall@linaro.org> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Marc Zyngier As we now have some basic handling to EL1-triggered aborts, we can actually report them to KVM. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall --- arch/arm64/kvm/hyp/hyp-entry.S | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/arch/arm64/kvm/hyp/hyp-entry.S b/arch/arm64/kvm/hyp/hyp-entry.S index d6cae54..d2f6640 100644 --- a/arch/arm64/kvm/hyp/hyp-entry.S +++ b/arch/arm64/kvm/hyp/hyp-entry.S @@ -120,6 +120,12 @@ el1_irq: mov x0, #ARM_EXCEPTION_IRQ b __guest_exit +el1_error: + stp x0, x1, [sp, #-16]! + mrs x1, tpidr_el2 + mov x0, #ARM_EXCEPTION_EL1_SERROR + b __guest_exit + ENTRY(__hyp_do_panic) mov lr, #(PSR_F_BIT | PSR_I_BIT | PSR_A_BIT | PSR_D_BIT |\ PSR_MODE_EL1h) @@ -148,7 +154,6 @@ ENDPROC(\label) invalid_vector el1_sync_invalid invalid_vector el1_irq_invalid invalid_vector el1_fiq_invalid - invalid_vector el1_error_invalid .ltorg @@ -168,10 +173,10 @@ ENTRY(__kvm_hyp_vector) ventry el1_sync // Synchronous 64-bit EL1 ventry el1_irq // IRQ 64-bit EL1 ventry el1_fiq_invalid // FIQ 64-bit EL1 - ventry el1_error_invalid // Error 64-bit EL1 + ventry el1_error // Error 64-bit EL1 ventry el1_sync // Synchronous 32-bit EL1 ventry el1_irq // IRQ 32-bit EL1 ventry el1_fiq_invalid // FIQ 32-bit EL1 - ventry el1_error_invalid // Error 32-bit EL1 + ventry el1_error // Error 32-bit EL1 ENDPROC(__kvm_hyp_vector)