From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web10.3568.1634873168983136979 for ; Thu, 21 Oct 2021 20:26:09 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=yyJ0qfZ5; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: ray.ni@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10144"; a="229080072" X-IronPort-AV: E=Sophos;i="5.87,171,1631602800"; d="scan'208";a="229080072" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Oct 2021 20:26:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,171,1631602800"; d="scan'208";a="484502420" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by orsmga007.jf.intel.com with ESMTP; 21 Oct 2021 20:26:07 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Thu, 21 Oct 2021 20:26:07 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Thu, 21 Oct 2021 20:26:07 -0700 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (104.47.56.42) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Thu, 21 Oct 2021 20:26:07 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=clenxZXet/+tYVKpMbj85r18uj1b8vBy9j1ZVVbl1oILVBDF5d9kKKbAjiDRbysLoIsFga1K5TLbMULvtZQmW+cBjbrFfoXnrwwhuyiL4HuE/Mu54QRKKHQL3Yhn7CcfxZ+YU+Jc7VycTU/5Q6QTLRKBo7q3alLWK/e3/3Mj+UeQ7P61omoOhjN2MYBcRRPNqI0XaT7CwFQrcv+fcwHnQ4ur5xbk9zr102veADFMjaOk/Pbaue9DvOk0VJ+KhkirdpXGDyPqMaeWio0qKqjto5ABdEWDgJwdqks2/eT2DvRS3Rfppen0c4EQc+EZkHK37GezX9bfg/x9zZglAf2eYw== 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=icaY/t3BUOyU0a2uGyPD6dIXyRlTBlCxcxdet+2wG9g=; b=KeNctfEnYuxDI0mAP6F1v4hobec0b0YmAyQDCGqQshoN4Vga+rJAitqtW0X2FfSLQO+aiSGgVHBF1ofYGDcECcZd/3LMySwnJuWIUSNbg6j0VVnr3yuMx+OXKtUlQtFHW/TwhtzrbJFMvcXc/kbY+oU7cvOu5eHPAPKRbcmrRWRf87UjR2FhQqkafy3t9peg1EoXYdPKBzZLegsXJffKqF+eT8HGbL3HOR+VnHfJkPzh5GFNktuuqD4mO60eYVbo9CXU71FPXZ6a4BV9c6mfc7ezUyBdtzKSA4X/va41NAJT4lOrLvA1XjnCICUfPjd2qqSD9d6TbDPoLdst5pWU6w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=icaY/t3BUOyU0a2uGyPD6dIXyRlTBlCxcxdet+2wG9g=; b=yyJ0qfZ5dWW4wdDqHpVPhQduqYw/k9inrzCJDM/RG/gKO/7MZ0FcWgaH0MytIXq4PTvKwFdDpRBaWC3FH224apUl0eH+b21m7gOGz/MDfDsDvJV0Mdvao6KpVk99XHK8yM/X3fCGKaPuI7HUig+NQLxHAJa22PJgW1Mn1yQilJM= Received: from BN0PR11MB5696.namprd11.prod.outlook.com (2603:10b6:408:14b::11) by BN6PR11MB1988.namprd11.prod.outlook.com (2603:10b6:404:48::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.18; Fri, 22 Oct 2021 03:26:06 +0000 Received: from BN0PR11MB5696.namprd11.prod.outlook.com ([fe80::317e:de35:e920:7778]) by BN0PR11MB5696.namprd11.prod.outlook.com ([fe80::317e:de35:e920:7778%3]) with mapi id 15.20.4628.018; Fri, 22 Oct 2021 03:26:06 +0000 From: "Ni, Ray" To: "devel@edk2.groups.io" , "Sheng, W" CC: "Kowalewski, Robert" , "Huang, Jenny" , "Chaganty, Rangasai V" , "Albecki, Mateusz" , "Kolakowski, Jacek" Subject: Re: [edk2-devel] [PATCH v3] IntelSiliconPkg/IntelVTdDxe: Support Multi PCI Root Bus Thread-Topic: [edk2-devel] [PATCH v3] IntelSiliconPkg/IntelVTdDxe: Support Multi PCI Root Bus Thread-Index: AQHXxnTUiWAvoguKBkGwtr34y072L6veWr2g Date: Fri, 22 Oct 2021 03:26:05 +0000 Message-ID: References: <20211021121129.16184-1-w.sheng@intel.com> In-Reply-To: <20211021121129.16184-1-w.sheng@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e394fffb-021e-4587-937f-08d9950baee4 x-ms-traffictypediagnostic: BN6PR11MB1988: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ufZPe0vSi7IZJPiM2ef/8Okpf3tqAaiVdZTHiWzy68xzInWjkPmlWbAGR6geYRMW5Zstj4M2txDw8LWRVrWVlvUvpypKbKa6MpRXDe6BGH8a7iLPhu3xWvodDCYpUM19amRMvWPs78hDGhcBd+n1X74uuTxU+YSM9LJVHcOqiVe4F6Lz4j1XiW7G2CSusgRHk/a2ogb6dmyvH0BTjwfRotEmLfGNW/DULcb91NGSURSaa6/dLnhlfNY1oeF/WqRMLy+lNh7PMEsEI6bQ+fYE4B4ZXa4AJpm2ZWJG1pUcElTDDV39Y7/H3DkWyiyWmTy5LebpMBJtIH+p8Z9TIDPz4+R1d7mKsnw5hPL0rUSmNK7KrBitNNQZWj/9rjSxIYYUuy5JkO6WHqXN+/ATGftyPtrK5DCmJpap9Ed1H52mkKwLyaspYBuCSa/4oGtG9BMJLD1XT6RwNTIPqzuxYGzLI3WxcKNW+jVHPOjQ7tLHga6yYRU24TsqpqxHoT47CkgAn5Y/pE5MhQ1Ms1/o9qYecCaXuV/atOQHKOGHDRaZJ9Pm4dOXZjorq4UwNgKYlgsKNyS+s0QLAhLuNKq+mS6YH2bQThb07VLED3M6GAdrMvq40SaRdqJpa26wFT3U2/e0PVFTot/dX9rENbFoupheSkEskTz6RE7LHaSg7LEp9Yt4gLaeLdMhjzuUklwk4PbENLdaSZcSK7NqPUG9rxuo9Q== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN0PR11MB5696.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(6029001)(366004)(4744005)(186003)(26005)(6506007)(2906002)(5660300002)(55016002)(38070700005)(82960400001)(6636002)(9686003)(86362001)(7696005)(66946007)(64756008)(66556008)(54906003)(316002)(8676002)(8936002)(110136005)(52536014)(38100700002)(122000001)(4326008)(76116006)(508600001)(71200400001)(33656002)(66476007)(66446008)(107886003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Zijfix/M9YjtlzCV15i26qNcxOOs9S+AqEMMH3uYFttdjY2Tt5+8YdOrL6Pm?= =?us-ascii?Q?swy36uTEgfwXRQALt2pdaVtbGiTBiSWcm5eKT7LOYyv1MyuNVv6icyS96PwS?= =?us-ascii?Q?TFRetF0OUpLJvcXbbGzXGz3275/PTY1q7kZYbRN8li1yNM0AlilC6c5oODvj?= =?us-ascii?Q?6ORZigMFPVn3z1vCyxxz/cvxREuZRkriOw+Ft7QqBQe/N4R3D8oyV5OmsbeD?= =?us-ascii?Q?YpdwfIwDHrjkP5rG3GXN3Qymw0+01es/rq+cg6weSYc0eXxOeiCkyofi+HCk?= =?us-ascii?Q?TZ9lMKPUkS+ndOQj/fS23CBZP7MGH7F7TfOEs5++z9qXrZQz0oyqMQ6b09la?= =?us-ascii?Q?fQJhiYXxCyrvrFVHf1FavBjPdBlm9UElDVF9EsjbVK934h67W05VQExNxEpB?= =?us-ascii?Q?oMdxAH3OMa9YBM7g2IkGIQafekI33NwhkdJnJARZ4Ulp/jtMEA8ptRUb159k?= =?us-ascii?Q?9ujvz6SKUPwMTeV6fJYL9N4Sc82BWRqt5XthyT34PWqnbcIf5ujpWgAomER2?= =?us-ascii?Q?/CwGI9Ww7lOK0FPEBYPXqWej5LJNYQA5yu+NAk+Ls0Od3XsRtm9iSj5iHCRw?= =?us-ascii?Q?OU3cxA1CdVKFhhk2j4zBSRGI8OPhXidRisRuitFQOO6p3lUBmRJ4Xu1GUS9l?= =?us-ascii?Q?lO8R1aGV+hDcdbU8lPOXmLjlMgcsKl3oNb8bQT7XZoo7JIqRwNAViwH0HB3G?= =?us-ascii?Q?kvjZSm60XHuDzn2swHINfysN65YSReSOZ0e6eRxBCcw/lUI0uNpXvvEiyyKg?= =?us-ascii?Q?EVUoLqJYd0c7I0d3opLbamFYvc5RzJLOgd6Q5U77oXyfTVXehU4dWMAEicPH?= =?us-ascii?Q?1QF36dcpxKfC1nWd/N1A4Ytk5AlW27pYW7gO0/cI+7gSi8HlhQu/yiUlpfDy?= =?us-ascii?Q?BahbQ1qMvRFRaSVJfRVP5zOfAbWJ6olii9iXqPnlg1gUZll8EPEJDpZzCIqt?= =?us-ascii?Q?jmnBda5zwqWTYgOWw0vZxZEJtnqvCGLWWJVcsfv5EYe5Ft1LnUfwZlWnLvyp?= =?us-ascii?Q?/V+LGNlj5wlT5CglmnnRK7dganvSdBxLExX2fdDe6KrGBbdf6pJW0yBUQX5P?= =?us-ascii?Q?7iowS1kwYTs5Se8ymUzzbgXhbH6G23El1SX/G6P2LfG7x9XPnJc0RiRmQf7V?= =?us-ascii?Q?2kP8Q+jV+m13s++DagZWFgwPBXkOKDkXu+dsqNli6hf7khWR1dw5B2/lnUfV?= =?us-ascii?Q?DwsPzmzoozlQUhtJT8DTOZeLZ01Lrs3568Q0Xn0QG3Slvsd3ix5fP/TPCjJf?= =?us-ascii?Q?OG9G2WgsUpCVDmIBpT76tZLtE/2QnCSFbn9e2/atGTGQkAtMuDGdqg2efwoT?= =?us-ascii?Q?hOa/SDCkTR3I7LVf87HV1qqI4De7PvjKLFjkQSuSt8CkhuIyOUWY7CHW1glT?= =?us-ascii?Q?TnAlhUY8Q7XWIdOVUUcAh94N4vY0lWMdowMEuPnpLCMMXZJxmvBVcRm5bVt3?= =?us-ascii?Q?I6dQc06CwM8=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN0PR11MB5696.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e394fffb-021e-4587-937f-08d9950baee4 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Oct 2021 03:26:05.8411 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ray.ni@intel.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB1988 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Wei, > + if (EFI_ERROR (Status)) { > + // > + // If PciRootBridgeIo protocol is not support, scan PCI device from = root bus 0x00. > + // > + Status =3D ScanPciBus(Context, Segment, 0x00, Callback); 1. Is the error handling necessary? In a simple client platform, there is only one PciRootBridgeIo protocol ins= tance. In a complex client or server platform, there are multiple PciRootBridgeIo = protocol instances. Additionally, the INF has a dependency on PciRootBridgeIo protocol. The driver doesn't run if the protocol doesn't exist. > + > + while (Descriptors->Desc !=3D ACPI_END_TAG_DESCRIPTOR) { > + if (Descriptors->ResType =3D=3D ACPI_ADDRESS_SPACE_TYPE_BUS) { > + break; > + } > + Descriptors++; > + } > + 2. You might need to add the error handling in case the ACPI descriptor doe= sn't contain record for ACPI_ADDRESS_SPACE_TYPE_BUS. That would be a fatal error. So, even an assertion is ok to me. Thanks, Ray