All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Tim Deegan <tim@xen.org>, Andrew Cooper <andrew.cooper3@citrix.com>
Cc: xen-devel@lists.xenproject.org, Jan Beulich <jbeulich@suse.com>
Subject: Re: [PATCH RFC v2 3/3] xen: rework paging_log_dirty_op to work with hvm guests
Date: Tue, 7 Apr 2015 12:09:16 +0200	[thread overview]
Message-ID: <5523ACCC.4090001@citrix.com> (raw)
In-Reply-To: <20150403141235.GA20330@deinos.phlegethon.org>

Hello,

El 03/04/15 a les 16.12, Tim Deegan ha escrit:
> Hi,
> 
> At 20:46 +0100 on 02 Apr (1428007593), Andrew Cooper wrote:
>> On 02/04/15 11:26, Roger Pau Monne wrote:
>>> When the caller of paging_log_dirty_op is a hvm guest Xen would choke when
>>> trying to copy the dirty bitmap to the guest because the paging lock is
>>> already held.
>>
>> Are you sure? Presumably you get an mm lock ordering violation, because
>> paging_log_dirty_op() should take the target domains paging lock, rather
>> than your own (which is prohibited by the current check at the top of
>> paging_domctl()).
>>
>> Unfortunately, dropping the paging_lock() here is unsafe, as it will
>> result in corruption of the logdirty bitmap from non-domain sources such
>> as HVMOP_modified_memory.
>>
>> I will need to find some time with a large pot of coffee and a
>> whiteboard, but I suspect it might actually be safe to alter the current
>> mm_lock() enforcement to maintain independent levels for a source and
>> destination domain.
> 
> We discussed this in an earlier thread and agreed it would be better
> to try to do this work in batches rather than add more complexity to
> the mm locking rules.  (I'm AFK this week so I haven't had a chance to
> review the actual pacth yet.)

I don't know about the locking rules or how much complexity would
permitting this kind of accesses add to it, but IMHO this patch makes
the code quite more complex and possibly error prone, so finding a
simpler approach seems like a good option to me.

Roger.

  reply	other threads:[~2015-04-07 10:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-02 10:26 [PATCH RFC v2 0/3] xen/pvh: enable migration on PVH Dom0 Roger Pau Monne
2015-04-02 10:26 ` [PATCH RFC v2 1/3] xen/pvh: enable mmu_update hypercall Roger Pau Monne
2015-04-02 10:42   ` Ian Campbell
2015-04-02 11:37     ` Roger Pau Monné
2015-04-02 11:50     ` Andrew Cooper
2015-04-02 12:43       ` Jürgen Groß
2015-04-02 12:56         ` Andrew Cooper
2015-04-02 10:26 ` [PATCH RFC v2 2/3] xen/shadow: fix shadow_track_dirty_vram to work on hvm guests Roger Pau Monne
2015-04-02 19:06   ` Andrew Cooper
2015-04-09 12:41     ` Tim Deegan
2015-04-09 12:45       ` Andrew Cooper
2015-04-02 10:26 ` [PATCH RFC v2 3/3] xen: rework paging_log_dirty_op to work with " Roger Pau Monne
2015-04-02 19:46   ` Andrew Cooper
2015-04-03 14:12     ` Tim Deegan
2015-04-07 10:09       ` Roger Pau Monné [this message]
2015-04-09 13:05         ` Tim Deegan
2015-04-09 13:01   ` Tim Deegan

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=5523ACCC.4090001@citrix.com \
    --to=roger.pau@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=tim@xen.org \
    --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.