From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>, andrew.cooper3@citrix.com
Cc: xen-devel@lists.xenproject.org, keir@xen.org
Subject: Re: [PATCH RFC] xen: prevent PVH Dom0 from having pages with more than one ref
Date: Fri, 13 Jun 2014 13:16:38 +0200 [thread overview]
Message-ID: <539ADD96.6000706@citrix.com> (raw)
In-Reply-To: <539AE91302000078000B64E3@mail.emea.novell.com>
On 13/06/14 13:05, Jan Beulich wrote:
>>>> Roger Pau Monné<roger.pau@citrix.com> 06/13/14 12:17 PM >>>
>> AFAICT (given my little knowledge about the domain builder), those pages
>> have been allocated by alloc_domheap_pages earlier in the code, which
>> makes them already have 1 ref, and then this loop adds another ref to
>> them, which makes no sense to me.
>
> alloc_domheap_pages() (or really assign_pages()) takes one reference for
> setting PGC_allocated. This is the reference that gets dropped when freeing
> the page. The code you modify takes a second reference for the usage type
> of the page becoming writable, which is a result of it getting a writable page
> table entry made for it. That reference gets dropped when the respective
> page table entry gets cleared.
>
>> The same happens for PV guests, but it doesn't seem to be a problem for
>> pure PV guests, and in fact removing this code for PV guests makes Xen
>> crash when the PV Dom0 boots. I would really appreciate if someone with
>> more knowledge on the domain builder code could comment on why this is
>> needed.
>
> So other than Andrew I think the change is correct except for being only a
> partial fix - there's a second place further down where a similar piece of code
> exists that would need fixing (conditionalizing) the same way.
Thanks, that makes sense, v2 on the way.
Roger.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
prev parent reply other threads:[~2014-06-13 11:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-13 9:12 [PATCH RFC] xen: prevent PVH Dom0 from having pages with more than one ref Roger Pau Monne
2014-06-13 9:23 ` Andrew Cooper
2014-06-13 10:17 ` Roger Pau Monné
2014-06-13 11:05 ` Jan Beulich
2014-06-13 11:16 ` Andrew Cooper
2014-06-13 11:39 ` Jan Beulich
2014-06-13 11:16 ` Roger Pau Monné [this message]
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=539ADD96.6000706@citrix.com \
--to=roger.pau@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=keir@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.