public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steffen Eiden <seiden@linux.ibm.com>
To: kvm@vger.kernel.org, linux-s390@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: Janosch Frank <frankja@linux.ibm.com>,
	Claudio Imbrenda <imbrenda@linux.ibm.com>,
	Christian Borntraeger <borntraeger@linux.ibm.com>
Subject: [PATCH v5 1/7] s390/uv: Always export uv_info
Date: Thu, 15 Jun 2023 12:05:27 +0200	[thread overview]
Message-ID: <20230615100533.3996107-2-seiden@linux.ibm.com> (raw)
In-Reply-To: <20230615100533.3996107-1-seiden@linux.ibm.com>

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>
---
 arch/s390/kernel/uv.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/arch/s390/kernel/uv.c b/arch/s390/kernel/uv.c
index 4ada621a2c46..5da3879001bb 100644
--- a/arch/s390/kernel/uv.c
+++ b/arch/s390/kernel/uv.c
@@ -23,12 +23,20 @@
 int __bootdata_preserved(prot_virt_guest);
 #endif
 
+/*
+ * uv_info contains both host and guest information but it's currently only
+ * expected to be used within modules if it's the KVM module or for
+ * any PV guest module.
+ *
+ * The kernel itself will write these values once in uv_query_info()
+ * and then make some of them readable via a sysfs interface.
+ */
 struct uv_info __bootdata_preserved(uv_info);
+EXPORT_SYMBOL(uv_info);
 
 #if IS_ENABLED(CONFIG_KVM)
 int __bootdata_preserved(prot_virt_host);
 EXPORT_SYMBOL(prot_virt_host);
-EXPORT_SYMBOL(uv_info);
 
 static int __init uv_init(phys_addr_t stor_base, unsigned long stor_len)
 {
-- 
2.40.1


  reply	other threads:[~2023-06-15 10:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-15 10:05 [PATCH v5 0/7] s390/uvdevice: Expose secret UVCs Steffen Eiden
2023-06-15 10:05 ` Steffen Eiden [this message]
2023-06-16  8:56   ` [PATCH v5 1/7] s390/uv: Always export uv_info Janosch Frank
2023-06-15 10:05 ` [PATCH v5 2/7] s390/uvdevice: Add info IOCTL Steffen Eiden
2023-06-15 10:05 ` [PATCH v5 3/7] s390/uvdevice: Add 'Add Secret' UVC Steffen Eiden
2023-06-15 10:05 ` [PATCH v5 4/7] s390/uvdevice: Add 'List Secrets' UVC Steffen Eiden
2023-06-15 10:05 ` [PATCH v5 5/7] s390/uvdevice: Add 'Lock Secret Store' UVC Steffen Eiden
2023-06-15 10:05 ` [PATCH v5 6/7] s390/uv: replace scnprintf with sysfs_emit Steffen Eiden
2023-06-15 10:05 ` [PATCH v5 7/7] s390/uv: Update query for secret-UVCs Steffen Eiden

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230615100533.3996107-2-seiden@linux.ibm.com \
    --to=seiden@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=frankja@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox