Received: by 10.223.176.46 with SMTP id f43csp4572182wra; Tue, 23 Jan 2018 11:09:37 -0800 (PST) X-Google-Smtp-Source: AH8x226jZwSD+BGBlGaf/53MHl3WGb165dJXJxv0ZInqk6FwV8n/UcdhM/hoLBISLzGt/HfHx3Yx X-Received: by 10.107.28.7 with SMTP id c7mr4952880ioc.134.1516734576981; Tue, 23 Jan 2018 11:09:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516734576; cv=none; d=google.com; s=arc-20160816; b=lOHG0EKZGau/5Kd6INHSuJI7NY24jkRh++Qb/zVfDg13Qao7Q8JZSj230/7LNEt6XD 7LqOVvPsRjjvN13vQC32OAjfNilWvqpWCbXdZf75D6OLlUwJ4fe9PnwlZqILebAZMXyh Ck8pDG+ijGPa0GTHU3nuZwTrT2VaNtxvdgY8Poy/M1cP/UfOk/urmhHij/qPvvZLwUVs BYaceMzfqFHE5gfRALGt3ZsyuJXJKM+uIotJT0P2WO5TAzFl+u8UEAAeX/3HXngQDpDf G3IFpeuqOd3ftITZH7HOXvFDNTDz3Oe4Iyld6Y8mGOO3zzf3NDj2ynlvWzJJEI67ZN/x fZ4A== 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=lFRGyt177E9RyL0sgMabpj0H2WKUSjOtG0q7AkfCr20=; b=0j1DDxuVc9LNQrnhMcC4jug6nLYufQQw1Z6v0SYZQbUgSJBOSOi1OEZd60bH7Xs23r d69BI1gwMIxtelHXMfIsNhbOz+s/1bk7VJ6H4o5GWKT9fvBoiNIsEuWDyeZMpZDlbzkM 1dntkArKzrnsq5QoOyz9ogyXmsjoO6KC/QvbkHV9W3o4ypR+24mFIHmpsNDJelb+GU9Z 5ItjkCQyWm2Vbsqf5k4G+ZxfQOBa61sw+o6ynRdIzjZKK3n6566cLxCwnOvoe10jXcvg bp/NFLAj+9RfIrMW6bSWSg4jpEsH0pZKyuAmbg2trgaqKfkP+y2FYp0t/2aSNujW0lLF 2/Xg== 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 q129si15954509ioe.313.2018.01.23.11.09.23; Tue, 23 Jan 2018 11:09:36 -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 S1751807AbeAWTI7 (ORCPT + 99 others); Tue, 23 Jan 2018 14:08:59 -0500 Received: from foss.arm.com ([217.140.101.70]:45722 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751530AbeAWTI5 (ORCPT ); Tue, 23 Jan 2018 14:08:57 -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 2878880D; Tue, 23 Jan 2018 11:08:57 -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 A2DE43F53D; Tue, 23 Jan 2018 11:08:52 -0800 (PST) Message-ID: <5A6787B9.3080906@arm.com> Date: Tue, 23 Jan 2018 19:06:33 +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: Dongjiu Geng CC: christoffer.dall@linaro.org, marc.zyngier@arm.com, linux@armlinux.org.uk, catalin.marinas@arm.com, rjw@rjwysocki.net, bp@alien8.de, robert.moore@intel.com, lv.zheng@intel.com, corbet@lwn.net, will.deacon@arm.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-acpi@vger.kernel.org, devel@acpica.org, huangshaoyu@huawei.com Subject: Re: [PATCH v9 5/7] arm64: kvm: Introduce KVM_ARM_SET_SERROR_ESR ioctl References: <1515254577-6460-1-git-send-email-gengdongjiu@huawei.com> <1515254577-6460-6-git-send-email-gengdongjiu@huawei.com> In-Reply-To: <1515254577-6460-6-git-send-email-gengdongjiu@huawei.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dongjiu Geng, On 06/01/18 16:02, Dongjiu Geng wrote: > The ARM64 RAS SError Interrupt(SEI) syndrome value is specific to the > guest and user space needs a way to tell KVM this value. So we add a > new ioctl. Before user space specifies the Exception Syndrome Register > ESR(ESR), it firstly checks that whether KVM has the capability to > set the guest ESR, If has, will set it. Otherwise, nothing to do. > > For this ESR specifying, Only support for AArch64, not support AArch32. After this patch user-space can trigger an SError in the guest. If it wants to migrate the guest, how does the pending SError get migrated? I think we need to fix migration first. Andrew Jones suggested using KVM_GET/SET_VCPU_EVENTS: https://www.spinics.net/lists/arm-kernel/msg616846.html Given KVM uses kvm_inject_vabt() on v8.0 hardware too, we should cover systems without the v8.2 RAS Extensions with the same API. I think this means a bit to read/write whether SError is pending, and another to indicate the ESR should be set/read. CPUs without the v8.2 RAS Extensions can reject pending-SError that had an ESR. user-space can then use the 'for migration' calls to make a 'new' SError pending. Now that the cpufeature bits are queued, I think this can be split up into two separate series for v4.16-rc1, one to tackle NOTIFY_SEI and the associated plumbing. The second for the KVM 'make SError pending' API. > diff --git a/arch/arm64/kvm/guest.c b/arch/arm64/kvm/guest.c > index 5c7f657..738ae90 100644 > --- a/arch/arm64/kvm/guest.c > +++ b/arch/arm64/kvm/guest.c > @@ -277,6 +277,11 @@ int kvm_arch_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu, > return -EINVAL; > } > > +int kvm_arm_set_sei_esr(struct kvm_vcpu *vcpu, u32 *syndrome) > +{ > + return -EINVAL; > +} Does nothing in the patch that adds the support? This is a bit odd. (oh, its hiding in patch 6...) Thanks, James