public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Claudio Imbrenda <imbrenda@linux.ibm.com>
To: kvm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org,
	frankja@linux.ibm.com, borntraeger@de.ibm.com, david@redhat.com,
	nrb@linux.ibm.com, seiden@linux.ibm.com, nsg@linux.ibm.com,
	schlameuss@linux.ibm.com, hca@linux.ibm.com
Subject: [PATCH v4 0/1] KVM: s390: fix a newly introduced bug
Date: Tue,  4 Mar 2025 19:23:03 +0100	[thread overview]
Message-ID: <20250304182304.178746-1-imbrenda@linux.ibm.com> (raw)

Fix race when making a page secure (hold pte lock again)

This should fix the issues I have seen, which I think/hope are also the same
issues that David found.

v3->v4:
* move and rename s390_wiggle_split_folio() to fix a compile issue when
  KVM is not selected
* removed obsolete reference to __() from comments

v2->v3:
* added check for pte_write() in make_hva_secure() [thanks David]

v1->v2:
* major refactoring
* walk the page tables only once
* when importing, manually fault in pages if needed

Claudio Imbrenda (1):
  KVM: s390: pv: fix race when making a page secure

 arch/s390/include/asm/gmap.h |   1 -
 arch/s390/include/asm/uv.h   |   3 +-
 arch/s390/kernel/uv.c        | 135 +++++++++++++++++++++++++++++++++--
 arch/s390/kvm/gmap.c         | 101 ++------------------------
 arch/s390/kvm/kvm-s390.c     |  25 ++++---
 arch/s390/mm/gmap.c          |  28 --------
 6 files changed, 153 insertions(+), 140 deletions(-)

-- 
2.48.1


             reply	other threads:[~2025-03-04 18:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-04 18:23 Claudio Imbrenda [this message]
2025-03-04 18:23 ` [PATCH v4 1/1] KVM: s390: pv: fix race when making a page secure Claudio Imbrenda
2025-03-06 10:23   ` David Hildenbrand
2025-03-06 22:07     ` David Hildenbrand
2025-03-06 22:17       ` David Hildenbrand
2025-03-07 13:18       ` Claudio Imbrenda

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=20250304182304.178746-1-imbrenda@linux.ibm.com \
    --to=imbrenda@linux.ibm.com \
    --cc=borntraeger@de.ibm.com \
    --cc=david@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=nrb@linux.ibm.com \
    --cc=nsg@linux.ibm.com \
    --cc=schlameuss@linux.ibm.com \
    --cc=seiden@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