Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755920AbdLORZl (ORCPT ); Fri, 15 Dec 2017 12:25:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:14418 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755506AbdLORZk (ORCPT ); Fri, 15 Dec 2017 12:25:40 -0500 Subject: Re: [RFC PATCH v3 2/2] KVM: x86: Allow Qemu/KVM to use PVH entry point To: Juergen Gross , Maran Wilson , 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 Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, rkrcmar@redhat.com References: <1513122151-5371-1-git-send-email-maran.wilson@oracle.com> <1513122151-5371-3-git-send-email-maran.wilson@oracle.com> From: Paolo Bonzini Message-ID: <72846976-b3c3-ceca-8168-d50bcad5993e@redhat.com> Date: Fri, 15 Dec 2017 18:25:34 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 15 Dec 2017 17:25:40 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 799 Lines: 25 On 15/12/2017 16:55, Juergen Gross wrote: > I'm fine with the general idea. > > I'm wondering whether you really want to require CONFIG_XEN for the > KVM case, though. > > Wouldn't it be better to rename arch/x86/xen/enlighten_pvh.c to > arch/x86/pvh.c and arch/x86/xen/xen-pvh.S to arch/x86/pvh-head.S, Yes, sounds good. > put both under CONFIG_PVH umbrella and select this from CONFIG_XEN_PVH > and KVM_PVH (or what you like to call it)? CONFIG_KVM_GUEST will be good enough. > In the two moved source files you can make Xen/KVM-specific parts > optional via their CONFIG_ options. > > And you might want to add an own ELF note for the KVM case? As long as it's compatible with Xen, it's not needed. Only the startup code changes between a KVM "PVH" kernel and a KVM "HVM" kernel. Paolo