Linux s390 Architecture development
 help / color / mirror / Atom feed
* [PATCH 0/6] KVM: s390: vsie: Small VSIE cleanup and improvements
@ 2026-08-07  9:57 Christoph Schlameuss
  2026-08-07  9:57 ` [PATCH 1/6] KVM: s390: Remove double 64bscao feature check Christoph Schlameuss
                   ` (5 more replies)
  0 siblings, 6 replies; 24+ messages in thread
From: Christoph Schlameuss @ 2026-08-07  9:57 UTC (permalink / raw)
  To: kvm
  Cc: Christian Borntraeger, Janosch Frank, Claudio Imbrenda,
	David Hildenbrand, Heiko Carstens, Vasily Gorbik,
	Alexander Gordeev, Sven Schnelle, linux-s390, Hendrik Brueckner,
	Eric Farman, Christoph Schlameuss

Some patches previously sent in series
"KVM: s390: vsie: Add VSIE SIGP Interpretation (vsie_sigpi) v1"

Link: https://lore.kernel.org/r/20260709-vsie-sigpi-v1-0-ea9f12066408@linux.ibm.com

now in its own series as proposed by Janosch in

Link: https://lore.kernel.org/all/77387525-cf7b-4617-a492-d81b6c1cef17@linux.ibm.com/

As well as some small additions like some of the offsets in struct
vsie_page do have in page offset or alignment requirements. Adding
assertions can actually prevent bad code changes as well as provide
clarity for the requirements.

And introduction of simple SCB_ALIGNMENT_SHIFT constant.

---
Christoph Schlameuss (6):
      KVM: s390: Remove double 64bscao feature check
      KVM: s390: vsie: Remove duplicate assertion
      KVM: s390: vsie: Convert shift to phys_to_pfn()
      KVM: s390: vsie: Assert mcck_info offset in vsie_page
      KVM: s390: vsie: Assert crycb alignment in vsie_page
      KVM: s390: vsie: Create constant SCB_ALIGNMENT_SHIFT

 arch/s390/include/asm/kvm_host_types.h |  2 ++
 arch/s390/kvm/kvm-s390.c               |  3 +--
 arch/s390/kvm/vsie.c                   | 19 +++++++++----------
 3 files changed, 12 insertions(+), 12 deletions(-)
---
base-commit: f9a2394a23482bfd330911e9c8295b71724feacd
change-id: 20260716-vsie-cleanup-202607-8690ba7ac3ea

Best regards,
-- 
Christoph Schlameuss <schlameuss@linux.ibm.com>


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 1/6] KVM: s390: Remove double 64bscao feature check
  2026-08-07  9:57 [PATCH 0/6] KVM: s390: vsie: Small VSIE cleanup and improvements Christoph Schlameuss
@ 2026-08-07  9:57 ` Christoph Schlameuss
  2026-08-07  9:59   ` sashiko-bot
  2026-08-07 10:59   ` Claudio Imbrenda
  2026-08-07  9:57 ` [PATCH 2/6] KVM: s390: vsie: Remove duplicate assertion Christoph Schlameuss
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 24+ messages in thread
From: Christoph Schlameuss @ 2026-08-07  9:57 UTC (permalink / raw)
  To: kvm
  Cc: Christian Borntraeger, Janosch Frank, Claudio Imbrenda,
	David Hildenbrand, Heiko Carstens, Vasily Gorbik,
	Alexander Gordeev, Sven Schnelle, linux-s390, Hendrik Brueckner,
	Eric Farman, Christoph Schlameuss

sclp.has_64bscao is already verified in the guard clause a few lines
above this. So we cannot reach this code if it is not true.

Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com>
---
 arch/s390/kvm/kvm-s390.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index 150b5dd2170e..c679d8f83c0e 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -455,8 +455,7 @@ static void __init kvm_s390_cpu_feat_init(void)
 	    !test_facility(3) || !nested)
 		return;
 	allow_cpu_feat(KVM_S390_VM_CPU_FEAT_SIEF2);
-	if (sclp.has_64bscao)
-		allow_cpu_feat(KVM_S390_VM_CPU_FEAT_64BSCAO);
+	allow_cpu_feat(KVM_S390_VM_CPU_FEAT_64BSCAO);
 	if (sclp.has_siif)
 		allow_cpu_feat(KVM_S390_VM_CPU_FEAT_SIIF);
 	if (sclp.has_gpere)

-- 
2.55.0


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 2/6] KVM: s390: vsie: Remove duplicate assertion
  2026-08-07  9:57 [PATCH 0/6] KVM: s390: vsie: Small VSIE cleanup and improvements Christoph Schlameuss
  2026-08-07  9:57 ` [PATCH 1/6] KVM: s390: Remove double 64bscao feature check Christoph Schlameuss
@ 2026-08-07  9:57 ` Christoph Schlameuss
  2026-08-07  9:59   ` sashiko-bot
                     ` (2 more replies)
  2026-08-07  9:57 ` [PATCH 3/6] KVM: s390: vsie: Convert shift to phys_to_pfn() Christoph Schlameuss
                   ` (3 subsequent siblings)
  5 siblings, 3 replies; 24+ messages in thread
From: Christoph Schlameuss @ 2026-08-07  9:57 UTC (permalink / raw)
  To: kvm
  Cc: Christian Borntraeger, Janosch Frank, Claudio Imbrenda,
	David Hildenbrand, Heiko Carstens, Vasily Gorbik,
	Alexander Gordeev, Sven Schnelle, linux-s390,
	Christoph Schlameuss

This is covered by a static_assert at the struct vsie_page definition.

Fixes: e38c884df921 ("KVM: s390: Switch to new gmap")
Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com>
---
 arch/s390/kvm/vsie.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c
