Skip to contentSkip to conversation

xsm: Further fixes

PATCH In review Andrew Cooper 4 participants 6 messages Dec 1, 2021 – Dec 3, 2021

lore
Share & tools
lore
#0 lore raw

cover xsm: Further fixes

Andrew Cooper (2):
xsm: Switch xsm_ops to __alt_call_maybe_initdata
xsm: Drop extern of non-existent variable

 xen/include/xsm/xsm.h | 2 --
 xen/xsm/xsm_core.c    | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/2 xsm: Switch xsm_ops to __alt_call_maybe_initdata

This should have been done at the point xsm_ops became fully altcall'd. This puts the xsm_ops structure in .init on architectures where it is no longer referenced at runtime.

Fixes d868feb95a8a ("xen/xsm: Complete altcall conversion of xsm interface")

---
CC: Daniel De Graaf <[email protected]>
CC: Daniel Smith <[email protected]>

---
 xen/xsm/xsm_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/xsm/xsm_core.c +1 -1
index 21fffbcb41d3..14d98f1f725f 100644
@@ -30,7 +30,7 @@
 
 #define XSM_FRAMEWORK_VERSION    "1.0.1"
 
-struct xsm_ops __read_mostly xsm_ops;
+struct xsm_ops __alt_call_maybe_initdata xsm_ops;
 
 enum xsm_ops_state {
     XSM_OPS_UNREGISTERED,
Signature · 1 line
2.11.0
#2 lore raw

PATCH 2/2 xsm: Drop extern of non-existent variable

In reply to Andrew Cooper

dummy_xsm_ops was dropped as part of organising XSM to be altcall compatible, but the extern was accidentally left around.

A later change reintroduced dummy_ops which is logically the same thing, but is private to xsm/dummy.c

Fixes 164a0b9653f4 ("xsm: refactor xsm_ops handling")

---
CC: Daniel De Graaf <[email protected]>
CC: Daniel Smith <[email protected]>

---
 xen/include/xsm/xsm.h | 2 --
 1 file changed, 2 deletions(-)
xen/include/xsm/xsm.h +0 -2
index 5aa4dd588d17..3e2b7fe3dbb3 100644
@@ -789,8 +789,6 @@ int xsm_dt_policy_init(void **policy_buffer, size_t *policy_size);
 bool has_xsm_magic(paddr_t);
 #endif
 
-extern struct xsm_ops dummy_xsm_ops;
-
 void xsm_fixup_ops(struct xsm_ops *ops);
 
 #ifdef CONFIG_XSM_FLASK
Signature · 1 line
2.11.0