public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/4] KVM: s390: Fix minor bugs in STFLE shadowing
@ 2023-11-08 17:12 Nina Schoetterl-Glausch
  2023-11-08 17:12 ` [PATCH v3 1/4] KVM: s390: vsie: Fix STFLE interpretive execution identification Nina Schoetterl-Glausch
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Nina Schoetterl-Glausch @ 2023-11-08 17:12 UTC (permalink / raw)
  To: Heiko Carstens, Christian Borntraeger, Claudio Imbrenda,
	Janosch Frank, Alexander Gordeev, Nina Schoetterl-Glausch,
	David Hildenbrand, Vasily Gorbik
  Cc: Sven Schnelle, linux-s390, kvm, linux-kernel

v2 -> v3 (range-diff below):
 * pick up tags (thanks Claudio)
 * reverse Christmas tree

v1 -> v2:
 * pick up tags (thanks {Claudio, David})
 * drop Fixes tag on cleanup patch, change message (thanks David)
 * drop Fixes tag on second patch since the length of the facility list
   copied wasn't initially specified and only clarified in later
   revisions
 * use READ/WRITE_ONCE (thanks {David, Heiko})

Improve the STFLE vsie implementation.
Firstly, fix a bug concerning the identification if the guest is
intending to use interpretive execution for STFLE for its guest.
Secondly, decrease the amount of guest memory accessed to the
minimum.
Also do some (optional) cleanups.

Nina Schoetterl-Glausch (4):
  KVM: s390: vsie: Fix STFLE interpretive execution identification
  KVM: s390: vsie: Fix length of facility list shadowed
  KVM: s390: cpu model: Use proper define for facility mask size
  KVM: s390: Minor refactor of base/ext facility lists

 arch/s390/include/asm/facility.h |  6 +++++
 arch/s390/include/asm/kvm_host.h |  2 +-
 arch/s390/kernel/Makefile        |  2 +-
 arch/s390/kernel/facility.c      | 21 +++++++++++++++
 arch/s390/kvm/kvm-s390.c         | 44 ++++++++++++++------------------
 arch/s390/kvm/vsie.c             | 15 +++++++++--
 6 files changed, 61 insertions(+), 29 deletions(-)
 create mode 100644 arch/s390/kernel/facility.c

Range-diff against v2:
1:  de77a2c36786 = 1:  de77a2c36786 KVM: s390: vsie: Fix STFLE interpretive execution identification
2:  f3b189627e96 ! 2:  e4b44c4d2400 KVM: s390: vsie: Fix length of facility list shadowed
    @@ Commit message
         case we'd wrongly inject a validity intercept.
     
         Acked-by: David Hildenbrand <david@redhat.com>
    +    Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
         Signed-off-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
     
      ## arch/s390/include/asm/facility.h ##
    @@ arch/s390/kernel/facility.c (new)
     +unsigned int stfle_size(void)
     +{
     +	static unsigned int size;
    -+	u64 dummy;
     +	unsigned int r;
    ++	u64 dummy;
     +
     +	r = READ_ONCE(size);
     +	if (!r) {
3:  4907bb8fb2bc ! 3:  8b02ac33defb KVM: s390: cpu model: Use proper define for facility mask size
    @@ Commit message
         S390_ARCH_FAC_LIST_SIZE_U64 for defining the fac_mask array.
         Note that both values are the same, there is no functional change.
     
    +    Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
         Signed-off-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
     
      ## arch/s390/include/asm/kvm_host.h ##
4:  2745898a22c3 ! 4:  a592be823576 KVM: s390: Minor refactor of base/ext facility lists
    @@ Commit message
         Make the constraint of that number on kvm_s390_fac_base obvious.
         Get rid of implicit double anding of stfle_fac_list.
     
    +    Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
         Signed-off-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
     
     

base-commit: 05d3ef8bba77c1b5f98d941d8b2d4aeab8118ef1
-- 
2.39.2


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

end of thread, other threads:[~2023-12-04 15:55 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-08 17:12 [PATCH v3 0/4] KVM: s390: Fix minor bugs in STFLE shadowing Nina Schoetterl-Glausch
2023-11-08 17:12 ` [PATCH v3 1/4] KVM: s390: vsie: Fix STFLE interpretive execution identification Nina Schoetterl-Glausch
2023-12-04 15:24   ` Janosch Frank
2023-11-08 17:12 ` [PATCH v3 2/4] KVM: s390: vsie: Fix length of facility list shadowed Nina Schoetterl-Glausch
2023-11-09 11:21   ` Heiko Carstens
2023-12-04 15:51   ` Janosch Frank
2023-11-08 17:12 ` [PATCH v3 3/4] KVM: s390: cpu model: Use proper define for facility mask size Nina Schoetterl-Glausch
2023-11-08 17:46   ` David Hildenbrand
2023-11-09 12:28   ` Janosch Frank
2023-12-04 15:52   ` Janosch Frank
2023-11-08 17:12 ` [PATCH v3 4/4] KVM: s390: Minor refactor of base/ext facility lists Nina Schoetterl-Glausch

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