index eea24562e7db..3e956c7faa4b 100644
--- a/arch/s390/kvm/vsie.c
+++ b/arch/s390/kvm/vsie.c
@@ -1565,7 +1565,6 @@ int kvm_s390_handle_vsie(struct kvm_vcpu *vcpu)
 	if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE)
 		return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP);
 
-	BUILD_BUG_ON(sizeof(struct vsie_page) != PAGE_SIZE);
 	scb_addr = kvm_s390_get_base_disp_s(vcpu, NULL);
 
 	/* 512 byte alignment */

-- 
2.55.0


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 3/6] KVM: s390: vsie: Convert shift to phys_to_pfn()
  2026-08-07  9:57 [PATCH 0/6] KVM: s390: vsie: Small VSIE cleanup and improvements Christoph Schlameuss
  2026-08-07  9:57 ` [PATCH 1/6] KVM: s390: Remove double 64bscao feature check Christoph Schlameuss
  2026-08-07  9:57 ` [PATCH 2/6] KVM: s390: vsie: Remove duplicate assertion Christoph Schlameuss
@ 2026-08-07  9:57 ` Christoph Schlameuss
  2026-08-07 10:02   ` sashiko-bot
                     ` (3 more replies)
  2026-08-07  9:57 ` [PATCH 4/6] KVM: s390: vsie: Assert mcck_info offset in vsie_page Christoph Schlameuss
                   ` (2 subsequent siblings)
  5 siblings, 4 replies; 24+ messages in thread
From: Christoph Schlameuss @ 2026-08-07  9:57 UTC (permalink / raw)
  To: kvm
  Cc: Christian Borntraeger, Janosch Frank, Claudio Imbrenda,
	David Hildenbrand, Heiko Carstens, Vasily Gorbik,
	Alexander Gordeev, Sven Schnelle, linux-s390,
	Christoph Schlameuss

Make the code slightly more readable.

Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com>
---
 arch/s390/kvm/vsie.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c
index 3e956c7faa4b..937f9c99bc00 100644
--- a/arch/s390/kvm/vsie.c
+++ b/arch/s390/kvm/vsie.c
@@ -701,7 +701,7 @@ static int pin_guest_page(struct kvm *kvm, gpa_t gpa, hpa_t *hpa)
 /* Unpins a page previously pinned via pin_guest_page, marking it as dirty. */
 static void unpin_guest_page(struct kvm *kvm, gpa_t gpa, hpa_t hpa)
 {
-	kvm_release_page_dirty(pfn_to_page(hpa >> PAGE_SHIFT));
+	kvm_release_page_dirty(pfn_to_page(phys_to_pfn(hpa)));
 	/* mark the page always as dirty for migration */
 	mark_page_dirty(kvm, gpa_to_gfn(gpa));
 }

-- 
2.55.0


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 4/6] KVM: s390: vsie: Assert mcck_info offset in vsie_page
  2026-08-07  9:57 [PATCH 0/6] KVM: s390: vsie: Small VSIE cleanup and improvements Christoph Schlameuss
                   ` (2 preceding siblings ...)
  2026-08-07  9:57 ` [PATCH 3/6] KVM: s390: vsie: Convert shift to phys_to_pfn() Christoph Schlameuss
@ 2026-08-07  9:57 ` Christoph Schlameuss
  2026-08-07 10:02   ` sashiko-bot
  2026-08-07 10:37   ` Christian Borntraeger
  2026-08-07  9:57 ` [PATCH 5/6] KVM: s390: vsie: Assert crycb alignment " Christoph Schlameuss
  2026-08-07  9:57 ` [PATCH 6/6] KVM: s390: vsie: Create constant SCB_ALIGNMENT_SHIFT Christoph Schlameuss
  5 siblings, 2 replies; 24+ messages in thread
From: Christoph Schlameuss @ 2026-08-07  9:57 UTC (permalink / raw)
  To: kvm
  Cc: Christian Borntraeger, Janosch Frank, Claudio Imbrenda,
	David Hildenbrand, Heiko Carstens, Vasily Gorbik,
	Alexander Gordeev, Sven Schnelle, linux-s390,
	Christoph Schlameuss

Ensure that the backup info for machine check is the same offset as that
in struct sie_page!

With the assertion in place we do not need the comment anymore.

Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com>
---
 arch/s390/kvm/vsie.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c
