From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6B309C2BA12 for ; Fri, 3 Apr 2020 15:34:01 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4A42820721 for ; Fri, 3 Apr 2020 15:34:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4A42820721 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jKOKM-0003or-GJ; Fri, 03 Apr 2020 15:33:50 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jKOKL-0003oj-Lk for xen-devel@lists.xenproject.org; Fri, 03 Apr 2020 15:33:49 +0000 X-Inumbo-ID: 82961e4e-75c0-11ea-bd3a-12813bfff9fa Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 82961e4e-75c0-11ea-bd3a-12813bfff9fa; Fri, 03 Apr 2020 15:33:49 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 04094AA7C; Fri, 3 Apr 2020 15:33:48 +0000 (UTC) Subject: Re: [PATCH v7 08/12] xen: add /buildinfo/config entry to hypervisor filesystem To: =?UTF-8?B?SsO8cmdlbiBHcm/Dnw==?= References: <20200402154616.16927-1-jgross@suse.com> <20200402154616.16927-9-jgross@suse.com> <19f84540-6b49-f99d-805a-e07f56330f31@suse.com> From: Jan Beulich Message-ID: Date: Fri, 3 Apr 2020 17:33:47 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Julien Grall , Wei Liu , Andrew Cooper , Ian Jackson , George Dunlap , xen-devel@lists.xenproject.org Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" On 03.04.2020 17:12, Jürgen Groß wrote: > On 03.04.20 16:31, Jan Beulich wrote: >> On 02.04.2020 17:46, Juergen Gross wrote: >>> --- a/xen/common/Kconfig >>> +++ b/xen/common/Kconfig >>> @@ -353,6 +353,16 @@ config DOM0_MEM >>>           Leave empty if you are not sure what to specify. >>>   +config HYPFS_CONFIG >>> +    bool "Provide hypervisor .config via hypfs entry" >>> +    default y >> >> My initial reaction was to ask for "depends on HYPFS", but then >> I noticed the earlier patch doesn't introduce such. Am I >> mis-remembering that it was agreed to make the whole thing >> possible to disable at least in EXPERT mode? > > No, I don't remember that agreement. > > And TBH I'm not sure this is a good idea, as that would at once make the > plan to replace at least some sysctl and/or domctl interfaces impossible > (like e.g. the last 3 patches of the series are doing already), or at > least would tie the related functionality to CONFIG_HYPFS. I think that would be fine - that's what config setting are for. Someone caring about space may not care about runtime setting of parameters. >>> --- a/xen/common/kernel.c >>> +++ b/xen/common/kernel.c >>> @@ -389,6 +389,16 @@ static HYPFS_STRING_INIT(compile_date, "compile_date"); >>>   static HYPFS_STRING_INIT(compile_domain, "compile_domain"); >>>   static HYPFS_STRING_INIT(extra, "extra"); >>>   +#ifdef CONFIG_HYPFS_CONFIG >>> +static struct hypfs_entry_leaf config = { >>> +    .e.type = XEN_HYPFS_TYPE_STRING, >>> +    .e.encoding = XEN_HYPFS_ENC_GZIP, >>> +    .e.name = "config", >>> +    .e.read = hypfs_read_leaf, >>> +    .content = &xen_config_data >>> +}; >>> +#endif >> >> Would be really good if no open-coded instantiations like this >> one would ever have to appear, i.e. if suitable macros were >> available. What's preventing use of one of the available ones >> here? > > Right now it is the only case for a non plain encoding. The alternative > would have been to either specify the encoding explicitly at all other > node definitions, or to have a macro for this single instance. Or set the encoding alongside e.size in the init function? Jan