All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Dunlap <george.dunlap@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Wei Liu <wei.liu2@citrix.com>,
	Roger Pau Monne <roger.pau@citrix.com>
Subject: Re: [PATCH 2/4] x86: relax a few get_gfn() invocations
Date: Fri, 5 Apr 2019 11:30:05 +0100	[thread overview]
Message-ID: <33c97290-3527-f07a-59ed-8f7cc174a50a@citrix.com> (raw)
In-Reply-To: <5C88F9C7020000780021E17A@prv1-mh.provo.novell.com>

On 3/13/19 12:38 PM, Jan Beulich wrote:
> In a few cases only a query is intended, i.e. without populating a
> possible PoD or paged out entry, when the intention is to replace the
> current entry anyway. Use get_gfn_query() there instead.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

The first one should be fine, but pretty sure the second two will
mis-fire for PoD: p2m->pod.entry_count won't get updated.  As it is,
it's sort-of misfiring already, since the "freed" memory won't be
reclaimed for the PoD cache.

Which probably means it's time for some serious refactoring to prevent
this sort of error from creeping in.  p2m->pod.entry_count accounting
should probably be moved into p2m_entry_modify(), and
p2m_pod_decrease_reservation() should probably be moved somewhere else
-- perhaps guest_remove_page() or something?  At any rate, a we probably
need to review of the layers and what everyone needs from them, and do
things at the right level.

 -George


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

WARNING: multiple messages have this Message-ID (diff)
From: George Dunlap <george.dunlap@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Wei Liu <wei.liu2@citrix.com>,
	Roger Pau Monne <roger.pau@citrix.com>
Subject: Re: [Xen-devel] [PATCH 2/4] x86: relax a few get_gfn() invocations
Date: Fri, 5 Apr 2019 11:30:05 +0100	[thread overview]
Message-ID: <33c97290-3527-f07a-59ed-8f7cc174a50a@citrix.com> (raw)
Message-ID: <20190405103005.BlrFDONbp3Ux8purfUNTo-hGKVsBsmaCjaDLYX9-gJo@z> (raw)
In-Reply-To: <5C88F9C7020000780021E17A@prv1-mh.provo.novell.com>

On 3/13/19 12:38 PM, Jan Beulich wrote:
> In a few cases only a query is intended, i.e. without populating a
> possible PoD or paged out entry, when the intention is to replace the
> current entry anyway. Use get_gfn_query() there instead.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

The first one should be fine, but pretty sure the second two will
mis-fire for PoD: p2m->pod.entry_count won't get updated.  As it is,
it's sort-of misfiring already, since the "freed" memory won't be
reclaimed for the PoD cache.

Which probably means it's time for some serious refactoring to prevent
this sort of error from creeping in.  p2m->pod.entry_count accounting
should probably be moved into p2m_entry_modify(), and
p2m_pod_decrease_reservation() should probably be moved somewhere else
-- perhaps guest_remove_page() or something?  At any rate, a we probably
need to review of the layers and what everyone needs from them, and do
things at the right level.

 -George


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  parent reply	other threads:[~2019-04-05 10:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-13 12:18 [PATCH 0/4] x86: some further follow-up to recent XSAs Jan Beulich
2019-03-13 12:38 ` [PATCH 1/4] x86: suppress XPTI-related TLB flushes when possible Jan Beulich
2019-04-03 18:52   ` Andrew Cooper
2019-04-04 10:07     ` Jan Beulich
2019-03-13 12:38 ` [PATCH 2/4] x86: relax a few get_gfn() invocations Jan Beulich
2019-04-03 18:16   ` Andrew Cooper
2019-04-05 10:30   ` George Dunlap [this message]
2019-04-05 10:30     ` [Xen-devel] " George Dunlap
2019-04-05 10:52     ` Jan Beulich
2019-04-05 10:52       ` [Xen-devel] " Jan Beulich
2019-03-13 12:38 ` [PATCH 3/4] x86/mm: drop redundant local variable from _get_page_type() Jan Beulich
2019-04-03 18:17   ` Andrew Cooper
2019-04-05 10:37   ` George Dunlap
2019-04-05 10:37     ` [Xen-devel] " George Dunlap
2019-03-13 12:39 ` [PATCH 4/4] x86/PV: remove unnecessary toggle_guest_pt() overhead Jan Beulich
2019-04-03 18:32   ` Andrew Cooper
2019-04-04  9:42     ` Jan Beulich
     [not found]   ` <5C88F9F30200000000104057@prv1-mh.provo.novell.com>
     [not found]     ` <5C88F9F3020000780023294C@prv1-mh.provo.novell.com>
2019-05-27  9:25       ` Ping: " Jan Beulich
2019-05-27  9:25         ` [Xen-devel] " Jan Beulich

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=33c97290-3527-f07a-59ed-8f7cc174a50a@citrix.com \
    --to=george.dunlap@citrix.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.