public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steffen Eiden <seiden@linux.ibm.com>
To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org
Cc: Ingo Franzki <ifranzki@linux.ibm.com>,
	Harald Freudenberger <freude@linux.ibm.com>,
	Christoph Schlameuss <schlameuss@linux.ibm.com>,
	Janosch Frank <frankja@linux.ibm.com>,
	Claudio Imbrenda <imbrenda@linux.ibm.com>
Subject: [PATCH v1 1/6] s390/boot/uv.c: Use a constant for more-data rc
Date: Mon, 30 Sep 2024 15:19:04 +0200	[thread overview]
Message-ID: <20240930131909.2079965-2-seiden@linux.ibm.com> (raw)
In-Reply-To: <20240930131909.2079965-1-seiden@linux.ibm.com>

Add a define for the UVC rc 0x0100 that indicates that a UV-call was
successful but may serve more data if called with a larger buffer
again.

Reviewed-by: Christoph Schlameuss <schlameuss@linux.ibm.com>
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
---
 arch/s390/boot/uv.c        | 4 ++--
 arch/s390/include/asm/uv.h | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/s390/boot/uv.c b/arch/s390/boot/uv.c
index 318e6ba95bfd..2a71e759dc42 100644
--- a/arch/s390/boot/uv.c
+++ b/arch/s390/boot/uv.c
@@ -22,8 +22,8 @@ void uv_query_info(void)
 	if (!test_facility(158))
 		return;
 
-	/* rc==0x100 means that there is additional data we do not process */
-	if (uv_call(0, (uint64_t)&uvcb) && uvcb.header.rc != 0x100)
+	/* Ignore that there might be more data we do not process */
+	if (uv_call(0, (uint64_t)&uvcb) && uvcb.header.rc != UVC_RC_MORE_DATA)
 		return;
 
 	if (IS_ENABLED(CONFIG_KVM)) {
diff --git a/arch/s390/include/asm/uv.h b/arch/s390/include/asm/uv.h
index 153d93468b77..94ff58336e8e 100644
--- a/arch/s390/include/asm/uv.h
+++ b/arch/s390/include/asm/uv.h
@@ -28,6 +28,7 @@
 #define UVC_RC_INV_STATE	0x0003
 #define UVC_RC_INV_LEN		0x0005
 #define UVC_RC_NO_RESUME	0x0007
+#define UVC_RC_MORE_DATA	0x0100
 #define UVC_RC_NEED_DESTROY	0x8000
 
 #define UVC_CMD_QUI			0x0001
-- 
2.43.0


  reply	other threads:[~2024-09-30 13:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-30 13:19 [PATCH v1 0/6] s390/uv: Retrieve Secrets Ultravisor Call support Steffen Eiden
2024-09-30 13:19 ` Steffen Eiden [this message]
2024-10-01 12:10   ` [PATCH v1 1/6] s390/boot/uv.c: Use a constant for more-data rc Claudio Imbrenda
2024-10-01 13:56   ` Janosch Frank
2024-09-30 13:19 ` [PATCH v1 2/6] s390/uv: Retrieve UV secrets support Steffen Eiden
2024-10-01 16:06   ` Christoph Schlameuss
2024-10-02  7:51     ` Janosch Frank
2024-09-30 13:19 ` [PATCH v1 3/6] s390/uvdevice: Add Retrieve Secret IOCTL Steffen Eiden
2024-10-01 16:09   ` Christoph Schlameuss
2024-09-30 13:19 ` [PATCH v1 4/6] s390/uvdevice: Increase indent in IOCTL definitions Steffen Eiden
2024-09-30 13:19 ` [PATCH v1 5/6] s390/uvdevice: Add List Secrets Ext IOCTL Steffen Eiden
2024-10-01 16:19   ` Christoph Schlameuss
2024-09-30 13:19 ` [PATCH v1 6/6] s390/uv: Retrieve UV secrets sysfs support Steffen Eiden
2024-10-01 17:42   ` Christoph Schlameuss

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=20240930131909.2079965-2-seiden@linux.ibm.com \
    --to=seiden@linux.ibm.com \
    --cc=frankja@linux.ibm.com \
    --cc=freude@linux.ibm.com \
    --cc=ifranzki@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=schlameuss@linux.ibm.com \
    /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