index 937f9c99bc00..7c3b5e11b301 100644
--- a/arch/s390/kvm/vsie.c
+++ b/arch/s390/kvm/vsie.c
@@ -33,10 +33,7 @@ enum vsie_page_flags {
 
 struct vsie_page {
 	struct kvm_s390_sie_block scb_s;	/* 0x0000 */
-	/*
-	 * the backup info for machine check. ensure it's at
-	 * the same offset as that in struct sie_page!
-	 */
+	/* backup info for machine check */
 	struct mcck_volatile_info mcck_info;    /* 0x0200 */
 	/*
 	 * The pinned original scb. Be aware that other VCPUs can modify
@@ -71,6 +68,7 @@ struct vsie_page {
 };
 
 static_assert(sizeof(struct vsie_page) == PAGE_SIZE);
+static_assert(offsetof(struct vsie_page, mcck_info) == offsetof(struct sie_page, mcck_info));
 
 /* trigger a validity icpt for the given scb */
 static int set_validity_icpt(struct kvm_s390_sie_block *scb,

-- 
2.55.0


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 5/6] KVM: s390: vsie: Assert crycb alignment in vsie_page
  2026-08-07  9:57 [PATCH 0/6] KVM: s390: vsie: Small VSIE cleanup and improvements Christoph Schlameuss
                   ` (3 preceding siblings ...)
  2026-08-07  9:57 ` [PATCH 4/6] KVM: s390: vsie: Assert mcck_info offset in vsie_page Christoph Schlameuss
@ 2026-08-07  9:57 ` Christoph Schlameuss
  2026-08-07 10:00   ` sashiko-bot
                     ` (2 more replies)
  2026-08-07  9:57 ` [PATCH 6/6] KVM: s390: vsie: Create constant SCB_ALIGNMENT_SHIFT Christoph Schlameuss
  5 siblings, 3 replies; 24+ messages in thread
From: Christoph Schlameuss @ 2026-08-07  9:57 UTC (permalink / raw)
  To: kvm
  Cc: Christian Borntraeger, Janosch Frank, Claudio Imbrenda,
	David Hildenbrand, Heiko Carstens, Vasily Gorbik,
	Alexander Gordeev, Sven Schnelle, linux-s390,
	Christoph Schlameuss

The crypto control block address is required to have double word
alignment.

Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com>
---
 arch/s390/kvm/vsie.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c
index 7c3b5e11b301..c9392460edca 100644
--- a/arch/s390/kvm/vsie.c
+++ b/arch/s390/kvm/vsie.c
@@ -69,6 +69,7 @@ struct vsie_page {
 
 static_assert(sizeof(struct vsie_page) == PAGE_SIZE);
 static_assert(offsetof(struct vsie_page, mcck_info) == offsetof(struct sie_page, mcck_info));
+static_assert(IS_ALIGNED(offsetof(struct vsie_page, crycb), 8));
 
 /* trigger a validity icpt for the given scb */
 static int set_validity_icpt(struct kvm_s390_sie_block *scb,

-- 
2.55.0


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 6/6] KVM: s390: vsie: Create constant SCB_ALIGNMENT_SHIFT
  2026-08-07  9:57 [PATCH 0/6] KVM: s390: vsie: Small VSIE cleanup and improvements Christoph Schlameuss
                   ` (4 preceding siblings ...)
  2026-08-07  9:57 ` [PATCH 5/6] KVM: s390: vsie: Assert crycb alignment " Christoph Schlameuss
@ 2026-08-07  9:57 ` Christoph Schlameuss
  2026-08-07 10:02   ` sashiko-bot
  5 siblings, 1 reply; 24+ messages in thread
From: Christoph Schlameuss @ 2026-08-07  9:57 UTC (permalink / raw)
  To: kvm
  Cc: Christian Borntraeger, Janosch Frank, Claudio Imbrenda,
	David Hildenbrand, Heiko Carstens, Vasily Gorbik,
	Alexander Gordeev, Sven Schnelle, linux-s390,
	Christoph Schlameuss

Create a simple constant for the SCB alignment shift.

Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com>
---
 arch/s390/include/asm/kvm_host_types.h | 2 ++
 arch/s390/kvm/vsie.c                   | 9 +++++----
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/arch/s390/include/asm/kvm_host_types.h b/arch/s390/include/asm/kvm_host_types.h
index 3f50942bdfe6..ac82dd09fce5 100644
--- a/arch/s390/include/asm/kvm_host_types.h
+++ b/arch/s390/include/asm/kvm_host_types.h
@@ -9,6 +9,8 @@
 #define KVM_S390_BSCA_CPU_SLOTS 64
 #define KVM_S390_ESCA_CPU_SLOTS 248
 
+#define SCB_ALIGNMENT_SHIFT 9
+
 #define SIGP_CTRL_C		0x80
 #define SIGP_CTRL_SCN_MASK	0x3f
 
diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c
index c9392460edca..eb60a359d0aa 100644
--- a/arch/s390/kvm/vsie.c
+++ b/arch/s390/kvm/vsie.c
@@ -1485,7 +1485,7 @@ static struct vsie_page *get_vsie_page(struct kvm *kvm, unsigned long addr)
 	int nr_vcpus;
 
 	rcu_read_lock();
-	vsie_page = radix_tree_lookup(&kvm->arch.vsie.addr_to_page, addr >> 9);
+	vsie_page = radix_tree_lookup(&kvm->arch.vsie.addr_to_page, addr >> SCB_ALIGNMENT_SHIFT);
 	rcu_read_unlock();
 	if (vsie_page) {
 		if (try_get_vsie_page(vsie_page)) {
@@ -1526,13 +1526,14 @@ static struct vsie_page *get_vsie_page(struct kvm *kvm, unsigned long addr)
 		}
 		if (vsie_page->scb_gpa != ULONG_MAX)
 			radix_tree_delete(&kvm->arch.vsie.addr_to_page,
-					  vsie_page->scb_gpa >> 9);
+					  vsie_page->scb_gpa >> SCB_ALIGNMENT_SHIFT);
 	}
 	/* Mark it as invalid until it resides in the tree. */
 	vsie_page->scb_gpa = ULONG_MAX;
 
 	/* Double use of the same address or allocation failure. */
-	if (radix_tree_insert(&kvm->arch.vsie.addr_to_page, addr >> 9, vsie_page)) {
+	if (radix_tree_insert(&kvm->arch.vsie.addr_to_page, addr >> SCB_ALIGNMENT_SHIFT,
+			      vsie_page)) {
 		put_vsie_page(vsie_page);
 		mutex_unlock(&kvm->arch.vsie.mutex);
 		return NULL;
@@ -1630,7 +1631,7 @@ void kvm_s390_vsie_destroy(struct kvm *kvm)
 		/* free the radix tree entry */
 		if (vsie_page->scb_gpa != ULONG_MAX)
 			radix_tree_delete(&kvm->arch.vsie.addr_to_page,
-					  vsie_page->scb_gpa >> 9);
+					  vsie_page->scb_gpa >> SCB_ALIGNMENT_SHIFT);
 		free_page((unsigned long)vsie_page);
 	}
 	kvm->arch.vsie.page_count = 0;

-- 
2.55.0


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/6] KVM: s390: vsie: Remove duplicate assertion
  2026-08-07  9:57 ` [PATCH 2/6] KVM: s390: vsie: Remove duplicate assertion Christoph Schlameuss
@ 2026-08-07  9:59   ` sashiko-bot
  2026-08-07 10:32   ` Christian Borntraeger
  2026-08-07 11:03   ` Claudio Imbrenda
  2 siblings, 0 replies; 24+ messages in thread
From: sashiko-bot @ 2026-08-07  9:59 UTC (permalink / raw)
  To: Christoph Schlameuss
  Cc: Vasily Gorbik, linux-s390, Heiko Carstens, Alexander Gordeev, kvm

> This is covered by a static_assert at the struct vsie_page definition.
> 
> Fixes: e38c884df921 ("KVM: s390: Switch to new gmap")
> Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260807-vsie-cleanup-202607-v1-0-b18659b55e3d@linux.ibm.com?part=2


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 1/6] KVM: s390: Remove double 64bscao feature check
  2026-08-07  9:57 ` [PATCH 1/6] KVM: s390: Remove double 64bscao feature check Christoph Schlameuss
@ 2026-08-07  9:59   ` sashiko-bot
  2026-08-07 10:59   ` Claudio Imbrenda
  1 sibling, 0 replies; 24+ messages in thread
From: sashiko-bot @ 2026-08-07  9:59 UTC (permalink / raw)
  To: Christoph Schlameuss
  Cc: Vasily Gorbik, Heiko Carstens, linux-s390, Alexander Gordeev, kvm

> sclp.has_64bscao is already verified in the guard clause a few lines
> above this. So we cannot reach this code if it is not true.
> 
> Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
> Reviewed-by: Eric Farman <farman@linux.ibm.com>
> Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
> Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260807-vsie-cleanup-202607-v1-0-b18659b55e3d@linux.ibm.com?part=1


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 5/6] KVM: s390: vsie: Assert crycb alignment in vsie_page
  2026-08-07  9:57 ` [PATCH 5/6] KVM: s390: vsie: Assert crycb alignment " Christoph Schlameuss
