From mboxrd@z Thu Jan 1 00:00:00 1970 From: Juergen Gross Subject: Re: [PATCH] x86: add feature flags to shared_info page Date: Mon, 02 Mar 2015 16:40:47 +0100 Message-ID: <54F4847F.9040101@suse.com> References: <1425301144-27119-1-git-send-email-jgross@suse.com> <54F470740200007800065076@mail.emea.novell.com> <54F4694D.3010808@citrix.com> <54F47A2C0200007800065109@mail.emea.novell.com> <54F47DB0.9020007@suse.com> <54F4804E.1010608@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" 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 1YSSSf-0003Qb-PL for xen-devel@lists.xenproject.org; Mon, 02 Mar 2015 15:40:49 +0000 In-Reply-To: <54F4804E.1010608@citrix.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: Andrew Cooper , Jan Beulich Cc: keir@xen.org, Ian.Campbell@citrix.com, tim@xen.org, ian.jackson@eu.citrix.com, david.vrabel@citrix.com, xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On 03/02/2015 04:22 PM, Andrew Cooper wrote: > On 02/03/15 15:11, Juergen Gross wrote: >> On 03/02/2015 02:56 PM, Jan Beulich wrote: >>>>>> On 02.03.15 at 14:44, wrote: >>>> On 02/03/15 13:15, Jan Beulich wrote: >>>>>>>> On 02.03.15 at 13:59, <"jgross@suse.com".non-mime.internet> wrote: >>>>>> In order to indicate the Xen tools capability to support the virtual >>>>>> mapped linear p2m list instead the 3 level mfn tree add feature flags >>>>>> to the shared_info page. >>>>> But why in the shared info page? They'd belong to start info or should >>>>> be obtainable via XENVER_get_features. >>>> >>>> Furthermore in this case, the virtual linear p2m is purely a >>>> guest->toolstack feature/ABI. >>>> >>>> Xen deliberately has no knowledge of PV guest p2ms of either the 3level >>>> or linear variety. >>>> >>>> Is there genuinely no better interface than the hypervisor feature >>>> flags >>>> to indicate a piece of toolstack support? >>> >>> As Ian indicated in his reply, much depends on whether any other >>> mechanism would allow the information to be retrieved early enough >>> in the guest. >> >> Options that would work are, regarding the time the information is >> needed: >> >> - XENVER_get_features >> - start info >> - shared info >> - any (other) hypercall >> >> All other interfaces are available much too late. >> >> I think start info is the best option, as it is built by the tools for >> domUs and, as Jan already mentioned, would be a better place for the >> information as shared info. > > I concur. The start info seems like the best place for it. > >> >> The last remaining question: what to do regarding dom0? Here I see the >> following alternatives: >> >> - do nothing: the 3 level mfn tree is built even if it is not needed, >> wastes up to 2MB memory and might slow down dom0 (I doubt the slow >> down would be detectable) >> - set the flag based on a hypervisor boot parameter (not very nice) >> - throw the 3 level mfn tree away during boot as soon as the tools can >> tell dom0 to do so (requires a new interface) >> >> Any thoughts? > > The toolstack only needs to access the p2m when doing suspend/resume for > migrate, or a coredump. None of these are applicable to dom0, so I > think dom0 can get away with doing whatever it prefers in this regard. Are core dumps of dom0 really no issue? I think crash is using the 3 level mfn tree today. Juergen