Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751885AbdINLNh (ORCPT ); Thu, 14 Sep 2017 07:13:37 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:6055 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751712AbdINLNe (ORCPT ); Thu, 14 Sep 2017 07:13:34 -0400 Subject: Re: [PATCH v6 5/7] arm64: kvm: route synchronous external abort exceptions to el2 To: James Morse References: <1503916701-13516-1-git-send-email-gengdongjiu@huawei.com> <1503916701-13516-6-git-send-email-gengdongjiu@huawei.com> <59B17449.6010201@arm.com> CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , From: gengdongjiu Message-ID: Date: Thu, 14 Sep 2017 19:12:06 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <59B17449.6010201@arm.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.142.68.147] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090203.59BA6420.0154,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 84d5f6dc99219ed2b5888504766dd513 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1061 Lines: 26 James, On 2017/9/8 0:31, James Morse wrote: > KVM already handles external aborts from lower exception levels, no more work > needs doing for TEA. If it is firmware first solution, that is SCR_EL3.EA=1, all SError interrupt and synchronous External Abort exceptions are taken to EL3, so EL3 firmware will handle it, KVM no needs to handle it. HCR_EL3.TEA is only for EL3 to check its value to decide to jump to hypervisor or kernel. > > What happens when a guest access the RAS-Error-Record registers? > > Before we can set HCR_EL2.TERR I think we need to add some minimal emulation for > the registers it traps. Most of them should be RAZ/WI, so it should be > straightforward. (I think KVMs default is to emulate an undef for unknown traps). Today I added the support to do some minimal emulation for RAS-Error-Record registers, thanks for the good suggestion. > > Eventually we will want to back this with a page of memory that lets > Qemu/kvmtool configure what the guest can see. (i.e. the emulated machine's > errors for kernel-first handling.)