Skip to content

Commit feb2c8f

Browse files
xiaobo55xavpatel
authored andcommitted
KVM: riscv: selftests: Switch to use macro from csr.h
Signed-off-by: Haibo Xu <haibo1.xu@intel.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Signed-off-by: Anup Patel <anup@brainfault.org>
1 parent 1d50c77 commit feb2c8f

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

tools/testing/selftests/kvm/include/riscv/processor.h

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
#ifndef SELFTEST_KVM_PROCESSOR_H
88
#define SELFTEST_KVM_PROCESSOR_H
99

10-
#include "kvm_util.h"
1110
#include <linux/stringify.h>
11+
#include <asm/csr.h>
12+
#include "kvm_util.h"
1213

1314
static inline uint64_t __kvm_reg_id(uint64_t type, uint64_t subtype,
1415
uint64_t idx, uint64_t size)
@@ -101,13 +102,6 @@ static inline uint64_t __kvm_reg_id(uint64_t type, uint64_t subtype,
101102
#define PGTBL_PAGE_SIZE PGTBL_L0_BLOCK_SIZE
102103
#define PGTBL_PAGE_SIZE_SHIFT PGTBL_L0_BLOCK_SHIFT
103104

104-
#define SATP_PPN _AC(0x00000FFFFFFFFFFF, UL)
105-
#define SATP_MODE_39 _AC(0x8000000000000000, UL)
106-
#define SATP_MODE_48 _AC(0x9000000000000000, UL)
107-
#define SATP_ASID_BITS 16
108-
#define SATP_ASID_SHIFT 44
109-
#define SATP_ASID_MASK _AC(0xFFFF, UL)
110-
111105
/* SBI return error codes */
112106
#define SBI_SUCCESS 0
113107
#define SBI_ERR_FAILURE -1

0 commit comments

Comments
 (0)