From patchwork Mon Aug 29 14:18:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juergen Gross X-Patchwork-Id: 9304047 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 602E26086B for ; Mon, 29 Aug 2016 14:20:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 50B3E28683 for ; Mon, 29 Aug 2016 14:20:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 458B628688; Mon, 29 Aug 2016 14:20:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2354B28683 for ; Mon, 29 Aug 2016 14:20:45 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1beNOT-0001Vn-Ql; Mon, 29 Aug 2016 14:18:33 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1beNOS-0001Tv-HY; Mon, 29 Aug 2016 14:18:32 +0000 Received: from [85.158.137.68] by server-4.bemta-3.messagelabs.com id 6E/6C-15788-73444C75; Mon, 29 Aug 2016 14:18:31 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrJLMWRWlGSWpSXmKPExsVyuP0Ov665y5F wgwmb2Szefl3CbPF9y2QmByaPwx+usAQwRrFm5iXlVySwZrzYMpe94CZfxZxjk9gaGK/wdDFy ckgIGEm8nfiPqYuRi0NIYCGjRMvfd0wgCTYBVYkN10+xgtgiAm4SX77PYgOxmQUiJOZ8OMXSx cjBISzgL9H7NhgkzAJUvnlPFwuIzStgL/G6r5MVYr6cxPWZ08FGcgo4SKz79A/MFgKqeXzxFf sERu4FjAyrGNWLU4vKUot0TfWSijLTM0pyEzNzdA0NjPVyU4uLE9NTcxKTivWS83M3MQK9XM/ AwLiD8fJXp0OMkhxMSqK8JXcOhwvxJeWnVGYkFmfEF5XmpBYfYpTh4FCS4BV2PhIuJFiUmp5a kZaZAww3mLQEB4+SCG8cSJq3uCAxtzgzHSJ1ilFRSpxXDiQhAJLIKM2Da4OF+CVGWSlhXkYGB gYhnoLUotzMElT5V4ziHIxKwrypIFN4MvNK4Ka/AlrMBLS4AORm3uKSRISUVAOj32bnGZNSl/ t3HF0XOiX29/mtmjpvt/8SE/rWu67g03uTfUdkJygcNGV/Nkf07Drm9v7gmRun+YgzfRaMPlB zOO/4eq2qdz8UdvQxl4R3mD0PUzlxkL/D+12cWtiBpi8T1jsXOvQsVZ2SMvtLa20S//78V+WP giyzfiat+r7gwFoDVq2bZduqlViKMxINtZiLihMBPeSeYGwCAAA= X-Env-Sender: jgross@suse.com X-Msg-Ref: server-16.tower-31.messagelabs.com!1472480310!50279463!1 X-Originating-IP: [195.135.220.15] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.84; banners=-,-,- X-VirusChecked: Checked Received: (qmail 55039 invoked from network); 29 Aug 2016 14:18:31 -0000 Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by server-16.tower-31.messagelabs.com with DHE-RSA-CAMELLIA256-SHA encrypted SMTP; 29 Aug 2016 14:18:31 -0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 34D31AD76; Mon, 29 Aug 2016 14:18:30 +0000 (UTC) From: Juergen Gross To: minios-devel@lists.xenproject.org, xen-devel@lists.xenproject.org Date: Mon, 29 Aug 2016 16:18:26 +0200 Message-Id: <1472480307-26293-2-git-send-email-jgross@suse.com> X-Mailer: git-send-email 2.6.6 In-Reply-To: <1472480307-26293-1-git-send-email-jgross@suse.com> References: <1472480307-26293-1-git-send-email-jgross@suse.com> Cc: Juergen Gross , samuel.thibault@ens-lyon.org, wei.liu2@citrix.com Subject: [Xen-devel] [PATCH v2 1/2] mini-os: partially revert "remove using start_info ..." X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Commit e33452c4f5547ed14defe6382b3b53664ac5bd8a ("remove using start_info in architecture independent code") removed the start_info variable completely. grub stubdom needs the start_info structure. Readd the start_info structure, but make it dependent on CONFIG_PARAVIRT. Signed-off-by: Juergen Gross Reviewed-by: Samuel Thibault --- arch/x86/setup.c | 12 ++++++++++++ include/hypervisor.h | 13 ++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/arch/x86/setup.c b/arch/x86/setup.c index 86955cf..5278227 100644 --- a/arch/x86/setup.c +++ b/arch/x86/setup.c @@ -33,6 +33,14 @@ #include #include +#ifdef CONFIG_PARAVIRT +/* + * This structure contains start-of-day info, such as pagetable base pointer, + * address of the shared_info structure, and things like that. + */ +union start_info_union start_info_union; +#endif + /* * Shared page for communicating with the hypervisor. * Events flags go here, for example. @@ -189,6 +197,10 @@ arch_init(void *par) /* print out some useful information */ print_start_of_day(par); +#ifdef CONFIG_PARAVIRT + memcpy(&start_info, par, sizeof(start_info)); +#endif + start_kernel(); } diff --git a/include/hypervisor.h b/include/hypervisor.h index 3073a8a..f3b1f3c 100644 --- a/include/hypervisor.h +++ b/include/hypervisor.h @@ -27,7 +27,18 @@ #include /* hypervisor.c */ -#ifndef CONFIG_PARAVIRT +#ifdef CONFIG_PARAVIRT +/* + * a placeholder for the start of day information passed up from the hypervisor + */ +union start_info_union +{ + start_info_t start_info; + char padding[512]; +}; +extern union start_info_union start_info_union; +#define start_info (start_info_union.start_info) +#else int hvm_get_parameter(int idx, uint64_t *value); int hvm_set_parameter(int idx, uint64_t value); #endif