Skip to content

Commit 4255ce0

Browse files
steffen-eidenfrankjaa
authored andcommitted
s390/uv: Always export uv_info
KVM needs the struct's values to be able to provide PV support. The uvdevice is currently guest only and will need the struct's values for call support checking and potential future expansions. As uv.c is only compiled with CONFIG_PGSTE or CONFIG_PROTECTED_VIRTUALIZATION_GUEST we don't need a second check in the code. Users of uv_info will need to fence for these two config options for the time being. Signed-off-by: Steffen Eiden <seiden@linux.ibm.com> Reviewed-by: Janosch Frank <frankja@linux.ibm.com> Link: https://lore.kernel.org/r/20230615100533.3996107-2-seiden@linux.ibm.com Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Message-Id: <20230615100533.3996107-2-seiden@linux.ibm.com>
1 parent 0bc380b commit 4255ce0

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

  • arch/s390/kernel

arch/s390/kernel/uv.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,20 @@
2323
int __bootdata_preserved(prot_virt_guest);
2424
#endif
2525

26+
/*
27+
* uv_info contains both host and guest information but it's currently only
28+
* expected to be used within modules if it's the KVM module or for
29+
* any PV guest module.
30+
*
31+
* The kernel itself will write these values once in uv_query_info()
32+
* and then make some of them readable via a sysfs interface.
33+
*/
2634
struct uv_info __bootdata_preserved(uv_info);
35+
EXPORT_SYMBOL(uv_info);
2736

2837
#if IS_ENABLED(CONFIG_KVM)
2938
int __bootdata_preserved(prot_virt_host);
3039
EXPORT_SYMBOL(prot_virt_host);
31-
EXPORT_SYMBOL(uv_info);
3240

3341
static int __init uv_init(phys_addr_t stor_base, unsigned long stor_len)
3442
{

0 commit comments

Comments
 (0)