Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932143AbdHVBZV (ORCPT ); Mon, 21 Aug 2017 21:25:21 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:4530 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754252AbdHVBZT (ORCPT ); Mon, 21 Aug 2017 21:25:19 -0400 Subject: Re: [PATCH v5 4/7] support user space to query RAS extension feature To: Christoffer Dall References: <1503065517-7920-1-git-send-email-gengdongjiu@huawei.com> <1503065517-7920-5-git-send-email-gengdongjiu@huawei.com> <20170821210824.GC20436@cbox> CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , From: gengdongjiu Message-ID: <1d75940a-dd1f-6349-a65a-adbbd221f41f@huawei.com> Date: Tue, 22 Aug 2017 09:20:20 +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: <20170821210824.GC20436@cbox> 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.0A020201.599B86FE.0095,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: d8a5bda7a280bafee03b6b00df7d99bf Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1755 Lines: 58 Christoffer, Thanks for the review. On 2017/8/22 5:08, Christoffer Dall wrote: > On Fri, Aug 18, 2017 at 10:11:54PM +0800, Dongjiu Geng wrote: > > You should put KVM and arm64 in the subject here. I will update it in the next version. > >> In armv8.2 RAS extension, it adds virtual SError exception >> syndrome registeri(VSESR_EL2), user space will specify that >> value. so user space will check whether CPU feature has RAS >> extension. if has, it will specify the virtual SError syndrome >> value. Otherwise, it will not set. This patch adds this support >> >> Signed-off-by: Dongjiu Geng >> --- >> arch/arm64/kvm/reset.c | 3 +++ >> include/uapi/linux/kvm.h | 1 + >> 2 files changed, 4 insertions(+) >> >> diff --git a/arch/arm64/kvm/reset.c b/arch/arm64/kvm/reset.c >> index 3256b9228e75..b7313ee028e9 100644 >> --- a/arch/arm64/kvm/reset.c >> +++ b/arch/arm64/kvm/reset.c >> @@ -77,6 +77,9 @@ int kvm_arch_dev_ioctl_check_extension(struct kvm *kvm, long ext) >> case KVM_CAP_ARM_PMU_V3: >> r = kvm_arm_support_pmu_v3(); >> break; >> + case KVM_CAP_ARM_RAS_EXTENSION: >> + r = cpus_have_const_cap(ARM64_HAS_RAS_EXTN); >> + break; >> case KVM_CAP_SET_GUEST_DEBUG: >> case KVM_CAP_VCPU_ATTRIBUTES: >> r = 1; >> diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h >> index 6cd63c18708a..5a2a338cae57 100644 >> --- a/include/uapi/linux/kvm.h >> +++ b/include/uapi/linux/kvm.h >> @@ -929,6 +929,7 @@ struct kvm_ppc_resize_hpt { >> #define KVM_CAP_PPC_SMT_POSSIBLE 147 >> #define KVM_CAP_HYPERV_SYNIC2 148 >> #define KVM_CAP_HYPERV_VP_INDEX 149 >> +#define KVM_CAP_ARM_RAS_EXTENSION 150 >> >> #ifdef KVM_CAP_IRQ_ROUTING >> >> -- >> 2.14.0 >> > > Thanks, > -Christoffer > > . >