From: Tim Deegan Subject: Re: [PATCH RFC 2/4] xen: grant_table: implement grant_table_soft_reset() Date: Thu, 4 Jun 2015 15:11:51 +0100 Message-ID: <20150604141151.GG74656@deinos.phlegethon.org> References: <1433338522-8422-1-git-send-email-vkuznets@redhat.com> <1433338522-8422-3-git-send-email-vkuznets@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Z0VsA-0002ti-89 for xen-devel@lists.xenproject.org; Thu, 04 Jun 2015 14:11:54 +0000 Content-Disposition: inline In-Reply-To: <1433338522-8422-3-git-send-email-vkuznets@redhat.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Vitaly Kuznetsov Cc: Wei Liu , Andrew Jones , Julien Grall , Keir Fraser , Ian Campbell , Stefano Stabellini , Andrew Cooper , Ian Jackson , Olaf Hering , David Vrabel , Jan Beulich , xen-devel@lists.xenproject.org, Daniel De Graaf List-Id: xen-devel@lists.xenproject.org At 15:35 +0200 on 03 Jun (1433345720), Vitaly Kuznetsov wrote: > When soft reset is being performed we need to replace all actively > granted pages with empty pages to prevent possible future memory > corruption as the newly started kernel won't be aware of these > granted pages. I'm not sure about this one. IMO it's the guest's responsibility to find and disable whatever holds these grants. This is by analogy with a bus-master-capable device in a real PC: until the device is found and reset, the new OS can't use memory outside its guaranteed safe pool. There has been talk before of an operation along the lines of "revoke this grant entry and wait for all users to release it" but that would only help with backends that are guaranteed to release grants in a reasonable time. Cheers, Tim.