@ 2026-08-07 10:00   ` sashiko-bot
  2026-08-07 10:38   ` Christian Borntraeger
  2026-08-07 11:25   ` Claudio Imbrenda
  2 siblings, 0 replies; 24+ messages in thread
From: sashiko-bot @ 2026-08-07 10:00 UTC (permalink / raw)
  To: Christoph Schlameuss
  Cc: kvm, linux-s390, Heiko Carstens, Vasily Gorbik, Alexander Gordeev

> The crypto control block address is required to have double word
> alignment.
> 
> Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260807-vsie-cleanup-202607-v1-0-b18659b55e3d@linux.ibm.com?part=5


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 4/6] KVM: s390: vsie: Assert mcck_info offset in vsie_page
  2026-08-07  9:57 ` [PATCH 4/6] KVM: s390: vsie: Assert mcck_info offset in vsie_page Christoph Schlameuss
@ 2026-08-07 10:02   ` sashiko-bot
  2026-08-07 10:37   ` Christian Borntraeger
  1 sibling, 0 replies; 24+ messages in thread
From: sashiko-bot @ 2026-08-07 10:02 UTC (permalink / raw)
  To: Christoph Schlameuss
  Cc: Alexander Gordeev, kvm, linux-s390, Heiko Carstens, Vasily Gorbik

> Ensure that the backup info for machine check is the same offset as that
> in struct sie_page!
> 
> With the assertion in place we do not need the comment anymore.
> 
> Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260807-vsie-cleanup-202607-v1-0-b18659b55e3d@linux.ibm.com?part=4


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 3/6] KVM: s390: vsie: Convert shift to phys_to_pfn()
  2026-08-07  9:57 ` [PATCH 3/6] KVM: s390: vsie: Convert shift to phys_to_pfn() Christoph Schlameuss
@ 2026-08-07 10:02   ` sashiko-bot
  2026-08-07 10:36   ` Christian Borntraeger
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 24+ messages in thread
From: sashiko-bot @ 2026-08-07 10:02 UTC (permalink / raw)
  To: Christoph Schlameuss
  Cc: Alexander Gordeev, kvm, linux-s390, Vasily Gorbik, Heiko Carstens

> Make the code slightly more readable.
> 
> Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260807-vsie-cleanup-202607-v1-0-b18659b55e3d@linux.ibm.com?part=3


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 6/6] KVM: s390: vsie: Create constant SCB_ALIGNMENT_SHIFT
  2026-08-07  9:57 ` [PATCH 6/6] KVM: s390: vsie: Create constant SCB_ALIGNMENT_SHIFT Christoph Schlameuss
@ 2026-08-07 10:02   ` sashiko-bot
  0 siblings, 0 replies; 24+ messages in thread
From: sashiko-bot @ 2026-08-07 10:02 UTC (permalink / raw)
  To: Christoph Schlameuss
  Cc: kvm, Heiko Carstens, linux-s390, Alexander Gordeev, Vasily Gorbik

> Create a simple constant for the SCB alignment shift.
> 
> Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260807-vsie-cleanup-202607-v1-0-b18659b55e3d@linux.ibm.com?part=6


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/6] KVM: s390: vsie: Remove duplicate assertion
  2026-08-07  9:57 ` [PATCH 2/6] KVM: s390: vsie: Remove duplicate assertion Christoph Schlameuss
  2026-08-07  9:59   ` sashiko-bot
@ 2026-08-07 10:32   ` Christian Borntraeger
  2026-08-07 11:03   ` Claudio Imbrenda
  2 siblings, 0 replies; 24+ messages in thread
From: Christian Borntraeger @ 2026-08-07 10:32 UTC (permalink / raw)
  To: Christoph Schlameuss, kvm
  Cc: Janosch Frank, Claudio Imbrenda, David Hildenbrand,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev, Sven Schnelle,
	linux-s390

Am 07.08.26 um 11:57 schrieb Christoph Schlameuss:
> This is covered by a static_assert at the struct vsie_page definition.
> 
> Fixes: e38c884df921 ("KVM: s390: Switch to new gmap")

we could argue to remove this as this is likely not needed for stable
since its a build bug, but does not hurt.



> Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com>
> ---
>   arch/s390/kvm/vsie.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c
> index eea24562e7db..3e956c7faa4b 100644
> --- a/arch/s390/kvm/vsie.c
> +++ b/arch/s390/kvm/vsie.c
> @@ -1565,7 +1565,6 @@ int kvm_s390_handle_vsie(struct kvm_vcpu *vcpu)
>   	if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE)
>   		return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP);
>   
> -	BUILD_BUG_ON(sizeof(struct vsie_page) != PAGE_SIZE);
>   	scb_addr = kvm_s390_get_base_disp_s(vcpu, NULL);
>   
>   	/* 512 byte alignment */
> 


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 3/6] KVM: s390: vsie: Convert shift to phys_to_pfn()
  2026-08-07  9:57 ` [PATCH 3/6] KVM: s390: vsie: Convert shift to phys_to_pfn() Christoph Schlameuss
  2026-08-07 10:02   ` sashiko-bot
@ 2026-08-07 10:36   ` Christian Borntraeger
  2026-08-07 10:40   ` Sven Schnelle
  2026-08-07 11:04   ` Claudio Imbrenda
  3 siblings, 0 replies; 24+ messages in thread
From: Christian Borntraeger @ 2026-08-07 10:36 UTC (permalink / raw)
  To: Christoph Schlameuss, kvm
  Cc: Janosch Frank, Claudio Imbrenda, David Hildenbrand,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev, Sven Schnelle,
	linux-s390



Am 07.08.26 um 11:57 schrieb Christoph Schlameuss:
> Make the code slightly more readable.
> 
> Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com>

Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com>

> ---
>   arch/s390/kvm/vsie.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c
> index 3e956c7faa4b..937f9c99bc00 100644
> --- a/arch/s390/kvm/vsie.c
> +++ b/arch/s390/kvm/vsie.c
> @@ -701,7 +701,7 @@ static int pin_guest_page(struct kvm *kvm, gpa_t gpa, hpa_t *hpa)
>   /* Unpins a page previously pinned via pin_guest_page, marking it as dirty. */
>   static void unpin_guest_page(struct kvm *kvm, gpa_t gpa, hpa_t hpa)
>   {
> -	kvm_release_page_dirty(pfn_to_page(hpa >> PAGE_SHIFT));
> +	kvm_release_page_dirty(pfn_to_page(phys_to_pfn(hpa)));
>   	/* mark the page always as dirty for migration */
>   	mark_page_dirty(kvm, gpa_to_gfn(gpa));
>   }
> 


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 4/6] KVM: s390: vsie: Assert mcck_info offset in vsie_page
  2026-08-07  9:57 ` [PATCH 4/6] KVM: s390: vsie: Assert mcck_info offset in vsie_page Christoph Schlameuss
  2026-08-07 10:02   ` sashiko-bot
@ 2026-08-07 10:37   ` Christian Borntraeger
  1 sibling, 0 replies; 24+ messages in thread
From: Christian Borntraeger @ 2026-08-07 10:37 UTC (permalink / raw)
  To: Christoph Schlameuss, kvm
  Cc: Janosch Frank, Claudio Imbrenda, David Hildenbrand,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev, Sven Schnelle,
	linux-s390



Am 07.08.26 um 11:57 schrieb Christoph Schlameuss:
> Ensure that the backup info for machine check is the same offset as that
> in struct sie_page!
> 
> With the assertion in place we do not need the comment anymore.

Nice and useful.

Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com>> 
> Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com>
> ---
>   arch/s390/kvm/vsie.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c
> index 937f9c99bc00..7c3b5e11b301 100644
> --- a/arch/s390/kvm/vsie.c
> +++ b/arch/s390/kvm/vsie.c
> @@ -33,10 +33,7 @@ enum vsie_page_flags {
>   
>   struct vsie_page {
>   	struct kvm_s390_sie_block scb_s;	/* 0x0000 */
> -	/*
> -	 * the backup info for machine check. ensure it's at
> -	 * the same offset as that in struct sie_page!
> -	 */
> +	/* backup info for machine check */
>   	struct mcck_volatile_info mcck_info;    /* 0x0200 */
>   	/*
>   	 * The pinned original scb. Be aware that other VCPUs can modify
> @@ -71,6 +68,7 @@ struct vsie_page {
>   };
>   
>   static_assert(sizeof(struct vsie_page) == PAGE_SIZE);
> +static_assert(offsetof(struct vsie_page, mcck_info) == offsetof(struct sie_page, mcck_info));
>   
>   /* trigger a validity icpt for the given scb */
>   static int set_validity_icpt(struct kvm_s390_sie_block *scb,
> 


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 5/6] KVM: s390: vsie: Assert crycb alignment in vsie_page
  2026-08-07  9:57 ` [PATCH 5/6] KVM: s390: vsie: Assert crycb alignment " Christoph Schlameuss
  2026-08-07 10:00   ` sashiko-bot
@ 2026-08-07 10:38   ` Christian Borntraeger
  2026-08-07 11:25   ` Claudio Imbrenda
  2 siblings, 0 replies; 24+ messages in thread
From: Christian Borntraeger @ 2026-08-07 10:38 UTC (permalink / raw)
  To: Christoph Schlameuss, kvm
  Cc: Janosch Frank, Claudio Imbrenda, David Hildenbrand,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev, Sven Schnelle,
	linux-s390



Am 07.08.26 um 11:57 schrieb Christoph Schlameuss:
> The crypto control block address is required to have double word
> alignment.
> 
> Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com>

Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com>

> ---
>   arch/s390/kvm/vsie.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c
> index 7c3b5e11b301..c9392460edca 100644
> --- a/arch/s390/kvm/vsie.c
> +++ b/arch/s390/kvm/vsie.c
> @@ -69,6 +69,7 @@ struct vsie_page {
>   
>   static_assert(sizeof(struct vsie_page) == PAGE_SIZE);
>   static_assert(offsetof(struct vsie_page, mcck_info) == offsetof(struct sie_page, mcck_info));
> +static_assert(IS_ALIGNED(offsetof(struct vsie_page, crycb), 8));
>   
>   /* trigger a validity icpt for the given scb */
>   static int set_validity_icpt(struct kvm_s390_sie_block *scb,
> 


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 3/6] KVM: s390: vsie: Convert shift to phys_to_pfn()
  2026-08-07  9:57 ` [PATCH 3/6] KVM: s390: vsie: Convert shift to phys_to_pfn() Christoph Schlameuss
  2026-08-07 10:02   ` sashiko-bot
  2026-08-07 10:36   ` Christian Borntraeger
