From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx.groups.io with SMTP id smtpd.web08.5281.1641897335470918718 for ; Tue, 11 Jan 2022 02:35:35 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=kCtLlRPh; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: jiewen.yao@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1641897335; x=1673433335; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=UYBAETlCqeFmFIfj8Lvwratm5wkjPjj4/HDUJ9D6wMI=; b=kCtLlRPhvLV46YiFMRKaoXlcibSZPLAi1cTPNtsixQY/uP+ZPkFxzCux gQFDsSNDpeUv35n5Xald0TxEUwjLo+ioqUPPzHR8gCa89yQ6vomzaY5PB 65ZHOoV+IuP7oJEdA+WOZRIuQLue4SNJt2zAan5giBnaCZoygT82SoiyJ iA0+uvlRUuiUQvRLMzDCQ0pkBlyh79Qj7QB4sJ7n29Jeal+ZNMSPYeem7 Xc/Pnxv7Vbj8p5tC/weD4Lz+WY2Mk27J1jC7RCw3F/KcmV3HDlnQY53ES iC0nijLuRibIgAocXV5dHIyuLLn14vXWYFW7nbAcOsZtzC7UhbVxQDf/C g==; X-IronPort-AV: E=McAfee;i="6200,9189,10223"; a="230796066" X-IronPort-AV: E=Sophos;i="5.88,279,1635231600"; d="scan'208";a="230796066" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2022 02:35:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,279,1635231600"; d="scan'208";a="558320457" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga001.jf.intel.com with ESMTP; 11 Jan 2022 02:35:34 -0800 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Tue, 11 Jan 2022 02:35:33 -0800 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Tue, 11 Jan 2022 02:35:33 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Tue, 11 Jan 2022 02:35:33 -0800 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.42) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Tue, 11 Jan 2022 02:35:31 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hOXrwMIa4hBh7Ol1K8ttQm0jqLpDy0E/ujYLFmxO6OFh/SHR0riNKEihZQRREYFgTCVPh6bgBIW4QpH0a1njCe1nNV9bNbTvy0YvIBjCdosCDGidwLyn6VtcwjTLg1UJBhVmm89zx3f+QKMMNKo+TTqTI6voPJVgMvl05ePNcmAD64m8SFHgsAGNZgJZmcH/4Ao9wuZy6hOzkmPvmxEhFnM1ZDYwsGhQKKAQDTeJyLEe5l0CC98gZDT7dHTCzFb3XJvuE6FvNSeG7TmEhhJiHKPYTmkows1nin7Fp4U1Dkh8iWEV1LQUtaRRyNfq/N1ODk8F2zFFa+9wznfpCErcaw== 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=P/cvNFCOXYQIzmxJgG8AKGBK4eE5as1dSL2m3y7SypU=; b=XS3gLtUYSwqPz583HvFYn2CxOC8ui2Ghjcg5W82hlbUzJz3qrxRXIpREns6CbwaBwBKHkECrxrabV+AzhQkdi8dyn2CXF0YoBHI1P33E+sNp7trPT40FMIdLn14kOtFLgL+7axHbEfMD65N1/wx+h9jq5LXT8Tw+xSVj1vW7AS120Loh0bbv8gO1NL5pEkfOfBnqJCKCnNdrK+D9CTMla2ZcRLTSemd6gk5KMnmcNNQnnMrpBB58TFxjrx3wxd66pGFpwYki1228tt7hFXGLwZDfDk8OaqrRBdOegX92cI6rAnwyDZrK0EhXOpBdz1BSDl+XZ+M7TXqOBbsCYzdkbw== 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 Received: from MW4PR11MB5872.namprd11.prod.outlook.com (2603:10b6:303:169::14) by MWHPR11MB1520.namprd11.prod.outlook.com (2603:10b6:301:b::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4867.11; Tue, 11 Jan 2022 10:35:28 +0000 Received: from MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::b8a9:e4f7:e037:771b]) by MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::b8a9:e4f7:e037:771b%7]) with mapi id 15.20.4867.012; Tue, 11 Jan 2022 10:35:28 +0000 From: "Yao, Jiewen" To: "Boeuf, Sebastien" , "devel@edk2.groups.io" CC: "Justen, Jordan L" , "kraxel@redhat.com" Subject: Re: [PATCH v3 03/11] OvmfPkg/CloudHv: Connect serial console Thread-Topic: [PATCH v3 03/11] OvmfPkg/CloudHv: Connect serial console Thread-Index: AQHYBtT1sMVPIgh0eE+7TWGJFqTTpKxdoCsQ Date: Tue, 11 Jan 2022 10:35:27 +0000 Message-ID: References: <7a8084c2484596459c4b554aeef1fda3b013bc11.1641894685.git.sebastien.boeuf@intel.com> In-Reply-To: <7a8084c2484596459c4b554aeef1fda3b013bc11.1641894685.git.sebastien.boeuf@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.200.16 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b2e69bee-7b2e-4799-ad3e-08d9d4ee15ac x-ms-traffictypediagnostic: MWHPR11MB1520:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr 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: x+LnopcxJYXv5dmxm3Mhqy1CF+avW1Qrh1+VkGD1uBDMgcUcOZbt6Qx4SHZxCbwXNpNkmBuRXZ6oiZ8lhkX4kiJpfcMFrUCHpxvDYmOt0hadLI+VMZtvCH12a+vzqASMMeFFeJi14XEUJ8denmnEt/a9FHByRRht8XaSxrLJbMsfT8Ao2THVncD9QgTp2hJSTC077QHzIeWxQdcO/Ve1/eipVzNHgbFsAEm4plQVsDy30kJYNQuepPunapevUj6D6oRJ3Kesy8uhu6h+289ECuPixyPq5i3otzmF+ZuFxkS73ZSYZwwM8EW4031PLwSigpOG9D6sBTUBLzjj4XgQfOpdjVZmItEmmcqZMMVsAhEvZQZb+JbCOj0pwsL5mQpuX3xtKNs7t0d3j9OmoyPTVtT+gKBrACv/6eWGm17Vgz99OAvQKf25FsDmxUNlrl4XxCuVVtXtmrjXBMBnfzPyhHnUlcGEvk/J60nqmVqeL3r+SKkJfFgfbrAt79PdgGRYGeROPTBFSUOYiGtDrcjt8nnetVfOWHDBK9JjlPSjjg+ADogzNkrGxbYSHBdF2FXipVVT4wyEYRyqLRaXYpSm1SZcxMtiC9vefzBvydG486Gm67WLDYlA8axKfELSxwD2NJCQrfKAf5F78yYEp8Ukcf6W1O2oZm5pf0G7fNs8j5RcF4ak/EoDtOipvaGHQJ7xLsxl41VkP5Z5UdbsV+0Gyw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW4PR11MB5872.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(86362001)(122000001)(71200400001)(8676002)(38100700002)(54906003)(66946007)(76116006)(38070700005)(8936002)(26005)(5660300002)(2906002)(33656002)(83380400001)(186003)(110136005)(508600001)(53546011)(4326008)(316002)(55016003)(9686003)(82960400001)(66556008)(52536014)(66476007)(64756008)(66446008)(6506007)(7696005)(19627235002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?foDU8LP9//Mr6HueZ2a+MwjvIN7PN1xwur7jCUMTx1Jfp39/Hj9RQqKyZyhP?= =?us-ascii?Q?QH9d1EOKLAKiNbD/XbexU5ZQdnnaYJqYEYWzCbukBnR3aF+H6KCD6tSeeZEj?= =?us-ascii?Q?76zC0/yAI/6O73jiUMisvwlmGu1yn0NJr2l1CpCAiSX2slzXmWLsuUeNj8ff?= =?us-ascii?Q?w3VA2W7dFgJdMbhGP/GtZqubCsGZk7wCJfE0zynG5IjU2IZHhx1Rmerqhf16?= =?us-ascii?Q?xQ1Owyw7LgUEJmXTbZzVVfb6X0sq1rZxiR98N55ygdSS7vX+P0pGvqYbplQ8?= =?us-ascii?Q?Qv53yudNhXtXb4WC6aDSkaQ2NhR6yOOYRicvRbpJMlUSqvuyNbgB7ijxtp5D?= =?us-ascii?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j?= =?us-ascii?Q?cRDGLTgf4kg2hkG8K8lR6mUoKRindfk4KdTdjJmgh7gCz+wM1WsiwwD7FUZt?= =?us-ascii?Q?q+9fR1UiQZN0ff8v0B2Ii0oNDk7d2tVPdtMZ9GDprDAVN+0EWL4bQ0e7ui8q?= =?us-ascii?Q?RdhxwuO9B8K/nR4k395Eo7ImaZ0aBV8U20bNM+HYCBj/ZVcIwkkHhAmSy/O3?= =?us-ascii?Q?UwQkC0kSjyF7oL2drMvF+Hf2b4PwdIld7YA/YFJAuf8YWIHP/KzFa8PCttN9?= =?us-ascii?Q?jg2oUuxAejepEHJ6iDnkz5i+gSVvCj/wS9g9loq4UsdAtiVOhj2yUoUseg4D?= =?us-ascii?Q?nPpErfv8fPeemj7cOWtyEcOenFJVBUeuVqRpRoCPjh30cUdplHN1kHUMyVPl?= =?us-ascii?Q?2LRLz+lnBP6x1E42r2srfHU=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB5872.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b2e69bee-7b2e-4799-ad3e-08d9d4ee15ac X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Jan 2022 10:35:27.9641 (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: 3OCWH/HGsrNKXIq/PHzg9EAOltZ0oOcK0m6uG6my3aJGryCuuGCCia22xSTLVkGpwJFAvhy5oV8ZVCBDLMr+aQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1520 Return-Path: jiewen.yao@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Acked-by: Jiewen Yao > -----Original Message----- > From: Boeuf, Sebastien > Sent: Tuesday, January 11, 2022 6:21 PM > To: devel@edk2.groups.io > Cc: Yao, Jiewen ; Justen, Jordan L > ; kraxel@redhat.com; Boeuf, Sebastien > > Subject: [PATCH v3 03/11] OvmfPkg/CloudHv: Connect serial console >=20 > From: Sebastien Boeuf >=20 > Cloud Hypervisor doesn't emulate any LPC bridge, therefore we simply > need to rely on the serial I/O port to be connected as a console. > It reuses the code from Xen since it's very generic. >=20 > Signed-off-by: Sebastien Boeuf > --- > OvmfPkg/CloudHv/CloudHvX64.dsc | 6 ++---- > OvmfPkg/CloudHv/CloudHvX64.fdf | 6 +----- > OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c | 8 +++++++- > 3 files changed, 10 insertions(+), 10 deletions(-) >=20 > diff --git a/OvmfPkg/CloudHv/CloudHvX64.dsc > b/OvmfPkg/CloudHv/CloudHvX64.dsc > index 5e11942d08..d6d34a4677 100644 > --- a/OvmfPkg/CloudHv/CloudHvX64.dsc > +++ b/OvmfPkg/CloudHv/CloudHvX64.dsc > @@ -828,11 +828,9 @@ > OvmfPkg/VirtioGpuDxe/VirtioGpu.inf >=20 >=20 >=20 > # >=20 > - # ISA Support >=20 > + # Serial Support >=20 > # >=20 > - OvmfPkg/SioBusDxe/SioBusDxe.inf >=20 > - MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxe.inf >=20 > - MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf >=20 > + MdeModulePkg/Universal/SerialDxe/SerialDxe.inf >=20 >=20 >=20 > # >=20 > # SMBIOS Support >=20 > diff --git a/OvmfPkg/CloudHv/CloudHvX64.fdf > b/OvmfPkg/CloudHv/CloudHvX64.fdf > index f35458551b..5ce3233bf7 100644 > --- a/OvmfPkg/CloudHv/CloudHvX64.fdf > +++ b/OvmfPkg/CloudHv/CloudHvX64.fdf > @@ -290,11 +290,7 @@ INF > MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf > INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf >=20 > INF > MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestD > xe.inf >=20 >=20 >=20 > -INF OvmfPkg/SioBusDxe/SioBusDxe.inf >=20 > -!if $(SOURCE_DEBUG_ENABLE) =3D=3D FALSE >=20 > -INF MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxe.inf >=20 > -!endif >=20 > -INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf >=20 > +INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf >=20 >=20 >=20 > INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf >=20 > INF OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf >=20 > diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c > b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c > index 0918c35f1f..51016a5548 100644 > --- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c > +++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c > @@ -418,10 +418,16 @@ PlatformBootManagerBeforeConsole ( > SaveS3BootScript (); >=20 > } >=20 >=20 >=20 > + // >=20 > // We need to connect all trusted consoles for TCG PP. Here we treat a= ll >=20 > // consoles in OVMF to be trusted consoles. >=20 > + // >=20 > + // Cloud Hypervisor doesn't emulate any LPC bridge, which is why it mu= st >=20 > + // rely on the serial I/O port to be connected as a console. It reuses= the >=20 > + // definition from Xen as it is very generic. >=20 > + // >=20 > PlatformInitializeConsole ( >=20 > - XenDetected () ? gXenPlatformConsole : gPlatformConsole >=20 > + (XenDetected () || PcdGet16 (PcdOvmfHostBridgePciDevId) =3D=3D > CLOUDHV_DEVICE_ID) ? gXenPlatformConsole : gPlatformConsole >=20 > ); >=20 >=20 >=20 > // >=20 > -- > 2.30.2