All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Dunlap <george.dunlap@eu.citrix.com>
To: Keir Fraser <Keir.Fraser@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Jan Beulich <JBeulich@novell.com>
Subject: Re: xenheap pages mapped by dom0
Date: Fri, 18 Dec 2009 15:29:15 +0000	[thread overview]
Message-ID: <4B2B9FCB.6010309@eu.citrix.com> (raw)
In-Reply-To: <C7514F4A.4C35%keir.fraser@eu.citrix.com>

Keir Fraser wrote:
> I think the right thing to do would be very roughly:
> On allocation:
>  page = alloc_xenheap_page();
>  share_xen_page_with_guest(page);
> On deallocation:
>  if (test_and_clear(PGC_allocated)) put_page();
>  if (page->count_info & PGC_count_mask) return -EBUSY;
>  free_xenheap_page(page);
>   
Hmm, the first two should probably happen in the opposite order, no?  
I.e., we should check to see that for each page we want to deallocate, 
page->count_info & PGC_count_mask == 0, returning -EBUSY if that fails; 
then unmark allocate and call free xenheap page?

 -George

  reply	other threads:[~2009-12-18 15:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-18 14:04 xenheap pages mapped by dom0 George Dunlap
2009-12-18 14:29 ` Jan Beulich
2009-12-18 15:24   ` Keir Fraser
2009-12-18 15:29     ` George Dunlap [this message]
2009-12-18 16:03       ` Keir Fraser
2009-12-18 15:44     ` Jan Beulich
2009-12-18 16:12       ` Keir Fraser
2009-12-18 16:19       ` George Dunlap
2009-12-18 16:37         ` Jan Beulich
2009-12-18 16:40         ` Keir Fraser
2009-12-18 21:59           ` George Dunlap

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=4B2B9FCB.6010309@eu.citrix.com \
    --to=george.dunlap@eu.citrix.com \
    --cc=JBeulich@novell.com \
    --cc=Keir.Fraser@eu.citrix.com \
    --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 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.