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 44D5FEDE98C for ; Thu, 14 Sep 2023 08:14:39 +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-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=fEm9kWhM+pOomvKm4BuTvp/XGQODsvGnmOioQT4vSqY=; b=NITg5fMU9Fd45q yH0+3J+RyCTjDawdfV5ApBH0ej/J9hYBigukdRw1fMjHvMz49ztm3laW2GnUn7JN5d2ImTgCWDJ1W n5yikNor79ZUgiRRN/DyzbTTTWjxOz1o7Zhp/d7ZV2yJIaRr3MAxWL6630SKAZUg2J78tMb3+1CJ4 IMN0v589SGI7i3WP2qlTbsh4fbZQEn+Kx2f2yhwWmpnYfUuSpaqWnlQcihEv47xdJmMpwOUzGrdI/ ju67iA0vTt12h3lCREiR3msuL97ckXQbsWO+jQj3DCEPQWo/U1Jn+/NIK3tRFaE72jmxNU6Qh375V OlFqNyao70VXUP4koeVA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qghUL-007g82-2r; Thu, 14 Sep 2023 08:14:13 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qghUI-007g60-2v for linux-arm-kernel@lists.infradead.org; Thu, 14 Sep 2023 08:14:12 +0000 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-3ff1c397405so7108675e9.3 for ; Thu, 14 Sep 2023 01:14:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1694679247; x=1695284047; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=FRr1rkGuTrUN4Y1UZo1LPGic4r7SXTmbnAZytMBynRY=; b=gf/OUg9eiOrVAZ5ueOcscV6y80eV6/hfdC9MQovkIm37hIxKlTB4rCBk7t2rscamQW iZZ8RU2aRD1pmjBrFvxxLlOOowP6OCOfhOVXmbBNus4KD9N0HVzQZLluepXfEi5/yDc7 LuzOv5gSRin28lL5p2GoyuUu2UyByLVaZPnY9eHQITRJoyRmQj/72cPQFJ/x1ZBouKFb cynX0kk0BDAzmpLUmyFFwRV/eX39yl8jSNkRwuLDaZcrJel3Wizj7OrqXu6f71nLDR39 m7HmcXp2RAkJyfoplIqVWfc8XylhWHlUfAxNmrTSEMMWNrequHxbixCLywzbJomrXvuK 7zXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694679247; x=1695284047; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=FRr1rkGuTrUN4Y1UZo1LPGic4r7SXTmbnAZytMBynRY=; b=Qh8/9VjA4aOxJ/Zyya6jWz/71uMEm0sPT9zqNYToG9vLenhIbQW8rv6AvnfR6U5s56 hKmXEyBLCjX1XZZha7kCn69bEWa5+8XKIzE41Qx0B5Ssin1Nxr2X/6eHYv+22arDFTZt zsS+qAYpj1KyBjdd7ulMsVSpgQ+sP6lw1iSEQjM/zYTHecQ6ipvuagDjcprINiSXKM31 u3zWNrwye8BItYqZtCn2tgO0eApk97P3hh5POnxUVp8vcrC0TWc52D01I5UmS4YSQkKl IApUN3QWaFibfLukrZDLkZWE2y1c8AWN9qzTyYXBWsDsrreZDZM/GUdL6xvRfJ79zNtB TxfA== X-Gm-Message-State: AOJu0YztNuT6LpgXR71dLE2TMh9RfQxc5a36+Rxw9exrfmQEkKEbDXic kWub+SiC5zR/n2ErB8IRW24RnQ== X-Google-Smtp-Source: AGHT+IGh6/pw8AhCYNH7FiOWterqGvoWGNUkgu/EnsrVKnj5h5ttR15SiMKATB3tNhotsC22ECVYdA== X-Received: by 2002:a05:600c:cc:b0:3fe:1db2:5179 with SMTP id u12-20020a05600c00cc00b003fe1db25179mr3955293wmm.19.1694679247084; Thu, 14 Sep 2023 01:14:07 -0700 (PDT) Received: from localhost (cst2-173-16.cust.vodafone.cz. [31.30.173.16]) by smtp.gmail.com with ESMTPSA id p6-20020a7bcc86000000b003fbdbd0a7desm4074945wma.27.2023.09.14.01.14.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 01:14:06 -0700 (PDT) Date: Thu, 14 Sep 2023 10:14:05 +0200 From: Andrew Jones To: Haibo Xu Cc: xiaobo55x@gmail.com, Paul Walmsley , Palmer Dabbelt , Albert Ou , Paolo Bonzini , Shuah Khan , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Zenghui Yu , Anup Patel , Atish Patra , Sean Christopherson , Ricardo Koller , Vishal Annapurve , Vipin Sharma , David Matlack , Thomas Huth , Aaron Lewis , Colton Lewis , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvm-riscv@lists.infradead.org Subject: Re: [PATCH v3 4/9] tools: riscv: Add header file csr.h Message-ID: <20230914-90a562a03985a9a97afd953a@orel> References: <119c9d06d64b7e4932c5f74a05af1e769cbe7da6.1694421911.git.haibo1.xu@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <119c9d06d64b7e4932c5f74a05af1e769cbe7da6.1694421911.git.haibo1.xu@intel.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230914_011410_942730_C42965E7 X-CRM114-Status: GOOD ( 18.66 ) 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 Thu, Sep 14, 2023 at 09:36:58AM +0800, Haibo Xu wrote: > Borrow the csr definitions and operations from kernel's > arch/riscv/include/asm/csr.h to tools/ for riscv. Since > only 64bit was supported for RISC-V KVM selftests, add > CONFIG_64BIT definition in kvm/Makefile to ensure only > 64bit registers were available in csr.h. > > Suggested-by: Andrew Jones > Signed-off-by: Haibo Xu > Reviewed-by: Andrew Jones > --- > tools/arch/riscv/include/asm/csr.h | 521 +++++++++++++++++++++++++++ > tools/testing/selftests/kvm/Makefile | 3 + > 2 files changed, 524 insertions(+) > create mode 100644 tools/arch/riscv/include/asm/csr.h > > diff --git a/tools/arch/riscv/include/asm/csr.h b/tools/arch/riscv/include/asm/csr.h > new file mode 100644 > index 000000000000..4e86c82aacbd > --- /dev/null > +++ b/tools/arch/riscv/include/asm/csr.h ... > diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile > index 0102a0297b84..89ecee2fdb73 100644 > --- a/tools/testing/selftests/kvm/Makefile > +++ b/tools/testing/selftests/kvm/Makefile > @@ -222,6 +222,9 @@ CFLAGS += -Wall -Wstrict-prototypes -Wuninitialized -O2 -g -std=gnu99 \ > ifeq ($(ARCH),s390) > CFLAGS += -march=z10 > endif > +ifeq ($(ARCH),riscv) > + CFLAGS += -DCONFIG_64BIT > +endif This should be a separate patch, since the "import csr.h to tools" should be completely separate from anything else. Also, all architectures that KVM selftests supports are 64-bit, so, as another completely separate patch, I think we should just add CONFIG_64BIT to CFLAGS for all builds, especially since there's a chance some of the includes the other architectures are using may need it. Of course we'll need sign-off and testing from the other arch maintainers. Thanks, drew _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel