From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: [PATCH] hvm: handle PoD and grant pages in HVMOP_get_mem_type Date: Mon, 22 Oct 2012 16:48:40 +0200 Message-ID: <20121022144840.GA22644@aepfle.de> References: <918914F5-6729-40C8-8D46-5EABB8FAB35B@gridcentric.ca> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <918914F5-6729-40C8-8D46-5EABB8FAB35B@gridcentric.ca> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andres Lagar-Cavilla Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Fri, Oct 19, Andres Lagar-Cavilla wrote: > > + else if ( p2m_is_magic(t) ) > > + a.mem_type = HVMMEM_ram_rw; > p2m_is_magic is this bizarre thing that should just be p2m_is_pod. Can > you take advantage of this opportunity and fix it? I will prepare a separate patch for that rename. > > + else if ( p2m_is_grant(t) ) > > + a.mem_type = HVMMEM_ram_rw; > > Yes there can be p2m_is_grant pages in an HVM, if it is running a > backend. Note that you need to discriminate whether the grant is > mapped writable in order to return ram_rw or ram_ro. I will put p2m_grant_map_rw into HVMMEM_ram_rw, and p2m_grant_map_ro into HVMMEM_ram_ro. > It might be a good idea to extend this interface to return > HVMMEM_grant_rw/ro. These are, in essence, different types of ram from > an HVM point of view. However, it might be overkill for the current > users. Would the guest really care about the info that a given page is a grant page? What would it do with that info? Olaf