Skip to contentSkip to conversation

xsave: export get_xsave_addr

PATCH In review Tiejun Chen 2 participants 2 messages Nov 28, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xsave: export get_xsave_addr

After commit, 1d7fe1d1, "KVM: x86: support XSAVES usage in the host", is introduced,

...
Building modules, stage 2.
MODPOST 20 modules
ERROR: "get_xsave_addr" [arch/x86/kvm/kvm.ko] undefined! make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2

so we need to export get_xsave_addr() while using KVM as a module.

---

I'm not sure if this is already fixed so just post in advance.

 arch/x86/kernel/xsave.c | 1 +
 1 file changed, 1 insertion(+)
arch/x86/kernel/xsave.c +1 -0
index 4c540c4..0de1fae 100644
@@ -738,3 +738,4 @@ void *get_xsave_addr(struct xsave_struct *xsave, int xstate)
 
 	return (void *)xsave + xstate_comp_offsets[feature];
 }
+EXPORT_SYMBOL_GPL(get_xsave_addr);
Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 10 lines · Tiejun Chen

After commit, 1d7fe1d1, "KVM: x86: support XSAVES usage in the host", is introduced,

...
Building modules, stage 2.
MODPOST 20 modules
ERROR: "get_xsave_addr" [arch/x86/kvm/kvm.ko] undefined! make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2

Quoted 7 lines

so we need to export get_xsave_addr() while using KVM as a module.

---

I'm not sure if this is already fixed so just post in advance.

Yes, it is fixed---Stephen Rothwell's linux-next testing caught it immediately. Pushing the XSAVES patch was unintended, since it hadn't been tested nor reviewed.

Paolo

Quoted 14 lines
 arch/x86/kernel/xsave.c | 1 +
 1 file changed, 1 insertion(+)
arch/x86/kernel/xsave.c +1 -0
index 4c540c4..0de1fae 100644
@@ -738,3 +738,4 @@ void *get_xsave_addr(struct xsave_struct *xsave, int xstate)
 
 	return (void *)xsave + xstate_comp_offsets[feature];
 }
+EXPORT_SYMBOL_GPL(get_xsave_addr);