public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Lendacky, Thomas via groups.io" <thomas.lendacky=amd.com@groups.io>
To: Gerd Hoffmann <kraxel@redhat.com>, "Xu, Min M" <min.m.xu@intel.com>
Cc: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"Aktas, Erdem" <erdemaktas@google.com>,
	Oliver Steffen <osteffen@redhat.com>,
	"Yao, Jiewen" <jiewen.yao@intel.com>,
	Ard Biesheuvel <ardb+tianocore@kernel.org>,
	Michael Roth <michael.roth@amd.com>,
	Liming Gao <gaoliming@byosoft.com.cn>,
	Laszlo Ersek <lersek@redhat.com>
Subject: Re: [edk2-devel] [PATCH v2 0/5] OvmfPkg: Add support for 5-level paging
Date: Fri, 2 Feb 2024 13:28:47 -0600	[thread overview]
Message-ID: <0ed8abc3-e2ce-6468-1a10-bf53be129b7f@amd.com> (raw)
In-Reply-To: <mzw4domdyflwakuygrmeglyvwwp4zr4obxk6tbvwkcwjk3lmny@rp6mngcq2dyq>

On 2/2/24 02:44, Gerd Hoffmann wrote:
> On Fri, Feb 02, 2024 at 08:30:23AM +0000, Xu, Min M wrote:
>>> Pushed branch with two experimental patches:
>>>    https://github.com/kraxel/edk2/commits/devel/paging-5lvl/
>>>
>>> One for tdx, writing different values into TDX_WORK_AREA_PGTBL_READY for
>>> 4-level and 5-level paging modes.
>>>
>>> One for sev, which adds a 2-level page directory for the first gigabyte and
>>> places it at the same physical address it has in 4-level paging.
>>> With that SevClearPageEncMaskForGhcbPage should work unmodified in 5-
>>> level mode.
>>>
>>> Test results are welcome.
>>
>> Thanks Gerd, it works in TDX. One typo in the patch that pageTableEntriesLoopla57  and pageTableEntriesLoopLa57.
> 
> Thanks for testing.
> 
> Added a second sev patch to the branch, rearranging the #vc
> handler uninstall to make the la57 cpuid checks work on sev.
> 
> @Tom: Would be great if you can give this a test

So this gets us past the ASM code CPUID instructions, however, the
SEV support is still assuming 4-level paging and so:

SEV ASSERT:
   AmdSevDxe:SetMemoryEncDec: bad PML4 for Physical=0x8000000000

   ASSERT_EFI_ERROR (Status = No mapping)
   ASSERT [AmdSevDxe] /root/kernels/ovmf-gerd-build-X64/OvmfPkg/AmdSevDxe/AmdSevDxe.c(235): !(((INTN)(RETURN_STATUS)(Status)) < 0)

SEV-ES and SEV-SNP ASSERT:
   PlatformPei:SetMemoryEncDec: bad PDPE for Physical=0x7FE5C000

   ASSERT_RETURN_ERROR (Status = No mapping)
   ASSERT [PlatformPei] /root/kernels/ovmf-gerd-build-X64/OvmfPkg/PlatformPei/AmdSev.c(254): !(((INTN)(RETURN_STATUS)(Status)) < 0)

FYI, this uncovered an SNP CPUID table processing bug in the ResetVector
code and so I sent a fix to the mailing list.

Thanks,
Tom

> 
> thanks & take care,
>    Gerd
> 
> PS: I'll be offline next week.
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#115069): https://edk2.groups.io/g/devel/message/115069
Mute This Topic: https://groups.io/mt/104052206/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2024-02-02 19:28 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-30 12:31 [edk2-devel] [PATCH v2 0/5] OvmfPkg: Add support for 5-level paging Gerd Hoffmann
2024-01-30 12:32 ` [edk2-devel] [PATCH v2 1/5] MdeModulePkg/DxeIplPeim: fix PcdUse5LevelPageTable assert Gerd Hoffmann
2024-01-30 12:32 ` [edk2-devel] [PATCH v2 2/5] MdeModulePkg/DxeIplPeim: rename variable Gerd Hoffmann
2024-01-30 18:58   ` Laszlo Ersek
2024-01-30 12:32 ` [edk2-devel] [PATCH v2 3/5] OvmfPkg/ResetVector: improve page table flag names Gerd Hoffmann
2024-01-30 19:04   ` Laszlo Ersek
2024-01-30 19:46   ` Pedro Falcato
2024-01-30 22:28     ` Laszlo Ersek
2024-01-31  8:14       ` Gerd Hoffmann
2024-01-31 11:22         ` Laszlo Ersek
2024-01-31 17:50           ` Pedro Falcato
2024-01-30 12:32 ` [edk2-devel] [PATCH v2 4/5] OvmfPkg/ResetVector: add 5-level paging support Gerd Hoffmann
2024-01-30 19:13   ` Laszlo Ersek
2024-02-01 15:44   ` Lendacky, Thomas via groups.io
2024-02-01 16:33     ` Gerd Hoffmann
2024-02-01 23:31     ` Laszlo Ersek
2024-01-30 12:32 ` [edk2-devel] [PATCH v2 5/5] OvmfPkg/PlatformInitLib: " Gerd Hoffmann
2024-01-30 19:15 ` [edk2-devel] [PATCH v2 0/5] OvmfPkg: Add support for 5-level paging Laszlo Ersek
2024-02-01 16:01   ` Lendacky, Thomas via groups.io
2024-01-31  6:19 ` Min Xu
2024-01-31  8:24   ` Gerd Hoffmann
2024-02-01  5:44     ` Min Xu
2024-02-01  8:45       ` Gerd Hoffmann
2024-02-01 14:14       ` Gerd Hoffmann
2024-02-02  8:30         ` Min Xu
2024-02-02  8:44           ` Gerd Hoffmann
2024-02-02 19:28             ` Lendacky, Thomas via groups.io [this message]
2024-02-12 15:13               ` Gerd Hoffmann
2024-01-31 12:02 ` 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=0ed8abc3-e2ce-6468-1a10-bf53be129b7f@amd.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