Received: by 10.223.176.46 with SMTP id f43csp3293427wra; Mon, 22 Jan 2018 11:35:25 -0800 (PST) X-Google-Smtp-Source: AH8x224ppZanLHVe7Hi8P+fq/cTmZx6Rx/JvYVf4Ck9gPH08wR17rnpi0R8CqJhMDUEcGp3HK14a X-Received: by 10.107.38.21 with SMTP id m21mr9799071iom.69.1516649724533; Mon, 22 Jan 2018 11:35:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516649724; cv=none; d=google.com; s=arc-20160816; b=wqm940UzV7ZRYwsGU0xBRbdAMxVGJcsTfPlQ4VdshM2w3EOiic5sLlKDwAJq6LHntT CxAlhurIkdD661VA3Ta2PZT4biP4K2eANvYmLgiYBJp8j/g364pLtN7mCuxvXij29g3C yDZ9C7m6XtL4Ayyv2llkqM+oHvu4LDYzZEpAYah7Os9STOFD3X+zr6+KSo+JwtktOyam apmfpcO7IlCFR2YU0axaiKqI5zedQY5FjUQKQL/GSmcbLHdQq7USow0Z6TwouuC/hXdc RcaTqMcNN7UMd1PZ2TtGeJg/M8eXjQTT6snQ72LYJS+h5zsbCFZegrDUKAVa8xSZ0xBs fchA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :references:subject:cc:to:mime-version:user-agent:from:date :message-id:arc-authentication-results; bh=BUC2RDM986fMwYDUVjOW+RC13/KmKcE06SNvRZzZQW8=; b=e69wBNGvzIGU1kLgk5rgVUXQC48DfCYPhaTEMllFZL+nPlNOcWBZ2M8EjGsxKC50DJ gdiKBqlYT0YUmy7//RjP/cLRKkicpFF7ZBT51Nr03pF4RVtw1TVM4INK+z2bl47070jt Owr16uIwEeGr+vMGR6YWpl2pcTa9ezOHxSoAF+h8DpaHRU1B63C40oNT0KOQEY2Wk6Na hTIBS86X6JZMFUPticogOI0qmEYi0ntnc1+V5AdzWetlltnUWeRawrj4/hAJvJkAfRDW 9VgRkEuO1S7qz1DC0Kg8YdYenbvbaWEKs3SkbxlLih5LfQNy8LZsd9L4hu8NslmkLMnp MNAg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k71si4440184iok.67.2018.01.22.11.35.11; Mon, 22 Jan 2018 11:35:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751204AbeAVTek (ORCPT + 99 others); Mon, 22 Jan 2018 14:34:40 -0500 Received: from foss.arm.com ([217.140.101.70]:34408 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751031AbeAVTeh (ORCPT ); Mon, 22 Jan 2018 14:34:37 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 302801435; Mon, 22 Jan 2018 11:34:37 -0800 (PST) Received: from [10.1.207.55] (melchizedek.cambridge.arm.com [10.1.207.55]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id F37C73F53D; Mon, 22 Jan 2018 11:34:31 -0800 (PST) Message-ID: <5A663C3C.7040904@arm.com> Date: Mon, 22 Jan 2018 19:32:12 +0000 From: James Morse User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.6.0 MIME-Version: 1.0 To: gengdongjiu CC: gengdongjiu , wuquanming , linux-doc@vger.kernel.org, kvm@vger.kernel.org, Marc Zyngier , Catalin Marinas , Jonathan Corbet , rjw@rjwysocki.net, linux@armlinux.org.uk, linuxarm@huawei.com, Linux Kernel Mailing List , linux-acpi@vger.kernel.org, bp@alien8.de, arm-mail-list , Huangshaoyu , pbonzini@redhat.com, kvmarm@lists.cs.columbia.edu, devel@acpica.org Subject: Re: [PATCH v8 7/7] arm64: kvm: handle SError Interrupt by categorization References: <1510343650-23659-1-git-send-email-gengdongjiu@huawei.com> <1510343650-23659-8-git-send-email-gengdongjiu@huawei.com> <5A0B1334.7060500@arm.com> <4af78739-99da-4056-4db1-f80bfe11081a@huawei.com> <5A283F26.3020507@arm.com> <4b37e86d-eee3-c51e-eceb-5d0c7ad12886@huawei.com> <506cd212-3d16-ba2a-518f-34982bc162fc@huawei.com> <5A58F8E3.5060002@arm.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi gengdongjiu, On 21/01/18 02:45, gengdongjiu wrote: > For the ESR_ELx_AET_UER, this exception is precise, closing the VM may > be better[1]. > But if you think panic is better until we support kernel-first, it is > also OK to me. I'm not convinced SError while a guest was running means only guest memory could be affected. Mechanisms like KSM means the error could affect multiple guests. Both firmware-fist and kernel-first will give us the address, with which we can know which processes are affected, isolated the memory and signal affected processes. Until we have one of these panic() is the only way we have to contain an error, but its an interim fix. Not panic()ing the host for an error that should be contained to the guest is a fudge, we don't actually know its safe (KSM, page-table etc). I want to improve on this with {firmware, kernel}-first support (or both!), I don't want to expose that this is happening to user-space, as once we have one of {firmware, kernel}-first, it shouldn't happen. >> This is inventing something new for RAS errors not claimed by firmware-first. >> If we have kernel-first too, this will never happen. (unless your system is >> losing the error description). > In fact, if we have kernel-first, I think we still need to judge the > error type by ESR, right? The kernel-first mechanism should consider the ESR/FAR, yes, but once the error has been claimed and handled, KVM shouldn't care about any of these values. (maybe we'll sanity check for uncontained errors, just in case the error escaped to the RAS code...) My point here was exposing 'unhandled' (ignored) RAS errors to user-space creates an ABI: someone will complain once we start handling the error, and they no longer get a notification via this 'unhandled' interface. Code written to use this interface becomes useless/untested. > If the handle_guest_sei() , may be the system does not support firmware-first, > so we judge the ESR value, ...and panic()/ignore as appropriate. I agree not all systems will support firmware-first, (big-endian is the obvious example), but if we get kernel-first support this ESR guessing can disappear, I'm against exposing it to user-space in the meantime. Thanks, James