From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E67FAC47079 for ; Fri, 5 Jan 2024 09:08:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:CC:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=KWVOg+sr+NDy2/bhfzryGM347D0KYQV4RokFu9ss07U=; b=HueGsM+VpP2KH30lPfFQbj3mCz MjkChcB3rhKopEBlSs6SizF2EzX+KTRlRRyAjLvu+xN3FSiyg79w7yGdQjW3qyAVFIiuezo6zucvs LLwUV74u0pW9nhsX+oPBKr7VbfOZQlw4k4ZWzsl5Tc37uPfHIGHBCGoidsv7TWctl09awIsrwinGw GJnJrqPkntqY0hYj3oNz1ynoZcA2AFTFZjT/lXvpstL2yXQDu7hJ/6kVQ+hMU8iA0tHYDz3BCGicd fx+xUW3/KPgkQdcOQPvB90rrr9AnxHXUd4bft9YVIxs64kDjd3pYd0hHOneFsx4yYQnvai6Vv9DAb j08//5LA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rLgAw-00GL7l-04; Fri, 05 Jan 2024 09:07:34 +0000 Received: from szxga02-in.huawei.com ([45.249.212.188]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rLgAs-00GL3J-0v for linux-arm-kernel@lists.infradead.org; Fri, 05 Jan 2024 09:07:32 +0000 Received: from mail.maildlp.com (unknown [172.19.88.194]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4T5yJQ5Yr4zZgNc; Fri, 5 Jan 2024 17:07:02 +0800 (CST) Received: from kwepemm600007.china.huawei.com (unknown [7.193.23.208]) by mail.maildlp.com (Postfix) with ESMTPS id 23C8F140336; Fri, 5 Jan 2024 17:07:17 +0800 (CST) Received: from [10.174.185.179] (10.174.185.179) by kwepemm600007.china.huawei.com (7.193.23.208) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 5 Jan 2024 17:07:15 +0800 Subject: Re: [PATCH v3 5/5] KVM: arm64: selftests: Test for setting ID register from usersapce To: Eric Auger CC: Oliver Upton , , , , , Mark Brown , Jing Zhang , Suzuki K Poulose , James Morse , Marc Zyngier , Paolo Bonzini , Adrian Hunter , Ian Rogers , Namhyung Kim , Jiri Olsa , Alexander Shishkin , Mark Rutland , Arnaldo Carvalho de Melo , Ingo Molnar , Peter Zijlstra References: <20231011195740.3349631-1-oliver.upton@linux.dev> <20231011195740.3349631-6-oliver.upton@linux.dev> From: Zenghui Yu Message-ID: Date: Fri, 5 Jan 2024 17:07:08 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Originating-IP: [10.174.185.179] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemm600007.china.huawei.com (7.193.23.208) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240105_010730_511674_E102F914 X-CRM114-Status: GOOD ( 11.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2023/10/19 16:38, Eric Auger wrote: >> +static const struct reg_ftr_bits ftr_id_aa64dfr0_el1[] = { >> + S_REG_FTR_BITS(FTR_LOWER_SAFE, ID_AA64DFR0_EL1, PMUVer, 0), > > Strictly speaking this is not always safe to have a lower value. For > instance: From Armv8.1, if FEAT_PMUv3 is implemented, the value 0b0001 > is not permitted. But I guess this consistency is to be taken into > account by the user space. But may be wort a comment. Here and below > > You may at least clarify what does mean 'safe' > >> + REG_FTR_BITS(FTR_LOWER_SAFE, ID_AA64DFR0_EL1, DebugVer, 0), I've seen the following failure on Cortex A72 where ID_AA64DFR0_EL1.DebugVer is 6. # ./aarch64/set_id_regs TAP version 13 1..79 ok 1 ID_AA64DFR0_EL1_PMUVer ==== Test Assertion Failure ==== include/kvm_util_base.h:553: !ret pid=2288505 tid=2288505 errno=22 - Invalid argument 1 0x0000000000402787: vcpu_set_reg at kvm_util_base.h:553 (discriminator 6) 2 (inlined by) test_reg_set_success at set_id_regs.c:342 (discriminator 6) 3 (inlined by) test_user_set_reg at set_id_regs.c:413 (discriminator 6) 4 0x0000000000401943: main at set_id_regs.c:475 5 0x0000ffffbdd5d03b: ?? ??:0 6 0x0000ffffbdd5d113: ?? ??:0 7 0x0000000000401a2f: _start at ??:? KVM_SET_ONE_REG failed, rc: -1 errno: 22 (Invalid argument) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel