File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 68
68
69
69
#include <asm/cpufeature.h>
70
70
#include <asm/pgtable-types.h>
71
+ #include <asm/rsi.h>
71
72
72
73
extern bool arm64_use_ng_mappings ;
74
+ extern unsigned long prot_ns_shared ;
75
+
76
+ #define PROT_NS_SHARED (is_realm_world() ? prot_ns_shared : 0)
73
77
74
78
#define PTE_MAYBE_NG (arm64_use_ng_mappings ? PTE_NG : 0)
75
79
#define PMD_MAYBE_NG (arm64_use_ng_mappings ? PMD_SECT_NG : 0)
Original file line number Diff line number Diff line change 8
8
#include <linux/psci.h>
9
9
#include <asm/rsi.h>
10
10
11
+ static struct realm_config config ;
12
+
13
+ unsigned long prot_ns_shared ;
14
+ EXPORT_SYMBOL (prot_ns_shared );
15
+
11
16
DEFINE_STATIC_KEY_FALSE_RO (rsi_present );
12
17
EXPORT_SYMBOL (rsi_present );
13
18
@@ -68,6 +73,9 @@ void __init arm64_rsi_init(void)
68
73
return ;
69
74
if (!rsi_version_matches ())
70
75
return ;
76
+ if (WARN_ON (rsi_get_realm_config (& config )))
77
+ return ;
78
+ prot_ns_shared = BIT (config .ipa_bits - 1 );
71
79
72
80
arm64_rsi_setup_memory ();
73
81
You can’t perform that action at this time.
0 commit comments