Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755118AbdLFK05 (ORCPT ); Wed, 6 Dec 2017 05:26:57 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:2212 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755094AbdLFK0t (ORCPT ); Wed, 6 Dec 2017 05:26:49 -0500 Subject: Re: [PATCH v8 7/7] arm64: kvm: handle SError Interrupt by categorization To: James Morse CC: , , , , , , , , , , , , , , , , , , References: <1510343650-23659-1-git-send-email-gengdongjiu@huawei.com> <1510343650-23659-8-git-send-email-gengdongjiu@huawei.com> <5A0B1334.7060500@arm.com> From: gengdongjiu Message-ID: <4af78739-99da-4056-4db1-f80bfe11081a@huawei.com> Date: Wed, 6 Dec 2017 18:26:14 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <5A0B1334.7060500@arm.com> Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.142.68.147] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1144 Lines: 30 On 2017/11/15 0:00, James Morse wrote: >> + * error has not been propagated >> + */ >> + run->exit_reason = KVM_EXIT_EXCEPTION; >> + run->ex.exception = ESR_ELx_EC_SERROR; >> + run->ex.error_code = KVM_SEI_SEV_RECOVERABLE; >> + return 0; > We should not pass RAS notifications to user space. The kernel either handles > them, or it panics(). User space shouldn't even know if the kernel supports RAS > until it gets an MCEERR signal. > > You're making your firmware-first notification an EL3->EL0 signal, bypassing the OS. > > If we get a RAS SError and there are no CPER records or values in the ERR nodes, > we should panic as it looks like the CPU/firmware is broken. (spurious RAS errors) Hi james, sorry to disturb you! do you think whether we need to set the guest ESR by user space? if need, I need to notify user space that there is a SError happen and need to set ESR for guest in some place of KVM. so here I return a error code to user space. you mean we should not pass RAS notifications to user space, so could you give some suggestion how to notify user space to set guest ESR. Thanks a lot in advance. > >