From: David Hildenbrand <david@redhat.com>
To: kvm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
Thomas Huth <thuth@redhat.com>,
Christian Borntraeger <borntraeger@de.ibm.com>
Subject: Re: [PATCH RFC 1/2] s390x: mm: allow mixed page table types (2k and 4k)
Date: Thu, 1 Jun 2017 14:59:49 +0200 [thread overview]
Message-ID: <2bc699c3-f3ba-e8b1-1149-92b31a0bcb22@redhat.com> (raw)
In-Reply-To: <20170529163202.13077-2-david@redhat.com>
> diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c
> index d4d409b..b22c2b6 100644
> --- a/arch/s390/mm/pgtable.c
> +++ b/arch/s390/mm/pgtable.c
> @@ -196,7 +196,7 @@ static inline pgste_t ptep_xchg_start(struct mm_struct *mm,
> {
> pgste_t pgste = __pgste(0);
>
> - if (mm_has_pgste(mm)) {
> + if (pgtable_has_pgste(mm, __pa(ptep))) {
> pgste = pgste_get_lock(ptep);
> pgste = pgste_pte_notify(mm, addr, ptep, pgste);
> }
> @@ -207,7 +207,7 @@ static inline pte_t ptep_xchg_commit(struct mm_struct *mm,
> unsigned long addr, pte_t *ptep,
> pgste_t pgste, pte_t old, pte_t new)
> {
> - if (mm_has_pgste(mm)) {
> + if (pgtable_has_pgste(mm, __pa(ptep))) {
> if (pte_val(old) & _PAGE_INVALID)
> pgste_set_key(ptep, pgste, new, mm);
> if (pte_val(new) & _PAGE_INVALID)
I think these two checks are wrong. We really have to test here the
mapcount bit only (relying on mm_has_pgste(mm) is wrong in case global
vm.allocate_pgste ist set).
But before I continue working on this, I think it makes sense to clarify
if something like that would be acceptable at all.
--
Thanks,
David
next prev parent reply other threads:[~2017-06-01 12:59 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-29 16:32 [PATCH RFC 0/2] KVM: s390: avoid having to enable vm.alloc_pgste David Hildenbrand
2017-05-29 16:32 ` [PATCH RFC 1/2] s390x: mm: allow mixed page table types (2k and 4k) David Hildenbrand
2017-06-01 11:39 ` Christian Borntraeger
2017-06-01 12:44 ` David Hildenbrand
2017-06-01 12:59 ` David Hildenbrand [this message]
2017-06-02 7:11 ` Christian Borntraeger
2017-05-29 16:32 ` [PATCH RFC 2/2] KVM: s390: Introduce KVM_VM_S390_LATE_MMAP David Hildenbrand
2017-06-01 10:46 ` [PATCH RFC 0/2] KVM: s390: avoid having to enable vm.alloc_pgste Martin Schwidefsky
2017-06-01 11:24 ` Christian Borntraeger
2017-06-01 11:27 ` David Hildenbrand
2017-06-02 7:06 ` Heiko Carstens
2017-06-02 7:02 ` Heiko Carstens
2017-06-02 7:13 ` Christian Borntraeger
2017-06-02 7:16 ` Martin Schwidefsky
2017-06-02 7:18 ` Christian Borntraeger
2017-06-02 7:25 ` Christian Borntraeger
2017-06-02 8:11 ` Martin Schwidefsky
2017-06-02 9:46 ` Martin Schwidefsky
2017-06-02 10:19 ` Christian Borntraeger
2017-06-02 10:53 ` Martin Schwidefsky
2017-06-02 13:20 ` Christian Borntraeger
2017-06-07 12:34 ` Martin Schwidefsky
2017-06-07 20:47 ` Heiko Carstens
2017-06-08 5:35 ` Martin Schwidefsky
2017-06-08 6:25 ` Heiko Carstens
2017-06-08 11:24 ` Martin Schwidefsky
2017-06-08 13:17 ` Heiko Carstens
2017-06-02 10:28 ` Heiko Carstens
2017-06-02 10:48 ` Martin Schwidefsky
2017-06-02 10:54 ` David Hildenbrand
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=2bc699c3-f3ba-e8b1-1149-92b31a0bcb22@redhat.com \
--to=david@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=schwidefsky@de.ibm.com \
--cc=thuth@redhat.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
all inboxes | Powered by JetHome®