Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp254106pxb; Mon, 13 Sep 2021 18:28:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpWfON6E0ux3tQQNYswQcdbxUtstbnKJqFHqJhPd0nFCdkU6pU/6cnZ6bfDlrs1bFXliUX X-Received: by 2002:a05:6e02:58d:: with SMTP id c13mr7013209ils.101.1631582933203; Mon, 13 Sep 2021 18:28:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631582933; cv=none; d=google.com; s=arc-20160816; b=IhJ3KxgtXwyzA54E3AnLXo26pDdaq8Ae2aG+Bb+zD3cp3+sSxyuuUgqrIBJIfWm1vt bHNT9G5d0zgEVtwd4E+d7iLd/EQya+Jz7VBog3dxpbR8sFSdlDJtDy5WAA8bzZ0VdSjJ vBe9apEA9iMNCvXTH1paZQcRBatR0+vwExl04OnbFW7P2Qy+WKrLZIqKeCTgWN43S7To WowUhRgc7KtSAXlhS+DrqplZUsm/ZR75Ahee4mBGQOSSxsdNUXG2kINWcfhMiOLVAjn4 yms0sM/p++q8G/PFVzQPURfE5exfAOurzq0qh1qLqtyfDlCeXbaxBX3wFGntsizIbCJn c9IA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=cI/jeOU5rLR8X7WtxXOWaAngNhFiIOuHbXY1aDDYGos=; b=GosIfiiTuWx4mAAgJuvOW1znDAnH748/kzVY4m2oJrVzwsulys4nKErLJDyVJj6Tkr luiDcPKxKoRd1CTmev9KxP0v0wydMjqnNXDZQtDzbmB2XftSbm7xt2Afa+hu5ILRXhCS 7UVQdfSPuEj07yxrX+g6wwqeMYDe1HcXBr0jiwcgcTEawms2Uo0IK/j99VUG+zqEltDz VORpXOR7bH4eQExCyJiHgTWJ4ZrziHat/1t8rfCTfJFQPTC1U3+pYGFxUCHY6mjA2cq6 RWhmypb0S8Y7yHBuYzWTWqeNHwggrIaatamtB3Y11VuVoTLH4XgTO12It51MFSo3l6P/ ZmRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=NMKR01fs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j8si656494jat.1.2021.09.13.18.28.42; Mon, 13 Sep 2021 18:28:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=NMKR01fs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238765AbhIMXkA (ORCPT + 99 others); Mon, 13 Sep 2021 19:40:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236079AbhIMXj7 (ORCPT ); Mon, 13 Sep 2021 19:39:59 -0400 Received: from mail-yb1-xb36.google.com (mail-yb1-xb36.google.com [IPv6:2607:f8b0:4864:20::b36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5404C061574 for ; Mon, 13 Sep 2021 16:38:41 -0700 (PDT) Received: by mail-yb1-xb36.google.com with SMTP id z5so24069069ybj.2 for ; Mon, 13 Sep 2021 16:38:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=cI/jeOU5rLR8X7WtxXOWaAngNhFiIOuHbXY1aDDYGos=; b=NMKR01fsDjOL/bSL+r00xqJRi+mMiSl6JTC0z4v6w6pafJlzwWUnP9WNprle1mMKN9 SqkKP2t1CC3hqLN22VyYmhvfvyeQ/qxBgsK11LfqIg5zqIVMWuOlE5MUxuoWgXZTpy75 iRBbB0FA/hVDjM0PJ+UlOyXWs7eZ+8A69OKeK/yvuqzJaHhr9Y6cSKKsP0w2vbJWVgEM kODN4pbGHgOQvBD0z3e1EqPUFVe3dZm5XhkbS+sKKxEjVVyOeJUiOOzetIKdzPA4/wH7 O/R5G0yjVzvkn4sEUZGCmkl0ghblpGpJcVyQ55ahS529cEpnW5uYibER5FPC2dokxqeC O4Sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=cI/jeOU5rLR8X7WtxXOWaAngNhFiIOuHbXY1aDDYGos=; b=OF1sC/WuevYg6SrF8mkmGkLls7J0R9dyj5OboGzi+elebPczqqMq1CWZUbbDGR68ob IfkpXWTjfLMvhryiS237YRqeWLVqybec0D5aMB3pk1ysM2FJ/tLF4e+G1fxuiin2wmPv IOp+E+qkYv1xZBjlKc7Tb7qjIdqjd+6kaSD9v6ikcfVfPn5QAU1kNlomrrd4Pk0HeV1h ko7qM9QJNI6KfKdeHMLydUHFVNp6WssKvDh8UkHftpuIsFT3dAZE81WKxqNIWaecCGGZ XuHIyydM8BTxWfYJGIy8BJqBr0uKjvIZNbUcuAbPntFWAuWq+BzC+frX5ANeFGKWxDKA wmcA== X-Gm-Message-State: AOAM530VYWRTTlrdP5VZwMwErz6n+8HTUuOeHsEjnE5B9Um4sQ6ISTyE J8sYs4nKt3idWtW+H6oEjc55J9Xwz86CyaxXu66iXA== X-Received: by 2002:a25:ab44:: with SMTP id u62mr18518702ybi.335.1631576320503; Mon, 13 Sep 2021 16:38:40 -0700 (PDT) MIME-Version: 1.0 References: <20210909013818.1191270-1-rananta@google.com> <20210909013818.1191270-3-rananta@google.com> <20210909171755.GF5176@sirena.org.uk> <20210910083011.GA4474@sirena.org.uk> In-Reply-To: <20210910083011.GA4474@sirena.org.uk> From: Raghavendra Rao Ananta Date: Mon, 13 Sep 2021 16:38:29 -0700 Message-ID: Subject: Re: [PATCH v4 02/18] KVM: arm64: selftests: Add sysreg.h To: Mark Brown Cc: Paolo Bonzini , Marc Zyngier , Andrew Jones , James Morse , Alexandru Elisei , Suzuki K Poulose , Catalin Marinas , Will Deacon , Peter Shier , Ricardo Koller , Oliver Upton , Reiji Watanabe , Jing Zhang , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 10, 2021 at 1:30 AM Mark Brown wrote: > > On Thu, Sep 09, 2021 at 01:06:31PM -0700, Raghavendra Rao Ananta wrote: > > On Thu, Sep 9, 2021 at 10:18 AM Mark Brown wrote: > > > > > create mode 100644 tools/testing/selftests/kvm/include/aarch64/sysreg.h > > > > Can we arrange to copy this at build time rather than having a duplicate > > > copy we need to keep in sync? We have some stuff to do this for uapi > > > headers already. > > > That's a great idea actually (I wasn't aware of it). But, probably > > should've mentioned it earlier, I had a hard time compiling the header > > as is so I modified it a little bit and made the definitions of > > [write|read]_sysreg_s() similar to the ones in kvm-unit-tests. > > I'll try my best to get the original format working and try to > > implement your idea if it works. > > One option would be to do something like split out the bits that can be > shared into a separate header which can be included from both places and > then have the header with the unsharable bits include that. Something > like sysreg.h and sysreg_defs.h for example. Hi Mark, Thanks again for your suggestion. As of v6 of the series, the original header from the kernel seems to be working as is, so there's no need to split it anymore. However, I'll plan to incorporate your suggestion as a separate series, if it's okay :) I was looking into this though and could only find some utilities such as tools/iio/, tools/spi/, and so on, which seem to create a symbolic link to the header present in the kernel (rather than copying). Is this what you were referring to? Regards, Raghavendra