LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Maran Wilson <maran.wilson@oracle.com>
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
Subject: Re: [Xen-devel] [RFC PATCH v4 1/7] xen/pvh: Split CONFIG_XEN_PVH into CONFIG_PVH and CONFIG_XEN_PVH
Date: Thu, 1 Mar 2018 06:43:10 +0100	[thread overview]
Message-ID: <65c9ea8b-0954-52b5-090f-9212573656c9@suse.com> (raw)
In-Reply-To: <20180228210734.GJ11576@char.us.oracle.com>

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 <maran.wilson@oracle.com>
>> ---
>>  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

  reply	other threads:[~2018-03-01  5:43 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-28 18:27 [RFC PATCH v4 0/7] KVM: x86: Allow Qemu/KVM to use PVH entry point Maran Wilson
2018-02-28 18:27 ` [RFC PATCH v4 1/7] xen/pvh: Split CONFIG_XEN_PVH into CONFIG_PVH and CONFIG_XEN_PVH Maran Wilson
2018-02-28 21:07   ` [Xen-devel] " Konrad Rzeszutek Wilk
2018-03-01  5:43     ` Juergen Gross [this message]
2018-03-01  7:19   ` Juergen Gross
2018-03-01 15:02   ` Boris Ostrovsky
2018-03-01 15:17     ` Paolo Bonzini
2018-03-01 17:24       ` Maran Wilson
2018-02-28 18:27 ` [RFC PATCH v4 2/7] xen/pvh: Move PVH entry code out of Xen specific tree Maran Wilson
2018-02-28 21:08   ` [Xen-devel] " Konrad Rzeszutek Wilk
2018-02-28 21:35     ` Paolo Bonzini
2018-03-01  6:11       ` Juergen Gross
2018-03-01  8:46         ` Paolo Bonzini
2018-03-01 16:15           ` Boris Ostrovsky
2018-03-01 17:22       ` Maran Wilson
2018-02-28 18:27 ` [RFC PATCH v4 3/7] xen/pvh: Create a new file for Xen specific PVH code Maran Wilson
2018-02-28 21:09   ` [Xen-devel] " Konrad Rzeszutek Wilk
2018-02-28 18:28 ` [RFC PATCH v4 4/7] xen/pvh: Move Xen specific PVH VM initialization out of common code Maran Wilson
2018-02-28 21:10   ` [Xen-devel] " Konrad Rzeszutek Wilk
2018-03-01  7:20   ` Juergen Gross
2018-03-01 16:05   ` Boris Ostrovsky
2018-03-01 17:43     ` Maran Wilson
2018-02-28 18:28 ` [RFC PATCH v4 5/7] xen/pvh: Move Xen code for getting mem map via hcall out of common file Maran Wilson
2018-03-01  7:21   ` Juergen Gross
2018-02-28 18:28 ` [RFC PATCH v4 6/7] xen/pvh: Add memory map pointer to hvm_start_info struct Maran Wilson
2018-03-01  7:29   ` Juergen Gross
2018-03-01  7:41     ` Jan Beulich
2018-03-01 17:19       ` Maran Wilson
2018-03-01 15:23   ` [Xen-devel] " Konrad Rzeszutek Wilk
2018-02-28 18:28 ` [RFC PATCH v4 7/7] KVM: x86: Allow Qemu/KVM to use PVH entry point Maran Wilson
2018-03-01  7:31   ` Juergen Gross
2018-02-28 21:39 ` [RFC PATCH v4 0/7] " Paolo Bonzini
2018-03-20 19:16 ` [PATCH v5 " Maran Wilson
2018-03-20 19:18   ` [PATCH v5 1/7] xen/pvh: Split CONFIG_XEN_PVH into CONFIG_PVH and CONFIG_XEN_PVH Maran Wilson
2018-03-20 19:23     ` Randy Dunlap
2018-03-20 20:55       ` Maran Wilson
2018-03-20 19:18   ` [PATCH v5 2/7] xen/pvh: Move PVH entry code out of Xen specific tree Maran Wilson
2018-03-20 19:19   ` [PATCH v5 3/7] xen/pvh: Create a new file for Xen specific PVH code Maran Wilson
2018-03-20 19:19   ` [PATCH v5 4/7] xen/pvh: Move Xen specific PVH VM initialization out of common file Maran Wilson
2018-03-20 19:19   ` [PATCH v5 5/7] xen/pvh: Move Xen code for getting mem map via hcall " Maran Wilson
2018-03-20 19:20   ` [PATCH v5 6/7] xen/pvh: Add memory map pointer to hvm_start_info struct Maran Wilson
2018-03-20 19:21   ` [PATCH v5 7/7] KVM: x86: Allow Qemu/KVM to use PVH entry point Maran Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=65c9ea8b-0954-52b5-090f-9212573656c9@suse.com \
    --to=jgross@suse.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=bp@suse.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=hch@infradead.org \
    --cc=hpa@zytor.com \
    --cc=jpoimboe@redhat.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=konrad.wilk@oracle.com \
    --cc=kvm@vger.kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=maran.wilson@oracle.com \
    --cc=mchehab@kernel.org \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=rdunlap@infradead.org \
    --cc=rkrcmar@redhat.com \
    --cc=roger.pau@citrix.com \
    --cc=tglx@linutronix.de \
    --cc=thomas.lendacky@amd.com \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    --subject='Re: [Xen-devel] [RFC PATCH v4 1/7] xen/pvh: Split CONFIG_XEN_PVH into CONFIG_PVH and CONFIG_XEN_PVH' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).