Received: by 10.223.176.46 with SMTP id f43csp2218933wra; Thu, 25 Jan 2018 06:43:59 -0800 (PST) X-Google-Smtp-Source: AH8x225H+Y8BaimDlayxSJi9DIj/95ennRZLVysGSfkRyerp1e3Qkv9uE/qzfgCD6bYPM4JdvmEM X-Received: by 2002:a17:902:7146:: with SMTP id u6-v6mr11669222plm.49.1516891439736; Thu, 25 Jan 2018 06:43:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516891439; cv=none; d=google.com; s=arc-20160816; b=FScQVL/zTaSHkd92VwisXNmqtPRmm2h6BE8nfRIh+RupkubyH0LTP5QDvQsreNQI4o ZnDhlBWGqOgOQUUF+cuoyR+c/fhIMBVA4RveadVBIjW1UaDFLfHtx9Hy9Ir71CMsWCUv B4Bcu3/nBJLPzlszJ/9LCcQNf38OM4Thkm3GWbnLuNYicoBS0TOM6WT6rAsN4kF3iEbq itZNJzj3Ef1Tn/vXJC7KdHgv54wXfmEQt0uaArVARU1GWdVuSW6iSyHYIlxLIZ2jPGmU 5s2AWtAVeMAgtmUsOCuw25uNFvJlYwRZG5oJqlwr130Oo1TPtMsMCp+rhkg+ZTtQOlfl Kd6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=z5vKDfD6mPYl9awV2I+6wPD+8PVGbB14wZcPCjhsJbs=; b=cIeMRYY+ejYwVHfEO4heulq2Q3ti+wcNJoOulAJLLnWF40bkBTPmN3d7HkQDj9bj15 WtzME8Ty8IhusXPpkYHjkmCTjA6iNufHhR0laWl2EETnOgunpv/7qmdiW6Nf9l2GykAD njELVsPRpXkrR59nA0DhPSbxpNvCxnsc5ApDdqnep4VfZ4trRtilHFc9vT+HZFO1gh2w ObWPi65GZiYJebRQZIlE8T0epXNTYFnNxLV9CuGBug7Ls+1vwVS+9trmZ7+klfJF4YQp jQyCXFUwDCPPKyaxHdP2P0y8qCj+oo+94szb/iuBGTP14SbcjR9LYvVJwyvOunehk15r 2yfw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l185si1649652pge.147.2018.01.25.06.43.44; Thu, 25 Jan 2018 06:43:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751849AbeAYOgt (ORCPT + 99 others); Thu, 25 Jan 2018 09:36:49 -0500 Received: from mx2.suse.de ([195.135.220.15]:50083 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751265AbeAYOgo (ORCPT ); Thu, 25 Jan 2018 09:36:44 -0500 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 BF028AE75; Thu, 25 Jan 2018 14:36:42 +0000 (UTC) From: Juergen Gross To: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, xen-devel@lists.xenproject.org Cc: lenb@kernel.org, rafael.j.wysocki@intel.com, mingo@redhat.com, boris.ostrovsky@oracle.com, Juergen Gross , stable@vger.kernel.org Subject: [PATCH v2 2/2] xen: add acpi_arch_get_root_pointer() for pvh guests Date: Thu, 25 Jan 2018 15:36:39 +0100 Message-Id: <20180125143639.9969-3-jgross@suse.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180125143639.9969-1-jgross@suse.com> References: <20180125143639.9969-1-jgross@suse.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add acpi_arch_get_root_pointer() for Xen PVH guests to communicate the address of the RSDP table given to the kernel via Xen start info. This makes the kernel boot again in PVH mode after on recent Xen the RSDP was moved to higher addresses. So up to that change it was pure luck that the legacy method to locate the RSDP was working when running as PVH mode. Cc: # 4.11 Signed-off-by: Juergen Gross --- arch/x86/xen/enlighten_pvh.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/arch/x86/xen/enlighten_pvh.c b/arch/x86/xen/enlighten_pvh.c index 436c4f003e17..f08fd43f2aa2 100644 --- a/arch/x86/xen/enlighten_pvh.c +++ b/arch/x86/xen/enlighten_pvh.c @@ -16,15 +16,23 @@ /* * PVH variables. * - * xen_pvh and pvh_bootparams need to live in data segment since they - * are used after startup_{32|64}, which clear .bss, are invoked. + * xen_pvh, pvh_bootparams and pvh_start_info need to live in data segment + * since they are used after startup_{32|64}, which clear .bss, are invoked. */ bool xen_pvh __attribute__((section(".data"))) = 0; struct boot_params pvh_bootparams __attribute__((section(".data"))); +struct hvm_start_info pvh_start_info __attribute__((section(".data"))); -struct hvm_start_info pvh_start_info; unsigned int pvh_start_info_sz = sizeof(pvh_start_info); +acpi_physical_address acpi_arch_get_root_pointer(void) +{ + if (xen_pvh) + return pvh_start_info.rsdp_paddr; + + return 0; +} + static void __init init_pvh_bootparams(void) { struct xen_memory_map memmap; -- 2.13.6