public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Janosch Frank <frankja@linux.vnet.ibm.com>
To: David Hildenbrand <david@redhat.com>,
	linux-s390@vger.kernel.org, kvm@vger.kernel.org
Cc: Christian Borntraeger <borntraeger@de.ibm.com>,
	Cornelia Huck <cohuck@redhat.com>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>
Subject: Re: [PATCH v1] s390x/mm: cleanup gmap_pte_op_walk()
Date: Mon, 13 Nov 2017 16:19:00 +0100	[thread overview]
Message-ID: <ba803651-3177-ef92-9378-001f4bdf0489@linux.vnet.ibm.com> (raw)
In-Reply-To: <20171110151805.7541-1-david@redhat.com>


[-- Attachment #1.1: Type: text/plain, Size: 1244 bytes --]

This is KVM, not qemu, subject s/x//


On 10.11.2017 16:18, David Hildenbrand wrote:
> gmap_mprotect_notify() refuses shadow gmaps. Turns out that
> a) gmap_protect_range()
> b) gmap_read_table()
> c) gmap_pte_op_walk()
> 
> Are never called for gmap shadows. And never should be. This dates back
> to gmap shadow prototypes where we allowed to call mprotect_notify() on
> the gmap shadow (to get notified about the prefix pages getting removed).
> This is avoided by always getting notified about any change on the gmap
> shadow.
> 
> The only real function for walking page tables on shadow gmaps is
> gmap_table_walk().
> 
> So, essentially, these functions should never get called and
> gmap_pte_op_walk() can be cleaned up. Add some checks to callers of
> gmap_pte_op_walk().

This already made sense when discussing, but I traced the callers anyhow
to make sure we didn't accidentally forget one.

Reviewed-by: Janosch Frank <frankja@linux.vnet.ibm.com> with one nit below

> @@ -889,7 +879,6 @@ static void gmap_pte_op_end(spinlock_t *ptl)
>   *
>   * Called with sg->mm->mmap_sem in read.
>   *
> - * Note: Can also be called for shadow gmaps.

How about also getting rid of the line above this one?


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2017-11-13 15:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-10 15:18 [PATCH v1] s390x/mm: cleanup gmap_pte_op_walk() David Hildenbrand
2017-11-13 15:19 ` Janosch Frank [this message]
2017-11-14 16:28   ` David Hildenbrand
2017-11-15 11:34     ` Christian Borntraeger

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=ba803651-3177-ef92-9378-001f4bdf0489@linux.vnet.ibm.com \
    --to=frankja@linux.vnet.ibm.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=schwidefsky@de.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