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 B12C278003C for ; Mon, 4 Mar 2024 13:09:33 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=msrLtYQgPBm3NJ8kP/bLl2fyAlURGm0QcYJRrNAKNgg=; c=relaxed/simple; d=groups.io; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Disposition:Content-Transfer-Encoding; s=20140610; t=1709557772; v=1; b=jEUmoODS/oHSm8MJPIERjvNrKEw9i+XSCdxmdS5jpLPDtZd2bNvXdtzzaCi8dizNHEAqbOna Oz3ur/veKk0paA6cD/Zr6beOzNNUhFA0hOyXsow5ZqjSFTcVkU5PD3HWDrhmecEkkW+jrHHsREO FYR7p7wOPuKMJFCM0MtgiEsg= X-Received: by 127.0.0.2 with SMTP id Dy1uYY7687511xMf1wkkGQEE; Mon, 04 Mar 2024 05:09:32 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web10.98039.1709557771546587321 for ; Mon, 04 Mar 2024 05:09:31 -0800 X-Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-25-LmM5JSOFMc2nySsSWuvp1w-1; Mon, 04 Mar 2024 08:09:25 -0500 X-MC-Unique: LmM5JSOFMc2nySsSWuvp1w-1 X-Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 97BF73C0F363; Mon, 4 Mar 2024 13:09:24 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.193.36]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7387B422A9; Mon, 4 Mar 2024 13:09:23 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 43E6518009DB; Mon, 4 Mar 2024 14:09:22 +0100 (CET) Date: Mon, 4 Mar 2024 14:09:22 +0100 From: "Gerd Hoffmann" To: Tom Lendacky 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 Subject: Re: [edk2-devel] GuestPhysAddrSize questions Message-ID: References: <20240222105407.75735-1-kraxel@redhat.com> <20240222105407.75735-4-kraxel@redhat.com> <32oty4asp3xrecjruatwm77fbevcaizswovjc5jqct5bdofwiq@sgff2gzgau7o> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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,kraxel@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 8Kj6Zoign3J9wbJqOnOE8dO5x7686176AA= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=jEUmoODS; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=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 Hi, > > 23:16 GuestPhysAddrSize Maximum guest physical address size in bits. > > This number applies only to guests using nested > > paging. When this field is zero, refer to the > > PhysAddrSize field for the maximum guest > > physical address size. See “Secure Virtual > > Machine” in APM Volume 2. > I believe the main purpose of GuestPhysAddrSize was for software use (for > 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 for > his thoughts. 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). 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. Is this nested virtualization use documented somewhere? Tried to search for GuestPhysAddrSize or Fn8000_0008_EAX in APM Volume 2, found nothing. Is there any case where the phys-bits limits for an l1 guest and l2 guest would be different? thanks & take care, Gerd -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#116313): https://edk2.groups.io/g/devel/message/116313 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] -=-=-=-=-=-=-=-=-=-=-=-