From patchwork Fri Oct 6 13:00:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 13411448 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0B115E81DF4 for ; Fri, 6 Oct 2023 13:02:18 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.613596.954235 (Exim 4.92) (envelope-from ) id 1qokT0-00086t-Qe; Fri, 06 Oct 2023 13:02:06 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 613596.954235; Fri, 06 Oct 2023 13:02:06 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qokT0-00086m-O1; Fri, 06 Oct 2023 13:02:06 +0000 Received: by outflank-mailman (input) for mailman id 613596; Fri, 06 Oct 2023 13:02:04 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qokSy-00085i-Ja for xen-devel@lists.xenproject.org; Fri, 06 Oct 2023 13:02:04 +0000 Received: from esa6.hc3370-68.iphmx.com (esa6.hc3370-68.iphmx.com [216.71.155.175]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 89f0fef1-6448-11ee-98d3-6d05b1d4d9a1; Fri, 06 Oct 2023 15:02:02 +0200 (CEST) Received: from mail-bn8nam11lp2168.outbound.protection.outlook.com (HELO NAM11-BN8-obe.outbound.protection.outlook.com) ([104.47.58.168]) by ob1.hc3370-68.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 06 Oct 2023 09:01:59 -0400 Received: from SJ0PR03MB6423.namprd03.prod.outlook.com (2603:10b6:a03:38d::21) by BL1PR03MB6024.namprd03.prod.outlook.com (2603:10b6:208:316::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.39; Fri, 6 Oct 2023 13:01:57 +0000 Received: from SJ0PR03MB6423.namprd03.prod.outlook.com ([fe80::66ca:3a42:baeb:9ecf]) by SJ0PR03MB6423.namprd03.prod.outlook.com ([fe80::66ca:3a42:baeb:9ecf%6]) with mapi id 15.20.6838.030; Fri, 6 Oct 2023 13:01:57 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 89f0fef1-6448-11ee-98d3-6d05b1d4d9a1 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1696597322; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=q9WWfWAkLiKL9bTKZOYna340S9McrAJSBpCBi1mBNvA=; b=EGHNN/PNQZP1EIkTBEySCDlo03g5Fh9FhLhKYk9HF13KF8SRgXjRDvnS jf/oqkYRouxP1erelI4LjVCz89aY9drPCUT2ZJpZoREcLJq4sKO9B6vSY aQZiPLaquJDHH7OOoiiYMb7XoovwQKfN4JkVQsxmTIhoMvNWQ4hRlFGlA E=; X-CSE-ConnectionGUID: zdvHY1jERRuCuGZJFk+JRQ== X-CSE-MsgGUID: GGINF2EgRgmDxN9CXK/EQA== X-IronPort-RemoteIP: 104.47.58.168 X-IronPort-MID: 124080232 X-IronPort-Reputation: None X-IronPort-Listener: OutboundMail X-IronPort-SenderGroup: RELAY_O365 X-IronPort-MailFlowPolicy: $RELAY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fw9/ rCoB17726QtN91YhsdcL+7V5VoLUmzyXcX2/hyAV7BZmnbUQKTRekP0WKL+Vbd8kbFh41gPM lbEpSXCLfLfCJHZcSR2njELz73quP3jJxBho3lvghQpRkBUdAF0+/gYDzranGfQmN9dP0EPa vZ3OVrjRy6d08aa8yqb0N1JNQq97Xw5fTbiQdtPW9f1DWz X-Talos-CUID: 9a23:lmLoHmPxBUPtRO5DSiV51H9NGO0fSGD20VjiAWG7SkRTcejA X-Talos-MUID: 9a23:fmOl4wxNm1Z5tL0Ew+rlyVIYLOyaqIuBKWYjy7gJgcaBGTxWahytr3Oae6Zyfw== X-IronPort-AV: E=Sophos;i="6.03,204,1694750400"; d="scan'208";a="124080232" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HatLaQaf9607+FPTCsxftOShzFdcrc1ouuD0TJEZ2iTwAAZKbKI56q2yu3UQG8YFzI+h1sfMfMphVdr3Px8rTAdPBE2r7EoSqShJAolHQabSHz8B+ftuTWIyAAXF0iuBJeqfLhYeOywXb1KYeGlG2jrw+fog8EOtfjCeoeM07hrWNHc7Yccxf8WMCzvIv7N7ukFnI0KaXd1I7HyIiJ5AFP+oC22dKRJ3CDKoMDQsjk9jUpND4RLNWmhLr0d2yY+VdiXGAcWpFmCmSrUYoVt9Hz3EROYa4QotlJWmI+8TgUxTF76FRuZyN15LhYdGC78POg3DLtF1mUmTiLRFRvCHfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vbrwg8wsku3XWRoPqMOqqdVQ5jyqnzvdDHhWtg8wd3g=; b=Nroz2+rygCqf8ioxstX+9Yof6InIkVKEHZ3uO43VZvS7sE5p/5Y+T7j6KNvOnTXIz19ILa5QGiFe0Kq8t8R0c0/3Hj6vrf2aBe/E8JxgJSTKanDy0oHM7lZAbYdMgQSQAX5K/m8nojCM/hhrGvxsMTZHvBMDKvb+Rtfbbs/sslhFXbfFW0amw7aKQYllAMo1rZj3aLqYeoSjkaHyL9SIbpH+Al4CEvpjg8kdUdws2DKs9O2grwOPr2ZMFRr5+q6T+c4W45aZ3gFylmH5Tgvu5S+gSNpC9JH7/+51qUhtCYySZBFe9K8NGLqHYlhi+ZQFrVBD6B3c3+sT8thN/rbQCw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.onmicrosoft.com; s=selector2-citrix-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vbrwg8wsku3XWRoPqMOqqdVQ5jyqnzvdDHhWtg8wd3g=; b=B9XqkiQFnYj3edAP18lcuYImDjLE1w+fpsqMNXGAzY2va9HZowCvumj6bFN56jiXMBzkPN73Rh7K0rpXkV/fnwmIYv/5dHqPQsaLxKaygGs8YdjT9J02yP/aHnvUUV4B8AaYStY01G9WrrTIseP7f9lx7NWQdSf2eIhvIBCZujI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com; From: Roger Pau Monne To: xen-devel@lists.xenproject.org Cc: Henry Wang , Roger Pau Monne , Community Manager , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [PATCH v2 2/2] domain: expose newly introduced hypercalls as XENFEAT Date: Fri, 6 Oct 2023 15:00:59 +0200 Message-ID: <20231006130059.97700-3-roger.pau@citrix.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231006130059.97700-1-roger.pau@citrix.com> References: <20231006130059.97700-1-roger.pau@citrix.com> X-ClientProxiedBy: LO2P265CA0328.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a4::28) To SJ0PR03MB6423.namprd03.prod.outlook.com (2603:10b6:a03:38d::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR03MB6423:EE_|BL1PR03MB6024:EE_ X-MS-Office365-Filtering-Correlation-Id: 2146d73b-e0ed-42cd-12af-08dbc66c6bf9 X-LD-Processed: 335836de-42ef-43a2-b145-348c2ee9ca5b,ExtAddr,ExtFwd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EnCAHMxvhf00WK+y/jtXeMnQMsXXkaAD4mKaVoGRakloD9uZmoCPcM9vu2218yULl7QgHjJrv9dBPt4dkgmeeDFGnM+jikxAegnvEz21WxOpu49FNdBV+IihOAK2n6fLLVq7+0IxgRnD6dDcMB9KgvW/h7MpzmzJxaIS1V/VDitMl7rB/U6h+sif0CgqXG7WK1Z2cU7vOtqtUw7Gr7Y859wpZsFtJjQhcVi+rJ3jsKUFMVPhb54k6Dub2QZ14Y2a7kSSlXxN47f1JWqM/OREexLlQBIIvymcK45wa0vv5iFQZn9KuJMTV2EU+zMWUaYdnyHCZMxdTDzxW6n2uRdV7XGzNRelLvB1EpyzSF9++6h5ONl6AcUEfCjyP/L34tsx4ZDiXF8+kRctVDzqmPPRNv5SooVP1O9mBACjl1l8vZe2ioCYLMjpexv4cmIOW0gpb2OBAgHFWNcl/8YynrV6TcIyWv4uhWJ8OTOHM04LlUV+Y6Jsg2g+gKVRZimjYijQqrNpy5sRSos7IXRm6JXoMBa5omcjYuzByA+9UWJLHIw= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ0PR03MB6423.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(396003)(366004)(376002)(136003)(39860400002)(230922051799003)(451199024)(1800799009)(186009)(64100799003)(83380400001)(6512007)(6506007)(478600001)(6486002)(86362001)(82960400001)(38100700002)(7416002)(2906002)(1076003)(26005)(2616005)(36756003)(316002)(66556008)(66476007)(54906003)(66946007)(5660300002)(6916009)(41300700001)(4326008)(8936002)(8676002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?KVmTwThahe1esXesjRg8PJsIUjox?= =?utf-8?q?B1rarrvvKl2gL6yRDpt+mWWaG1U0OXl4uNuEt38WCFcbbW4AgKPBEyqZUXvVbgUMS?= =?utf-8?q?dzys/GKm9kEXemJhw9+DW26hQSzim/orHL4JhOm9V3LpdiuiXTVbzknCmZUPuCco2?= =?utf-8?q?bTaTC1tdpMc/RFfQepdZtm85vy4iqW8UFkizfni+A/docdaJqyE1ao+HxLQBvGWls?= =?utf-8?q?PR849Q0Sj3vGKtwhzi7GRFw2gHf3qO8dUmyq7WwSXWzhpfWrq3+jI5AWf1oFpXuyw?= =?utf-8?q?q22Br9xvMlFJAfjZoZr2e9nQ76ZZop6DXe9awda4g+QL9bKPzG/WvxG8HC3gaS95N?= =?utf-8?q?C3eOMLIVnqxA2VJQxoEqrNwWP74OGKnigV/ew1NS1MLxAxChvVhJAGaTNwE1R6+ai?= =?utf-8?q?o/XsN9O1S+yEgaXdWWx2eG2TjCDnD24cMMzNpxvGawSBcdygzAZ+B/0Vacn40AhtM?= =?utf-8?q?MObmXUzfVOIKMgQJZ+ycnwfN1Gl0ltMeYdp/9NMLjLBEagysiU2zadD+cUhL1sTTZ?= =?utf-8?q?4jllJI3IArO1d462qFdh19ROnxu04n90Z9rLVTiPERxVwEh8szvWf6EMiZL2X9j3y?= =?utf-8?q?WYd36OuVusrPr59tKmAmVmk/UV8cMcBmQopzQF27mE47viaU0ZFl/IzChjFx9GZrB?= =?utf-8?q?DR9mWJlHF/mXSjwPGl+oVTnJGLmrx8xdeP3q2iirUKZ2LItF/44mNK/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X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: lWVx//C5v7sauqCuaLbPewzuOzw+wZsIsWPxKaCN7PjwE3uWwTFsOcluh/mqx7Dvn+/PUYifsXAiU9yf4G0BYccifQ36DCP1/X0n6UtOiNp7rInlc2dN90suEe7A6QXyalg0Qs/XIjtr0L7pJ1Hr8D5VKUsR+375YlYVhgQkqcjzLnOx4zfw1WF8r6V5P9bwvU4CRgkX2suvuB3myHzRNgKtmA5UfIj7sXaQ9nadnkO/B9QTDtjr8LE14KYUfCL2Qp9h6fx0mcV7snoIL+E4lAT9EfVtw7lwU+h0GqThItBn3crVs6+2laJAH3HkqPLbG+rFoGC+AO2WBg4gXCOwXHv/zmJypwTilpYwKI0/kkEB8VzBW/u/rDuetAT61FML5VCNXSV3tldiWK81ZvKpQ5CD+S32vuHji92+Aw4zGUByTxkkFDM5E5LhlzNyNzgc23W9BrZ0mWiXEaEhNNThqwTFABHX093wCT5bg61D/XLv0o61zLAeqot6jP/Jrmyjxw51JDTZMNQHY/5Dp81jSZNXTRvkNPyDtxcjMQceluPqow+47BQU25g/ZptAVie83oJSkqfUWL9mH20fhBjI4iuk/ZQwovErxzf0jXQs2XzxeSQSUZ/s4TnOM6bZBA8WUXar4t+5h7oeZAO48yTGovcebSH4lhmG7WV0NrqYD4ZKwX+pj7v0ZMndOxQQ7FiCIVfQpgj3TAJi7L9J+wxJEF4LZI1tPsh6bnsVIFdtM3xPmBIqlpgreTFHtnLYFwvGvZHlPnEK/AqwUT0ak13hQfvpVRP53UbY+U3sxR5ODRd77fc5nrJjQCJPYA0V91+cLXXMB45+fAB9eV4ZIbOqE2d2pSRM2TfrtxzFvHA5jErKIleKMz5zRlMvxq7HaP1NBO+nByBx4gpQzTVqRaxMf0aFPWpl8PiTMqVKEaP0py4= X-OriginatorOrg: citrix.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2146d73b-e0ed-42cd-12af-08dbc66c6bf9 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR03MB6423.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Oct 2023 13:01:57.4642 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335836de-42ef-43a2-b145-348c2ee9ca5b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: j71tUMVBDrCLpoPzMPcI0apc201kAy1Zh5YBPSFKK1iDUEfM9gUUpfxGecJBjAUB6KrQqOLsWqc7rKrVjemd8Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR03MB6024 XENFEAT_runstate_phys_area is exposed to all architectures, while XENFEAT_vcpu_time_phys_area is currently only implemented for x86, and hence the feature flag is also only exposed on x86. Additionally add dummy guards with TODOs in the respective hypercall implementations, to signal the intention to control the availability of those hypercalls on a guest-by-guest basis from the toolstack. Signed-off-by: Roger Pau Monné --- Changes since v1: - Adjust comments, and add new one in vcpu.h - Add dummy guard with TDOD in hypercall implementations. --- CHANGELOG.md | 2 ++ xen/arch/x86/domain.c | 4 ++++ xen/common/domain.c | 4 ++++ xen/common/kernel.c | 6 +++++- xen/include/public/features.h | 9 +++++++++ xen/include/public/vcpu.h | 3 +++ 6 files changed, 27 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e33cf4e1b113..47ea9e275462 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Add Intel Hardware P-States (HWP) cpufreq driver. - On Arm, experimental support for dynamic addition/removal of Xen device tree nodes using a device tree overlay binary (.dtbo). + - Introduce two new hypercalls to map the vCPU runstate and time areas by + physical rather than linear/virtual addresses. ### Removed - On x86, the "pku" command line option has been removed. It has never diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index 8e0af2278104..8d3d52034a6d 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -1580,6 +1580,10 @@ long do_vcpu_op(int cmd, unsigned int vcpuid, XEN_GUEST_HANDLE_PARAM(void) arg) { struct vcpu_register_time_memory_area area; + rc = -ENOSYS; + if ( 0 /* TODO: Dom's XENFEAT_vcpu_time_phys_area setting */ ) + break; + rc = -EFAULT; if ( copy_from_guest(&area.addr.p, arg, 1) ) break; diff --git a/xen/common/domain.c b/xen/common/domain.c index 1468638ade8b..8f9ab01c0cb7 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -1998,6 +1998,10 @@ long common_vcpu_op(int cmd, struct vcpu *v, XEN_GUEST_HANDLE_PARAM(void) arg) { struct vcpu_register_runstate_memory_area area; + rc = -ENOSYS; + if ( 0 /* TODO: Dom's XENFEAT_runstate_phys_area setting */ ) + break; + rc = -EFAULT; if ( copy_from_guest(&area.addr.p, arg, 1) ) break; diff --git a/xen/common/kernel.c b/xen/common/kernel.c index 52aa28762782..b6302e44b34e 100644 --- a/xen/common/kernel.c +++ b/xen/common/kernel.c @@ -607,7 +607,11 @@ long do_xen_version(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg) switch ( fi.submap_idx ) { case 0: - fi.submap = (1U << XENFEAT_memory_op_vnode_supported); + fi.submap = (1U << XENFEAT_memory_op_vnode_supported) | +#ifdef CONFIG_X86 + (1U << XENFEAT_vcpu_time_phys_area) | +#endif + (1U << XENFEAT_runstate_phys_area); if ( VM_ASSIST(d, pae_extended_cr3) ) fi.submap |= (1U << XENFEAT_pae_pgdir_above_4gb); if ( paging_mode_translate(d) ) diff --git a/xen/include/public/features.h b/xen/include/public/features.h index d2a9175aae67..22713a51b520 100644 --- a/xen/include/public/features.h +++ b/xen/include/public/features.h @@ -111,6 +111,15 @@ #define XENFEAT_not_direct_mapped 16 #define XENFEAT_direct_mapped 17 +/* + * Signal whether the domain is permitted to use the following hypercalls: + * + * VCPUOP_register_runstate_phys_area + * VCPUOP_register_vcpu_time_phys_area + */ +#define XENFEAT_runstate_phys_area 18 +#define XENFEAT_vcpu_time_phys_area 19 + #define XENFEAT_NR_SUBMAPS 1 #endif /* __XEN_PUBLIC_FEATURES_H__ */ diff --git a/xen/include/public/vcpu.h b/xen/include/public/vcpu.h index 8fb0bd1b6c03..03b031a3e557 100644 --- a/xen/include/public/vcpu.h +++ b/xen/include/public/vcpu.h @@ -236,6 +236,9 @@ DEFINE_XEN_GUEST_HANDLE(vcpu_register_time_memory_area_t); * Note that the area registered via VCPUOP_register_runstate_memory_area will * be updated in the same manner as the one registered via virtual address PLUS * VMASST_TYPE_runstate_update_flag engaged by the domain. + * + * XENFEAT_{runstate,vcpu_time}_phys_area feature bits signal if the domain is + * permitted the usage of the hypercalls. */ #define VCPUOP_register_runstate_phys_area 14 #define VCPUOP_register_vcpu_time_phys_area 15