From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (NAM02-DM3-obe.outbound.protection.outlook.com [40.107.95.40]) by mx.groups.io with SMTP id smtpd.web10.8010.1681997491608392976 for ; Thu, 20 Apr 2023 06:31:31 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=ymP8Sfzo; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: amd.com, ip: 40.107.95.40, mailfrom: pankaj.gupta@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oXlVH9Wm4qpeFliZqpDviug/zze/PGf1ZaMhQai06kk3BkBcw/bvB74tnPqxnfJCVzLqr9G4A4peWUcXv6uGZh0+umbqQvIbBwWWL827+HG8+FCHEBJ4kTHCv2bpaGBrR1NA655NM6Xl77u+oh/CpizZOUSx6o1Ra8+33a3gGrlv62tH4/x31LJ7iXyEi+wXenWrW/UjoZItj35qmRJvkqY/wGY6oZ+FYCuJTJ1bN8Ry9awKrptJMSFVNyqh0C+xqGI11dJ6q3yXTkRpvTZBVtQl3JAsoCLW0XneciL2FLLigOpJdDRiawyHNDtMaL1p5htQG5aziW0x50GI+DpqmA== 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=qWTT/Wssu/Rful6nJMaRXjBcI7pZ4PGqTGQF7P85D9A=; b=UVoYVCVucB+6gCxJOZDHLJnmoqzmShrhvBrqlJbn2gx9YcLUODNiSxcptzqM7pd8uOmDHSb8I+IY5MnEIA9Q3qDOpRODkfCdqoY6H8UbMeNQJAO8VwK2qDRB2xmBKVRmkTGV1ys5hb6usLtmVbRFIqCtmEqcLmk8epNPKRO+qk4cVByeIkBHZiUn69KoCJZQrdyXd6QKf+aKDp4B4uqACO1xfnJyPTZ9IPJPWLvcUrWOT2CAsS2TnygRm4Nffo9dvXz9k5exqLlBKoF3lEVwYI3d+igJm4CDxr3VzlHbxMs+dbnHeDYp+Pr/OQw95IgChmSY6PfDCV9I9HX3a8xV1A== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qWTT/Wssu/Rful6nJMaRXjBcI7pZ4PGqTGQF7P85D9A=; b=ymP8SfzoSjvFBFgwLoLrmMlVpCfRJck5pZJt8S9UQ5yWaWOhy2uKpe6IF6bWF/hNKqG8lRVc0ODrPCM0N6Q90BSZHEa10kDb4guEj7ZxeF03yslhdMf8+cqJJBlFjlvcUJDaZHucrLZnkFjiLEfLr9ZGMV3igYkz24QrGYGeBLw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DM6PR12MB2810.namprd12.prod.outlook.com (2603:10b6:5:41::21) by PH0PR12MB7839.namprd12.prod.outlook.com (2603:10b6:510:286::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.22; Thu, 20 Apr 2023 13:31:29 +0000 Received: from DM6PR12MB2810.namprd12.prod.outlook.com ([fe80::756a:e835:b8a5:16d5]) by DM6PR12MB2810.namprd12.prod.outlook.com ([fe80::756a:e835:b8a5:16d5%6]) with mapi id 15.20.6319.020; Thu, 20 Apr 2023 13:31:29 +0000 Message-ID: <6e2c2dbb-d8a8-1fce-9ab5-bbee1a701508@amd.com> Date: Thu, 20 Apr 2023 15:31:20 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [edk2-devel] [PATCH 0/4] OvmfPkg: add virtio serial driver To: Gerd Hoffmann Cc: devel@edk2.groups.io, Ard Biesheuvel , Stefan Berger , Julien Grall , Anthony Perard , Ard Biesheuvel , Jordan Justen , Pawel Polawski , Oliver Steffen , =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= , Jiewen Yao References: <20230417090320.225046-1-kraxel@redhat.com> <75755155-c93a-bc72-5ef7-58ad1a9c9a73@amd.com> From: "Gupta, Pankaj" In-Reply-To: X-ClientProxiedBy: FR0P281CA0186.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:ab::16) To DM6PR12MB2810.namprd12.prod.outlook.com (2603:10b6:5:41::21) Return-Path: Pankaj.Gupta@amd.com MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR12MB2810:EE_|PH0PR12MB7839:EE_ X-MS-Office365-Filtering-Correlation-Id: bc68a781-9ba4-4f9d-ea90-08db41a38c27 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1FoYJeNsns5ficGV5OBVU2WT8tncQxHiL8Rq+Va4CnIFen9ns0GhDdA+Abt9mTQORrBhYi94yz4SAa0cg+0v1unpuVKTwhSd9PfNnLCv5N+TAPFPnQk/V8Gc86Pj8hpMtb00XObWUNBrIfPd0WjJX/VLqcd/7hhuXKpNsxrOCp+MAnX7NMafxcU9ly11YJOhBpoTiBMJs2eejdMMbUgf3+pPXcd/OpJLKr5NcAf1tmxmSqwXTaDzPuhJ3+cUbOzahrjX87KFB84kYnVASultw5W09YamL9gdWkbUFAE0U1CahKfKV15YdMgn7YH97qdiOiknVjoDqxdZA7Ez2md4mYF7HUL4RNBegdcJy6huw+c5NzbAZWgYZppVTE1mE9briTyeZM9kUVizd5GJ5I6YL/3axZ1S+my41Q47UVJnLHvals2nGnWVvLlwIBM0YZXxIjTE4o5sLPqJ3NS7d9gYPMB9TmFp00gRPr3gH+Dy+rz91biP3WD4z0A9S9ZSAdmgvV2qcjXwx7HOEJvgG3K3XBHQbWXJzVQri5H4i+B6zGm/p0oew3tm2eWgDx6lo93eCQXim6IF2lhBPQFgBCnEPiCMYA3bXbSrict7G0nQfwt3JADjBoq+oUNbR/yQ42i04xhyye3Ny6wqCdGbiBRgeA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR12MB2810.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(366004)(376002)(346002)(396003)(136003)(451199021)(54906003)(31686004)(478600001)(2616005)(6486002)(6506007)(6512007)(26005)(6666004)(316002)(66946007)(4326008)(66556008)(66476007)(6916009)(186003)(7416002)(5660300002)(38100700002)(8676002)(8936002)(2906002)(41300700001)(86362001)(31696002)(36756003)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?YkdJY1JreTZiZGdqYWwvbU1BZDRKbGpPR1dLcDlDNHlOVmRxZk5wb0VBeWFq?= =?utf-8?B?anpNMU0yOEYyYjVqUnJBVmd0cjg4bUt3L2pKNkE1STEwNHUwWmRtWUlxL0JD?= =?utf-8?B?cVRCb1RQMDhORmh2ai9QUmRYMDV5K01nUm12MnJ0VXgxem9iRVdvZTBRazVq?= =?utf-8?B?dzdWUkEyVEJnWVBZenVaMDBwNUNhTUdxLzRZWnRwWmxDTlp0RGRneWh1d3Q4?= =?utf-8?B?Y2o3UEU0UHU2TS9aU0N6OHU1MFVDbXEwWnZhb3d2UkNtQTg1ZXdFZDJuTTFt?= =?utf-8?B?V1NWdkpKTEhmUDI5TXFpT29MbE1lVGdBZ2M1cGVEZ2lHclBLMUdzOWRRaHNL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-Exchange-CrossTenant-Network-Message-Id: bc68a781-9ba4-4f9d-ea90-08db41a38c27 X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB2810.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2023 13:31:29.2342 (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: eEQDuKUTkoR2ZaMsLgpzjy5k2lsk4yPfT5QIOzIe2TKRnA3HFNUbNeqfeSh/arm7QSHvOMPX6loikvl8Rx7e1w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB7839 Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit >>> libvirt snippet (add to ): >>> >>> >>> >>> >> Was thinking about the motivation to add the virtio serial device. >> >> AFAIU this can provide a console in bios/early boot based on "virtio". >> Currently we can only get it with emulated PTY device which is slow >> because of frequent VMEXITS because of ioport write? > > Yes, it has better performance because it wouldn't vmexit for every > single character. > > Dawback is that it wouldn't work for early logging, the driver loads > relatively late because it depends on pci and virtio. So if the > firmware panics in SEC or PEI you wouldn't see that. > > So for debug logging it isn't the best choice, for efi shell and grub it > works fine. Sure. > >> Or is there any other reason (e.g across the ARCH support) to add this >> support in UEFI ? > > Should work on all architectures, although it needs some platform setup > code to have the firmware actually bind the firmware console to it (see > patch #4). > > Another nice property of a virtio console is that systemd will spawn a > getty there even if it is not explicitly configured as console device. Nice. Thanks, Pankaj