Re: [edk2-devel] [PATCH] OvmfPkg: Create additional PML4 entries for large SEV-SNP VMs

2023-01-24 Thread Mikolaj Lisik via groups.io
Hi, > > (now that I check, all of this insane behavior seems to have been > > inherited from MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c. Sorry > > for the rant.) > > We have UefiCpuPkg/Library/CpuPageTableLib meanwhile. > > So switch the code over to use that instead, and reduce the number >

Re: [edk2-devel] [PATCH] OvmfPkg: Create additional PML4 entries for large SEV-SNP VMs

2023-01-24 Thread Mikolaj Lisik via groups.io
Thanks for the review! > Please swap the Present and ReadWrite lines. You should only set > Present after everything else as to avoid explicit caching (TLB and > paging structure) issues. > > Although this whole file is full of spotty behavior. ASSERTS can get > deleted and the file is full of the

Re: [edk2-devel] [PATCH] OvmfPkg: Create additional PML4 entries for large SEV-SNP VMs

2023-01-16 Thread Gerd Hoffmann
Hi, > (now that I check, all of this insane behavior seems to have been > inherited from MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c. Sorry > for the rant.) We have UefiCpuPkg/Library/CpuPageTableLib meanwhile. So switch the code over to use that instead, and reduce the number of VirtualM

Re: [edk2-devel] [PATCH] OvmfPkg: Create additional PML4 entries for large SEV-SNP VMs

2023-01-13 Thread Pedro Falcato
On Fri, Jan 13, 2023 at 5:02 PM Mikolaj Lisik via groups.io wrote: > > Edk2 was failing, rather than creating more PML4 entries, when they > weren't present in the initial memory acceptance flow. Because of that > VMs with more than 512G memory were crashing. This code fixes that. > > This change

[edk2-devel] [PATCH] OvmfPkg: Create additional PML4 entries for large SEV-SNP VMs

2023-01-13 Thread Mikolaj Lisik via groups.io
Edk2 was failing, rather than creating more PML4 entries, when they weren't present in the initial memory acceptance flow. Because of that VMs with more than 512G memory were crashing. This code fixes that. This change affects only SEV-SNP VMs. The code was tested by successfully booting a 512G S