From patchwork Sun Jul 7 09:15:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhenzhong Duan X-Patchwork-Id: 11034753 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4203513B1 for ; Mon, 8 Jul 2019 09:13:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 329DE27FAC for ; Mon, 8 Jul 2019 09:13:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2702D284D2; Mon, 8 Jul 2019 09:13:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=2.0 tests=BAYES_00,DATE_IN_PAST_12_24, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2BC122837D for ; Mon, 8 Jul 2019 09:13:51 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hkPgb-0004TJ-Lu; Mon, 08 Jul 2019 09:11:49 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hkPga-0004T2-6s for xen-devel@lists.xenproject.org; Mon, 08 Jul 2019 09:11:48 +0000 X-Inumbo-ID: 670838c0-a160-11e9-a357-174144195c19 Received: from aserp2120.oracle.com (unknown [141.146.126.78]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 670838c0-a160-11e9-a357-174144195c19; Mon, 08 Jul 2019 09:11:43 +0000 (UTC) Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x6899N1m045622; Mon, 8 Jul 2019 09:11:31 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id; s=corp-2018-07-02; bh=HrLoCLWKaK68rHicJaIU6MsioVbmLOJdaDU92K7D8ok=; b=tCQMMzgabehfm7OTcpmRRmZH/CeFRo9huZe6zZBm3ddL+DXYhBX0Q7XEAI8ETyetM8wD B7A6dMd/hrPQf6XgJpR8+GxoNoVZKCi1y41ENxqkoKM/nFNBrTEvH5wE5nZMeo5uLDhW iVyII8WAHKxzcBETvG85BMPTIx+LEPchtvoIHVY/kxGgvCUSHz1hkLXFBBfJjM20+i22 MuKlGIQ8byC7Vd4u37Io5eq91055SPgtpicAwD2qVQQBb3+VbCU4P4i2vjmV7G1tvRq1 vRz8UNCz1KVxgrgh+J6BkjJeSQUWg08qwkrga4St6EpOc867feT4FpGkUF4zTMXpoFq0 9A== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by aserp2120.oracle.com with ESMTP id 2tjkkpd879-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 08 Jul 2019 09:11:30 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x6897uOB111007; Mon, 8 Jul 2019 09:11:30 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserp3020.oracle.com with ESMTP id 2tjkf23d87-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 08 Jul 2019 09:11:30 +0000 Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x689BTkI005039; Mon, 8 Jul 2019 09:11:29 GMT Received: from z2.cn.oracle.com (/10.182.69.87) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 08 Jul 2019 02:11:29 -0700 From: Zhenzhong Duan To: linux-kernel@vger.kernel.org Date: Sun, 7 Jul 2019 17:15:04 +0800 Message-Id: <1562490908-17882-1-git-send-email-zhenzhong.duan@oracle.com> X-Mailer: git-send-email 1.8.3.1 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9311 signatures=668688 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 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-1810050000 definitions=main-1907080120 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9311 signatures=668688 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1907080121 Subject: [Xen-devel] [PATCH v6 0/4] misc fixes to PV extensions code X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: jgross@suse.com, sstabellini@kernel.org, Zhenzhong Duan , mingo@redhat.com, bp@alien8.de, xen-devel@lists.xenproject.org, boris.ostrovsky@oracle.com, tglx@linutronix.de MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Hi, In virtualization environment, PV extensions (drivers, interrupts, timers, etc) are enabled in the majority of use cases which is the best option. However, in some cases (kexec not fully working, benchmarking, etc) we want to disable PV extensions. We have xen_nopv for that purpose but only for XEN. For a consistent admin experience a common command line parameter set across all PV guest implementations is a better choice. To achieve this introduce a new 'nopv' parameter which is usable by most of PV guest implementation. Due to the limitation of some PV guests(XEN PV, XEN PVH and jailhouse), 'nopv' is ignored for XEN PV , jailhouse and XEN PVH if booting via Xen-PVH boot entry. If booting via normal boot entry(like grub2), PVH guest has to panic itself currently. While analyzing the PV guest code one bug were found and fixed. (Patches 1). It can be applied independent of the functional changes, but is kept in the series as the functional changes depend on them. For compatibility reason, "xen_nopv" is keeped and mapped to "nopv", this way also avoids an issue with xen_nopv when booting PVH guest. Build test passes with CONFIG_HYPERVISOR_GUEST enable and disabled. I didn't get env to test with jailhouse and Hyperv, the others work as expected. v6: PATCH3 add Reviewed-by PATCH4 remove unnecessory xen_hvm_nopv_guest_late_init() per Boris v5: PATCH2: update patch description per Boris add declaration of nopv variable in arch/x86/include/asm/hypervisor.h which will be used in PATCH3 and PATCH4 PATCH3 update xen_parse_nopv() per Boris PATCH4 add nopv=false per Boris Combine PATCH5 into PATCH3 v4: PATCH5 a new patch to add 'xen_nopv' back per Boris v3: Remove some unrelated patches from patchset as suggested by Tglx PATCH1 unchanged PATCH2 add Reviewed-by PATCH3 add Reviewed-by PATCH4 rewrite the patch as Jgross found an issue in old patch, description is also updated. v2: PATCH3 use 'ignore_nopv' for PVH/PV guest as suggested by Jgross. PATCH5 new added one, specifically for HVM guest Thanks Zhenzhong