Received: by 10.223.185.116 with SMTP id b49csp7604726wrg; Thu, 1 Mar 2018 08:06:14 -0800 (PST) X-Google-Smtp-Source: AG47ELvCxZW4Fb/yEFfgd83Ox3ufPuZEGqNvQ800hsrKd/mgJDB+Z8Ud5XjaR8Fw37SejSAtdcus X-Received: by 10.101.88.76 with SMTP id s12mr1892873pgr.385.1519920374696; Thu, 01 Mar 2018 08:06:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519920374; cv=none; d=google.com; s=arc-20160816; b=P/gnJpavZ59hxK/LL771kB7m7mG3bVk8356lE9XoW34M5xjqaXHHLd1xaGKJX8WF7z dA8EfYrYlJX3mrQYmG44xyBEdoNoT3F1eq67GkNL3vq3dhW6rq13hkbNBOtHW17P5H3R H2Fj5Zr7mbfxmr+hw/CbDv4M65FaXnNZCyvFx+ORPbZ6CwfQhMyneGaUk3rGqmLUYIfp AynmcIAy/YN4V9tVkSAb7OHKQox3gXmE6ohNdGNXDMkSBXxFSPq2TiKdUgaeZoCUWYoK SrCxgz+PWjk+hOz4WeeZtJqrNfqoi3zC4V22BfYIVfyr1HedVuFjQMp49eme6hsbFhgn p5EA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender: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=jNqsPxcNieV1eZyt6c4k0FPljXBjy3J2zpSQFL5WNgwJkCb1kIu8ROBv09xROQaFLH Qq7ppCjRN5prqJVLoREP39uL5K++EaHzF5Vpsm3ejLN72fLKZvZwnfTtjQa9EipLfqfk rwAF6XkNHoi19JkqInvyg+SOUUKesREJ0SXme6XVypo1PkYInbhCvDxuS7TcAaelpOys 18ssi6VTrSLdvTUFGOtYt42uTcCMZFCDRnK7scYftAZxDY94Qs6wJWPUdOzhq4XqPS1m pNfrsrVsT8jyuNoYhcGF7c+weYw8hqbAE9uuCMhHY/FLawabfKt+ezKlIsAcfEJLg212 PmvQ== 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: 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y10si2599621pgv.456.2018.03.01.08.05.55; Thu, 01 Mar 2018 08:06:14 -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; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=E0IzK1uG; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1032812AbeCAQFA (ORCPT + 99 others); Thu, 1 Mar 2018 11:05:00 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:38832 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1032700AbeCAQE4 (ORCPT ); Thu, 1 Mar 2018 11:04:56 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w21Furri164959; Thu, 1 Mar 2018 16:04:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=JNB4nXngZDIovGn/Utr8fGSpQOuO6ht3KZdsxVhOzz0=; b=E0IzK1uG8Kvtv6uwe53nOhHcAiqXeakzu1VLmnOzagfv93m3sDGZYfIEzOtbh/9I3W6U kTiFDRsAkWi/NFnOGW2y668qUzwOYN8yOZA6G4/4DaKOkGKo4sMyMlv6+YHXzqC38KXi XHRroX4ramg21Gj6LExdLNRZ5DeLaeIDNKWI/lAiUTh/lciP3ZCYxLMc8/mNZIVKzy91 nE5dmavrwluW6ZP35ttLyTucRh09/KZkFlFCEbwi3nrrEs5tilGau3Zyt/DZZupqdttY Ffsm90FjTs06C0ySYE9ogJcWA0Xb79cFmqSQc855xVFq9IbcFmPJLtfrU5YnshktgfqC ZA== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2120.oracle.com with ESMTP id 2gekuggbyr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 01 Mar 2018 16:04:07 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w21G46hd023213 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 1 Mar 2018 16:04:06 GMT Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w21G41RD030026; Thu, 1 Mar 2018 16:04:02 GMT Received: from dhcp-burlington7-2nd-B-east-10-152-55-162.usdhcp.oraclecorp.com (/10.152.32.65) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 01 Mar 2018 08:04:01 -0800 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(); > +} >