From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AG47ELvZkayJKntsoYrOB9ySDwXIuvPK57nH8WuvXjmTLx0Hy48Ny5CUzV1V773p5t16EBTcf24j ARC-Seal: i=1; a=rsa-sha256; t=1519920284; cv=none; d=google.com; s=arc-20160816; b=zfgSPoEoBnSjKrpyaChkKsPBRB4ZAnYOwQpbJED/kZvSDmK0dAE28AMsvUqswSRcjK PPEAA4HvrOG3otUo7hc/eTziKlC0cjbz570jUD2rHcqpd6vdUlod3spq8HQ98RO5txZl Z9Tn04YLDNE/BreJGlc00rMlpGi51gp1kCeLZSNjk7JKPE5IL/D/xcPKphvajPk0CGiJ YixKansrsVCWbgGZAv3L+uHwDN7GmYref/B6gHdVaQZC8jj7RHxTIuCagj4xs+06rGgF kkBWEcC8mBtjG3Nk18v8IzcUPL09IP24vvZFyvdaV65ZbIUFzmfkV9mSQ0SWee0dQ3Eo +3HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-language:content-transfer-encoding:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject :dkim-signature:arc-authentication-results; bh=JNB4nXngZDIovGn/Utr8fGSpQOuO6ht3KZdsxVhOzz0=; b=Wk6NP0om6Tkjuk418jVLj0Mbs4Q+NkZy+cezhc6fsfKP8pCb8g0NGw23l88DW26kpx VrEgo6u/9rv8rIVrBuAnQ7Jptg4Q7YwG5vE04TvrcHdXmr2XyMWCFFaP/7rAYiKBqX1x W5orBdk5IjaOWi6q+9TRkz3CVjx3iuqC52k+bdRMeyCkM6HGAQptDkvJ4+KgSE27fogy VRwPHMElSmDq8lyW+7olpbr6ai9Cw/Nq9g0jsEmMaDKIbZF8m8lhQ3GdGziKUZKqVmcZ c7848PFRKFlyIbC1wdmOw8Oe7Vqnq4Vg7yLXnH5ThH18pm1OmuXZxDO6Cd3hsOlJcf5u 1p1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=E0IzK1uG; spf=pass (google.com: domain of boris.ostrovsky@oracle.com designates 156.151.31.85 as permitted sender) smtp.mailfrom=boris.ostrovsky@oracle.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=E0IzK1uG; spf=pass (google.com: domain of boris.ostrovsky@oracle.com designates 156.151.31.85 as permitted sender) smtp.mailfrom=boris.ostrovsky@oracle.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Subject: Re: [RFC PATCH v4 4/7] xen/pvh: Move Xen specific PVH VM initialization out of common code To: Maran Wilson , pbonzini@redhat.com, jgross@suse.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, jpoimboe@redhat.com, bp@suse.de, kirill.shutemov@linux.intel.com, thomas.lendacky@amd.com, luto@kernel.org, dave.hansen@linux.intel.com, davem@davemloft.net, gregkh@linuxfoundation.org, mchehab@kernel.org, linus.walleij@linaro.org, rdunlap@infradead.org References: <1519842483-8887-1-git-send-email-maran.wilson@oracle.com> <1519842483-8887-5-git-send-email-maran.wilson@oracle.com> From: Boris Ostrovsky Message-ID: Date: Thu, 1 Mar 2018 11:05:25 -0500 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: <1519842483-8887-5-git-send-email-maran.wilson@oracle.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8819 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803010200 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1593670492940069413?= X-GMAIL-MSGID: =?utf-8?q?1593751931904735007?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: On 02/28/2018 01:28 PM, Maran Wilson wrote: > We need to refactor PVH entry code so that support for other hypervisors > like Qemu/KVM can be added more easily. > > This patch moves the small block of code used for initializing Xen PVH > virtual machines into the Xen specific file. This initialization is not > going to be needed for Qemu/KVM guests. Moving it out of the common file > is going to allow us to compile kernels in the future without CONFIG_XEN > that are still capable of being booted as a Qemu/KVM guest via the PVH > entry point. > > Signed-off-by: Maran Wilson > --- > arch/x86/pvh.c | 28 ++++++++++++++++++++-------- > arch/x86/xen/enlighten_pvh.c | 18 +++++++++++++++++- > 2 files changed, 37 insertions(+), 9 deletions(-) > > diff --git a/arch/x86/pvh.c b/arch/x86/pvh.c > index b56cb5e7d6ac..2d7a7f4958cb 100644 > --- a/arch/x86/pvh.c > +++ b/arch/x86/pvh.c > @@ -72,26 +72,38 @@ static void __init init_pvh_bootparams(void) > pvh_bootparams.hdr.type_of_loader = (9 << 4) | 0; /* Xen loader */ > } > > +/* > + * If we are trying to boot a Xen PVH guest, it is expected that the kernel > + * will have been configured to provide the required override for this routine. > + */ > +void __init __weak xen_pvh_init(void) > +{ > + xen_raw_printk("Error: Missing xen PVH initialization\n"); I think this should be printk (or, more precisely, this should not be xen_raw_printk()): we are here because we are *not* a Xen guest and so Xen-specific printk will not work. (and the same is true for the next patch where weak mem_map_via_hcall() is added). -boris > + BUG(); > +} >