@ 2026-08-07 10:40   ` Sven Schnelle
  2026-08-07 11:06     ` Sven Schnelle
  2026-08-07 11:04   ` Claudio Imbrenda
  3 siblings, 1 reply; 24+ messages in thread
From: Sven Schnelle @ 2026-08-07 10:40 UTC (permalink / raw)
  To: Christoph Schlameuss
  Cc: kvm, Christian Borntraeger, Janosch Frank, Claudio Imbrenda,
	David Hildenbrand, Heiko Carstens, Vasily Gorbik,
	Alexander Gordeev, linux-s390

Christoph Schlameuss <schlameuss@linux.ibm.com> writes:

> Make the code slightly more readable.
>
> Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com>
> ---
>  arch/s390/kvm/vsie.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c
> index 3e956c7faa4b..937f9c99bc00 100644
> --- a/arch/s390/kvm/vsie.c
> +++ b/arch/s390/kvm/vsie.c
> @@ -701,7 +701,7 @@ static int pin_guest_page(struct kvm *kvm, gpa_t gpa, hpa_t *hpa)
>  /* Unpins a page previously pinned via pin_guest_page, marking it as dirty. */
>  static void unpin_guest_page(struct kvm *kvm, gpa_t gpa, hpa_t hpa)
>  {
> -	kvm_release_page_dirty(pfn_to_page(hpa >> PAGE_SHIFT));
> +	kvm_release_page_dirty(pfn_to_page(phys_to_pfn(hpa)));
>  	/* mark the page always as dirty for migration */
>  	mark_page_dirty(kvm, gpa_to_gfn(gpa));
>  }

Could you add to the commit description what you changed? I.e. use
phys_to_pfn() instead of the open coded shift? It's bad if you do a 'git
log' and get commit with useless descriptions like 'make code more
readable'.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 1/6] KVM: s390: Remove double 64bscao feature check
  2026-08-07  9:57 ` [PATCH 1/6] KVM: s390: Remove double 64bscao feature check Christoph Schlameuss
  2026-08-07  9:59   ` sashiko-bot
@ 2026-08-07 10:59   ` Claudio Imbrenda
  1 sibling, 0 replies; 24+ messages in thread
From: Claudio Imbrenda @ 2026-08-07 10:59 UTC (permalink / raw)
  To: Christoph Schlameuss
  Cc: kvm, Christian Borntraeger, Janosch Frank, David Hildenbrand,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev, Sven Schnelle,
	linux-s390, Hendrik Brueckner, Eric Farman

On Fri, 07 Aug 2026 11:57:42 +0200
Christoph Schlameuss <schlameuss@linux.ibm.com> wrote:

> sclp.has_64bscao is already verified in the guard clause a few lines
> above this. So we cannot reach this code if it is not true.
> 
> Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
> Reviewed-by: Eric Farman <farman@linux.ibm.com>
> Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
> Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com>

Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>

> ---
>  arch/s390/kvm/kvm-s390.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
> index 150b5dd2170e..c679d8f83c0e 100644
> --- a/arch/s390/kvm/kvm-s390.c
> +++ b/arch/s390/kvm/kvm-s390.c
> @@ -455,8 +455,7 @@ static void __init kvm_s390_cpu_feat_init(void)
>  	    !test_facility(3) || !nested)
>  		return;
>  	allow_cpu_feat(KVM_S390_VM_CPU_FEAT_SIEF2);
> -	if (sclp.has_64bscao)
> -		allow_cpu_feat(KVM_S390_VM_CPU_FEAT_64BSCAO);
> +	allow_cpu_feat(KVM_S390_VM_CPU_FEAT_64BSCAO);
>  	if (sclp.has_siif)
>  		allow_cpu_feat(KVM_S390_VM_CPU_FEAT_SIIF);
>  	if (sclp.has_gpere)
> 


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/6] KVM: s390: vsie: Remove duplicate assertion
  2026-08-07  9:57 ` [PATCH 2/6] KVM: s390: vsie: Remove duplicate assertion Christoph Schlameuss
  2026-08-07  9:59   ` sashiko-bot
  2026-08-07 10:32   ` Christian Borntraeger
@ 2026-08-07 11:03   ` Claudio Imbrenda
  2 siblings, 0 replies; 24+ messages in thread
