2023-11-15 12:51:33

by Claudio Imbrenda

[permalink] [raw]
Subject: [GIT PULL v1 0/2] KVM: s390: two small but important fixes

Hi Paolo,

two small but important fixes, please pull :)


Claudio



The following changes since commit b85ea95d086471afb4ad062012a4d73cd328fa86:

Linux 6.7-rc1 (2023-11-12 16:19:07 -0800)

are available in the Git repository at:

https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git tags/kvm-s390-master-6.7-1

for you to fetch changes up to 27072b8e18a73ffeffb1c140939023915a35134b:

KVM: s390/mm: Properly reset no-dat (2023-11-14 18:56:46 +0100)

----------------------------------------------------------------
Two small but important bugfixes.

----------------------------------------------------------------
Claudio Imbrenda (2):
KVM: s390: vsie: fix wrong VIR 37 when MSO is used
KVM: s390/mm: Properly reset no-dat

arch/s390/kvm/vsie.c | 4 ----
arch/s390/mm/pgtable.c | 2 +-
2 files changed, 1 insertion(+), 5 deletions(-)

--
2.41.0


2023-11-15 12:51:53

by Claudio Imbrenda

[permalink] [raw]
Subject: [GIT PULL v1 2/2] KVM: s390/mm: Properly reset no-dat

When the CMMA state needs to be reset, the no-dat bit also needs to be
reset. Failure to do so could cause issues in the guest, since the
guest expects the bit to be cleared after a reset.

Cc: <[email protected]>
Reviewed-by: Nico Boehr <[email protected]>
Message-ID: <[email protected]>
Signed-off-by: Claudio Imbrenda <[email protected]>
---
arch/s390/mm/pgtable.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c
index 3bd2ab2a9a34..5cb92941540b 100644
--- a/arch/s390/mm/pgtable.c
+++ b/arch/s390/mm/pgtable.c
@@ -756,7 +756,7 @@ void ptep_zap_unused(struct mm_struct *mm, unsigned long addr,
pte_clear(mm, addr, ptep);
}
if (reset)
- pgste_val(pgste) &= ~_PGSTE_GPS_USAGE_MASK;
+ pgste_val(pgste) &= ~(_PGSTE_GPS_USAGE_MASK | _PGSTE_GPS_NODAT);
pgste_set_unlock(ptep, pgste);
preempt_enable();
}
--
2.41.0

2023-12-08 18:14:44

by Paolo Bonzini

[permalink] [raw]
Subject: Re: [GIT PULL v1 0/2] KVM: s390: two small but important fixes

On Wed, Nov 15, 2023 at 1:51 PM Claudio Imbrenda <[email protected]> wrote:
>
> Hi Paolo,
>
> two small but important fixes, please pull :)

Done, thanks.

Paolo

>
> Claudio
>
>
>
> The following changes since commit b85ea95d086471afb4ad062012a4d73cd328fa86:
>
> Linux 6.7-rc1 (2023-11-12 16:19:07 -0800)
>
> are available in the Git repository at:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git tags/kvm-s390-master-6.7-1
>
> for you to fetch changes up to 27072b8e18a73ffeffb1c140939023915a35134b:
>
> KVM: s390/mm: Properly reset no-dat (2023-11-14 18:56:46 +0100)
>
> ----------------------------------------------------------------
> Two small but important bugfixes.
>
> ----------------------------------------------------------------
> Claudio Imbrenda (2):
> KVM: s390: vsie: fix wrong VIR 37 when MSO is used
> KVM: s390/mm: Properly reset no-dat
>
> arch/s390/kvm/vsie.c | 4 ----
> arch/s390/mm/pgtable.c | 2 +-
> 2 files changed, 1 insertion(+), 5 deletions(-)
>
> --
> 2.41.0
>

2023-12-08 21:03:13

by Paolo Bonzini

[permalink] [raw]
Subject: Re: [GIT PULL v1 0/2] KVM: s390: two small but important fixes

On Fri, Dec 8, 2023 at 7:13 PM Paolo Bonzini <[email protected]> wrote:
> > KVM: s390/mm: Properly reset no-dat

A small question on this one, would it make sense to clear _all_
gmap-related bits, including _PGSTE_GPS_ZERO?

Paolo

2023-12-11 10:04:58

by Claudio Imbrenda

[permalink] [raw]
Subject: Re: [GIT PULL v1 0/2] KVM: s390: two small but important fixes

On Fri, 8 Dec 2023 22:02:43 +0100
Paolo Bonzini <[email protected]> wrote:

> On Fri, Dec 8, 2023 at 7:13 PM Paolo Bonzini <[email protected]> wrote:
> > > KVM: s390/mm: Properly reset no-dat
>
> A small question on this one, would it make sense to clear _all_
> gmap-related bits, including _PGSTE_GPS_ZERO?

That's a good question, I'll have to think about it.

In general, though, not resetting it will not cause issues in the guest.