From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: paged granttable entries Date: Thu, 26 Aug 2010 14:13:55 +0200 Message-ID: <20100826121355.GA6254@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Patrick Colp Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Patrick, after adding some debug to __gnttab_map_grant_ref(), I found the gfn referenced by sha1->frame has p2m_type_t == p2m_ram_paged. As a result, the following code gets into the 'iomem_access_permitted(rd, frame, frame)' branch. Some naive approach to call p2m_mem_paging_populate() and return GNTST_eagain lead to a deadlock in the guest. The guest reponds to keypresses, xm destroy does not work. How are paged out granttable entries supposed to come back when the guest did not do the GNTTABOP_map_grant_ref hypercall yet? I tried to skip gfn listed in the guests granttable in p2m_mem_paging_nominate, but that doesnt appear to work because new pages can be added to the granttable at anytime by the drivers. Olaf