From: Claudio Imbrenda @ 2026-08-07 11:03 UTC (permalink / raw)
  To: Christoph Schlameuss
  Cc: kvm, Christian Borntraeger, Janosch Frank, David Hildenbrand,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev, Sven Schnelle,
	linux-s390

On Fri, 07 Aug 2026 11:57:43 +0200
Christoph Schlameuss <schlameuss@linux.ibm.com> wrote:

Add this above:

"Remove useless BUILD_BUG_ON() checking the size of struct vsie_page."

and then this:

> This is covered by a static_assert at the struct vsie_page definition.
        ^^^
I would add "already" in there

> 
> Fixes: e38c884df921 ("KVM: s390: Switch to new gmap")
> Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com>
> ---
>  arch/s390/kvm/vsie.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c
> index eea24562e7db..3e956c7faa4b 100644
> --- a/arch/s390/kvm/vsie.c
> +++ b/arch/s390/kvm/vsie.c
> @@ -1565,7 +1565,6 @@ int kvm_s390_handle_vsie(struct kvm_vcpu *vcpu)
>  	if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE)
>  		return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP);
>  
> -	BUILD_BUG_ON(sizeof(struct vsie_page) != PAGE_SIZE);
>  	scb_addr = kvm_s390_get_base_disp_s(vcpu, NULL);
>  
>  	/* 512 byte alignment */
> 


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 3/6] KVM: s390: vsie: Convert shift to phys_to_pfn()
  2026-08-07  9:57 ` [PATCH 3/6] KVM: s390: vsie: Convert shift to phys_to_pfn() Christoph Schlameuss
                     ` (2 preceding siblings ...)
  2026-08-07 10:40   ` Sven Schnelle
@ 2026-08-07 11:04   ` Claudio Imbrenda
  3 siblings, 0 replies; 24+ messages in thread
From: Claudio Imbrenda @ 2026-08-07 11:04 UTC (permalink / raw)
  To: Christoph Schlameuss
  Cc: kvm, Christian Borntraeger, Janosch Frank, David Hildenbrand,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev, Sven Schnelle,
	linux-s390

On Fri, 07 Aug 2026 11:57:44 +0200
Christoph Schlameuss <schlameuss@linux.ibm.com> wrote:

> Make the code slightly more readable.

... "by using phys_to_pfn() instead of an open coded shift"

> 
> Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com>
> ---
>  arch/s390/kvm/vsie.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c
> index 3e956c7faa4b..937f9c99bc00 100644
> --- a/arch/s390/kvm/vsie.c
> +++ b/arch/s390/kvm/vsie.c
> @@ -701,7 +701,7 @@ static int pin_guest_page(struct kvm *kvm, gpa_t gpa, hpa_t *hpa)
>  /* Unpins a page previously pinned via pin_guest_page, marking it as dirty. */
>  static void unpin_guest_page(struct kvm *kvm, gpa_t gpa, hpa_t hpa)
>  {
> -	kvm_release_page_dirty(pfn_to_page(hpa >> PAGE_SHIFT));
> +	kvm_release_page_dirty(pfn_to_page(phys_to_pfn(hpa)));
>  	/* mark the page always as dirty for migration */
>  	mark_page_dirty(kvm, gpa_to_gfn(gpa));
>  }
> 


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 3/6] KVM: s390: vsie: Convert shift to phys_to_pfn()
  2026-08-07 10:40   ` Sven Schnelle
@ 2026-08-07 11:06     ` Sven Schnelle
  2026-08-07 11:28       ` Claudio Imbrenda
  0 siblings, 1 reply; 24+ messages in thread
From: Sven Schnelle @ 2026-08-07 11:06 UTC (permalink / raw)
  To: Christoph Schlameuss
  Cc: kvm, Christian Borntraeger, Janosch Frank, Claudio Imbrenda,
	David Hildenbrand, Heiko Carstens, Vasily Gorbik,
	Alexander Gordeev, linux-s390

Sven Schnelle <svens@linux.ibm.com> writes:

> Christoph Schlameuss <schlameuss@linux.ibm.com> writes:
>
>> Make the code slightly more readable.
>>
>> Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com>
>> ---
>>  arch/s390/kvm/vsie.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c
>> index 3e956c7faa4b..937f9c99bc00 100644
>> --- a/arch/s390/kvm/vsie.c
>> +++ b/arch/s390/kvm/vsie.c
>> @@ -701,7 +701,7 @@ static int pin_guest_page(struct kvm *kvm, gpa_t gpa, hpa_t *hpa)
>>  /* Unpins a page previously pinned via pin_guest_page, marking it as dirty. */
>>  static void unpin_guest_page(struct kvm *kvm, gpa_t gpa, hpa_t hpa)
>>  {
>> -	kvm_release_page_dirty(pfn_to_page(hpa >> PAGE_SHIFT));
>> +	kvm_release_page_dirty(pfn_to_page(phys_to_pfn(hpa)));
>>  	/* mark the page always as dirty for migration */
>>  	mark_page_dirty(kvm, gpa_to_gfn(gpa));
>>  }
>
> Could you add to the commit description what you changed? I.e. use
> phys_to_pfn() instead of the open coded shift? It's bad if you do a 'git
> log' and get commit with useless descriptions like 'make code more
> readable'.

Nevermind - was in a rush and missed that it's in the summary... :-/

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 5/6] KVM: s390: vsie: Assert crycb alignment in vsie_page
  2026-08-07  9:57 ` [PATCH 5/6] KVM: s390: vsie: Assert crycb alignment " Christoph Schlameuss
  2026-08-07 10:00   ` sashiko-bot
  2026-08-07 10:38   ` Christian Borntraeger
