From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: xen-devel@lists.xensource.com
Cc: Tim.Deegan@xen.org, Ian.Campbell@citrix.com,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: [PATCH v2 5/6] xen/arm: create_p2m_entries should not call free_domheap_page
Date: Fri, 20 Jul 2012 16:05:57 +0100 [thread overview]
Message-ID: <1342796758-4958-5-git-send-email-stefano.stabellini@eu.citrix.com> (raw)
In-Reply-To: <1342796758-4958-1-git-send-email-stefano.stabellini@eu.citrix.com>
The guest is entitled to use valid memory pages as pfns for grant_table
usage.
In these cases we shouldn't call free_domheap_page to free the existing
page from create_p2m_entries, because it resets the reference counting
but the page is still allocated to the guest (even if not in the p2m
anymore) and common grant_table code is also going to call put_page on
it.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
xen/arch/arm/p2m.c | 5 -----
1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
index a4c7e6f..fbfef72 100644
--- a/xen/arch/arm/p2m.c
+++ b/xen/arch/arm/p2m.c
@@ -225,12 +225,7 @@ static int create_p2m_entries(struct domain *d,
/* else: third already valid */
if ( third[third_table_offset(addr)].p2m.valid )
- {
- /* p2m entry already present */
- free_domheap_page(
- mfn_to_page(third[third_table_offset(addr)].p2m.base));
flush_tlb_all_local();
- }
/* Allocate a new RAM page and attach */
switch (op) {
--
1.7.2.5
next prev parent reply other threads:[~2012-07-20 15:05 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-20 15:05 [PATCH v2 0/6] xen/arm: grant_table Stefano Stabellini
2012-07-20 15:05 ` [PATCH v2 1/6] Initialize lr_queue in vcpu_vgic_init for the first 32 irqs Stefano Stabellini
2012-07-20 15:05 ` [PATCH v2 2/6] xen/arm: set paging_mode_translate and paging_mode_external Stefano Stabellini
2012-07-20 15:05 ` [PATCH v2 3/6] xen/arm: implement page reference and grant table functions needed by grant_table.c Stefano Stabellini
2012-07-23 16:03 ` Ian Campbell
2012-07-24 10:25 ` Stefano Stabellini
2012-07-24 10:41 ` Ian Campbell
2012-07-26 17:56 ` Stefano Stabellini
2012-07-27 7:57 ` Ian Campbell
2012-07-20 15:05 ` [PATCH v2 4/6] xen/arm: implement get/put_page_type Stefano Stabellini
2012-07-23 16:08 ` Ian Campbell
2012-07-24 10:27 ` Stefano Stabellini
2012-07-24 10:42 ` Ian Campbell
2012-07-26 18:03 ` Stefano Stabellini
2012-07-23 20:01 ` Tim Deegan
2012-07-24 10:21 ` Stefano Stabellini
2012-07-20 15:05 ` Stefano Stabellini [this message]
2012-07-23 16:25 ` [PATCH v2 5/6] xen/arm: create_p2m_entries should not call free_domheap_page Ian Campbell
2012-07-24 10:28 ` Stefano Stabellini
2012-07-20 15:05 ` [PATCH v2 6/6] xen/arm: grant table Stefano Stabellini
2012-07-23 16:13 ` Ian Campbell
2012-07-24 10:30 ` Stefano Stabellini
2012-07-23 16:24 ` [PATCH v2 1/6] Initialize lr_queue in vcpu_vgic_init for the first 32 irqs Ian Campbell
2012-07-23 16:30 ` [PATCH v2 0/6] xen/arm: grant_table Ian Campbell
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=1342796758-4958-5-git-send-email-stefano.stabellini@eu.citrix.com \
--to=stefano.stabellini@eu.citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=Tim.Deegan@xen.org \
--cc=xen-devel@lists.xensource.com \
/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).