From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 97D677803CF for ; Wed, 24 Jan 2024 19:55:43 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=Ha4cGAU19sLmR3b1AhbqLapEyV231nJtPmcnqJWislc=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:Message-ID:Date:User-Agent:Subject:From:To:CC:References:Autocrypt:In-Reply-To:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1706126142; v=1; b=HyReGLss6mDGlnEhqVwGS/+k/wqYB7XtQM8HRYmVW9Sw9s88/a2uVOKUgvK6HqTaYwY87bxT 5FijAUDN7qeZtCkOrCt6dmg71kBGxOldxwdEZrdMG00afJtdgCmDQ0QQzNsz6Da+ZKweuaN0NSD uTSzdGuKPLyCBUwB9O8PQIB8= X-Received: by 127.0.0.2 with SMTP id SWhMYY7687511x2RXlc38szx; Wed, 24 Jan 2024 11:55:42 -0800 X-Received: from NAM04-BN8-obe.outbound.protection.outlook.com (NAM04-BN8-obe.outbound.protection.outlook.com [40.107.100.84]) by mx.groups.io with SMTP id smtpd.web11.33202.1706126141311204932 for ; Wed, 24 Jan 2024 11:55:41 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PKBiCbWIXwGUawhM5BipZTyXeRpMfTpOkC5EFNdxuB8vUGKoAnug/8TMCpe0TTrtoysonSxi94O/T+J8ZlrZl3RE6Z8ovP6iwOYiuBN8iI1OpTKHRr5YdSwtZp+1TQNy3DC+okJdnrWkE3PbpOeEV6iGHdCsyjW/dQlqMG6gwssIfr/4fLbJ6GcAK2sNLmMuT4LbN13aZZf+3s1lzeMAiqnqSyL3PvRjk8WVzApq83N06le+7V2qgNzc/OoijI/rW9/ovQUMzEouYOM0emQx7D9UQaEQAUEgCg2FNhqtB09ZXQeQjOpWaEeTHsU1ZLEVOzwvhZ0PdkCSr4z3b+HRbQ== 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=2ARmTujV8G4RknKFCBvRhHoKskyBigC6XlyEdLAuixI=; b=RBCqym/Xo/oH6G4k51G4pEncK1lopHgOBVhBTdJ/ukLWlChokAjUxeaAlk0g2AFF/0nXC0lQCAKJsa/TkA0esDwHNckDY4osttzq8ulTvZmEmp9TXsEYXK6sos0kv7Z7s34wYMsnsv5mg3ogFmlxuQbYDTV8RrAS5NGVycGdLHRcZX6kXO/ynRPjfu2OSX2wqQ8ZlQIGo5O8TW8gfaZ7VQ6NKOK6GYYm6k8TbhXzuK6IF1IHagjwEkFheUuTc5mCKW55bf3f4PiO8DBZKfvOBE8ES7AbktIlfYM2Jji81hAq/So8iBOwHBkItdRWoOZ24vrPx2vplZi0zhAg7ZdLmA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none X-Received: from BL1PR12MB5732.namprd12.prod.outlook.com (2603:10b6:208:387::17) by DS7PR12MB8082.namprd12.prod.outlook.com (2603:10b6:8:e6::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.22; Wed, 24 Jan 2024 19:55:38 +0000 X-Received: from BL1PR12MB5732.namprd12.prod.outlook.com ([fe80::200:c1d0:b9aa:e16c]) by BL1PR12MB5732.namprd12.prod.outlook.com ([fe80::200:c1d0:b9aa:e16c%4]) with mapi id 15.20.7202.035; Wed, 24 Jan 2024 19:55:38 +0000 Message-ID: Date: Wed, 24 Jan 2024 13:55:36 -0600 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [PATCH 1/1] OvmfPkg/ResetVector: send post codes to qemu debug console From: "Lendacky, Thomas via groups.io" To: Laszlo Ersek , devel@edk2.groups.io, kraxel@redhat.com CC: Jiewen Yao , Erdem Aktas , Ard Biesheuvel , Michael Roth , Min Xu , Oliver Steffen References: <20240124153107.2112760-1-kraxel@redhat.com> <67da33f7-5038-6732-455a-2576f641f1c0@redhat.com> <4d8b55a7-0898-4ab3-90d0-394b3bd533de@amd.com> Autocrypt: addr=thomas.lendacky@amd.com; keydata= xsFNBFaNZYkBEADxg5OW/ajpUG7zgnUQPsMqWPjeAxtu4YH3lCUjWWcbUgc2qDGAijsLTFv1 kEbaJdblwYs28z3chM7QkfCGMSM29JWR1fSwPH18WyAA84YtxfPD8bfb1Exwo0CRw1RLRScn 6aJhsZJFLKyVeaPO1eequEsFQurRhLyAfgaH9iazmOVZZmxsGiNRJkQv4YnM2rZYi+4vWnxN 1ebHf4S1puN0xzQsULhG3rUyV2uIsqBFtlxZ8/r9MwOJ2mvyTXHzHdJBViOalZAUo7VFt3Fb aNkR5OR65eTL0ViQiRgFfPDBgkFCSlaxZvc7qSOcrhol160bK87qn0SbYLfplwiXZY/b/+ez 0zBtIt+uhZJ38HnOLWdda/8kuLX3qhGL5aNz1AeqcE5TW4D8v9ndYeAXFhQI7kbOhr0ruUpA udREH98EmVJsADuq0RBcIEkojnme4wVDoFt1EG93YOnqMuif76YGEl3iv9tYcESEeLNruDN6 LDbE8blkR3151tdg8IkgREJ+dK+q0p9UsGfdd+H7pni6Jjcxz8mjKCx6wAuzvArA0Ciq+Scg hfIgoiYQegZjh2vF2lCUzWWatXJoy7IzeAB5LDl/E9vz72cVD8CwQZoEx4PCsHslVpW6A/6U NRAz6ShU77jkoYoI4hoGC7qZcwy84mmJqRygFnb8dOjHI1KxqQARAQABz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Jr NdQdtvYxECabwtPaShqnRIE7HhQPu8Xr9adirnDw1Wruafmyxnn5W3rhJy06etmP0pzL6frN y46PmDPicLjX/srgemvLtHoeVRplL9ATAkmQ7yxXc6wBSwf1BYs9gAiwXbU1vMod0AXXRBym 0qhojoaSdRP5XTShfvOYdDozraaKx5Wx8X+oZvvjbbHhHGPL2seq97fp3nZ9h8TIQXRhO+aY vFkWitqCJg== In-Reply-To: <4d8b55a7-0898-4ab3-90d0-394b3bd533de@amd.com> X-ClientProxiedBy: SA0PR11CA0150.namprd11.prod.outlook.com (2603:10b6:806:131::35) To BL1PR12MB5732.namprd12.prod.outlook.com (2603:10b6:208:387::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL1PR12MB5732:EE_|DS7PR12MB8082:EE_ X-MS-Office365-Filtering-Correlation-Id: 95bfbf00-aeaa-43bd-63bc-08dc1d166fa1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: 1gZyFPvhlvISNj7sZXNqlSaDET7iG5fW/oCVRW+sVeYHwFlH8EcS9r7r2wXC1zUwXlyteYXacxdpMjyTaIs8Xm0a5nwzsWLySzUC6CKywFL1nEG7aku1siOnO6GUzZ7ANobfP0fFHqyW8DxlhkmLu49DLrTe/1oQ3FqcCM/JGBuCJc/WRY5jcfY/wfhr0IjJw/h/LLhGYVNGxSI9AXdumS9mFfQPH4eW0rznNDB2T/NrnzI0+CqcVq1N2rxQEuQIwK3nhTXAQ/6QTsO4KjFkXBGS++LZEsXEWshRRW8hnHoissmfqkIeouG6iomE6kWNCLOgoFA2czRP4J0fS0Mu8Gji5Dyrh81Yon/1kVEctXXm5UXPI7y5N9e1gWL9tRa4HYlewLtOc+FLXm0d1quTdP/TNtFl/n+YGNDR8X/qH5e36SYs+diMjkytobM9mhqjPKvRGsPgsj+0edUzhifIaH05nPZtzgwQlaVvWbX0R0NVW201SA1NSu8CZTO5QFLhCu9E18Ro12Uf5oiiWW6Z0U98JXy4EBbpUKIW1yquVfkzSrgoy5JCcfjLwI4Ggpk7WZuel7w4Pi39/4F84B7YUhkXYQmCS592pCbbTCUu7zDGiywjC5t3S3JsE98NrPxucyMZgAguL9/UrYVLCD0j7w== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?9h+jhwg+Y8eJJshG4pDejmU24GOhCrgEr1/LT9DkCFvY5Dy8iUG3MpZ35cLV?= =?us-ascii?Q?hLVFHCSmsSjMG5dWnFDWbLXsvCYio8JIL1Kp8895pXKRwiZiLgFADqJidsKg?= =?us-ascii?Q?rrTUK+djzn7RVVr28VdbaxOkz2BL8novEaz9t9IRA9uYB4PswrUePngw/Xz8?= =?us-ascii?Q?WpbduKdBGOPwXMjLC8aA+qy11bCweQZC2S91gp9TEJ/0EM/VOE2Kqlt9JCYI?= =?us-ascii?Q?gz8RV190KCZZ0melGXfn80YYipkyLCYlzjpZj+tznKtvl1CmiVLkqHzY2JDv?= =?us-ascii?Q?bdEMYapNH8jOJo8o4dB9yaAYZHGXRgTk/w0ORBmiAtqcb6IRuBg0WnAimHyI?= =?us-ascii?Q?BM+MFm7NPyOUIZ/iDrX6RBHifQf7DtNUySVoOeI1SreZYxfGrfsNdrTxsc8W?= =?us-ascii?Q?WZqOmFqKKV2/QyJaoCt2vbTuwmlZTm3S48jKGsP4d0PP4qMncKvUfYjPkXTW?= =?us-ascii?Q?3NxQXbBjDjAkDnp2LCDh4RWKATay20tBU8CrGdHSkykwaJp2At0h3QtTYyxj?= =?us-ascii?Q?tWX2VKvRLbdQrhMFXzSHgdKfjJPopVs/yiB9+3BsgoJVzNn9BxvwCoz2iyp3?= =?us-ascii?Q?Rvku7+SlIqKxY3/mpxTDrfVM2s7nLu5oPwCvOQ3++IB4d/TxIK/wUPBQgaen?= =?us-ascii?Q?sa8TRO7znQdGWW1gYS6hbBoiXQ2pk9F54J9eLLxxS7Tva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YWtegWI6f2O7rO2jEZVoQjZV1v24p?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 95bfbf00-aeaa-43bd-63bc-08dc1d166fa1 X-MS-Exchange-CrossTenant-AuthSource: BL1PR12MB5732.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jan 2024 19:55:38.0368 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: wgSWFZ3oqOi19JwkRe8JjyzuL/8SaVuEjH3heOvK1ZWFtyfAhkArgD5sfAEQKmytTptXTYCGKxd2Xs+Ohp+7lQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB8082 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,thomas.lendacky@amd.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: GhqzMciKW0X7NvPzsuScUwBJx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=HyReGLss; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On 1/24/24 13:24, Tom Lendacky wrote: > On 1/24/24 10:47, Laszlo Ersek wrote: >> On 1/24/24 16:31, Gerd Hoffmann wrote: >>> Neat when doing ResetVector coding. >>> >>> Signed-off-by: Gerd Hoffmann >>> --- >>> =C2=A0 OvmfPkg/ResetVector/DebugCon.asm=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |= 43 +++++++++++++++++++++++++++ >>> =C2=A0 OvmfPkg/ResetVector/ResetVector.nasmb |=C2=A0 2 +- >>> =C2=A0 2 files changed, 44 insertions(+), 1 deletion(-) >>> =C2=A0 create mode 100644 OvmfPkg/ResetVector/DebugCon.asm >>> >>> diff --git a/OvmfPkg/ResetVector/DebugCon.asm=20 >>> b/OvmfPkg/ResetVector/DebugCon.asm >>> new file mode 100644 >>> index 000000000000..9c57d1a52c75 >>> --- /dev/null >>> +++ b/OvmfPkg/ResetVector/DebugCon.asm >>> @@ -0,0 +1,43 @@ >>> +;---------------------------------------------------------------------= --------- >>> +; @file >>> +; qemu debug console support macros (based on serial port macros) >>> +; >>> +; Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved. >>> +; SPDX-License-Identifier: BSD-2-Clause-Patent >>> +; >>> +;---------------------------------------------------------------------= --------- >>> + >>> +%macro=C2=A0 outToDebugPort 1 >>> +=C2=A0=C2=A0=C2=A0 mov=C2=A0=C2=A0=C2=A0=C2=A0 dx, 0x402 >>> +=C2=A0=C2=A0=C2=A0 mov=C2=A0=C2=A0=C2=A0=C2=A0 al, %1 >>> +=C2=A0=C2=A0=C2=A0 out=C2=A0=C2=A0=C2=A0=C2=A0 dx, al >>> +%endmacro >>> + >>> +%macro=C2=A0 debugShowCharacter 1 >>> +=C2=A0=C2=A0=C2=A0 outToDebugPort %1 >>> +%endmacro >>> + >>> +%macro=C2=A0 debugShowHexDigit 1 >>> +=C2=A0 %if (%1 < 0xa) >>> +=C2=A0=C2=A0=C2=A0 debugShowCharacter BYTE ('0' + (%1)) >>> +=C2=A0 %else >>> +=C2=A0=C2=A0=C2=A0 debugShowCharacter BYTE ('a' + ((%1) - 0xa)) >>> +=C2=A0 %endif >>> +%endmacro >>> + >>> +%macro=C2=A0 debugNewline 0 >>> +=C2=A0=C2=A0=C2=A0 debugShowCharacter `\r` >>> +=C2=A0=C2=A0=C2=A0 debugShowCharacter `\n` >>> +%endmacro >>> + >>> +%macro=C2=A0 debugShowPostCode 1 >>> +=C2=A0=C2=A0=C2=A0 debugShowHexDigit (((%1) >> 4) & 0xf) >>> +=C2=A0=C2=A0=C2=A0 debugShowHexDigit ((%1) & 0xf) >>> +=C2=A0=C2=A0=C2=A0 debugNewline >>> +%endmacro >>> + >>> +BITS=C2=A0=C2=A0=C2=A0 16 >>> + >>> +%macro=C2=A0 debugInitialize 0 >>> +=C2=A0=C2=A0=C2=A0 ; not required >>> +%endmacro >>> diff --git a/OvmfPkg/ResetVector/ResetVector.nasmb=20 >>> b/OvmfPkg/ResetVector/ResetVector.nasmb >>> index 5832aaa8abf7..f1655ddfcde3 100644 >>> --- a/OvmfPkg/ResetVector/ResetVector.nasmb >>> +++ b/OvmfPkg/ResetVector/ResetVector.nasmb >>> @@ -41,7 +41,7 @@ >>> =C2=A0 %elifdef DEBUG_SERIAL >>> =C2=A0=C2=A0=C2=A0 %include "SerialDebug.asm" >>> =C2=A0 %else >>> -=C2=A0 %include "DebugDisabled.asm" >>> +=C2=A0 %include "DebugCon.asm" >>> =C2=A0 %endif >>> =C2=A0 %include "Ia32/SearchForBfvBase.asm" >> >> (1) How much output does this produce? Trapping to QEMU for every single >> character written to the debug console is very slow. If it only produces >> a few bytes, that should be OK. >> >> (2) debugInitialize could actually be put to use; the presence of the >> QEMU debug console is detectable. We'd need to allocate a single byte >> somewhere, detect the console in debugInitialize, save the result in >> that byte, then check the byte in debugShowPostCode. Eliminates even >> those few (?) traps if there is no debug console configured. >> >> (3) I'm already hating myself for asking about this, but... is there a >> way for only customizing debugInitialize and debugShowCharacter? The >> rest is common with "SerialDebug.asm", and I wish I hadn't had to review >> those (unchanged) macros, they make my eyes bleed :/ >> >> Anyway, if you think any of these (or all of these!) means too much >> work, I'm OK with the patch going-in as is. >=20 > My concern would be around SEV-ES/SEV-SNP guest usage. The in and out=20 > instruction will generate a #VC and would require a #VC handler to be in= =20 > place. >=20 > I'm pretty sure this will cause issues for those types of guests, but it= =20 > might be a few days before I can get to it to verify. @Gerd, were you abl= e=20 > to test this with those types of guests? Had a meeting get canceled and so got a chance to test this. As I thought,= =20 this causes SEV-ES/SEV-SNP guest failures. Thanks, Tom >=20 > Thanks, > Tom >=20 >> >> I'm a bit concerned about (1), TBH. >> >> Laszlo >> -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#114352): https://edk2.groups.io/g/devel/message/114352 Mute This Topic: https://groups.io/mt/103933942/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-