> > +{ > > + MemEncryptSevSnpPreValidateSystemRam ( > > + StartAddress, > > + EFI_SIZE_TO_PAGES (Size) > > Sorry, I forgot to ask this earlier in the series, but is StartAddress > guaranteed to be page-aligned and Size a multiple of 4KB? Should there be > any asserts for those just in case? > > Also, can Size be 0? In which case MemEncryptSevSnpPreValidateSystemRam() > shouldn't be called? >
It shouldn't happen, but I'll return EFI_INVALID_PARAMETER on those conditions. > > + Status = gBS->InstallProtocolInterface ( > > + &mAmdSevDxeHandle, > > + &gEfiMemoryAcceptProtocolGuid, > > + EFI_NATIVE_INTERFACE, > > + &mMemoryAcceptProtocol > > + ); > > Should this only be installed for an SNP guest, e.g. put within the > "if (MemEncryptSevSnpIsEnabled ()) {" check? > > Maybe use ASSERT_EFI_ERROR (Status)? > Will do, thanks for your review. -- -Dionna Glaze, PhD (she/her) -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#94597): https://edk2.groups.io/g/devel/message/94597 Mute This Topic: https://groups.io/mt/93975245/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-