]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
KVM: riscv: selftests: Switch to use macro from csr.h
authorHaibo Xu <haibo1.xu@intel.com>
Mon, 22 Jan 2024 09:58:38 +0000 (17:58 +0800)
committerAnup Patel <anup@brainfault.org>
Mon, 26 Feb 2024 04:44:07 +0000 (10:14 +0530)
Signed-off-by: Haibo Xu <haibo1.xu@intel.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
tools/testing/selftests/kvm/include/riscv/processor.h

index a0f9efe5a2a8de6afda4d4531f1ca6bda22f4b9c..b6b95e747688e422fa9ecb2eb5f6d8d1b6c1fa13 100644 (file)
@@ -7,8 +7,9 @@
 #ifndef SELFTEST_KVM_PROCESSOR_H
 #define SELFTEST_KVM_PROCESSOR_H
 
-#include "kvm_util.h"
 #include <linux/stringify.h>
+#include <asm/csr.h>
+#include "kvm_util.h"
 
 static inline uint64_t __kvm_reg_id(uint64_t type, uint64_t subtype,
                                    uint64_t idx, uint64_t size)
@@ -101,13 +102,6 @@ static inline uint64_t __kvm_reg_id(uint64_t type, uint64_t subtype,
 #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)
-
 /* SBI return error codes */
 #define SBI_SUCCESS                            0
 #define SBI_ERR_FAILURE                                -1