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 X-Spam-Level: X-Spam-Status: No, score=-9.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5DED6C432BE for ; Thu, 2 Sep 2021 12:33:39 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 21A52600CD for ; Thu, 2 Sep 2021 12:33:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 21A52600CD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=d0xk1nvAl0D2fWsgSbK1R2OVsIHmvUbQzLuf90S2Efw=; b=js3rhZ+frsTl6o RKOW2IK8sGEkQW4WV1CCq32LKqwtU/1bHf8QZcOPrTMBfT5PjGbAikNiiZJ+2/rhcN+0adlWPLEmD G/mKzrYOfpK8rAqDPVoTPpiysQZtNJhGChK7BJfuaaiv2v0TlrI8GWXrQedzpyce7Ql3BemoF/AIy qx7pbcN0iaKEnY9xWPs6MLyHASaZ55VbtG4PJkykAAnnGfM0Be1R49DsEuCOzTD8578EjmgDVsaUk IyXPawxBhGqDuacoYc65lsoCXj6PFm/gGhS4bU8+YgRz6iOfwIASa3hwFbRysFU+MKU5tTZdKPTtU eeB3pbZetwnTa+sFB5Lg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mLlsF-009Znx-Ju; Thu, 02 Sep 2021 12:31:19 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mLlsC-009Znc-G8 for linux-arm-kernel@lists.infradead.org; Thu, 02 Sep 2021 12:31:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1630585874; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1bF0+pdPFV1oPqtHYhh2gb/KkOQLq0K7gX0PwtmmkGA=; b=iGKkNJW1LysqKv0d01S2ie3jo4e9FI+rss9lrkG2wV89kYI980/O8mT5cA+O2iENiSPPTe T+UHSjfzbEKMh5TBoC1JuxS9paSTV/JVfYT/fWH6rTYw3bAb35j3y2wNX6XTFOQBvKI+AP JhsYP6gONzunUMONih4YkEeqYXKCzBI= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-476-Ab1wTERvNqSuq8SF4zKjFg-1; Thu, 02 Sep 2021 08:31:13 -0400 X-MC-Unique: Ab1wTERvNqSuq8SF4zKjFg-1 Received: by mail-wm1-f72.google.com with SMTP id y188-20020a1c7dc5000000b002e80e0b2f87so948671wmc.1 for ; Thu, 02 Sep 2021 05:31:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=1bF0+pdPFV1oPqtHYhh2gb/KkOQLq0K7gX0PwtmmkGA=; b=tmGUHBMI4CyayYugGNVi1JfKRzAIc4phR7sWDtw7Yvhb89k7Sog1vflvzpYj+836aG Nq0KGLIRTB8dtoGzBEdVNXP44Ny2lfO55wN4Uufg9a9j9sK4XeMf/CD9iM+nukW6Gv4l UhfYFx7AyWUYzQD/XQvbu2Wpn8goQFjCrLs2r0Nk0KrAtSWnesDFqfRFg9eWmSV65qoP HSJI6qws349nfz0T003KydS0jnFFdYDyhejd/8Ke1lldBBluBNv0SCk4kvVTpGh4zCEX AACISTc566motDZSLZQOOitTZ/4qCCqLEpueaLjSLrDLTBLluvDtzMNpMgdQ+KdGBLb/ SXMw== X-Gm-Message-State: AOAM531QT8o6+dxb49MsTEXD/5TlRTj5WKZsQRIR2lUWiFtxMp0JR60I jx6sFz/Kk3q8CGq7b24oefQLVLCKYXc8OcY7UCDpYONYw6jgd00Udp8m55valhZFr3ky04LSI1k fopisTiXzSQxWMoK8/pGvqNtcePAH32fiyA8= X-Received: by 2002:a5d:6cc9:: with SMTP id c9mr3459268wrc.12.1630585872056; Thu, 02 Sep 2021 05:31:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzw9OYDFsRzxtUxt8WzFVuzQqX9uKEjP7AudR21ZtDRAs5a3V/WpA+nMGwkaPm1bwnde7r7Lg== X-Received: by 2002:a5d:6cc9:: with SMTP id c9mr3459246wrc.12.1630585871881; Thu, 02 Sep 2021 05:31:11 -0700 (PDT) Received: from gator (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id x21sm1539270wmi.15.2021.09.02.05.31.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Sep 2021 05:31:11 -0700 (PDT) Date: Thu, 2 Sep 2021 14:31:10 +0200 From: Andrew Jones To: Oliver Upton Cc: Raghavendra Rao Ananta , kvm@vger.kernel.org, Will Deacon , Catalin Marinas , Peter Shier , linux-kernel@vger.kernel.org, Marc Zyngier , Paolo Bonzini , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v3 02/12] KVM: arm64: selftests: Add write_sysreg_s and read_sysreg_s Message-ID: <20210902123110.royrzw4dsykkrcjx@gator> References: <20210901211412.4171835-1-rananta@google.com> <20210901211412.4171835-3-rananta@google.com> MIME-Version: 1.0 In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=drjones@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210902_053116_662738_3FBB98AD X-CRM114-Status: GOOD ( 26.56 ) 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Sep 01, 2021 at 11:06:10PM +0000, Oliver Upton wrote: > On Wed, Sep 01, 2021 at 03:48:40PM -0700, Raghavendra Rao Ananta wrote: > > On Wed, Sep 1, 2021 at 3:08 PM Oliver Upton wrote: > > > > > > On Wed, Sep 01, 2021 at 09:28:28PM +0000, Oliver Upton wrote: > > > > On Wed, Sep 01, 2021 at 09:14:02PM +0000, Raghavendra Rao Ananta wrote: > > > > > For register names that are unsupported by the assembler or the ones > > > > > without architectural names, add the macros write_sysreg_s and > > > > > read_sysreg_s to support them. > > > > > > > > > > The functionality is derived from kvm-unit-tests and kernel's > > > > > arch/arm64/include/asm/sysreg.h. > > > > > > > > > > Signed-off-by: Raghavendra Rao Ananta > > > > > > > > Would it be possible to just include ? See > > > > tools/arch/arm64/include/asm/sysreg.h > > > > > > Geez, sorry for the noise. I mistakenly searched from the root of my > > > repository, not the tools/ directory. > > > > > No worries :) > > > > > In any case, you could perhaps just drop the kernel header there just to > > > use the exact same source for kernel and selftest. > > > > > You mean just copy/paste the entire header? There's a lot of stuff in > > there which we > > don't need it (yet). > > Right. It's mostly register definitions, which I don't think is too high > of an overhead. Don't know where others stand, but I would prefer a > header that is equivalent between kernel & selftests over a concise > header. > Until now we haven't needed the sys_reg(...) type of definitions for sysregs in selftests. In case we did, we defined the registers we needed for get/set_one_reg by their parts, e.g. #define ID_AA64DFR0_EL1 3, 0, 0, 5, 0 allowing us to choose how we use them, ARM64_SYS_REG(...) vs. sys_reg(...). Bringing over sysreg.h is probably a good idea though. If we do, then I'd suggest we define a new macro that allows us to convert a SYS_* register definition from sysreg.h into an ARM64_SYS_REG definition for get/set_one_reg in order to avoid redundant definitions. Thanks, drew _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel