From: Julien Grall Subject: Re: [RFC for 4.6] xen: Extend DOMCTL createdomain to support arch configuration Date: Thu, 20 Nov 2014 14:54:53 +0000 Message-ID: <546E00BD.9080007@linaro.org> References: <1416338436-3293-1-git-send-email-julien.grall@linaro.org> <546E0AAF02000078000495E0@smtp.nue.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XrT8M-0001zo-Ce for xen-devel@lists.xenproject.org; Thu, 20 Nov 2014 14:54:58 +0000 Received: by mail-wg0-f43.google.com with SMTP id l18so3965785wgh.16 for ; Thu, 20 Nov 2014 06:54:56 -0800 (PST) In-Reply-To: <546E0AAF02000078000495E0@smtp.nue.novell.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: Jan Beulich Cc: Wei Liu , ian.campbell@citrix.com, George Dunlap , tim@xen.org, Ian Jackson , stefano.stabellini@citrix.com, xen-devel@lists.xenproject.org, Daniel De Graaf , Keir Fraser List-Id: xen-devel@lists.xenproject.org Hi Jan, On 11/20/2014 02:37 PM, Jan Beulich wrote: >>>> On 18.11.14 at 20:20, wrote: >> --- a/xen/arch/x86/setup.c >> +++ b/xen/arch/x86/setup.c >> @@ -540,6 +540,7 @@ void __init noreturn __start_xen(unsigned long mbi_p) >> int i, j, e820_warn = 0, bytes = 0; >> bool_t acpi_boot_table_init_done = 0; >> struct domain *dom0; >> + struct arch_domainconfig config; >> struct ns16550_defaults ns16550 = { >> .data_bits = 8, >> .parity = 'n', >> @@ -1347,7 +1348,8 @@ void __init noreturn __start_xen(unsigned long mbi_p) >> domcr_flags |= DOMCRF_pvh | DOMCRF_hap; >> >> /* Create initial domain 0. */ >> - dom0 = domain_create(0, domcr_flags, 0); >> + memset(&config, 0, sizeof(config)); >> + dom0 = domain_create(0, domcr_flags, 0, &config); > > Why not NULL like almost everywhere else? It was because DOM0 is not a dummy domain. As it's not use on x86, I could replace by NULL. >> --- a/xen/include/public/arch-x86/xen.h >> +++ b/xen/include/public/arch-x86/xen.h >> @@ -228,6 +228,11 @@ struct arch_shared_info { >> }; >> typedef struct arch_shared_info arch_shared_info_t; >> >> +struct arch_domainconfig { >> + char dummy; >> +}; >> +typedef struct arch_domainconfig arch_domainconfig_t; > > I think we decided that, regardless of all bad precedents, we'd stop > adding things without xen_ prefix to the public interface. I'm also > rather uncertain about all these typedef-s - I think we could very > well get away without adding any new ones (if internally to the > hypervisor or tools they turn out to make the code much better > readable, each such component could still introduce one on its own). Ok. I will drop them and rename the structure to xen_arch_domainconfig; Regards, -- Julien Grall