From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.132.183.28, mailfrom: lersek@redhat.com) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Fri, 26 Jul 2019 10:19:34 -0700 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 60AFA2EED3D; Fri, 26 Jul 2019 17:19:33 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-40.ams2.redhat.com [10.36.116.40]) by smtp.corp.redhat.com (Postfix) with ESMTP id A2A36620CA; Fri, 26 Jul 2019 17:19:31 +0000 (UTC) Subject: Re: [PATCH v3 33/35] OvmfPkg: Introduce XenIoPvhDxe to initialize Grant Tables To: Anthony PERARD Cc: devel@edk2.groups.io, xen-devel@lists.xenproject.org, Ard Biesheuvel , Jordan Justen , Julien Grall References: <20190704144233.27968-1-anthony.perard@citrix.com> <20190704144233.27968-34-anthony.perard@citrix.com> <4badd535-c23d-c64d-7bb3-fb42bbbf538a@redhat.com> <20190726160642.GG1242@perard.uk.xensource.com> From: "Laszlo Ersek" Message-ID: Date: Fri, 26 Jul 2019 19:19:30 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190726160642.GG1242@perard.uk.xensource.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 26 Jul 2019 17:19:33 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 07/26/19 18:06, Anthony PERARD wrote: > On Wed, Jul 10, 2019 at 04:05:02PM +0200, Laszlo Ersek wrote: >> On 07/04/19 16:42, Anthony PERARD wrote: >>> + if (State == NULL) { >>> + Status = EFI_OUT_OF_RESOURCES; >>> + goto Error; >>> + } >>> + >>> + Allocation = AllocateReservedPages (XEN_GRANT_FRAMES); >> >> (5) So, again, please evaluate if this could simply be AllocatePages(). > > I would prefer to let know the operating system that those pages are > potentially used, unless I'm sure OVMF has let know Xen that those > pages don't contain the grant table anymore. > > I'll probably try to make some changes in OVMF to allow to give back > those pages, but for now I think keeping those pages as reserved will > be good enough. Fair enough! Thanks, Laszlo