Received: by 10.223.185.116 with SMTP id b49csp7041876wrg; Wed, 28 Feb 2018 21:45:03 -0800 (PST) X-Google-Smtp-Source: AG47ELvCklPH9NTRe3errkRPMHF6simaW3xdotle/fu+SMyXmw82NQ8h86IO1rJXsbrk0nIpzW7u X-Received: by 10.99.124.25 with SMTP id x25mr606309pgc.372.1519883103475; Wed, 28 Feb 2018 21:45:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519883103; cv=none; d=google.com; s=arc-20160816; b=U7dFyiRgJGO6dDJn/EQ+kXP9xtPBC08UXTWsTrTpmuKoqr7kbRPIixV2O80sHyDiH6 BFLYP179jNxgW1ppEYv/UzeyamsKVWJeJVvCj/dIawcuUyEJcbNG2oazMe9RQnfooNpX wv/EcxwCE0zgISz753IRF/bMc3OILFwZELu3h/YuGWUVkZc/ZnscWMYdN3ngr5WwODvq LqGUU8AbyspUiH7zUBbbsBAZxZdq+mGR5HKXsL/d7ir4aKrMhNTtBb6qSPsA8Tg8z9h6 672B44Gvn40JubH3of30qGzlHnj7U4KQLqxOLlKF46sSWxdPA7rg2dvzPv6fK930gT6E gMEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=85rV4ARd6GVsAVM1Ds7x8kf0LloHC1F7pP7wbgBgeTQ=; b=INaggvB0+ZlZIoKVa50C2FLg5OXYR/T86WbaKSmPo4yBSs9cmfyjpaKIdZG47rh8KN zyuT6cLdGQM3eNlHDPVMREKHQ/s1N3F7baOaK0eFFojJwoScabTspUz2SLZgMzaQxRQf 70x5/0F/3kGwbuZuJut8T+H9JbKXtBpaigHRYwrXsSnhgJvH29Svk8J7QpRsrOWEebau Cuo5RINFCToRN6qwOx30XBjMEkDdfNsjV2pyn+PL6dsCf10SID69foSkAqLR3LVWgrgn mkE9sDKymY6lvklyv/7t5CBSE7e/colb6rZ54V5ByP+SPHNP9God/Mxxu96raXDlyrTE ExWg== 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 q9-v6si2485702plr.110.2018.02.28.21.44.49; Wed, 28 Feb 2018 21:45:03 -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 S966211AbeCAFnW (ORCPT + 99 others); Thu, 1 Mar 2018 00:43:22 -0500 Received: from mx2.suse.de ([195.135.220.15]:44330 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966101AbeCAFnR (ORCPT ); Thu, 1 Mar 2018 00:43:17 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 453F8ABA3; Thu, 1 Mar 2018 05:43:15 +0000 (UTC) Subject: Re: [Xen-devel] [RFC PATCH v4 1/7] xen/pvh: Split CONFIG_XEN_PVH into CONFIG_PVH and CONFIG_XEN_PVH To: Konrad Rzeszutek Wilk , Maran Wilson Cc: pbonzini@redhat.com, boris.ostrovsky@oracle.com, roger.pau@citrix.com, andrew.cooper3@citrix.com, hch@infradead.org, JBeulich@suse.com, x86@kernel.org, xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, thomas.lendacky@amd.com, dave.hansen@linux.intel.com, rkrcmar@redhat.com, gregkh@linuxfoundation.org, mchehab@kernel.org, hpa@zytor.com, linus.walleij@linaro.org, mingo@redhat.com, rdunlap@infradead.org, luto@kernel.org, jpoimboe@redhat.com, tglx@linutronix.de, bp@suse.de, davem@davemloft.net, kirill.shutemov@linux.intel.com References: <1519842483-8887-1-git-send-email-maran.wilson@oracle.com> <1519842483-8887-2-git-send-email-maran.wilson@oracle.com> <20180228210734.GJ11576@char.us.oracle.com> From: Juergen Gross Message-ID: <65c9ea8b-0954-52b5-090f-9212573656c9@suse.com> Date: Thu, 1 Mar 2018 06:43:10 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180228210734.GJ11576@char.us.oracle.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 28/02/18 22:07, Konrad Rzeszutek Wilk wrote: > On Wed, Feb 28, 2018 at 10:27:57AM -0800, Maran Wilson wrote: >> In order to pave the way for hypervisors other then Xen to use the PVH >> entry point for VMs, we need to factor the PVH entry code into Xen specific >> and hypervisor agnostic components. The first step in doing that, is to >> create a new config option for PVH entry that can be enabled >> independently from CONFIG_XEN. >> >> Signed-off-by: Maran Wilson >> --- >> arch/x86/Kconfig | 8 ++++++++ >> arch/x86/kernel/head_64.S | 4 ++-- >> arch/x86/xen/Kconfig | 3 ++- >> 3 files changed, 12 insertions(+), 3 deletions(-) >> >> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig >> index eb7f43f23521..fa7cd0305125 100644 >> --- a/arch/x86/Kconfig >> +++ b/arch/x86/Kconfig >> @@ -791,6 +791,14 @@ config KVM_GUEST >> underlying device model, the host provides the guest with >> timing infrastructure such as time of day, and system time >> >> +config PVH >> + bool "Support for running PVH guests" >> + depends on KVM_GUEST || XEN >> + def_bool n >> + ---help--- >> + This option enables the PVH entry point for guest virtual machines >> + as specified in the x86/HVM direct boot ABI. >> + >> config KVM_DEBUG_FS >> bool "Enable debug information for KVM Guests in debugfs" >> depends on KVM_GUEST && DEBUG_FS >> diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S >> index 0f545b3cf926..fc9f678c6413 100644 >> --- a/arch/x86/kernel/head_64.S >> +++ b/arch/x86/kernel/head_64.S >> @@ -41,7 +41,7 @@ >> >> #define pud_index(x) (((x) >> PUD_SHIFT) & (PTRS_PER_PUD-1)) >> >> -#if defined(CONFIG_XEN_PV) || defined(CONFIG_XEN_PVH) >> +#if defined(CONFIG_XEN_PV) || defined(CONFIG_PVH) >> PGD_PAGE_OFFSET = pgd_index(__PAGE_OFFSET_BASE) >> PGD_START_KERNEL = pgd_index(__START_KERNEL_map) >> #endif >> @@ -387,7 +387,7 @@ NEXT_PAGE(early_dynamic_pgts) >> >> .data >> >> -#if defined(CONFIG_XEN_PV) || defined(CONFIG_XEN_PVH) >> +#if defined(CONFIG_XEN_PV) || defined(CONFIG_PVH) >> NEXT_PGD_PAGE(init_top_pgt) >> .quad level3_ident_pgt - __START_KERNEL_map + _KERNPG_TABLE_NOENC >> .org init_top_pgt + PGD_PAGE_OFFSET*8, 0 >> diff --git a/arch/x86/xen/Kconfig b/arch/x86/xen/Kconfig >> index f605825a04ab..021c8591c3c0 100644 >> --- a/arch/x86/xen/Kconfig >> +++ b/arch/x86/xen/Kconfig >> @@ -77,8 +77,9 @@ config XEN_DEBUG_FS >> Enabling this option may incur a significant performance overhead. >> >> config XEN_PVH >> - bool "Support for running as a PVH guest" >> + bool "Support for running as a Xen PVH guest" >> depends on XEN && XEN_PVHVM && ACPI >> # Pre-built page tables are not ready to handle 5-level paging. >> depends on !X86_5LEVEL > > Not specific to this patch, but why is this there? PVH is not using PV so > there should be no problems with 5 level paging. > > Juergen, thoughts? This dependency will be removed with Kyrill's series enabling to boot the same kernel with either 5- or 4-level paging. Adding 5-level paging support to the PVH boot path could be done later. OTOH the same could be achieved by using grub2 to boot in PVH mode (with my grub2 PVH series) as this variant is using the common Linux boot entry, not the PVH specific one. Juergen