Received: by 2002:a05:7412:7c14:b0:fa:6e18:a558 with SMTP id ii20csp230564rdb; Mon, 22 Jan 2024 02:11:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IFOs3w5+jAubTEp+kSSoVFa3sFKmLeIbUSzGW1g7/VtHmj5ZRiFmfusaZUPakpCer6QWk44 X-Received: by 2002:a17:90a:de88:b0:290:666f:7be4 with SMTP id n8-20020a17090ade8800b00290666f7be4mr768431pjv.33.1705918274875; Mon, 22 Jan 2024 02:11:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705918274; cv=pass; d=google.com; s=arc-20160816; b=OCXudQKOIZdxo9HbuwXOblN+KpZrMJt/+EF0WydWnxlqVudDxBXof51hRUgwYQU8F7 RuD6JXRQ6FimCBSEGcIqYP6G5wPE4tYHEZ6p6W/5xBLoUM6dpw9jbuwwzta0bHzOrX6g oLadcjQM3Jj4VL9YeXhuyXY+1B3360T4jmPJs/0T9RyNHp115U4TcDsgmaYZd0U0eETD sIyvdtVPBxsnwUPT1LWTrf71pVQt4hd9SOgE78F87tgo76EnJNgganAfkrn0W7Nm2Ay5 vQPuMe20DyYRN0wYA3BJQ+7mjrKa26GgRXeCkbZ7oYG5twjmMUD11wvyj/0pzMlylHqH g8yQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=vmZYbwnuKJy16bN5rjgdQm9l4q3HJb51gCUJLQRDvWI=; fh=bC1tUbXBLQhkfdXGFycgHlH8hp9fUwfWD1/luIn6lys=; b=k2O/0d4Zq9KTfh/b202M3i7lm75wGfpVNzxs7HaptMS/NC0Ih9v3ypUmdQ+FKjLAKh 0xw2/YVa0m13VfuFv/YoanE0jS6DJqpNC2XKRhBYep9x5rn2RKIrJiWnvCHBad7Dr5nx hxkQopw8lVMXT5ZgGsh179ZLWxHzkpvH3VVJfK4TSr2KFo4ycKuBQ5O2ZTBVdC89z0im fQxM6tJwuBHW2/cZzQgDD2A/jvuxZ3BBTNzCIMNwO79cEWV8R9XFmveWbNtoadbkXnz7 oLU+MZBs0dyGf9GBZcNqOe4zzpVxv1IZcs3Hbi6hkET4MT9YtsWAJpg8hQspzf7FO+07 cWmA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FNTdXCgF; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-32658-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32658-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id b17-20020a17090aa59100b00290a6f3b319si1196941pjq.125.2024.01.22.02.11.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 02:11:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-32658-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FNTdXCgF; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-32658-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32658-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id AEACFB276B1 for ; Mon, 22 Jan 2024 09:48:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A57013A1A8; Mon, 22 Jan 2024 09:47:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="FNTdXCgF" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7F6DD3A8DF; Mon, 22 Jan 2024 09:47:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705916840; cv=none; b=idE7V28NUReijziUCRgqpNjpQ9yCyLDwJjras5v3ByCo33fRalVngcrssOL8EjbptUNAfB/eEzZGvyOGim73XGIpyCoNcHH559g2HUnnZxeuQ2wXjwaFsZ35ZLzhkQVDni9cKBTdM0RrKtQALMj6xmKxVe/VVIRmtZpcDynFBqk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705916840; c=relaxed/simple; bh=bCbMxYqsNc6ysevtODH1LdEzA9cmGSP1KVajSHQPjJU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=LHul7jb1m/u6v4OLLh/66WBKxlSfozEt2h2RTdbSOFP4TuDKJz/ykfuEdPK8cwKV8cMS8tm+2uvM7nqn/F5Syk/XzmKq42KoUaa396JQBdXO6ff16dUyu11BOlZILSR/3AOmCOn8JMLomRVLqxahK/CkrLQOKlDuPW9kkcQCwuU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=FNTdXCgF; arc=none smtp.client-ip=192.198.163.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1705916840; x=1737452840; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bCbMxYqsNc6ysevtODH1LdEzA9cmGSP1KVajSHQPjJU=; b=FNTdXCgFDEajK0J+b4+fNPpxe5+s51uH2XqYPM3n/4RxGn1+ABwZgHvI qacCUMnlG1uDyHcLeKUCYQXBp7q7pZu/56jljYDSlvXu7sOkII9gXkEDf AzWhg0NOWbu1wYFMu4E3/ojdcSTMnSz1Ryuvh2PPh2/DnLmeUxT2XJJLT jbtuDrmtvou523Zo+2jCXrBBVmSNLiIm8Xc6P3MkHEeoOVjXVb3SH88mt jgiuwt3yiJ6dyeqoRnmWM0syD1C0fd0/fzuyETd6LQxCw3VVuIaD2qCuH 8pP87cw7w58JaImtMXQUBLL4SYKGI3gfKSr3STeVnFOSIALbwGPR6JoGK A==; X-IronPort-AV: E=McAfee;i="6600,9927,10960"; a="22641905" X-IronPort-AV: E=Sophos;i="6.05,211,1701158400"; d="scan'208";a="22641905" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jan 2024 01:47:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10960"; a="778535499" X-IronPort-AV: E=Sophos;i="6.05,211,1701158400"; d="scan'208";a="778535499" Received: from haibo-optiplex-7090.sh.intel.com ([10.239.159.132]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jan 2024 01:47:09 -0800 From: Haibo Xu To: Cc: xiaobo55x@gmail.com, ajones@ventanamicro.com, Haibo Xu , 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 , Guo Ren , Mayuresh Chitale , Greentime Hu , wchen , Conor Dooley , Samuel Holland , Minda Chen , Jisheng Zhang , Sean Christopherson , Like Xu , Peter Xu , Vipin Sharma , Aaron Lewis , Thomas Huth , Maciej Wieczor-Retman , 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: [PATCH v5 08/12] KVM: riscv: selftests: Switch to use macro from csr.h Date: Mon, 22 Jan 2024 17:58:38 +0800 Message-Id: <4806503d3e8fe4b727eb6df72c8fdd087355495b.1705916069.git.haibo1.xu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Signed-off-by: Haibo Xu Reviewed-by: Andrew Jones --- tools/testing/selftests/kvm/include/riscv/processor.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/tools/testing/selftests/kvm/include/riscv/processor.h b/tools/testing/selftests/kvm/include/riscv/processor.h index 5b62a3d2aa9b..6f9e1e5e466d 100644 --- a/tools/testing/selftests/kvm/include/riscv/processor.h +++ b/tools/testing/selftests/kvm/include/riscv/processor.h @@ -7,8 +7,9 @@ #ifndef SELFTEST_KVM_PROCESSOR_H #define SELFTEST_KVM_PROCESSOR_H -#include "kvm_util.h" #include +#include +#include "kvm_util.h" static inline uint64_t __kvm_reg_id(uint64_t type, uint64_t idx, uint64_t size) @@ -95,13 +96,6 @@ static inline uint64_t __kvm_reg_id(uint64_t type, uint64_t idx, #define PGTBL_PAGE_SIZE PGTBL_L0_BLOCK_SIZE #define PGTBL_PAGE_SIZE_SHIFT PGTBL_L0_BLOCK_SHIFT -#define SATP_PPN _AC(0x00000FFFFFFFFFFF, UL) -#define SATP_MODE_39 _AC(0x8000000000000000, UL) -#define SATP_MODE_48 _AC(0x9000000000000000, UL) -#define SATP_ASID_BITS 16 -#define SATP_ASID_SHIFT 44 -#define SATP_ASID_MASK _AC(0xFFFF, UL) - #define SBI_EXT_EXPERIMENTAL_START 0x08000000 #define SBI_EXT_EXPERIMENTAL_END 0x08FFFFFF -- 2.34.1