From patchwork Tue Sep 27 18:05:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 9352621 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 5AB15600CB for ; Tue, 27 Sep 2016 18:35:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 504302899E for ; Tue, 27 Sep 2016 18:35:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 44DF9289BE; Tue, 27 Sep 2016 18:35:53 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B84372899E for ; Tue, 27 Sep 2016 18:35:52 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1boxCz-0006QY-0j; Tue, 27 Sep 2016 18:34:25 +0000 Received: from merlin.infradead.org ([2001:4978:20e::2]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1box1p-0005Gx-R3 for linux-arm-kernel@bombadil.infradead.org; Tue, 27 Sep 2016 18:22:53 +0000 Received: from mail-wm0-x236.google.com ([2a00:1450:400c:c09::236]) by merlin.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bowlz-0008Q6-La for linux-arm-kernel@lists.infradead.org; Tue, 27 Sep 2016 18:06:33 +0000 Received: by mail-wm0-x236.google.com with SMTP id w84so190360452wmg.1 for ; Tue, 27 Sep 2016 11:06:14 -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=OBRkE0StBCWgHibpip4eiBNdsKpGB0NUV2M4EU5lgfE=; b=UQxP4e18aFZqnaZi5bok4O2XiQUo1AEjIZnrAhE3x/PbfvGqAPFDSgvtGKWHkjfYI/ aX7YRtp8kk3ItJv5wn2RqvPLjJOdbDPgIzOJ9eZZlly8hWqZzLQBwaFUmeU2FnddIvh3 cXVxDAGKaxsDSFTSo86yRi+Mm/kGYeKJY/1hU= 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=OBRkE0StBCWgHibpip4eiBNdsKpGB0NUV2M4EU5lgfE=; b=kzyhYA7/goZWRRYt9ZQsC49UG9pQeKiao3KlKQ11UF6Xr/lb9yRtgUc5SOm9Ci5ReP SNySx2P1ZkowoVBUHu1xA2AD4fGS/bU0L/7KKjYDAkbL1c24LZhtMopWH4DHTjS7vWXi CtEAXSryz6nKirZHGdSVtSgPS0QmqpWaqt4RAWbNx5m4KjQR3BBxP31WWlRllwh8jL57 M84U8fmEtS8/uY7Q81CxLwT5iwqKKX/fxXEbZaP12WgXWFShBLBTp31rkJBXH8/IMXBv u2uG4bVmlkh2EatBZN33+BjnSHulWQbmYoahrdWJOw1smPs8qDtoVFFvvz+S9wC+q2pY Z4eA== X-Gm-Message-State: AA6/9Rk6hFYcEDLkkb30lz/XQbu+9R7XBWR3KHvZPAhYxd8cLkajvNGU8akxjBFG0d7WaUYD X-Received: by 10.28.196.14 with SMTP id u14mr4314779wmf.17.1474999573314; Tue, 27 Sep 2016 11:06:13 -0700 (PDT) Received: from localhost.localdomain ([94.18.191.146]) by smtp.gmail.com with ESMTPSA id k2sm17932539wmg.23.2016.09.27.11.06.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 27 Sep 2016 11:06:12 -0700 (PDT) From: Christoffer Dall To: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= Subject: [PULL 28/50] arm: KVM: Add HYP async abort handler Date: Tue, 27 Sep 2016 20:05:36 +0200 Message-Id: <20160927180558.14699-29-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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160927_140631_882099_41F289F5 X-CRM114-Status: GOOD ( 10.91 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marc Zyngier , Christoffer Dall , kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Marc Zyngier If we've exited the guest because it has triggered an asynchronous abort, a possible course of action is to let it know it screwed up by giving it a Virtual Abort to chew on. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall --- arch/arm/kvm/handle_exit.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/kvm/handle_exit.c b/arch/arm/kvm/handle_exit.c index 3f1ef0d..863fdf4 100644 --- a/arch/arm/kvm/handle_exit.c +++ b/arch/arm/kvm/handle_exit.c @@ -160,6 +160,9 @@ int handle_exit(struct kvm_vcpu *vcpu, struct kvm_run *run, exit_handler = kvm_get_exit_handler(vcpu); return exit_handler(vcpu, run); + case ARM_EXCEPTION_DATA_ABORT: + kvm_inject_vabt(vcpu); + return 1; default: kvm_pr_unimpl("Unsupported exception type: %d", exception_index);