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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40A28C6FD1D for ; Wed, 15 Mar 2023 12:32:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232695AbjCOMc1 (ORCPT ); Wed, 15 Mar 2023 08:32:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232615AbjCOMcK (ORCPT ); Wed, 15 Mar 2023 08:32:10 -0400 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 880825AB77 for ; Wed, 15 Mar 2023 05:31:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1678883489; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=xNn+CBjtFTZl8nZrkL+kMKnI9y6k85qov/bywsyBJ9s=; b=Ra49gYTXho6W8WxdgArzD1ppa18TzvHUO4If04tqciHslWrOt3Fs9vOp uM5AO3K9lCawcBNHMT0rOskZTO5GzPCXOGq1n6N9ryijvdjsfsKkHFyvK F8WdEwGaNv2HP/OniyHyomwP9gX+Ud/F2IUDPYn3mR2BcsK0GH8iGGrGb c=; X-IronPort-RemoteIP: 104.47.55.174 X-IronPort-MID: 103360133 X-IronPort-Reputation: None X-IronPort-Listener: OutboundMail X-IronPort-SenderGroup: RELAY_O365 X-IronPort-MailFlowPolicy: $RELAYED IronPort-Data: A9a23:bHsJL6hUHwnHAJ1YtkuBzBsgX1615hAKZh0ujC45NGQN5FlHY01je htvWjiDb/uIYGKned1+a4jioUMDuJTXxtRgTwJk+3owQSgb9cadCdqndUqhZCn6wu8v7q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LO/m1HaYGn9dM+MhO2mQiJIiypJiAleIJtTBDI/dmieRbz8C4JDWy8ss5WT 6Cc6z43iKErH2xKZPs6otrxp79tlRDxQN5PYnY= IronPort-HdrOrdr: A9a23:nnaUGqiezvyqicBo7FPtLA9xFHBQXiwji2hC6mlwRA09TyX5ra 2TdTogtSMc6QxhPk3I/OrrBEDuexzhHPJOj7X5eI3SPjUO21HYS72Kj7GSoAEIcheWnoJgPO VbAs1D4bXLZmSS5vyKhDVQfexA/DGGmprY+ts3zR1WPH9Xg3cL1XYJNu6ZeHcGNDWvHfACZe OhDlIsnUvcRZwQBP7LfkUtbqz4iPDgsonpWhICDw5P0njzsdv5gISKaCRxx30lIkly/Ys= X-IronPort-AV: E=Sophos;i="5.98,262,1673931600"; d="scan'208";a="103360133" Received: from mail-bn8nam12lp2174.outbound.protection.outlook.com (HELO NAM12-BN8-obe.outbound.protection.outlook.com) ([104.47.55.174]) by ob1.hc3370-68.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 15 Mar 2023 08:31:22 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KEaJSVVyfoM66MIFGWvvrmrX5Ds2Ej3qBabO18I7tNpWU8Pp4fGGkFXknxmwfZnEq8adMH+avKH3AYqhuWfYyleVM1b9T1wngOZEhMDKe+WDL9+XucBHK8EBIaCeJujEKKTgvnW/0IQ+2M9CuARVDHEyUD3TX9I/vfqJYiM3rMHPZ4hvn58jfpaQC9auKAP7fPT39whmIhJ5bicUiDhzUBGnEDO577RTnlEN8Al4cuno5pBuUPOO7v7BA8n/VxgAxEXNl4xqsFhSdWyMjDm3/GuDXPbDvJ+DeiT7keZKJYNsiPjuj7OnMnYGFBj+4smzmAvagTcYV30GyxZPG8l09Q== 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=mUFi3aCD1p4P3JI7yrknjj3N6t2foQ+yzm3wY06sJ3A=; b=YP7ALnOD8XDuYz+mpFoG9AHyBvniVg2h2WZ+gQW5f3yUS0xtfOYBYSOPW+eX45zLVtHQwKoyGHgTTwKp4JhM/XumM6lzXvvVzbX3Zj9fz/RW6OwT9fRWuzLr2x1e+sUKd+Kymkw+3kr+2Nlwlm6T2HMTP2nkh2kb8YumNaBoTiaywRAsnFThFoBzaw9VrK+7/xvr0Zo4W680OfxZ2VXXzCIRuFlKETYsbLsPkQKlOfcHO90GhfswMeG1ns/c3snvkx1oVJpXcLjgexFL8k+m6nC6GLY8gDl4pCzaFCNsVKFdxItQiwHj2Vu4CZ3pBj9o56OG6fYn9FPHZLoxeNDL4A== 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=mUFi3aCD1p4P3JI7yrknjj3N6t2foQ+yzm3wY06sJ3A=; b=s7ydqrD0bOXiKsbwuAoVCZUhU9rZyysXItadelf/NAYsMZJ9he3naSmUx4Vnke8YIO8TWvfVN/V5UY3PVj1U3+LiKLWlDakndJCEMt/IuktJLSTy5Rl9vkgsdTeLXVmuB8G2CEH0QrelsLy3aABLfXVsgAjomNcd4wzFyoKdruY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com; Received: from PH0PR03MB6368.namprd03.prod.outlook.com (2603:10b6:510:aa::21) by DM6PR03MB5179.namprd03.prod.outlook.com (2603:10b6:5:24d::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.30; Wed, 15 Mar 2023 12:31:20 +0000 Received: from PH0PR03MB6368.namprd03.prod.outlook.com ([fe80::4fdc:e60c:b790:d034]) by PH0PR03MB6368.namprd03.prod.outlook.com ([fe80::4fdc:e60c:b790:d034%5]) with mapi id 15.20.6178.019; Wed, 15 Mar 2023 12:31:20 +0000 Date: Wed, 15 Mar 2023 13:31:14 +0100 From: Roger Pau =?utf-8?B?TW9ubsOp?= To: Huang Rui Cc: Juergen Gross , Stefano Stabellini , Oleksandr Tyshchenko , Boris Ostrovsky , xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, Alex Deucher , Christian =?utf-8?B?S8O2bmln?= , Stewart Hildebrand , Xenia Ragiadakou , Honglei Huang , Julia Zhang , Chen Jiqian Subject: Re: [RFC PATCH 2/5] xen/grants: update initialization order of xen grant table Message-ID: References: <20230312120157.452859-1-ray.huang@amd.com> <20230312120157.452859-3-ray.huang@amd.com> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230312120157.452859-3-ray.huang@amd.com> X-ClientProxiedBy: LO4P265CA0241.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:350::15) To PH0PR03MB6368.namprd03.prod.outlook.com (2603:10b6:510:aa::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR03MB6368:EE_|DM6PR03MB5179:EE_ X-MS-Office365-Filtering-Correlation-Id: 274ca5cf-c941-447e-0e49-08db25512e06 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5OXo6s1EF8WLHCpo+ONQLc7kaXSHfPnWgKP88sYRJuY2E+BljQeToIAiSXXANOdI7d/zvTtIDU8jVVZz3zLe5QRbw9qrrKZdYKWE/0Lzd2pW4tZXnMKWohgR4b1SpqodR9FHpXff8UGmBF6cvNLzPIiIvbzdark95WmAvUUB9i9s6NMBCOqPwIhn0r/lj6SyAfdKrrFtVmG035kHH1zPqNIVqv9LGslFZ+Xp4CCTzx+02Sl7/G8xMlVZJLX7sW9nrTJbZL6CpgdTd1nmqS8MSJ7BRVuPJH5hmNy1W+yfQpW8KnAc38wYOZvnyY/AuzDMuE5plWM5ZFNgXMTmyB8hIJJAFtS1LSk042eLINvqIIFpSFLsHZO/CISwIOuKD9N9RRD06AD/LAOCRvXLTSxDLWQsvjGqAAYGa5ta+xCA2HHuQaw0qUfXf5ejmazsDys+MEMZj6XeuR/nJ2KDGELOuc+weyzVq58o+FUi1yK1Ez+yx2uDIfdGU3YPmmP67SjXRGnrKod2TGTIv4kE2qtNyJC7992ntVB3SUGDLmy5nsrVQ/CCDktZscse26SGR+tEcHiO4wYrxc7yeX37KHjyO9ypDywqVJcr1aaLmC+IRwhnxXpFnfFtV+Y654eYpBXQfqtTVCqytDGL6GYlwUqfWA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR03MB6368.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(7916004)(396003)(366004)(39860400002)(376002)(346002)(136003)(451199018)(41300700001)(7416002)(8936002)(5660300002)(15650500001)(2906002)(38100700002)(85182001)(86362001)(82960400001)(478600001)(6916009)(66946007)(66476007)(8676002)(66556008)(6486002)(6666004)(33716001)(4326008)(83380400001)(54906003)(316002)(6506007)(9686003)(6512007)(186003)(26005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TXovcTJ4TkJpbXJqOE94Sm9LcXU1c2IzLzFPdU42NXZKMFBCNlNvemdnUHc2?= =?utf-8?B?ZTg3TUpjemcxelZ5Vld2a3d0MDhUMlBDamc3emJLZmpUQkE1VzUzc281OHAw?= =?ut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YSVxT3o=3D?= X-OriginatorOrg: citrix.com X-MS-Exchange-CrossTenant-Network-Message-Id: 274ca5cf-c941-447e-0e49-08db25512e06 X-MS-Exchange-CrossTenant-AuthSource: PH0PR03MB6368.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Mar 2023 12:31:20.1065 (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: 4brcGzUI8sO+8xnsAB0+NFYKwNKRERLDP4lq8Y/HVjwBtsZm4E1eYcIXfacZgCMi5+BohRyXrCijImkhLmcEtg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR03MB5179 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Mar 12, 2023 at 08:01:54PM +0800, Huang Rui wrote: > The xen grant table will be initialied before parsing the PCI resources, > so xen_alloc_unpopulated_pages() ends up using a range from the PCI > window because Linux hasn't parsed the PCI information yet. > > So modify the initialization order to make sure the real PCI resources > are parsed before. Has this been tested on a domU to make sure the late grant table init doesn't interfere with PV devices getting setup? > Signed-off-by: Huang Rui > --- > arch/x86/xen/grant-table.c | 2 +- > drivers/xen/grant-table.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/xen/grant-table.c b/arch/x86/xen/grant-table.c > index 1e681bf62561..64a04d1e70f5 100644 > --- a/arch/x86/xen/grant-table.c > +++ b/arch/x86/xen/grant-table.c > @@ -165,5 +165,5 @@ static int __init xen_pvh_gnttab_setup(void) > } > /* Call it _before_ __gnttab_init as we need to initialize the > * xen_auto_xlat_grant_frames first. */ > -core_initcall(xen_pvh_gnttab_setup); > +fs_initcall_sync(); > #endif > diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c > index e1ec725c2819..6382112f3473 100644 > --- a/drivers/xen/grant-table.c > +++ b/drivers/xen/grant-table.c > @@ -1680,4 +1680,4 @@ static int __gnttab_init(void) > } > /* Starts after core_initcall so that xen_pvh_gnttab_setup can be called > * beforehand to initialize xen_auto_xlat_grant_frames. */ Comment need to be updated, but I was thinking whether it won't be best to simply call xen_pvh_gnttab_setup() from __gnttab_init() itself when running as a PVH guest? Thanks, Roger.