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 8C24C94198E for ; Mon, 4 Mar 2024 17:24:03 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=iduF1JGk9FLCbcrTyeW0lzR4WOVzf7Y6qOGVwgwV9yI=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:Message-ID:Date:User-Agent:Subject:To:CC:References:From: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=1709573042; v=1; b=H2N/kLMHCoORIehdFrC5AXCzuB0RFnoRmG343ZJY0I6dgvezJftP4wUPoQjoraVGvMLz3nVM n8gk1bUE5X/bwK9rLEDVbd+b6ybIyEbkUG8Ok3CPrm5gjroqBLM/8E9RkwYCnXq/3y1/V/8McCg AGqIO6kxor9mjc9MeKopuuQE= X-Received: by 127.0.0.2 with SMTP id NeDMYY7687511xhfEO5Ski9C; Mon, 04 Mar 2024 09:24:02 -0800 X-Received: from NAM12-DM6-obe.outbound.protection.outlook.com (NAM12-DM6-obe.outbound.protection.outlook.com [40.107.243.75]) by mx.groups.io with SMTP id smtpd.web10.472.1709573041325731842 for ; Mon, 04 Mar 2024 09:24:01 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fhe+BeQm3z1qlIqwukDT1avqSqcFaUrRlwYFc2KAbJoV3NVbukcINVgiLh8UqH5974VXy7ylV8Ntpi+0wgeV7xSJcxxebFNLsc6rYfIN483cOa3IqWE1RPYGMbBUoW9tcUqD52nt0deaaoZD/uhzp62pB6nJEkB4OivJdiBPjYdVbZ0wvsQqWMezP1J+hyN/9H8UZaySGJtO9kv5g7/PZJ9Jtn0b3ikaM4eTguqj5l68K5YhZ1UEtFRDeRU6+4hR0IQoYwgIoUxJ6seQisZq1J3Tvq2qgtRyI1xVrZ8eOez014pVDx6ZWHQW0PitAom65JiNySgKREy5MEDTFrThEg== 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=JE/4P8mQajZ6RN0rDbpGf8Q0dXTF6VT4zNJvORs0y/Y=; b=FPOcOT/VKyeRmwqq8AnUQCNG4P2oHR3C6wFSstCG7O+rMEf6Vty4H3AlkEFVsiehkezecVxTKJ4wvP3OByMlUGjF2UCuT2o5JCyrBsgWtJBIS3wyry54bIUG8dMf8zSHhB9S6dDcKdytKrlKkK8XBJGnJmF+SaOUx51lWhKOXnV68lNX8k5D2A71cDv87O488d8N6oJjSrbqVPZ0tnX1bsRkZtA7DozJggF3cdvEfqD751QU1syvn/nvIiq1KhyxStKbuO964I/biEgf/o6omZ4FxBjTCk4N8dsmHqjKuTFjNvXzvLivN8T06k4p5ijuaD1RKgc63JGC5sKS7jAwIw== 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 BL1PR12MB5779.namprd12.prod.outlook.com (2603:10b6:208:392::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.38; Mon, 4 Mar 2024 17:23:56 +0000 X-Received: from BL1PR12MB5732.namprd12.prod.outlook.com ([fe80::4c26:40af:e1fd:849e]) by BL1PR12MB5732.namprd12.prod.outlook.com ([fe80::4c26:40af:e1fd:849e%7]) with mapi id 15.20.7339.035; Mon, 4 Mar 2024 17:23:56 +0000 Message-ID: <9e7e617c-d398-81b4-2c92-6b3a092e354c@amd.com> Date: Mon, 4 Mar 2024 11:23:53 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [edk2-devel] GuestPhysAddrSize questions To: Gerd Hoffmann CC: devel@edk2.groups.io, Paolo Bonzini , Michael Roth , Jiewen Yao , Liming Gao , Laszlo Ersek , Ard Biesheuvel , Min Xu , Erdem Aktas , Oliver Steffen , Ard Biesheuvel References: <20240222105407.75735-1-kraxel@redhat.com> <20240222105407.75735-4-kraxel@redhat.com> <32oty4asp3xrecjruatwm77fbevcaizswovjc5jqct5bdofwiq@sgff2gzgau7o> From: "Lendacky, Thomas via groups.io" In-Reply-To: X-ClientProxiedBy: DM6PR21CA0023.namprd21.prod.outlook.com (2603:10b6:5:174::33) To BL1PR12MB5732.namprd12.prod.outlook.com (2603:10b6:208:387::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL1PR12MB5732:EE_|BL1PR12MB5779:EE_ X-MS-Office365-Filtering-Correlation-Id: f6659748-0d2a-430e-57ff-08dc3c6fdf52 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: B9KzQuwysKq8Cjjl5d2MTdhWr0kqlf2WElrTvibcUF3AftVwqNcGeXnSOPdYJiYmGRPFlq8XCh327U6Q7lfKO6qUChFGgZBf0putfmDOTbCsNS3PMRgj0J/ukUxLrxLV74KWG8JXPsCUxAgPAsp7f0uF6UUQ42XmNP2207yH+xVHpFfd5aP5xi+MuxpEuBrIQM0xX/XCPbNvEU9+dwH3RYqSnLkgEr9AVupf/cHNavD4rliu0Z7ANvWXzv8KSsB9Qx3eorT1P4VYvMV7hynQw9SKReJf7+HA2rWiDkgXbE9wl83PnrHUnXYL7WxS7tlviQDTp4a1Nx0uoBNd22utAGb2IWk0Cdd5M4uKu0A0SZML0BNXuwD7rkEvAsyGoqE/z/i3D2wsgRfUQ0M2I4u1o4WXRQM9wZzNpg7Mns2ChsOIgJwI0oht4U2LrZEWVfN21AwHeAoBX5nlCaPkV7s6XH/n7PxwIXQZpP0BRGfrtKQvEpVFQ2awrCKwhQB/jadBpK3if23IMp3nasxs2G6LPTEP9psmsm5INyEtgljErL2jTtDm+pj4JGVWeljAq7iTXhmDtwmlwUmNEv4E5nTEZgfCjPV56d0pHDBxdOx3UWTfvOAjdwLRQzUvmZyhFngC X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?/wo8i9HkjX40plo5esGMUpwtesnHLKwaPnWyLGzSAQbHO2TzlEwjXGTjzYAG?= =?us-ascii?Q?YEE+4pPCd4XzL7eQChIe6bnsEHQyfCyrbl5yu91xCXEa7Tozxp6TTVKBqO+2?= =?us-ascii?Q?I1oNnV0CXt1+BhC0D4jzlTbBiJpsFMq/TGAm9o92fqA74GLGzTswU2S0B7VU?= =?us-ascii?Q?DXzcs+7yAsTzj0p2uFqnSOAlLk1avuWBLoZWiJribVZfthg04KA/IpHyCAXk?= =?us-ascii?Q?8+ZY+V/wdRe9yNyEvzIPe5KP07qf4tz0tMWc/h2Eypcu7GoZGEt/xNMHSAsC?= =?us-ascii?Q?80l5+5jd85ZRcGu6aPElhygYVIC2z5eD2XxF8hTeA9hapFjXrCBee5tHNqSP?= =?us-ascii?Q?k/XQpyumrpZFjtIXA/gIsI77FEbhPAxCzhJhqTDjNfzWabj4Z7plfUejBJ6x?= =?us-ascii?Q?BKlf4o8TiBpXy6el2Akjrxhjg5CZk+xATFKYmhS5JOS1sb5kKcDg5GRqnRhy?= =?us-ascii?Q?vshudq1l4Mcvi8h3lQN9U6JT4NeDYIqo1bOknvf2uOHdwboDWdn7asBPl8AV?= =?us-ascii?Q?zFgu65SkwOIazC4dPVZiqIomSDYOoJqPeLbacn80AlZ3o2U5mNnHw/BzTOlO?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7nYt4rYPEazTPsHI8bOp151i2lP6bzn2?= =?us-ascii?Q?1Tf1fAsgGNWDiHR9ZCHB5ME9iq2e1U5sxsy62aSodv9STlUO0visWwjVif+i?= =?us-ascii?Q?YA64PtnTiiO80u1iS6KctZXPnnEl0k7MJRSlJMM5?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: f6659748-0d2a-430e-57ff-08dc3c6fdf52 X-MS-Exchange-CrossTenant-AuthSource: BL1PR12MB5732.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Mar 2024 17:23:56.6828 (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: zKuk4qgYhS9ZkrUNr/707tV7kev0WTZlg66j1djUvqDzB/Aky4jcyaZwlZyyg1EiMY8ibuQ+lt8X09rhcXn4SQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5779 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: 3a47SYixOrHWdrpEFKET538Xx7686176AA= 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="H2N/kLMH"; dmarc=pass (policy=none) header.from=groups.io; 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 3/4/24 07:09, Gerd Hoffmann wrote: > Hi, >=20 >>> 23:16 GuestPhysAddrSize Maximum guest physical address size in bits= . >>> This number applies only to guests using ne= sted >>> paging. When this field is zero, refer to t= he >>> PhysAddrSize field for the maximum guest >>> physical address size. See =E2=80=9CSecure = Virtual >>> Machine=E2=80=9D in APM Volume 2. >=20 >> I believe the main purpose of GuestPhysAddrSize was for software use (fo= r >> nested virtualization) and that the hardware itself has always returned = zero >> for that value. So you should be able to use that field. Adding @Paolo f= or >> his thoughts. >=20 > Posted patches for kernel > https://lore.kernel.org/kvm/20240301101410.356007-1-kraxel@redhat.com/ > and qemu > https://lore.kernel.org/kvm/20240301101713.356759-1-kraxel@redhat.com/ > (sorry forgot to Cc you). >=20 > Reviewers mentioned this is meant for nested guests, i.e. (if I > understand this correctly) the l0 hypervisor can use that to tell > the l1 hypervisor what the l2 guest phys-bits should be. >=20 > Is this nested virtualization use documented somewhere? Tried to > search for GuestPhysAddrSize or Fn8000_0008_EAX in APM Volume 2, > found nothing. Right, and I don't think you'll see anything added to the APM that will=20 state how it can be used by software. The APM is an architectural=20 definition and won't talk about hypervisors and using nested paging, etc. >=20 > Is there any case where the phys-bits limits for an l1 guest and > l2 guest would be different? I haven't really thought about this before and all the implications that=20 may or may not be in play, so I don't think I can really answer that. Thanks, Tom >=20 > thanks & take care, > Gerd >=20 -=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 (#116332): https://edk2.groups.io/g/devel/message/116332 Mute This Topic: https://groups.io/mt/104510523/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-