Received: by 10.213.65.68 with SMTP id h4csp2955602imn; Mon, 9 Apr 2018 11:48:50 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/9zO+l52vA8At3qtYZAm8zoLbdtknqEXQz0iWFA9taUYJV8TW/0eU0Q/i301woLYpuvLTO X-Received: by 10.101.69.5 with SMTP id n5mr25432152pgq.363.1523299730261; Mon, 09 Apr 2018 11:48:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523299730; cv=none; d=google.com; s=arc-20160816; b=hZhGcxbfIskb+XWTeuadbmeXb/r3keFo0Vy0z+5HDtDtxQ8u362dlQTB4YSGTMaHpz f85Hu/idCNWuCHgUqElsLmMCPDDfWNhUHecXBD6FpLL+mpOJLIbCjKJbh2povo0uya2E Ofub6NNP80oIEeEHNuONNNWEU0OxSP0jBqVpSxCe8CEAoVwlyauIEkc1RLicPnSYB5x9 lcL6yxj/oiRBT4Mxoo2EZfzw0yPYJPwUBdLiW6CgJGgsPiRUBaDTiYRp9lnLtxyf2Zow bQNhPJ5Zp+lC8HpVBnnBhM/Js7VTRQLkP/Zv56D7sE9SACbcKld9qpVth8iNOYM3AgnQ t8Xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=hQmsUlM8byttAHQFhrqV8Ou9V8X13wKyW6pn591kmVE=; b=ncna9cAJd0S1YzV+64nr0q7tH7yhXS+Uhg/fYaTTC9xVoninZvNPYDvK/81s+or3u5 JW53BKm+5t+CKMEEW4ohC3bfuu4A1KkM2xegaEEB8jy3PzvrDXuaTeNUGTDkzOkEIgoV y6hGESZ4X08VB9tIqavNn8hw+wgY0BBOxGYoMcfM/OQv7Z9veSdvDr/3zcBHSBDGSmr7 vJYMLUYVZLXOVwhF1PcUW31xjgulxsb9VPc3JZcVfL2tOQu5lufJoy2/ban8+UXIGoJA vtvFDUR9vNSjSikkF2eihD0LtJHGwDYyyQx9ev2iagsbC26mPvrybLs5kUVRwGiot5lt e33A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=J6IHBpeC; 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 d9-v6si814045plj.551.2018.04.09.11.48.13; Mon, 09 Apr 2018 11:48:50 -0700 (PDT) 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=J6IHBpeC; 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 S1752988AbeDISpT (ORCPT + 99 others); Mon, 9 Apr 2018 14:45:19 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:38196 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751688AbeDISpS (ORCPT ); Mon, 9 Apr 2018 14:45:18 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w39IfuPQ186921; Mon, 9 Apr 2018 18:45:12 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id; s=corp-2017-10-26; bh=hQmsUlM8byttAHQFhrqV8Ou9V8X13wKyW6pn591kmVE=; b=J6IHBpeC/4Z5JsrhggLAL7x2AAjerauUzRrtxILvKQeHyT72xjginL3DYgD+AaQ00NPX zPCanXBpofqLnj1F9nRDpIEF3JTZjzreo6F0beYCKyrPz0EY5WMet0AS5XI3wff08dAv biFCJyEjlV56DcuYGH/F+kzzOEe97p7stOSJNWcmOiSos+pBmlY9/mUXfWcBwWZSISqK oi+vwA4hZPFUK5Yktil7w3m+N65ZptDTDBcM6OwC2KZuWnDvyRaQmd74hX1BlsMT8RLH wcqsYQcZ8KWthIubPhqIVNX2yi1qVhwVWJgwCKdfgIx2BpscbihYYXIV1Sq5JY+BCkeB RQ== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp2130.oracle.com with ESMTP id 2h6kgt6y8b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 09 Apr 2018 18:45:12 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w39IjCJf025498 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 9 Apr 2018 18:45:12 GMT Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w39IjBPG028281; Mon, 9 Apr 2018 18:45:11 GMT Received: from ovs104.us.oracle.com (/10.149.224.204) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 09 Apr 2018 11:45:10 -0700 From: Boris Ostrovsky To: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org Cc: jgross@suse.com, Boris Ostrovsky Subject: [PATCH] xen/pvh: Indicate XENFEAT_linux_rsdp_unrestricted to Xen Date: Mon, 9 Apr 2018 14:51:44 -0400 Message-Id: <1523299904-18199-1-git-send-email-boris.ostrovsky@oracle.com> X-Mailer: git-send-email 1.8.3.1 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8858 signatures=668698 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-1804090189 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Pre-4.17 kernels ignored start_info's rsdp_paddr pointer and instead relied on finding RSDP in standard location in BIOS RO memory. This has worked since that's where Xen used to place it. However, with recent Xen change (commit 4a5733771e6f ("libxl: put RSDP for PVH guest near 4GB")) it prefers to keep RSDP at a "non-standard" address. Even though as of commit b17d9d1df3c3 ("x86/xen: Add pvh specific rsdp address retrieval function") Linux is able to find RSDP, for back-compatibility reasons we need to indicate to Xen that we can handle this, an we do so by setting XENFEAT_linux_rsdp_unrestricted flag in ELF notes. (Also take this opportunity and sync features.h header file with Xen) Signed-off-by: Boris Ostrovsky --- XENFEAT_linux_rsdp_unrestricted inly makes sense for CONFIG_XEN_PVH but I set it uncoditionally to avoid what I think is unnecessary ifdefery. arch/x86/xen/xen-head.S | 4 +++- include/xen/interface/features.h | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/arch/x86/xen/xen-head.S b/arch/x86/xen/xen-head.S index 96f26e0..5077ead 100644 --- a/arch/x86/xen/xen-head.S +++ b/arch/x86/xen/xen-head.S @@ -89,7 +89,9 @@ END(hypercall_page) ELFNOTE(Xen, XEN_ELFNOTE_FEATURES, .ascii "!writable_page_tables|pae_pgdir_above_4gb") ELFNOTE(Xen, XEN_ELFNOTE_SUPPORTED_FEATURES, - .long (1 << XENFEAT_writable_page_tables) | (1 << XENFEAT_dom0)) + .long (1 << XENFEAT_writable_page_tables) | \ + (1 << XENFEAT_dom0) | \ + (1 << XENFEAT_linux_rsdp_unrestricted)) ELFNOTE(Xen, XEN_ELFNOTE_PAE_MODE, .asciz "yes") ELFNOTE(Xen, XEN_ELFNOTE_LOADER, .asciz "generic") ELFNOTE(Xen, XEN_ELFNOTE_L1_MFN_VALID, diff --git a/include/xen/interface/features.h b/include/xen/interface/features.h index 9b0eb57..6d1384a 100644 --- a/include/xen/interface/features.h +++ b/include/xen/interface/features.h @@ -42,6 +42,9 @@ /* x86: Does this Xen host support the MMU_PT_UPDATE_PRESERVE_AD hypercall? */ #define XENFEAT_mmu_pt_update_preserve_ad 5 +/* x86: Does this Xen host support the MMU_{CLEAR,COPY}_PAGE hypercall? */ +#define XENFEAT_highmem_assist 6 + /* * If set, GNTTABOP_map_grant_ref honors flags to be placed into guest kernel * available pte bits. @@ -60,6 +63,26 @@ /* operation as Dom0 is supported */ #define XENFEAT_dom0 11 +/* Xen also maps grant references at pfn = mfn. + * This feature flag is deprecated and should not be used. +#define XENFEAT_grant_map_identity 12 + */ + +/* Guest can use XENMEMF_vnode to specify virtual node for memory op. */ +#define XENFEAT_memory_op_vnode_supported 13 + +/* arm: Hypervisor supports ARM SMC calling convention. */ +#define XENFEAT_ARM_SMCCC_supported 14 + +/* + * x86/PVH: If set, ACPI RSDP can be placed at any address. Otherwise RSDP + * must be located in lower 1MB, as required by ACPI Specification for IA-PC + * systems. + * This feature flag is only consulted if XEN_ELFNOTE_GUEST_OS contains + * the "linux" string. + */ +#define XENFEAT_linux_rsdp_unrestricted 15 + #define XENFEAT_NR_SUBMAPS 1 #endif /* __XEN_PUBLIC_FEATURES_H__ */ -- 1.8.3.1