From: David Vrabel <david.vrabel@citrix.com>
To: Tim Deegan <tim@xen.org>, George Dunlap <george.dunlap@citrix.com>
Cc: "Tian, Kevin" <kevin.tian@intel.com>,
"Nakajima, Jun" <jun.nakajima@intel.com>,
George Dunlap <george.dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
David Vrabel <david.vrabel@citrix.com>,
Jan Beulich <jbeulich@suse.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [PATCHv2 2/3] mm: don't free pages until mm locks are released
Date: Wed, 2 Dec 2015 17:14:10 +0000 [thread overview]
Message-ID: <565F26E2.70008@citrix.com> (raw)
In-Reply-To: <20151202164649.GB94392@deinos.phlegethon.org>
On 02/12/15 16:46, Tim Deegan wrote:
> At 16:30 +0000 on 02 Dec (1449073841), George Dunlap wrote:
>> On 02/12/15 16:23, Tim Deegan wrote:
>>> At 07:25 +0000 on 02 Dec (1449041100), Tian, Kevin wrote:
>>>>> From: David Vrabel [mailto:david.vrabel@citrix.com]
>>>>> Sent: Saturday, November 14, 2015 2:50 AM
>>>>>
>>>>> If a page is freed without translations being invalidated, and the page is
>>>>> subsequently allocated to another domain, a guest with a cached
>>>>> translation will still be able to access the page.
>>>>>
>>>>> Currently translations are invalidated before releasing the page ref, but
>>>>> while still holding the mm locks. To allow translations to be invalidated
>>>>> without holding the mm locks, we need to keep a reference to the page
>>>>> for a bit longer in some cases.
>>>>>
>>>>> [ This seems difficult to a) verify as correct; and b) difficult to get
>>>>> correct in the future. A better suggestion would be useful. Perhaps
>>>>> using something like pg->tlbflush_needed mechanism that already exists
>>>>> for pages from PV guests? ]
>>>>
>>>> Per-page flag looks clean in general, but not an expert here. Tim might
>>>> have a better idea.
>>>
>>> I think you can probably use the tlbflush_timestamp stuff as-is for
>>> EPT flushes -- the existing TLB shootdowns already drop all EPT
>>> translations.
>>
>> Are you saying that if you do a TLB shootdown you don't need to do an
>> invept command?
>
> Yes, I think so. flush_area_local() -> hvm_flush_guest_tlbs() ->
> hvm_asid_flush_core() should DTRT.
I don't think so. Guest-physical mappings are only tagged with the EP4TA
and not the VPID, thus changing the VPID does nothing.
Thus we would need to extend the current mechanism to determine that a
invept is also needed.
David
next prev parent reply other threads:[~2015-12-02 17:14 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-13 18:49 [RFC PATCHv2 0/3]: x86/ept: reduce translation invalidation impact David Vrabel
2015-11-13 18:49 ` [PATCHv2 1/3] x86/ept: remove unnecessary sync after resolving misconfigured entries David Vrabel
2015-12-02 7:17 ` Tian, Kevin
2015-11-13 18:49 ` [PATCHv2 2/3] mm: don't free pages until mm locks are released David Vrabel
2015-11-16 11:52 ` Jan Beulich
2015-11-16 12:02 ` David Vrabel
2015-11-16 12:04 ` Jan Beulich
2015-11-30 14:10 ` David Vrabel
2015-12-02 7:25 ` Tian, Kevin
2015-12-02 16:23 ` Tim Deegan
2015-12-02 16:30 ` George Dunlap
2015-12-02 16:46 ` Jan Beulich
2015-12-02 16:46 ` Tim Deegan
2015-12-02 17:01 ` George Dunlap
2015-12-02 17:14 ` David Vrabel [this message]
2015-12-03 10:22 ` Jan Beulich
2015-12-03 10:56 ` George Dunlap
2015-12-02 16:45 ` David Vrabel
2015-12-02 17:17 ` George Dunlap
2015-11-13 18:49 ` [PATCHv2 3/3] x86/ept: defer the invalidation until the p2m lock is released David Vrabel
2015-12-02 7:14 ` [RFC PATCHv2 0/3]: x86/ept: reduce translation invalidation impact Tian, Kevin
2015-12-03 15:59 ` David Vrabel
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=565F26E2.70008@citrix.com \
--to=david.vrabel@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=george.dunlap@citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=jun.nakajima@intel.com \
--cc=kevin.tian@intel.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.