From: Keir Fraser Subject: Re: [PATCH] hvm: Use main memory for video memory. [Was: xend, 8MB video memory and ballooning] Date: Thu, 31 Jul 2008 16:03:12 +0100 Message-ID: References: <20080731145758.GP4678@implementation.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20080731145758.GP4678@implementation.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Samuel Thibault Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 31/7/08 15:57, "Samuel Thibault" wrote: >> I'd've hoped it would just work... does the extra page of allocation >> during restore fail? > > It does work, but I guess it replaces the mapping of the "magic" page > with the mapping of the allocated page, so that shared_info wouldn't > work any more. PV drivers will add_to_physmap() these pages again during resume, which will map the correct pages (shared_info and grant_table, notably) on top of the RAM pages that save/restore will leave behind. things should work fine then and the displaced RAM pages *should* get freed immediately. Even if they don't they will on domain destruction and it's only a few pages... >> I'm thinking that the grant tables will be mapped in the I/O hole too, and >> that is from 'Xen heap' just like shared_info is. > > Urgl, hadn't thought about those, I guess the PV drivers would > re-etablish them on resume anyway? Yep, as above. >> So special-casing one and not the other sure is odd. > > Actually, shouldn't it be up to the hypervisor to not return all these > from the SHADOW_OP_PEEK operation? Well, maybe. :-) But shadow code doesn't special-case these Xen-heap pages I think. And doing so could be a pain, and maybe cause other issues? -- Keir