From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EFF16C433F5 for ; Fri, 15 Oct 2021 08:47:00 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 9EA50611C2 for ; Fri, 15 Oct 2021 08:47:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9EA50611C2 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.209948.366540 (Exim 4.92) (envelope-from ) id 1mbIra-0001GA-9P; Fri, 15 Oct 2021 08:46:50 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 209948.366540; Fri, 15 Oct 2021 08:46:50 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mbIra-0001G3-6B; Fri, 15 Oct 2021 08:46:50 +0000 Received: by outflank-mailman (input) for mailman id 209948; Fri, 15 Oct 2021 08:46:48 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mbIrY-0001Fx-CA for xen-devel@lists.xenproject.org; Fri, 15 Oct 2021 08:46:48 +0000 Received: from de-smtp-delivery-102.mimecast.com (unknown [194.104.111.102]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id b87425e8-3b8f-49b9-a4ef-268676f54f84; Fri, 15 Oct 2021 08:46:47 +0000 (UTC) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04lp2056.outbound.protection.outlook.com [104.47.14.56]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-22-f7BWRgjHO9ax80xbqc-NbA-1; Fri, 15 Oct 2021 10:46:45 +0200 Received: from VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) by VE1PR04MB6478.eurprd04.prod.outlook.com (2603:10a6:803:12a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.15; Fri, 15 Oct 2021 08:46:43 +0000 Received: from VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::4d37:ec64:4e90:b16b]) by VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::4d37:ec64:4e90:b16b%7]) with mapi id 15.20.4608.017; Fri, 15 Oct 2021 08:46:43 +0000 Received: from [10.156.60.236] (37.24.206.209) by AS9PR06CA0393.eurprd06.prod.outlook.com (2603:10a6:20b:461::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16 via Frontend Transport; Fri, 15 Oct 2021 08:46:42 +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: b87425e8-3b8f-49b9-a4ef-268676f54f84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1634287606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=S9ZuMCTs+lIj/8Hj1q2CDClfVA0P5EBBRDSOqG+rdYA=; b=HRb1uE5lYdMnmSZp1LJOGEe0ZgxEunzTnQgl8BIFJnzqYdxMvAHGI9UhSsZ7zOklTMc6iw qq5hxgRXfHHiFqUKjiYkUQrcDkfZBoJgNxAH7fUJMwyxff+KFTpYm+5DO8jFiM8x2+Oblc tXxOhGwHq9B+h/afuMWBkm/JSwhKpJ0= X-MC-Unique: f7BWRgjHO9ax80xbqc-NbA-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F5uTaTsAYj4L6OZDJaYRRc2If4cZ9W5AxmUetRjku1Z9eRafREkm/fM1F/WMe34dLtPKhKzTpXdahT6qHasP2Y2ceySBXsapEZN6dV3FcggbPdRg9NPGc/S/zlBDvjCjZEdKdRyO2r2pG29IfiT02CItx1QYl7EYu6gT4cY7OaZVGmY/JuD26DEvVgqz3mwpVSvfpiYq3EYKnmIhBEHOsZCuXeq+DHI09EnseAbt9waMGHxQ0I9yHolCzYtxX0yxLos8GF0E0l25hTvi4SzSRJhi9WGPscrFwveFapXNipls3fjV2fjdBSJkEggsl8CA4UFTmfjS4pE+H+t5kZVeXA== 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=PyvRoloTOWjWUXSGIpwSFTfMd1GNqAm6Q6HANk4lEc4=; b=fcaoEPRwbLC8Z4tZoDjxb4th2blAjZY29xt49QR6HYH/o42g/n+FEDidvh+LrLhRjKSUbfl6umKALhxavCub7EN1yKx3DLjhjK9pJvzw/ftxe2fSYikMRXRx1076WQScRikdi+Uuz0M8rFieyZwFvrYaTXglDwyBBOZaD4pcEFcWNyxqKh0J0Oi7rFgNVZOeT1ymrrjaf2Ac8ih8j6Pyf3y1E8Nm9PD+tRDt5dQRr6n5naOc+dxJ9lATTD4DeZYzwTqrAeiScgN7GN2Rwq3pJ6TqF2hRLpe/G+89npJod9/2hPGtPC2tikj61OW2syDcBmJOQmXgxLg56BwEqIpc4w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=suse.com; Subject: Re: [PATCH v2 1/6] xen: introduce XEN_DOMCTL_CDF_directmap To: Penny Zheng CC: Wei.Chen@arm.com, Bertrand.Marquis@arm.com, xen-devel@lists.xenproject.org, sstabellini@kernel.org, julien@xen.org References: <20211015030945.2082898-1-penny.zheng@arm.com> <20211015030945.2082898-2-penny.zheng@arm.com> From: Jan Beulich Message-ID: <073d4b36-cb2f-88b2-76d2-3438d4ef589a@suse.com> Date: Fri, 15 Oct 2021 10:46:41 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 In-Reply-To: <20211015030945.2082898-2-penny.zheng@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AS9PR06CA0393.eurprd06.prod.outlook.com (2603:10a6:20b:461::34) To VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 122ac8a4-3cd9-4d81-99e2-08d98fb85064 X-MS-TrafficTypeDiagnostic: VE1PR04MB6478: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1265; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NqA9BU8r1wNtoFuLBhyaXPwTgyk7ZPrwGr01hp+9uHqECEkvGHGo97T4TrI5ydM6SmNNeLPJ6quzPQpGp7OiLXTSFJtTsJEtHzAbiimHQSpEJ6KnGofWrTT4+U2birYQQTjBbxPQLv+3UQdLdzY8JuCfXEpzQYsEOzSpvfRGXUgk38bZTJ+IVPzqk/OuZrpoVN4yDNYx1MLuecS1qPPmwUYNvuFUKNKU3AsvbpGlGNHbhgsunSRj/LPOD6emWrfgCWvhA2xzrMD4JgmvVurm4xDK1fh/qWSaMT1n6fI7YB3uxBgdgo1qs5sNfHT5rzvXSZv54DUoH3H3nSbh8IbbqC/KV/SHM9fqxQTOM+W0nOAuukMj4jGVK2lWhVHPLLSEL6cwWes2VX9zzBcWrnXpUCFp2D+2EeuouOz1SN5E5HSgh89XUiIhAGlsDFJgIPdoZvUCbPs1hk4EhBgwCD+AwnisWxx1Abdls7HTplQ/87ounFb0eP662OVMGMY85RnSI/cEr39yli6jEPBnSVZvikJnP4CdIDMPckQr/RV2LfVwQFr8Fchitcx+b27wq27B/PKOtRtW7efhbcNnDDQS95AVEOeRa4Ta2U+CM64Bi3OeXwiDOmYYLRsYVQbt4zTend6K4sdkR4RtT3CaI5XH6kBvHMa7u7CX57rE6CrXwjefGBpP78AVq48zHZDKokl3RVpwmtDc8GLYQ1dAlF0k0NtTLHPKtwoXuETmabE08O+S02F7uCwLoW/BaumO0IiB X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5600.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(2616005)(66946007)(4326008)(38100700002)(66556008)(53546011)(6916009)(8676002)(66476007)(2906002)(36756003)(8936002)(316002)(86362001)(16576012)(508600001)(5660300002)(83380400001)(31696002)(956004)(186003)(31686004)(6486002)(26005)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?UaLRT/2EUAsX21M9pRI79BYVEJ6i/5AvGUJB+E6ne7v7wRE/gmWsB+EvfBIl?= =?us-ascii?Q?aWR3hsygmwX4A+U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us-ascii?Q?aC6LPrDd6P5eMagNmuuNXX2bgO2ZePgzUpCj3NGlHGvdg+qdfnnf/1DOq63w?= =?us-ascii?Q?uwNaI8YrxXCJjoi6LJk8FiftnMlS06M+VQT7zzPWgYGoOxaUYCFLx1HHpfKv?= =?us-ascii?Q?d9tShB78BkFd0tqzQuc4NNT7YxIoMUIRKgChEX3QOSMxQlaULGkKt48EIzCK?= =?us-ascii?Q?Atoxz1w6IRLhLnbfH9iri9bqgh+zqe7j2SI5O+//SU5B2TN3XooTvUFVebSk?= =?us-ascii?Q?shg6KoxK105HubacG44rUnmzthv8Fso5khNFXChMEqJzYoJvUMrbsh098J+h?= =?us-ascii?Q?1UG2ErpyZ/GGyz5FZLUSqTlZ93ei6K/eoFqv5VTn+FKAp0Dg64G65hzRu6/f?= =?us-ascii?Q?fmMwRApVjPKwgWhz4LyZn7oX?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 122ac8a4-3cd9-4d81-99e2-08d98fb85064 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5600.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2021 08:46:43.6729 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: RQcorq6afrCIqg6/AJL+4XYy9QNS4PUwh7JzNe70b8h2pUfelMNPqqCUrqRdOBhVSjhFkabzu/Z+c6EryxL6fw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6478 On 15.10.2021 05:09, Penny Zheng wrote: > From: Stefano Stabellini >=20 > This commit introduces a new arm-specific flag XEN_DOMCTL_CDF_directmap t= o > specify that this domain should have its memory directly mapped > (guest physical address =3D=3D physical address) at domain creation. >=20 > Refine is_domain_direct_mapped to check whether the flag > XEN_DOMCTL_CDF_directmap is set. >=20 > Signed-off-by: Stefano Stabellini > Signed-off-by: Penny Zheng > --- > CC: andrew.cooper3@citrix.com > CC: jbeulich@suse.com > CC: George Dunlap > CC: Ian Jackson > CC: Wei Liu > CC: "Roger Pau Monn=C3=A9" > --- Please have here a brief log of changes in the new version, to aid reviewers. > xen/arch/arm/domain.c | 3 ++- > xen/arch/arm/domain_build.c | 4 +++- > xen/common/domain.c | 3 ++- > xen/include/asm-arm/domain.h | 4 ++-- > xen/include/public/domctl.h | 4 +++- > 5 files changed, 12 insertions(+), 6 deletions(-) You clearly had to re-base over the XEN_DOMCTL_CDF_vpmu addition. I think just like that change (which I'd expect you to have looked at while doing the re-base) you also need to at least fiddle with OCaml's domain_create_flag, to keep the ABI check there happy. > --- a/xen/include/public/domctl.h > +++ b/xen/include/public/domctl.h > @@ -72,9 +72,11 @@ struct xen_domctl_createdomain { > #define XEN_DOMCTL_CDF_nested_virt (1U << _XEN_DOMCTL_CDF_nested_virt= ) > /* Should we expose the vPMU to the guest? */ > #define XEN_DOMCTL_CDF_vpmu (1U << 7) > +/* If this domain has its memory directly mapped? (ARM only) */ > +#define XEN_DOMCTL_CDF_directmap (1U << 8) The comment doesn't read well; how about "Should domain memory be directly mapped?" That's if a comment here is really needed in the first place. I also don't think "Arm only" should be here - this may go stale. What I'm missing in this regard is rejecting of the flag in x86'es arch_sanitise_domain_config() (or by whichever other means). Jan