From: Julien Grall <julien.grall@citrix.com>
To: Jan Beulich <jbeulich@suse.com>, Tim Deegan <tim@xen.org>,
Andrew Cooper <andrew.cooper3@citrix.com>
Cc: xen-devel <xen-devel@lists.xen.org>,
Ian Campbell <ian.campbell@citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Fwd: Question regarding the behavior of guest_physmap_remove_page on x86
Date: Tue, 17 Nov 2015 18:09:17 +0000 [thread overview]
Message-ID: <564B6D4D.8080004@citrix.com> (raw)
In-Reply-To: <564B6C56.8080501@citrix.com>
(Resending with this time xen-devel in CC)
Hi,
On ARM, it's possible to fail when removing a page from the P2M. It's
happening if we are trying to shatter a superpage and we don't have
memory to allocate the table. Therefore the mapping won't be removed
from the P2M.
However on ARM (and until recently on x86 [1]), the function
guest_physmap_remove_page is not supposed to return an error. So we
would free the page even if we fail to remove the page. This will end up
to re-use the page by someone else even though the mapping is still
present in the P2M.
I looked to the x86 version and I'm not sure how the function is
behaving. Maybe an x86 maintainers could give me insight here.
I'm thinking to fix the problem by checking the return of
guest_physmap_remove_page to avoid the page being reallocate to someone
else (see for instance guest_remove_page in xen/common/memory.c). Is it
a sensible way to fix it?
Regards,
[1] 5ae03990 "xen/vtd: create RMRR mapping"
--
Julien Grall
next parent reply other threads:[~2015-11-17 18:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <564B6C56.8080501@citrix.com>
2015-11-17 18:09 ` Julien Grall [this message]
2015-11-17 18:47 ` Fwd: Question regarding the behavior of guest_physmap_remove_page on x86 Andrew Cooper
2015-11-18 16:16 ` Julien Grall
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=564B6D4D.8080004@citrix.com \
--to=julien.grall@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=jbeulich@suse.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.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.