All of lore.kernel.org
 help / color / mirror / Atom feed
From: Razvan Cojocaru <rcojocaru@bitdefender.com>
To: Jan Beulich <JBeulich@suse.com>,
	George Dunlap <George.Dunlap@eu.citrix.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Roger Pau Monne <roger.pau@citrix.com>,
	Wei Liu <wei.liu2@citrix.com>,
	george.dunlap@citrix.com,
	xen-devel <xen-devel@lists.xenproject.org>
Subject: [PATCH V10 4/5] p2m: Always use hostp2m when clipping rangesets
Date: Thu, 29 Nov 2018 15:23:05 +0200	[thread overview]
Message-ID: <5543e709-6dd0-4c88-ad87-5837490ea441@bitdefender.com> (raw)
In-Reply-To: <5BFFB9C0020000780020119C@prv1-mh.provo.novell.com>

On 11/29/18 12:04 PM, Jan Beulich wrote:
>>>> On 28.11.18 at 22:56, <rcojocaru@bitdefender.com> wrote:
>> Changes since V9:
>>  - Removed the patch RFC (replaced by a printk(XENLOG_G_WARNING).
>>  - Reused start and end in change_type_range() and removed the
>>    intermediary variables range_start and range_end.
>>  - Added an extra explanation for the if ( start > end ) return;
>>    code in the comment.
> 
> This last item isn't really taking care of the comments I gave on v9.
> The _incoming_ start being larger than the _incoming_ end is
> something worth to point out. But you put that check after clipping
> end. Furthermore it looks like you continue to break the case
> where ->max_mapped_pfn increases subsequently, i.e. you still
> don't update the rangeset with the unmodified incoming values.
> Or otherwise I would have expected an explanation (as a reply
> to my comments, not necessarily by adding to description or
> comments of the patch here) why either this is not an issue or I'm
> misreading anything.

max_mapped_pfn _should_ end up being >= the logdirty range upper bound,
since AFAICT the logdirty ranges are tied to ept_set_entry() calls,
which always end up calling p2m_altp2m_propagate_change() when they
occur on the hostp2m (which in turn calls p2m_set_entry() on the
altp2ms, and so on).

Long story short, all modifications to the hostp2m's max_mapped_pfn will
end up updating it for all active altp2ms. The other way around is not
true if I understand the code correctly, so it is theoretically possible
for altp2m->max_mapped_pfn > hostp2m->max_mapped_pfn (although, again
AFAICT, this should not really affect the logdirty case where we're now
doing our best to keep the hostp2m in sync with altp2ms).

So this is why I believe that this is not an issue, however I might be
missing something or am (quite likely) possibly misunderstanding the
question.

Also, apologies if I'm speaking out of turn and the question was really
addressed to George (who is the proper author of the patch).


Thanks,
Razvan

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

  reply	other threads:[~2018-11-29 13:23 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-28 21:56 [PATCH V10 0/5] Fix VGA logdirty related display freezes with altp2m Razvan Cojocaru
2018-11-28 21:56 ` [PATCH V10 1/5] x86/p2m: allocate logdirty_ranges for altp2ms Razvan Cojocaru
2018-11-28 21:56 ` [PATCH V10 2/5] x86/p2m: refactor p2m_reset_altp2m() Razvan Cojocaru
2018-11-28 21:56 ` [PATCH V10 3/5] x86/altp2m: fix display frozen when switching to a new view early Razvan Cojocaru
2018-11-28 21:56 ` [PATCH V10 4/5] p2m: Always use hostp2m when clipping rangesets Razvan Cojocaru
2018-11-29 10:04   ` Jan Beulich
2018-11-29 13:23     ` Razvan Cojocaru [this message]
2018-11-29 13:58       ` Jan Beulich
2018-11-30 21:59         ` Razvan Cojocaru
2018-12-03  8:49           ` Jan Beulich
2018-12-04 12:18             ` Razvan Cojocaru
2018-12-04 12:54               ` Jan Beulich
2018-12-04 14:05                 ` Razvan Cojocaru
2018-11-28 21:56 ` [PATCH V10 5/5] p2m: change_type_range: Only invalidate mapped gfns Razvan Cojocaru
2018-11-28 22:01   ` Razvan Cojocaru
2018-11-29 10:07   ` Jan Beulich
2018-11-29 11:47     ` Razvan Cojocaru
2018-12-04  3:27 ` [PATCH V10 0/5] Fix VGA logdirty related display freezes with altp2m Tamas K Lengyel

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=5543e709-6dd0-4c88-ad87-5837490ea441@bitdefender.com \
    --to=rcojocaru@bitdefender.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@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.