Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1900224pxb; Thu, 28 Oct 2021 12:12:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxtrqmeTpmt2QYv9hLhy/e1U0kQFVR7JAjGXjNWkfMaCNIgrJuP01NVkCZGngLrymDlSbjL X-Received: by 2002:a17:90a:12cd:: with SMTP id b13mr14745308pjg.65.1635448327340; Thu, 28 Oct 2021 12:12:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1635448327; cv=pass; d=google.com; s=arc-20160816; b=acYFU1feuefWsLAdxY0jrm8u1vCGf+S8ocC6o4ieHEc8ulB1xigrSm2vYT2txRWVVG xzo3eNVEmgM/kiMXMCgownnROgb+9uITW/bLB0lzaR3l+3sYSIWfZ38m67jc495YaRmi lDutcBxS6j5IQ8YdRiq97xbMl8sNRX93I0jb5tQAlt0c75t62Uakiaa+Vn6VXrPjz/pv 5lDD3+0Q4/4Xdfz6Qj4jihRM/DmFMnr2FGYUt6E99m+od3J9lXaz8dgVBS4tCeo4PVQh B6VeH55LdpwC1QPLBtahdM9vW+gDa8T99CRs7pkdJsHMDdbCE9F575DAFEMwGSz0hRDp KZzg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature:dkim-signature; bh=MF0710uZFyMs26KIjmJUd9EACMS7DQrZSFE1vH8ah9Y=; b=jFnU/IlR1AWDbYSdAY9v5GD3xTPc+KrdnLX7Pp9NhTHpttkbUmQNVD/cG+jROGTGcw AP7LSVY605jYzrwV3IVu0+9dxmvaJ6GX/VYzP21zrsEhh1XhWQG8i2U+WE7m29JRZT9V tPHsL93MHxpmTZ4aoAzWazY+1AJPErdOMniBdVjwFBe1/DXc48fZzb50sW1i7fkuM6XS q2ZDQ5BxkIiLLOXbcHVG0WcSTpUaEvdwafhz3E6t7qo/ItDPKis36IAEa7lJ33QiwMAI +b7RxJ0TmMdIK8GBBL+DeZTapkxnNOjuGz6zzOssQBCdnZWj3PDxnrzmEg8BGaYyJrBt FlsA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=ve9DyOXf; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=LWnRZHtm; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id q14si2441742plk.449.2021.10.28.12.11.31; Thu, 28 Oct 2021 12:12:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=ve9DyOXf; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=LWnRZHtm; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S231203AbhJ1TLi (ORCPT + 99 others); Thu, 28 Oct 2021 15:11:38 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:51384 "EHLO mx0b-00069f02.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230293AbhJ1TLh (ORCPT ); Thu, 28 Oct 2021 15:11:37 -0400 Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19SIjZp1021616; Thu, 28 Oct 2021 19:09:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=MF0710uZFyMs26KIjmJUd9EACMS7DQrZSFE1vH8ah9Y=; b=ve9DyOXfj7iinpnWGgA6SDZrMSICmDdStG3tcgXEEDmU0bfWbFnYZUBIdPwqd+YltJrB wC5xVBqL0jf+rkWmoJBNFgqb6phpeYQqI8Zl01rO8Bxanna3zk5KqwJu3TF1KrXd2Tm+ /JVsp7jGeNBKUMm9o/dJLcb+ugJUcaGE72k38FTBIa8EGTBP5YZ3f+dcQtJ33Uf6YAho rHzFWMGgfz3spDJL0BLT7D118CJkzj7rW/cKUT03ARbBS292ryLbqklOFhqpLKcDGdyx 8z+pE9caQgSRrl4jkY0VSfK2UMIxqHRUvA57RINvUcI1i9l+MrIV9NRwO/5WGJ0Kr/Vi 9A== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by mx0b-00069f02.pphosted.com with ESMTP id 3byja2ccdh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Oct 2021 19:08:59 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 19SIu2RH087373; Thu, 28 Oct 2021 19:08:58 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2104.outbound.protection.outlook.com [104.47.58.104]) by userp3020.oracle.com with ESMTP id 3bx4gt97ct-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Oct 2021 19:08:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cWO8yqg6Kd2e1r0umMOS2vohgtXioIbSbXdOh9YkBecBfsxjtqWRZn80/QTzDwTKDRSnbplw/7i/Ssap42OFwIKx7eyPJX+qdQkEfkdP3FGIKSsZt2xwFCmW5D2j8o82kOYhJ96YCK2fbHEuSxl6AoN+OeV22cG1LiXAWFJHq6vwwyRcRT2SXdSnOJEZ8eELqak0uTMVoqHJQT0wn7y84GVkVUhkWHK2ib6IiM+5Qc3Mw7UyoeQx3EDIEwOv/tVJJXZxzMuVXCFTPsUe9B7i2PnFxNbRA+uxnFnXJCCzUkln0c6i9/kRqSykjezl8jndoamuONgQmIK6lUdWB6dPDA== 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=MF0710uZFyMs26KIjmJUd9EACMS7DQrZSFE1vH8ah9Y=; b=AKKBSCT9pEDbN/2ivhVXYuYM58ZlXIF+MEAaFR2bFKBqJLxVFKg3n8yLMyvpnyPahcqRUZF+yi3PMno/D/mONQxZsPf4FP2/OPxAethj13qi6Zr7hVxfKe0/PRpTgwSwzqAesfWdwct7j0Pj/BwEvgG3qCv0eagqq1SPpmwCKxPdJicDk3ZWyc98jxQpsX2AMIe/bIThNPng4RHpXEJ+NdYT1nVRO79hfBL+wo3SAdqDEWbZzAUBfqAF741JZdWdrvYJSDoapuBGlyy0jqqkXcObVTzNr+6eA58+oVbY/kjQt+yJ4ejQKVlQlPRpPEia3QyOHsT5KTWTirlmKmxjiA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MF0710uZFyMs26KIjmJUd9EACMS7DQrZSFE1vH8ah9Y=; b=LWnRZHtmcmryH1ypUHZwekXQOXOte64U069lRGPu9G6C21foEGH+w1PHFpa8c0rCGIHAMauAnRQkfKRI3TDEy2tbSz7JMG3GWh0vB3sHJSa1NZKXQ98RHxem8K0Nk2Rg4RP3M9Za+nO2EYaAT6/eYN64LwXFCm2WG+J1ntOx1Ns= Authentication-Results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=oracle.com; Received: from BLAPR10MB5009.namprd10.prod.outlook.com (2603:10b6:208:321::10) by BL0PR10MB2980.namprd10.prod.outlook.com (2603:10b6:208:7d::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.14; Thu, 28 Oct 2021 19:08:56 +0000 Received: from BLAPR10MB5009.namprd10.prod.outlook.com ([fe80::3c49:46aa:83e1:a329]) by BLAPR10MB5009.namprd10.prod.outlook.com ([fe80::3c49:46aa:83e1:a329%6]) with mapi id 15.20.4649.015; Thu, 28 Oct 2021 19:08:56 +0000 Message-ID: <0b1837f9-57ef-8deb-df78-cb7841d93d68@oracle.com> Date: Thu, 28 Oct 2021 15:08:51 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.2.1 Subject: Re: [PATCH V2 3/4] xen/unpopulated-alloc: Add mechanism to use Xen resource Content-Language: en-US To: Oleksandr Tyshchenko , xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org Cc: Oleksandr Tyshchenko , Juergen Gross , Stefano Stabellini , Julien Grall References: <1635264312-3796-1-git-send-email-olekstysh@gmail.com> <1635264312-3796-4-git-send-email-olekstysh@gmail.com> From: Boris Ostrovsky In-Reply-To: <1635264312-3796-4-git-send-email-olekstysh@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BYAPR01CA0041.prod.exchangelabs.com (2603:10b6:a03:94::18) To BLAPR10MB5009.namprd10.prod.outlook.com (2603:10b6:208:321::10) MIME-Version: 1.0 Received: from [10.74.110.188] (138.3.200.60) by BYAPR01CA0041.prod.exchangelabs.com (2603:10b6:a03:94::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.14 via Frontend Transport; Thu, 28 Oct 2021 19:08:54 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 88bb9532-1987-45ec-6265-08d99a466389 X-MS-TrafficTypeDiagnostic: BL0PR10MB2980: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0OeJwAGjgf2L1aEr/iFW9CImlCIDEzFnR4N4zYGDr5XDDxTHxsCUuZuE/zoRci1ef7z9LewTOhx4bMslOmWgLJH2fct3f2nAeOuNjXDKjTKkd1K5WMpkDUrPgIRaOw4oPoLwGpSG33fUZ/d15SI7a3fd0E9RcyCrfDwfp6vLMqMsRXZKs/Qx6Ppabx8n9UgfX02dUGIN2u1t/obPsy+Y+NM2uRoZX1j9qK1AM+SGgTc+nbDlSLBFnaHVXnyeEjFWvU9Wh990oXhlJjEe+dee9ECVIwc7md+luFC5kBXQHdH4r+W2kl1zIcwoHl17QgRGHHDozpEO8KHQ0qABvqgQ8K8DlcisyQEzgIuZozvH6Z6QhfwjxSeVbLolgcnSLsaZ5BsPQNGkOzT6YztDh0LWSnvN0+R4OoHzYCW0C94xXdx7fO+sFoAs6VZvBPCQNrRQChVMy5dgOnrQ3tggeYvyhy9KaYRnC7Nnr7DBSfqFWgRkgC9MLEy7drfe3LXBYhG4+DAMVSp6BJD6WE79Ad73l3dM2OOYOe63/3ZlA4eykLMoEIaaBGQPTKbCphIpJS9AG5SdNtIltlOWhEq9uY8ieS46fXPA49XR6TIoZ/o39MzLhiqbVHQbq3M+4hZ6acxF2U30X4k/lwQvkiozOlebqVjRwZ0hekMXAnw51zYJM6bjko7oJIJWrprDk0Qvoame3HYhk49BqZkyE7+SG/Q8wQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BLAPR10MB5009.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(508600001)(86362001)(44832011)(4744005)(8676002)(2906002)(31686004)(4326008)(316002)(6486002)(31696002)(6666004)(5660300002)(54906003)(36756003)(66476007)(186003)(66946007)(16576012)(38100700002)(66556008)(8936002)(2616005)(956004)(53546011)(26005)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?NU5jZG5KSktGNzBuZXdOaWlsK095VDVYOFppb0Uzck1HelZtY2t2a0p6bk80?= =?utf-8?B?b0p1aUJwSXY2cG5zc3BaanViMENjVVJtSVpCMHVHZzZFZUxNL3J2anNsMDZL?= =?utf-8?B?eEV4cHE0TU9HMWIxamxBbktHaU45a2lhMEdhU1BhNjhLY0NJUk9TaW9keExO?= =?utf-8?B?NkFYTnE0NzNsdjd3U2VpeEFjYy9sMWd0VWZtK2x1VmVQKzdORGxubXVQR0tI?= =?utf-8?B?bmJaZUNWNFBnVURtWUJocXhnWE5xQUZJdnowU0Y1c2pFWFFvV3V4Z3czczVo?= =?utf-8?B?U3FJcWI2bFUwOVNtcjc5cEtRV3JhQkxaZzhDN0JuOVo4OTErb1haL0FhYkVX?= =?utf-8?B?clNVUzhuaHphcmhYTFFMazUweVpLVU12UUpyaVV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?RURocUZNR1liQmk1VktKaUZqUHJhdk9iY0R6eE5QVWFLQWJKamhuSjNZS3dC?= =?utf-8?Q?6phB7HTmS99wQBboBnLDhg0xceDPaKyJqz9EoC/vG8=3D?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 88bb9532-1987-45ec-6265-08d99a466389 X-MS-Exchange-CrossTenant-AuthSource: BLAPR10MB5009.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2021 19:08:55.9624 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 8nnkcjxKWK0q00HGxr4/be0nFfL3PS1gE1U+k7NuJWAh5LpvdIAsXQQmgCSFUdmXvTA4IvgN1HlrtpQv1Bl3J0V1ZftqDgxRXU30hXP6B7U= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR10MB2980 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10151 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 malwarescore=0 adultscore=0 suspectscore=0 bulkscore=0 mlxscore=0 spamscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2110280099 X-Proofpoint-GUID: HKPxr1Rf9kkDtqz470HThbNiVPGDYUBf X-Proofpoint-ORIG-GUID: HKPxr1Rf9kkDtqz470HThbNiVPGDYUBf Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/26/21 12:05 PM, Oleksandr Tyshchenko wrote: > > +static void unpopulated_init(void) > +{ > + static bool inited = false; > + int ret; > + > + if (inited) > + return; > + > + /* > + * Try to initialize Xen resource the first and fall back to default > + * resource if arch doesn't offer one. > + */ > + ret = arch_xen_unpopulated_init(&xen_resource); > + if (!ret) > + target_resource = &xen_resource; > + else if (ret == -ENOSYS) > + target_resource = &iomem_resource; > + else > + pr_err("Cannot initialize Xen resource\n"); I'd pass target_resource as a parameter to arch_xen_unpopulated_init() instead. Default routine will assign it iomem_resource and you won't have to deal with -ENOSYS. Also, what happens in case of error? Is it fatal? I don't think your changes in fill_list() will work. > + > + inited = true; I agree with Stefano in that it would be better to call this from an init function, and you won't have t worry about multiple calls here. -boris