@ 2026-08-07 11:25   ` Claudio Imbrenda
  2 siblings, 0 replies; 24+ messages in thread
From: Claudio Imbrenda @ 2026-08-07 11:25 UTC (permalink / raw)
  To: Christoph Schlameuss
  Cc: kvm, Christian Borntraeger, Janosch Frank, David Hildenbrand,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev, Sven Schnelle,
	linux-s390

On Fri, 07 Aug 2026 11:57:46 +0200
Christoph Schlameuss <schlameuss@linux.ibm.com> wrote:

> The crypto control block address is required to have double word
> alignment.

I would add:

"Add a static_assert to enforce correct alignment."

> 
> Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com>
> ---
>  arch/s390/kvm/vsie.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c
> index 7c3b5e11b301..c9392460edca 100644
> --- a/arch/s390/kvm/vsie.c
> +++ b/arch/s390/kvm/vsie.c
> @@ -69,6 +69,7 @@ struct vsie_page {
>  
>  static_assert(sizeof(struct vsie_page) == PAGE_SIZE);
>  static_assert(offsetof(struct vsie_page, mcck_info) == offsetof(struct sie_page, mcck_info));
> +static_assert(IS_ALIGNED(offsetof(struct vsie_page, crycb), 8));
>  
>  /* trigger a validity icpt for the given scb */
>  static int set_validity_icpt(struct kvm_s390_sie_block *scb,
> 


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 3/6] KVM: s390: vsie: Convert shift to phys_to_pfn()
  2026-08-07 11:06     ` Sven Schnelle
@ 2026-08-07 11:28       ` Claudio Imbrenda
  0 siblings, 0 replies; 24+ messages in thread
From: Claudio Imbrenda @ 2026-08-07 11:28 UTC (permalink / raw)
  To: Sven Schnelle
  Cc: Christoph Schlameuss, kvm, Christian Borntraeger, Janosch Frank,
	David Hildenbrand, Heiko Carstens, Vasily Gorbik,
	Alexander Gordeev, linux-s390

On Fri, 07 Aug 2026 13:06:41 +0200
Sven Schnelle <svens@linux.ibm.com> wrote:

> Sven Schnelle <svens@linux.ibm.com> writes:
> 
> > Christoph Schlameuss <schlameuss@linux.ibm.com> writes:
> >  
> >> Make the code slightly more readable.
> >>
> >> Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com>
> >> ---
> >>  arch/s390/kvm/vsie.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c
> >> index 3e956c7faa4b..937f9c99bc00 100644
> >> --- a/arch/s390/kvm/vsie.c
> >> +++ b/arch/s390/kvm/vsie.c
> >> @@ -701,7 +701,7 @@ static int pin_guest_page(struct kvm *kvm, gpa_t gpa, hpa_t *hpa)
> >>  /* Unpins a page previously pinned via pin_guest_page, marking it as dirty. */
> >>  static void unpin_guest_page(struct kvm *kvm, gpa_t gpa, hpa_t hpa)
> >>  {
> >> -	kvm_release_page_dirty(pfn_to_page(hpa >> PAGE_SHIFT));
> >> +	kvm_release_page_dirty(pfn_to_page(phys_to_pfn(hpa)));
> >>  	/* mark the page always as dirty for migration */
> >>  	mark_page_dirty(kvm, gpa_to_gfn(gpa));
> >>  }  
> >
> > Could you add to the commit description what you changed? I.e. use
> > phys_to_pfn() instead of the open coded shift? It's bad if you do a 'git
> > log' and get commit with useless descriptions like 'make code more
> > readable'.  
> 
> Nevermind - was in a rush and missed that it's in the summary... :-/

I still think the description should be self-contained and not be split
between the subject line and the body, even if it means that the body
of the text repeats the subject line again.

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2026-08-07 11:29 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-07  9:57 [PATCH 0/6] KVM: s390: vsie: Small VSIE cleanup and improvements Christoph Schlameuss
2026-08-07  9:57 ` [PATCH 1/6] KVM: s390: Remove double 64bscao feature check Christoph Schlameuss
2026-08-07  9:59   ` sashiko-bot
2026-08-07 10:59   ` Claudio Imbrenda
2026-08-07  9:57 ` [PATCH 2/6] KVM: s390: vsie: Remove duplicate assertion Christoph Schlameuss
2026-08-07  9:59   ` sashiko-bot
2026-08-07 10:32   ` Christian Borntraeger
2026-08-07 11:03   ` Claudio Imbrenda
2026-08-07  9:57 ` [PATCH 3/6] KVM: s390: vsie: Convert shift to phys_to_pfn() Christoph Schlameuss
2026-08-07 10:02   ` sashiko-bot
2026-08-07 10:36   ` Christian Borntraeger
2026-08-07 10:40   ` Sven Schnelle
2026-08-07 11:06     ` Sven Schnelle
2026-08-07 11:28       ` Claudio Imbrenda
2026-08-07 11:04   ` Claudio Imbrenda
2026-08-07  9:57 ` [PATCH 4/6] KVM: s390: vsie: Assert mcck_info offset in vsie_page Christoph Schlameuss
2026-08-07 10:02   ` sashiko-bot
2026-08-07 10:37   ` Christian Borntraeger
2026-08-07  9:57 ` [PATCH 5/6] KVM: s390: vsie: Assert crycb alignment " Christoph Schlameuss
2026-08-07 10:00   ` sashiko-bot
2026-08-07 10:38   ` Christian Borntraeger
2026-08-07 11:25   ` Claudio Imbrenda
2026-08-07  9:57 ` [PATCH 6/6] KVM: s390: vsie: Create constant SCB_ALIGNMENT_SHIFT Christoph Schlameuss
2026-08-07 10:02   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox