From: "Paolo Bonzini" <pbonzini@redhat.com>
To: Tom Lendacky <thomas.lendacky@amd.com>,
Gerd Hoffmann <kraxel@redhat.com>,
devel@edk2.groups.io
Cc: Michael Roth <michael.roth@amd.com>,
Jiewen Yao <jiewen.yao@intel.com>,
Liming Gao <gaoliming@byosoft.com.cn>,
Laszlo Ersek <lersek@redhat.com>,
Ard Biesheuvel <ardb+tianocore@kernel.org>,
Min Xu <min.m.xu@intel.com>, Erdem Aktas <erdemaktas@google.com>,
Oliver Steffen <osteffen@redhat.com>,
Ard Biesheuvel <ardb@kernel.org>
Subject: Re: [edk2-devel] GuestPhysAddrSize questions
Date: Thu, 22 Feb 2024 18:39:11 +0100 [thread overview]
Message-ID: <CABgObfZsj9HsPaf0oaeEmY0HhKa=gMsVj0D9apqAA2rRy+L8Zw@mail.gmail.com> (raw)
In-Reply-To: <74a62ef0-bd0f-4844-985c-0035fc3d76f7@redhat.com>
On Thu, Feb 22, 2024 at 5:13 PM Paolo Bonzini <pbonzini@redhat.com> wrote:
> Also, to clarify the hardware behavior, if hCR4.LA57=0 and host
> PhysAddrSize==52, then will guest physical addresses above 2^48
>
> 1) cause a reserved #PF in the guest, or
>
> 2) cause a non-present NPF exit in the hypervisor?
>
> I remember that several years ago we had a discussion on hCR4.LA57=0
> reducing the address space compared to MAXPHYADDR, but I cannot find the
> emails and also at the time I didn't notice GuestPhysAddrSize.
Found them! They say that "according to the design document, CPU will
report #NPF if the guest references a PA that is greater than 48 bits
while the hypervisor is in 4-level nested paging mode". That's nice,
because it's the same behavior as the affected Intel processors.
Paolo
> Anyhow, basically we would like GuestPhysAddrSize to be "redefined" as
>
> Maximum usable physical address size in bits. Physical addresses
> above this size should not be used, but will not produce a "reserved"
> page fault. When this field is zero, all bits up to PhysAddrSize are
> usable. This field is expected to be nonzero only on guests where
> the hypervisor is using nested paging.
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#115859): https://edk2.groups.io/g/devel/message/115859
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]
-=-=-=-=-=-=-=-=-=-=-=-
next prev parent reply other threads:[~2024-02-22 17:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-22 10:54 [edk2-devel] [PATCH v4 0/3] OvmfPkg: Add support for 5-level paging Gerd Hoffmann
2024-02-22 10:54 ` [edk2-devel] [PATCH v4 1/3] MdeModulePkg/DxeIplPeim: fix PcdUse5LevelPageTable assert Gerd Hoffmann
2024-03-01 12:44 ` [edk2-devel] 回复: " gaoliming via groups.io
2024-02-22 10:54 ` [edk2-devel] [PATCH v4 2/3] MdeModulePkg/DxeIplPeim: rename variable Gerd Hoffmann
2024-03-01 12:44 ` [edk2-devel] 回复: " gaoliming via groups.io
2024-02-22 10:54 ` [edk2-devel] [PATCH v4 3/3] OvmfPkg/PlatformInitLib: add 5-level paging support Gerd Hoffmann
2024-02-22 11:24 ` [edk2-devel] GuestPhysAddrSize questions (was: Re: [PATCH v4 3/3] OvmfPkg/PlatformInitLib: add 5-level paging) support Gerd Hoffmann
2024-02-22 15:44 ` [edk2-devel] GuestPhysAddrSize questions Lendacky, Thomas via groups.io
2024-02-22 16:13 ` Paolo Bonzini
2024-02-22 17:39 ` Paolo Bonzini [this message]
2024-03-04 13:09 ` Gerd Hoffmann
2024-03-04 17:23 ` Lendacky, Thomas via groups.io
2024-03-06 22:45 ` Paolo Bonzini
2024-02-27 12:54 ` [edk2-devel] [PATCH v4 0/3] OvmfPkg: Add support for 5-level paging Laszlo Ersek
2024-02-29 10:16 ` Laszlo Ersek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CABgObfZsj9HsPaf0oaeEmY0HhKa=gMsVj0D9apqAA2rRy+L8Zw@mail.gmail.com' \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox