[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH RFC] xen: prevent PVH Dom0 from having pages with more than one ref



>>> Roger Pau MonnÃ<roger.pau@xxxxxxxxxx> 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.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.