From: George Dunlap <george.dunlap@citrix.com>
To: Tamas K Lengyel <tamas@tklengyel.com>
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
Xen-devel <xen-devel@lists.xenproject.org>,
Jan Beulich <jbeulich@suse.com>,
Andrew Cooper <andrew.cooper3@citrix.com>
Subject: Re: [PATCH v4] altp2m: Allow the hostp2m entries to be of type p2m_ram_shared
Date: Mon, 13 Jun 2016 10:28:35 +0100 [thread overview]
Message-ID: <575E7CC3.7040805@citrix.com> (raw)
In-Reply-To: <CABfawhnvZ0ccgaXkwXijidXMh=37cBGL3A1OMxUH4qFkiGdj3w@mail.gmail.com>
On 11/06/16 18:55, Tamas K Lengyel wrote:
> On Thu, May 26, 2016 at 10:17 AM, Tamas K Lengyel <tamas@tklengyel.com> wrote:
>>
>> On May 26, 2016 04:40, "George Dunlap" <george.dunlap@citrix.com> wrote:
>>>
>>> On 26/05/16 04:55, Tamas K Lengyel wrote:
>>>> Move sharing locks above altp2m to avoid locking order violation. Allow
>>>> applying altp2m mem_access settings when the hostp2m entries are shared.
>>>> Also, do not trigger PoD for hostp2m when setting altp2m mem_access to
>>>> be
>>>> in-line with non-altp2m mem_access path. Also allow gfn remapping with
>>>> p2m_ram_shared type gfns in altp2m views.
>>>>
>>>> When using mem_sharing in combination with altp2m, unsharing events
>>>> overwrite
>>>> altp2m entries with that of the hostp2m (both remapped entries and
>>>> mem_access
>>>> settings). User should take precaution to not share pages where this
>>>> behavior
>>>> is undesired.
>>>
>>> I'm afraid this is not acceptable. How could this ever be even remotely
>>> usable? If this is a necessary side effect of sharing, then I think the
>>> original functionality, of un-sharing when setting an altp2m entry is
>>> the only option (and not allowing sharing to happen when an altp2m is
>>> present for a particular gfn).
>>>
>>> Hmm, but actually this also brings up another tricky point: In an altp2m
>>> you can change the mfn which backs a gfn. This would need to be handled
>>> properly in the reverse map, which it doesn't look like it is at the
>>> moment.
>>>
>>> On the whole, I think if you're going to allow a single gfn to be
>>> simultaneously shared and allow an altp2m for it, you're going to need
>>> to do a lot more work.
>>>
>>> (Sorry for not catching a lot of this before...)
>>>
>>
>> Well this patch resolves the locking order violation and allows the
>> xen-access tool's altp2m tests to pass, so it does improve on the current
>> situation which is a hypervisor crash. To help with the override issue the
>> user can apply W mem_access permission on the shared hostp2m entries. That
>> way they get notification through vm_event of the event that leads to
>> unsharing and can then reapply the altp2m changes. So IMHO this patch is
>> already quite workable and while it requires more setup from the userside,
>> the VMM side is OK with this change.
>
> Ping. Can I get an update on what the verdict is on this patch?
To get a proper verdict requires actually taking a deeper look and
thinking carefully about things :-) Sorry for the delay -- hopefully I
can get to this this week.
Peace,
-George
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-06-13 9:29 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-26 3:55 [PATCH v4] altp2m: Allow the hostp2m entries to be of type p2m_ram_shared Tamas K Lengyel
2016-05-26 10:39 ` George Dunlap
2016-05-26 16:17 ` Tamas K Lengyel
2016-06-11 17:55 ` Tamas K Lengyel
2016-06-13 9:28 ` George Dunlap [this message]
2016-06-13 17:20 ` Tamas K Lengyel
2016-07-12 17:29 ` Tamas K Lengyel
2016-07-15 8:57 ` George Dunlap
2016-07-15 14:59 ` Tamas K Lengyel
2016-07-18 11:04 ` George Dunlap
2016-07-18 15:18 ` Tamas K Lengyel
2016-07-18 15:27 ` Andrew Cooper
2016-07-18 16:15 ` George Dunlap
2016-07-18 16:22 ` Tamas K Lengyel
2016-07-18 16:10 ` George Dunlap
2016-07-18 17:06 ` Tamas K Lengyel
2016-07-19 11:39 ` George Dunlap
2016-07-19 15:20 ` Tamas K Lengyel
2016-07-19 13:36 ` Ian Jackson
2016-07-19 15:31 ` Tamas K Lengyel
2016-07-19 17:11 ` George Dunlap
2016-07-19 19:12 ` 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=575E7CC3.7040805@citrix.com \
--to=george.dunlap@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=tamas@tklengyel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).