Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boot failed when using AmdSevX64 OVMF #257

Open
choehojun opened this issue Dec 29, 2024 · 8 comments
Open

Boot failed when using AmdSevX64 OVMF #257

choehojun opened this issue Dec 29, 2024 · 8 comments

Comments

@choehojun
Copy link

Hello,
I built an OVMF file using the default package OvmfPkg/OvmfPkgX64.dsc and successfully launched a guest VM with SEV-SNP enabled. (I built host/guest kernel and qemu using shell scripts at snp-latest branch) However, I noticed that this OVMF file does not have an SNP_KERNEL_HASHES section, so its launch-time measurement only provide integrity for the boot loader and do not cover the kernel or initrd. Therefore, I tried to switch the build package to OvmfPkg/AmdSev/AmdSevX64.dsc so that the launch-time measurement would also include the hashes of the kernel and initrd images. Unfortunately, I was unable to boot the guest VM using the OVMF file built this way.

I tried to analyze the cause of this problem but was unsuccessful, so I'm sharing the log here and submitting an issue in order to find out what’s going wrong.

Below is the part of VM launch log using QEMU:

/usr/local/bin/qemu-system-x86_64 -enable-kvm -cpu EPYC-v4 -machine q35 -smp 32,maxcpus=32 -m 4096M,slots=5,maxmem=12288M -no-reboot -bios /home/choehojun/ovmf/OVMF.fd -object secret,id=mysecret,file=./disk_enc.key -drive file=/home/choehojun/guest/ubuntu-22.04-kernel.qcow2,if=none,id=disk0,format=qcow2,encrypt.key-secret=mysecret -device virtio-scsi-pci,id=scsi0,disable-legacy=on,iommu_platform=true -device scsi-hd,drive=disk0 -machine memory-encryption=sev0,vmport=off -object memory-backend-memfd,id=ram1,size=4096M,share=true,prealloc=false -machine memory-backend=ram1 -object sev-snp-guest,id=sev0,policy=0x30000,cbitpos=51,reduced-phys-bits=5 -kernel ./vmlinuz-6.10.0-snp-guest-0c3836482481 -append "console=ttyS0 earlyprintk=serial root=/dev/sda1" -initrd ./initrd.img-6.10.0-snp-guest-0c3836482481 -nographic -monitor pty -monitor unix:monitor,server,nowait -net user,hostfwd=tcp::8080-:8080,hostfwd=tcp::2222-:22 -net nic

...

Loading driver 8657015B-EA43-440D-949A-AF3BE365C0FC
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7EC3A540
Loading driver at 0x0007E4DE000 EntryPoint=0x0007E4E23E0 IoMmuDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7EC3A898
ProtectUefiImageCommon - 0x7EC3A540
  - 0x000000007E4DE000 - 0x0000000000006CC0
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/OvmfPkg/IoMmuDxe/IoMmuDxe/DEBUG/IoMmuDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 4E939DE9-D948-4B0F-88ED-E6E1CE517C1E 7E4E4AA0
InstallIoMmuProtocol: Feature of reserved memory for DMA is supported.
Loading driver 22DC2B60-FE40-42AC-B01F-3AB1FAD9AAD8
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7EC391C0
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb/DEBUG/EmuVariableFvbRuntimeDxe.dll
Loading driver at 0x0007F0CE000 EntryPoint=0x0007F0D04CE EmuVariableFvbRuntimeDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7EC39118
ProtectUefiImageCommon - 0x7EC391C0
  - 0x000000007F0CE000 - 0x0000000000006000
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb/DEBUG/EmuVariableFvbRuntimeDxe.dll
SetUefiImageMemoryAttributes - 0x000000007F0CE000 - 0x0000000000001000 (0x0000000000004008)
SetUefiImageMemoryAttributes - 0x000000007F0CF000 - 0x0000000000003000 (0x0000000000020008)
SetUefiImageMemoryAttributes - 0x000000007F0D2000 - 0x0000000000002000 (0x0000000000004008)
EMU Variable FVB Started
Disabling EMU Variable FVB since flash variables appear to be supported.
Error: Image at 0007F0CE000 start failed: Aborted
SetUefiImageMemoryAttributes - 0x000000007F0CE000 - 0x0000000000006000 (0x0000000000000008)
Loading driver CBD2E4D5-7068-4FF5-B462-9822B4AD8D60
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7EC391C0
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe/DEBUG/VariableRuntimeDxe.dll
Loading driver at 0x0007F0C4000 EntryPoint=0x0007F0CCD62 VariableRuntimeDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7EC39418
ProtectUefiImageCommon - 0x7EC391C0
  - 0x000000007F0C4000 - 0x0000000000010000
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe/DEBUG/VariableRuntimeDxe.dll
SetUefiImageMemoryAttributes - 0x000000007F0C4000 - 0x0000000000001000 (0x0000000000004008)
SetUefiImageMemoryAttributes - 0x000000007F0C5000 - 0x000000000000D000 (0x0000000000020008)
SetUefiImageMemoryAttributes - 0x000000007F0D2000 - 0x0000000000002000 (0x0000000000004008)
VarCheckLibRegisterSetVariableCheckHandler - 0x7F0C7C98 Success
Variable driver common space: 0x3FF9C 0x3FF9C 0x3FF9C
Variable driver will work with auth variable format!
InstallProtocolInterface: CD3D0A05-9E24-437C-A891-1EE053DB7638 7F0D27E0
InstallProtocolInterface: AF23B340-97B4-4685-8D4F-A3F28169B21D 7F0D27B0
InstallProtocolInterface: 1E5668E2-8481-11D4-BCF1-0080C73C8881 0
VarCheckLibRegisterSetVariableCheckHandler - 0x7F0C7A6B Success
InstallProtocolInterface: 81D1675C-86F6-48DF-BD95-9A6E4F0925C3 7F0D2740
Loading driver 6C2004EF-4E0E-4BE4-B14C-340EB4AA5891
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7EC387C0
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe/DEBUG/StatusCodeHandlerRuntimeDxe.dll
Loading driver at 0x0007F0BF000 EntryPoint=0x0007F0C10CB StatusCodeHandlerRuntimeDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7EC38598
ProtectUefiImageCommon - 0x7EC387C0
  - 0x000000007F0BF000 - 0x0000000000005000
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe/DEBUG/StatusCodeHandlerRuntimeDxe.dll
SetUefiImageMemoryAttributes - 0x000000007F0BF000 - 0x0000000000001000 (0x0000000000004008)
SetUefiImageMemoryAttributes - 0x000000007F0C0000 - 0x0000000000003000 (0x0000000000020008)
SetUefiImageMemoryAttributes - 0x000000007F0C3000 - 0x0000000000001000 (0x0000000000004008)
Loading driver 52FE8196-F9DE-4D07-B22F-51F77A0E7C41
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7EC37BC0
Loading driver at 0x0007EC27000 EntryPoint=0x0007EC28883 LocalApicTimerDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7EC38218
ProtectUefiImageCommon - 0x7EC37BC0
  - 0x000000007EC27000 - 0x0000000000002F00
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/OvmfPkg/LocalApicTimerDxe/LocalApicTimerDxe/DEBUG/LocalApicTimerDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 26BACCB3-6F42-11D4-BCE7-0080C73C8881 7EC29D20
Loading driver 128FB770-5E79-4176-9E51-9BB268A17DD1
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7EC372C0
Loading driver at 0x0007E4A6000 EntryPoint=0x0007E4ACF62 PciHostBridgeDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7EC37A98
ProtectUefiImageCommon - 0x7EC372C0
  - 0x000000007E4A6000 - 0x0000000000009D80
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe/DEBUG/PciHostBridgeDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
Select Item: 0x0
FW CFG Signature: 0x554D4551
Select Item: 0x1
FW CFG Revision: 0x3
QemuFwCfg interface (DMA) is supported.
Select Item: 0x19
Select Item: 0x19
PciHostBridgeUtilityInitRootBridge: populated root bus 0, with room for 255 subordinate bus(es)
RootBridge: PciRoot(0x0)
  Support/Attr: 70069 / 70069
    DmaAbove4G: No
NoExtConfSpace: No
     AllocAttr: 3 (CombineMemPMem Mem64Decode)
           Bus: 0 - FF Translation=0
            Io: 6000 - FFFF Translation=0
           Mem: 80000000 - DFFFFFFF Translation=0
    MemAbove4G: C000000000 - DFFFFFFFFF Translation=0
          PMem: FFFFFFFFFFFFFFFF - 0 Translation=0
   PMemAbove4G: FFFFFFFFFFFFFFFF - 0 Translation=0
CpuDxe: 5-Level Paging = 0
InstallProtocolInterface: CF8034BE-6768-4D8B-B739-7CCE683A9FBE 7EC2CBC0
InstallProtocolInterface: 09576E91-6D3F-11D2-8E39-00A0C969723B 7EC2CF18
InstallProtocolInterface: 2F707EBB-4A1A-11D4-9A38-0090273FC14D 7EC2C2F0
Loading driver EBF342FE-B1D3-4EF8-957C-8048606FF671
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7EC2C5C0
Loading driver at 0x0007E474000 EntryPoint=0x0007E48423A SetupBrowser.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7EC2B018
ProtectUefiImageCommon - 0x7EC2C5C0
  - 0x000000007E474000 - 0x0000000000018A00
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe/DEBUG/SetupBrowser.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: B9D4C360-BCFB-4F9B-9298-53C136982258 7E48C4F0
InstallProtocolInterface: A770C357-B693-4E6D-A6CF-D21C728E550B 7E48C520
InstallProtocolInterface: 1F73B18D-4630-43C1-A1DE-6F80855D7DA4 7E48C500
Loading driver F9D88642-0737-49BC-81B5-6889CD57D9EA
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7EC2B1C0
Loading driver at 0x0007E4B4000 EntryPoint=0x0007E4B746E SmbiosDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7EC2B498
ProtectUefiImageCommon - 0x7EC2B1C0
  - 0x000000007E4B4000 - 0x0000000000005D00
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe/DEBUG/SmbiosDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
Select Item: 0x0
FW CFG Signature: 0x554D4551
Select Item: 0x1
FW CFG Revision: 0x3
QemuFwCfg interface (DMA) is supported.
Select Item: 0x19
Select Item: 0x19
Select Item: 0x27
DetectSmbiosVersion: SMBIOS version from QEMU: 0x0208
InstallProtocolInterface: 03583FF6-CB36-4940-947E-B9B39F4AFAF7 7E4B9B90
Loading driver 17985E6F-E778-4D94-AEFA-C5DD2B77E186
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7EC26CC0
Loading driver at 0x0007E49F000 EntryPoint=0x0007E4A3451 QemuFwCfgAcpiPlatform.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7EC26198
ProtectUefiImageCommon - 0x7EC26CC0
  - 0x000000007E49F000 - 0x0000000000006D40
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe/DEBUG/QemuFwCfgAcpiPlatform.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
Select Item: 0x0
FW CFG Signature: 0x554D4551
Select Item: 0x1
FW CFG Revision: 0x3
QemuFwCfg interface (DMA) is supported.
AcpiPlatformEntryPoint: waiting for root bridges to be connected, registered callback
Loading driver FA20568B-548B-4B2B-81EF-1BA08D4A3CEC
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7EC26240
Loading driver at 0x0007E444000 EntryPoint=0x0007E44984B BootScriptExecutorDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7EC26818
ProtectUefiImageCommon - 0x7EC26240
  - 0x000000007E444000 - 0x0000000000017700
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe/DEBUG/BootScriptExecutorDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
Loading driver F74D20EE-37E7-48FC-97F7-9B1047749C69
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7EC25BC0
Loading driver at 0x0007E4D9000 EntryPoint=0x0007E4D9FB9 LogoDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7EC25F18
InstallProtocolInterface: 6A1EE763-D47A-43B4-AABE-EF1DE2AB56FC 7E4DABB0
ProtectUefiImageCommon - 0x7EC25BC0
  - 0x000000007E4D9000 - 0x0000000000004B00
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Logo/LogoDxe/DEBUG/LogoDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 53CD299F-2BC1-40C0-8C07-23F64FDB30E0 7E4DAA00
Loading driver DCE1B094-7DC6-45D0-9FDD-D7FC3CC3E4EF
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7EC24B40
Loading driver at 0x0007E495000 EntryPoint=0x0007E497822 QemuRamfbDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7EC24E98
ProtectUefiImageCommon - 0x7EC24B40
  - 0x000000007E495000 - 0x0000000000004C00
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/OvmfPkg/QemuRamfbDxe/QemuRamfbDxe/DEBUG/QemuRamfbDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
Select Item: 0x0
FW CFG Signature: 0x554D4551
Select Item: 0x1
FW CFG Revision: 0x3
QemuFwCfg interface (DMA) is supported.
Select Item: 0x19
Error: Image at 0007E495000 start failed: Not Found
Loading driver FE5CEA76-4F72-49E8-986F-2CD899DFFE5D
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7EC24B40
Loading driver at 0x0007E493000 EntryPoint=0x0007E496DA8 FaultTolerantWriteDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7EC24098
ProtectUefiImageCommon - 0x7EC24B40
  - 0x000000007E493000 - 0x0000000000005A40
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe/DEBUG/FaultTolerantWriteDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
Ftw: FtwWorkSpaceLba - 0x41, WorkBlockSize  - 0x1000, FtwWorkSpaceBase - 0x0
Ftw: FtwSpareLba     - 0x42, SpareBlockSize - 0x1000
Ftw: NumberOfWorkBlock - 0x1, FtwWorkBlockLba - 0x41
Ftw: WorkSpaceLbaInSpare - 0x0, WorkSpaceBaseInSpare - 0x0
Ftw: Remaining work space size - FE0
InstallProtocolInterface: 3EBD9E82-2C78-4DE6-9786-8D4BFCB7C881 7EC01028
NOTICE - AuthVariableLibInitialize() returns Unsupported!
Variable driver will continue to work without auth variable support!
RecordSecureBootPolicyVarData GetVariable SecureBoot Status E
InstallProtocolInterface: 6441F818-6362-4E44-B570-7DBA31DD2453 0
Loading driver 378D7B65-8DA9-4773-B6E4-A47826A833E1
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7EC243C0
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe/DEBUG/PcRtc.dll
Loading driver at 0x0007F0B9000 EntryPoint=0x0007F0BC237 PcRtc.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7EC24618
ProtectUefiImageCommon - 0x7EC243C0
  - 0x000000007F0B9000 - 0x0000000000006000
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe/DEBUG/PcRtc.dll
SetUefiImageMemoryAttributes - 0x000000007F0B9000 - 0x0000000000001000 (0x0000000000004008)
SetUefiImageMemoryAttributes - 0x000000007F0BA000 - 0x0000000000004000 (0x0000000000020008)
SetUefiImageMemoryAttributes - 0x000000007F0BE000 - 0x0000000000001000 (0x0000000000004008)
InstallProtocolInterface: 27CFAC87-46CC-11D4-9A38-0090273FC14D 0
Loading driver F099D67F-71AE-4C36-B2A3-DCEB0EB2B7D8
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7EC23940
Loading driver at 0x0007E4B2000 EntryPoint=0x0007E4B3083 WatchdogTimer.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7EC23298
ProtectUefiImageCommon - 0x7EC23940
  - 0x000000007E4B2000 - 0x0000000000001F00
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer/DEBUG/WatchdogTimer.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 665E3FF5-46CC-11D4-9A38-0090273FC14D 7E4B3D50
Loading driver AD608272-D07F-4964-801E-7BD3B7888652
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7E4D8040
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe/DEBUG/MonotonicCounterRuntimeDxe.dll
Loading driver at 0x0007F0B5000 EntryPoint=0x0007F0B6E5E MonotonicCounterRuntimeDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7E4D8D18
ProtectUefiImageCommon - 0x7E4D8040
  - 0x000000007F0B5000 - 0x0000000000004000
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe/DEBUG/MonotonicCounterRuntimeDxe.dll
SetUefiImageMemoryAttributes - 0x000000007F0B5000 - 0x0000000000001000 (0x0000000000004008)
SetUefiImageMemoryAttributes - 0x000000007F0B6000 - 0x0000000000002000 (0x0000000000020008)
SetUefiImageMemoryAttributes - 0x000000007F0B8000 - 0x0000000000001000 (0x0000000000004008)
InstallProtocolInterface: 1DA97072-BDDC-4B30-99F1-72A0B56FFF2A 0
Loading driver 42857F0A-13F2-4B21-8A23-53D3F714B840
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7E4D84C0
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe/DEBUG/CapsuleRuntimeDxe.dll
Loading driver at 0x0007F0B1000 EntryPoint=0x0007F0B30E7 CapsuleRuntimeDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7E4D8898
ProtectUefiImageCommon - 0x7E4D84C0
  - 0x000000007F0B1000 - 0x0000000000004000
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe/DEBUG/CapsuleRuntimeDxe.dll
SetUefiImageMemoryAttributes - 0x000000007F0B1000 - 0x0000000000001000 (0x0000000000004008)
SetUefiImageMemoryAttributes - 0x000000007F0B2000 - 0x0000000000002000 (0x0000000000020008)
SetUefiImageMemoryAttributes - 0x000000007F0B4000 - 0x0000000000001000 (0x0000000000004008)
InstallProtocolInterface: 5053697E-2CBC-4819-90D9-0580DEEE5754 0
Loading driver EBF8ED7C-0DD1-4787-84F1-F48D537DCACF
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7E4D70C0
Loading driver at 0x0007E48D000 EntryPoint=0x0007E490BE7 DriverHealthManagerDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7E4D7A18
ProtectUefiImageCommon - 0x7E4D70C0
  - 0x000000007E48D000 - 0x0000000000005E40
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe/DEBUG/DriverHealthManagerDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 09576E91-6D3F-11D2-8E39-00A0C969723B 7E492860
InstallProtocolInterface: 330D4706-F2A0-4E4F-A369-B66FA8D54385 7E492830
Loading driver 6D33944A-EC75-4855-A54D-809C75241F6C
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7E4B0D40
Loading driver at 0x0007E412000 EntryPoint=0x0007E4221DD BdsDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7E4B1C18
ProtectUefiImageCommon - 0x7E4B0D40
  - 0x000000007E412000 - 0x00000000000189C0
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Universal/BdsDxe/BdsDxe/DEBUG/BdsDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
Select Item: 0x0
FW CFG Signature: 0x554D4551
Select Item: 0x1
FW CFG Revision: 0x3
QemuFwCfg interface (DMA) is supported.
InstallProtocolInterface: 665E3FF6-46CC-11D4-9A38-0090273FC14D 7E42A740
Loading driver 28A03FF4-12B3-4305-A417-BB1A4F94081E
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7E4B1140
Loading driver at 0x0007E45E000 EntryPoint=0x0007E464B6C RamDiskDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7E4B0998
ProtectUefiImageCommon - 0x7E4B1140
  - 0x000000007E45E000 - 0x000000000000A9C0
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe/DEBUG/RamDiskDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 09576E91-6D3F-11D2-8E39-00A0C969723B 7E4B0898
InstallProtocolInterface: 330D4706-F2A0-4E4F-A369-B66FA8D54385 7E468698
InstallProtocolInterface: 09576E91-6D3F-11D2-8E39-00A0C969723B 7E468730
InstallProtocolInterface: 330D4706-F2A0-4E4F-A369-B66FA8D54385 7E4B04B0
InstallProtocolInterface: AB38A0DF-6873-44A9-87E6-D4EB56148449 7E468420
InstallProtocolInterface: 28A03FF4-12B3-4305-A417-BB1A4F94081E 7E4B0498
Loading driver E660EA85-058E-4B55-A54B-F02F83A24707
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7E49C6C0
Loading driver at 0x0007DC57000 EntryPoint=0x0007DC656BC DisplayEngine.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7E49D718
ProtectUefiImageCommon - 0x7E49C6C0
  - 0x000000007DC57000 - 0x0000000000013800
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe/DEBUG/DisplayEngine.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 9BBE29E9-FDA1-41EC-AD52-452213742D2E 7DC68C70
InstallProtocolInterface: 4311EDC0-6054-46D4-9E40-893EA952FCCC 7DC68C88
Loading driver 4110465D-5FF3-4F4B-B580-24ED0D06747A
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7E4720C0
Loading driver at 0x0007E469000 EntryPoint=0x0007E46AE00 SmbiosPlatformDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7E472A98
ProtectUefiImageCommon - 0x7E4720C0
  - 0x000000007E469000 - 0x0000000000003B80
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe/DEBUG/SmbiosPlatformDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
Select Item: 0x0
FW CFG Signature: 0x554D4551
Select Item: 0x1
FW CFG Revision: 0x3
QemuFwCfg interface (DMA) is supported.
Select Item: 0x19
Select Item: 0x28
SmbiosAdd: Smbios type 1 with size 0x4B is added to 32-bit table
SmbiosCreateTable: Initialize 32-bit entry point structure
SmbiosCreateTable() re-allocate SMBIOS 32-bit table
SmbiosAdd: Smbios type 3 with size 0x27 is added to 32-bit table
SmbiosAdd: Smbios type 4 with size 0x41 is added to 32-bit table
SmbiosAdd: Smbios type 16 with size 0x19 is added to 32-bit table
SmbiosAdd: Smbios type 17 with size 0x35 is added to 32-bit table
SmbiosAdd: Smbios type 19 with size 0x21 is added to 32-bit table
SmbiosAdd: Smbios type 19 with size 0x21 is added to 32-bit table
SmbiosAdd: Smbios type 32 with size 0xD is added to 32-bit table
FirmwareVendor:            "EDK II" (6 chars)
FirmwareVersionString:     "unknown" (7 chars)
FirmwareReleaseDateString: "02/02/2022" (10 chars)
SmbiosAdd: Smbios type 0 with size 0x35 is added to 32-bit table
Loading driver D9DCC5DF-4007-435E-9098-8970935504B2
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7E4702C0
Loading driver at 0x0007E438000 EntryPoint=0x0007E43B6E7 PlatformDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7E470598
ProtectUefiImageCommon - 0x7E4702C0
  - 0x000000007E438000 - 0x0000000000005BC0
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/OvmfPkg/PlatformDxe/Platform/DEBUG/PlatformDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 09576E91-6D3F-11D2-8E39-00A0C969723B 7E43D9C0
InstallProtocolInterface: 330D4706-F2A0-4E4F-A369-B66FA8D54385 7E43DA90
Loading driver 93B80004-9FB3-11D4-9A3A-0090273FC14D
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7E46F140
Loading driver at 0x0007DC47000 EntryPoint=0x0007DC53221 PciBusDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7E46F398
ProtectUefiImageCommon - 0x7E46F140
  - 0x000000007DC47000 - 0x000000000000F140
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe/DEBUG/PciBusDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 7DC55CC0
InstallProtocolInterface: 107A772C-D5E1-11D4-9A46-0090273FC14D 7DC55BA0
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 7DC55E80
InstallProtocolInterface: 19CB87AB-2CB9-4665-8360-DDCF6054F79D 7DC55E60
Loading driver 83DD3B39-7CAF-4FAC-A542-E050B767E3A7
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7E46E8C0
Loading driver at 0x0007E435000 EntryPoint=0x0007E436D0B VirtioPciDeviceDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7E46E818
ProtectUefiImageCommon - 0x7E46E8C0
  - 0x000000007E435000 - 0x0000000000003000
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe/DEBUG/VirtioPciDeviceDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 7E437DA0
InstallProtocolInterface: 107A772C-D5E1-11D4-9A46-0090273FC14D 7E437E00
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 7E437D80
Loading driver 0170F60C-1D40-4651-956D-F0BD9879D527
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7E46D040
Loading driver at 0x0007E430000 EntryPoint=0x0007E43341D Virtio10.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7E46E498
ProtectUefiImageCommon - 0x7E46D040
  - 0x000000007E430000 - 0x0000000000004B00
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/OvmfPkg/Virtio10Dxe/Virtio10/DEBUG/Virtio10.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 7E4348A0
InstallProtocolInterface: 107A772C-D5E1-11D4-9A46-0090273FC14D 7E434900
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 7E434880
Loading driver 11D92DFB-3CA9-4F93-BA2E-4780ED3E03B5
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7E46D9C0
Loading driver at 0x0007E42C000 EntryPoint=0x0007E42E27F VirtioBlkDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7E46D318
ProtectUefiImageCommon - 0x7E46D9C0
  - 0x000000007E42C000 - 0x0000000000003580
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/OvmfPkg/VirtioBlkDxe/VirtioBlk/DEBUG/VirtioBlkDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 7E42F3A0
InstallProtocolInterface: 107A772C-D5E1-11D4-9A46-0090273FC14D 7E42F400
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 7E42F380
Loading driver FAB5D4F4-83C0-4AAF-8480-442D11DF6CEA
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7E45D040
Loading driver at 0x0007E40E000 EntryPoint=0x0007E410834 VirtioScsiDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7E46D598
ProtectUefiImageCommon - 0x7E45D040
  - 0x000000007E40E000 - 0x0000000000003B00
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/OvmfPkg/VirtioScsiDxe/VirtioScsi/DEBUG/VirtioScsiDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 7E411920
InstallProtocolInterface: 107A772C-D5E1-11D4-9A46-0090273FC14D 7E411980
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 7E411900
Loading driver 58E26F0D-CBAC-4BBA-B70F-18221415665A
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7E45D9C0
Loading driver at 0x0007E43E000 EntryPoint=0x0007E43FD90 VirtioRngDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7E45D318
ProtectUefiImageCommon - 0x7E45D9C0
  - 0x000000007E43E000 - 0x0000000000002F80
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/OvmfPkg/VirtioRngDxe/VirtioRng/DEBUG/VirtioRngDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 7E440DA0
InstallProtocolInterface: 107A772C-D5E1-11D4-9A46-0090273FC14D 7E440E00
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 7E440D80
Loading driver 51CCF399-4FDF-4E55-A45B-E123F84D456A
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7E45C040
Loading driver at 0x0007E406000 EntryPoint=0x0007E4086F2 ConPlatformDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7E45D598
ProtectUefiImageCommon - 0x7E45C040
  - 0x000000007E406000 - 0x0000000000003EC0
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe/DEBUG/ConPlatformDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 7E409C20
InstallProtocolInterface: 107A772C-D5E1-11D4-9A46-0090273FC14D 7E409D20
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 7E409BF0
InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 7E409BC0
InstallProtocolInterface: 107A772C-D5E1-11D4-9A46-0090273FC14D 7E409D20
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 7E409BF0
Loading driver 408EDCEC-CF6D-477C-A5A8-B4844E3DE281
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7E45C340
Loading driver at 0x0007DC37000 EntryPoint=0x0007DC3C210 ConSplitterDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7E45C898
ProtectUefiImageCommon - 0x7E45C340
  - 0x000000007DC37000 - 0x0000000000007680
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe/DEBUG/ConSplitterDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 7DC3E360
InstallProtocolInterface: 107A772C-D5E1-11D4-9A46-0090273FC14D 7DC3E440
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 7DC3DC60
InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 7DC3E2E0
InstallProtocolInterface: 107A772C-D5E1-11D4-9A46-0090273FC14D 7DC3E420
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 7DC3DC40
InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 7DC3E260
InstallProtocolInterface: 107A772C-D5E1-11D4-9A46-0090273FC14D 7DC3E400
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 7DC3DC20
InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 7DC3E1E0
InstallProtocolInterface: 107A772C-D5E1-11D4-9A46-0090273FC14D 7DC3E3E0
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 7DC3DC00
InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 7DC3E160
InstallProtocolInterface: 107A772C-D5E1-11D4-9A46-0090273FC14D 7DC3E3C0
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 7DC3DBE0
InstallProtocolInterface: 387477C1-69C7-11D2-8E39-00A0C969723B 7DC3DF90
InstallProtocolInterface: DD9E7534-7762-4698-8C14-F58517A625AA 7DC3DFC0
InstallProtocolInterface: 31878C87-0B75-11D5-9A4F-0090273FC14D 7DC3E030
InstallProtocolInterface: 8D59D32B-C655-4AE9-9B15-F25904992A43 7DC3E088
InstallProtocolInterface: 387477C2-69C7-11D2-8E39-00A0C969723B 7DC3DE50
InstallProtocolInterface: 387477C2-69C7-11D2-8E39-00A0C969723B 7DC3DD30
Loading driver CCCB0C28-4B24-11D5-9A5A-0090273FC14D
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7E42BC40
Loading driver at 0x0007DC41000 EntryPoint=0x0007DC4409D GraphicsConsoleDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7E42BB18
ProtectUefiImageCommon - 0x7E42BC40
  - 0x000000007DC41000 - 0x0000000000005EC0
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe/DEBUG/GraphicsConsoleDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 7DC45560
InstallProtocolInterface: 107A772C-D5E1-11D4-9A46-0090273FC14D 7DC46D00
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 7DC45530
Loading driver 9E863906-A40F-4875-977F-5B93FF237FC6
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7E42B3C0
Loading driver at 0x0007DC27000 EntryPoint=0x0007DC2C998 TerminalDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7E40DF98
ProtectUefiImageCommon - 0x7E42B3C0
  - 0x000000007DC27000 - 0x0000000000007C40
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe/DEBUG/TerminalDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 7DC2EA40
InstallProtocolInterface: 107A772C-D5E1-11D4-9A46-0090273FC14D 7DC2EAA0
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 7DC2E7D0
Loading driver 806040CA-DAD9-4978-A3B4-2D2AB0C8A48F
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7E40D140
Loading driver at 0x0007DC21000 EntryPoint=0x0007DC235FC QemuKernelLoaderFsDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7E40D398
ProtectUefiImageCommon - 0x7E40D140
  - 0x000000007DC21000 - 0x0000000000005100
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe/DEBUG/QemuKernelLoaderFsDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
Select Item: 0x0
FW CFG Signature: 0x554D4551
Select Item: 0x1
FW CFG Revision: 0x3
QemuFwCfg interface (DMA) is supported.
Select Item: 0x17
Select Item: 0x8
FetchBlob: loading 11956736 bytes for "kernel"
Select Item: 0x18
Select Item: 0x11
VerifyBlob: Verifier called but no hashes table discoverd in MEMFD
Error: Image at 0007DC21000 start failed: Access Denied
Loading driver 6B38F7B4-AD98-40E9-9093-ACA2B5A253C4
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7E40D140
Loading driver at 0x0007DC22000 EntryPoint=0x0007DC24FB6 DiskIoDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7E40D598
ProtectUefiImageCommon - 0x7E40D140
  - 0x000000007DC22000 - 0x0000000000004840
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe/DEBUG/DiskIoDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 7DC265E0
InstallProtocolInterface: 107A772C-D5E1-11D4-9A46-0090273FC14D 7DC26700
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 7DC265C0
Loading driver 1FA1F39E-FEFF-4AAE-BD7B-38A070A3B609
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7E40C040
Loading driver at 0x0007DC1B000 EntryPoint=0x0007DC1FC9D PartitionDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7E40D718
ProtectUefiImageCommon - 0x7E40C040
  - 0x000000007DC1B000 - 0x0000000000006740
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe/DEBUG/PartitionDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 7DC214E0
InstallProtocolInterface: 107A772C-D5E1-11D4-9A46-0090273FC14D 7DC215E0
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 7DC214C0
Loading driver CD3BAFB6-50FB-4FE8-8E4E-AB74D2C1A600
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7E40C2C0
Loading driver at 0x0007DC34000 EntryPoint=0x0007DC3527C EnglishDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7E40C518
ProtectUefiImageCommon - 0x7E40C2C0
  - 0x000000007DC34000 - 0x0000000000002200
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe/DEBUG/EnglishDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 1D85CD7F-F43D-11D2-9A0C-0090273FC14D 7DC35D60
InstallProtocolInterface: A4C751FC-23AE-4C3E-92E9-4964CF63F349 7DC35D00
Loading driver 0167CCC4-D0F7-4F21-A3EF-9E64B7CDCE8B
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7E40B040
Loading driver at 0x0007E400000 EntryPoint=0x0007E402BD6 ScsiBus.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7E40C898
ProtectUefiImageCommon - 0x7E40B040
  - 0x000000007E400000 - 0x0000000000004000
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe/DEBUG/ScsiBus.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 7E403E00
InstallProtocolInterface: 107A772C-D5E1-11D4-9A46-0090273FC14D 7E403EA0
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 7E403DE0
Loading driver 0A66E322-3740-4CCE-AD62-BD172CECCA35
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7E40B9C0
Loading driver at 0x0007DC07000 EntryPoint=0x0007DC0F1EA ScsiDisk.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7E40BF18
ProtectUefiImageCommon - 0x7E40B9C0
  - 0x000000007DC07000 - 0x0000000000009CC0
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe/DEBUG/ScsiDisk.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 7DC10B20
InstallProtocolInterface: 107A772C-D5E1-11D4-9A46-0090273FC14D 7DC10B80
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 7DC10AA0
Loading driver 820C59BB-274C-43B2-83EA-DAC673035A59
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7E40A040
Loading driver at 0x0007DC17000 EntryPoint=0x0007DC18FDF SataController.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7E40B518
ProtectUefiImageCommon - 0x7E40A040
  - 0x000000007DC17000 - 0x00000000000034C0
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe/DEBUG/SataController.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 7DC1A300
InstallProtocolInterface: 107A772C-D5E1-11D4-9A46-0090273FC14D 7DC1A360
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 7DC1A280
Loading driver 5E523CB4-D397-4986-87BD-A6DD8B22F455
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7E40A9C0
Loading driver at 0x0007CE80000 EntryPoint=0x0007CE88939 AtaAtapiPassThruDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7E40AF18
ProtectUefiImageCommon - 0x7E40A9C0
  - 0x000000007CE80000 - 0x000000000000B440
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru/DEBUG/AtaAtapiPassThruDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 7CE8AFC0
InstallProtocolInterface: 107A772C-D5E1-11D4-9A46-0090273FC14D 7CE8B020
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 7CE8AF40
Loading driver 19DF145A-B1D4-453F-8507-38816676D7F6
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7DC40040
Loading driver at 0x0007CE91000 EntryPoint=0x0007CE955A7 AtaBusDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7E40A518
ProtectUefiImageCommon - 0x7DC40040
  - 0x000000007CE91000 - 0x00000000000066C0
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe/DEBUG/AtaBusDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 7CE97240
InstallProtocolInterface: 107A772C-D5E1-11D4-9A46-0090273FC14D 7CE97330
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 7CE97310
Loading driver 5BE3BDF4-53CF-46A3-A6A9-73C34A6E5EE3
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7DC409C0
Loading driver at 0x0007CE6C000 EntryPoint=0x0007CE73434 NvmExpressDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7DC40F18
ProtectUefiImageCommon - 0x7DC409C0
  - 0x000000007CE6C000 - 0x0000000000009C00
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe/DEBUG/NvmExpressDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 7CE75A40
InstallProtocolInterface: 107A772C-D5E1-11D4-9A46-0090273FC14D 7CE75AA0
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 7CE75970
InstallProtocolInterface: 5C198761-16A8-4E69-972C-89D67954F81D 7CE758E0
Loading driver 864E1CA8-85EB-4D63-9DCC-6E0FC90FFD55
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7DC3F040
Loading driver at 0x0007DC13000 EntryPoint=0x0007DC14E15 SioBusDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7DC3FD18
ProtectUefiImageCommon - 0x7DC3F040
  - 0x000000007DC13000 - 0x00000000000031C0
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/OvmfPkg/SioBusDxe/SioBusDxe/DEBUG/SioBusDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 7DC15F60
InstallProtocolInterface: 107A772C-D5E1-11D4-9A46-0090273FC14D 7DC16080
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 7DC15F40
Loading driver E2775B47-D453-4EE3-ADA7-391A1B05AC17
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7DC3FAC0
Loading driver at 0x0007CE79000 EntryPoint=0x0007CE7D753 PciSioSerialDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7DC3F998
ProtectUefiImageCommon - 0x7DC3FAC0
  - 0x000000007CE79000 - 0x00000000000061C0
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxe/DEBUG/PciSioSerialDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 7CE7F000
InstallProtocolInterface: 107A772C-D5E1-11D4-9A46-0090273FC14D 7CE7F060
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 7CE7EE70
Loading driver C4D1F932-821F-4744-BF06-6D30F7730F8D
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7DC33040
Loading driver at 0x0007CE66000 EntryPoint=0x0007CE69D92 Ps2KeyboardDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7DC33D18
ProtectUefiImageCommon - 0x7DC33040
  - 0x000000007CE66000 - 0x0000000000005BC0
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe/DEBUG/Ps2KeyboardDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 7CE6B9E0
InstallProtocolInterface: 107A772C-D5E1-11D4-9A46-0090273FC14D 7CE6BA40
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 7CE6B970
Loading driver B8E62775-BB0A-43F0-A843-5BE8B14F8CCD
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7DC33AC0
Loading driver at 0x0007DC04000 EntryPoint=0x0007DC05663 BootGraphicsResourceTableDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7DC33998
ProtectUefiImageCommon - 0x7DC33AC0
  - 0x000000007DC04000 - 0x00000000000029C0
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe/DEBUG/BootGraphicsResourceTableDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: CDEA2BD3-FC25-4C1C-B97C-B31186064990 7DC06770
InstallProtocolInterface: 4B5DC1DF-1EAA-48B2-A7E9-EAC489A00B5C 7DC067F0
Loading driver 961578FE-B6B7-44C3-AF35-6BC705CD2B1F
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7DC32CC0
Loading driver at 0x0007CE50000 EntryPoint=0x0007CE57F03 Fat.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7DC32B18
ProtectUefiImageCommon - 0x7DC32CC0
  - 0x000000007CE50000 - 0x000000000000A040
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/FatPkg/EnhancedFatDxe/Fat/DEBUG/Fat.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 7CE59EA0
InstallProtocolInterface: 107A772C-D5E1-11D4-9A46-0090273FC14D 7CE59F00
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 7CE59CD0
Loading driver 905F13B0-8F91-4B0A-BD76-E1E78F9422E4
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7DC32240
Loading driver at 0x0007CE49000 EntryPoint=0x0007CE4DB87 UdfDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7DC32998
ProtectUefiImageCommon - 0x7DC32240
  - 0x000000007CE49000 - 0x00000000000063C0
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe/DEBUG/UdfDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 7CE4F120
InstallProtocolInterface: 107A772C-D5E1-11D4-9A46-0090273FC14D 7CE4F280
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 7CE4F100
Loading driver 2FB92EFA-2EE0-4BAE-9EB6-7464125E1EF7
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7DC31B40
Loading driver at 0x0007CE42000 EntryPoint=0x0007CE4734B UhciDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7DC31098
ProtectUefiImageCommon - 0x7DC31B40
  - 0x000000007CE42000 - 0x0000000000006F80
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe/DEBUG/UhciDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 7CE48D80
InstallProtocolInterface: 107A772C-D5E1-11D4-9A46-0090273FC14D 7CE48E00
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 7CE48DE0
Loading driver BDFE430E-8F2A-4DB0-9991-6F856594777E
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7DC31240
Loading driver at 0x0007CE39000 EntryPoint=0x0007CE3F4B7 EhciDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7DC31798
ProtectUefiImageCommon - 0x7DC31240
  - 0x000000007CE39000 - 0x0000000000008940
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe/DEBUG/EhciDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 7CE417A0
InstallProtocolInterface: 107A772C-D5E1-11D4-9A46-0090273FC14D 7CE41800
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 7CE41730
Loading driver B7F50E91-A759-412C-ADE4-DCD03E7F7C28
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7DC30B40
Loading driver at 0x0007CE1D000 EntryPoint=0x0007CE220E1 XhciDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7DC30098
ProtectUefiImageCommon - 0x7DC30B40
  - 0x000000007CE1D000 - 0x000000000000D780
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe/DEBUG/XhciDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 7CE2A4E0
InstallProtocolInterface: 107A772C-D5E1-11D4-9A46-0090273FC14D 7CE2A5E0
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 7CE2A5C0
Loading driver 240612B7-A063-11D4-9A3A-0090273FC14D
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7DC30240
Loading driver at 0x0007CE2F000 EntryPoint=0x0007CE358CA UsbBusDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7DC30798
ProtectUefiImageCommon - 0x7DC30240
  - 0x000000007CE2F000 - 0x0000000000009540
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe/DEBUG/UsbBusDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 7CE382A0
InstallProtocolInterface: 107A772C-D5E1-11D4-9A46-0090273FC14D 7CE38200
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 7CE381A0
Loading driver 2D2E62CF-9ECF-43B7-8219-94E7FC713DFE
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7DC2FB40
Loading driver at 0x0007CE16000 EntryPoint=0x0007CE1A21C UsbKbDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7DC2F098
ProtectUefiImageCommon - 0x7DC2FB40
  - 0x000000007CE16000 - 0x0000000000006400
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe/DEBUG/UsbKbDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 7CE1BAA0
InstallProtocolInterface: 107A772C-D5E1-11D4-9A46-0090273FC14D 7CE1C260
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 7CE1C240
Loading driver 9FB4B4A7-42C0-4BCD-8540-9BCC6711F83E
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7DC2F240
Loading driver at 0x0007CE10000 EntryPoint=0x0007CE13C48 UsbMassStorageDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7DC2F798
ProtectUefiImageCommon - 0x7DC2F240
  - 0x000000007CE10000 - 0x0000000000005980
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe/DEBUG/UsbMassStorageDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 7CE15760
InstallProtocolInterface: 107A772C-D5E1-11D4-9A46-0090273FC14D 7CE15840
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 7CE15730
Loading driver E3752948-B9A1-4770-90C4-DF41C38986BE
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7DC12B40
Loading driver at 0x0007CE09000 EntryPoint=0x0007CE0D05A QemuVideoDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7DC12098
ProtectUefiImageCommon - 0x7DC12B40
  - 0x000000007CE09000 - 0x0000000000006700
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/OvmfPkg/QemuVideoDxe/QemuVideoDxe/DEBUG/QemuVideoDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 7CE0F560
InstallProtocolInterface: 107A772C-D5E1-11D4-9A46-0090273FC14D 7CE0F5C0
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 7CE0F350
Loading driver D6099B94-CD97-4CC5-8714-7F6312701A8A
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 7DC12240
Loading driver at 0x0007CE03000 EntryPoint=0x0007CE07088 VirtioGpuDxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7DC12798
ProtectUefiImageCommon - 0x7DC12240
  - 0x000000007CE03000 - 0x0000000000005D80
 Image - /home/choehojun/AMDSEV/ovmf/Build/AmdSev/DEBUG_GCC5/X64/OvmfPkg/VirtioGpuDxe/VirtioGpu/DEBUG/VirtioGpuDxe.dll
!!!!!!!!  Image Section Alignment(0x40) does not match Required Alignment (0x1000)  !!!!!!!!
ProtectUefiImage failed to create image properties record
InstallProtocolInterface: 18A031AB-B443-4D1A-A5C0-0C09261E9F71 7CE08B60
InstallProtocolInterface: 6A7A5CFF-E8D9-4F70-BADA-75AB3025CE14 7CE08B30
[Bds] Entry...
[BdsDxe] Locate Variable Policy protocol - Success
Variable Driver Auto Update Lang, Lang:eng, PlatformLang:en Status: Success
PlatformBootManagerBeforeConsole
Registered NotifyDevPath Event
PCI Bus First Scanning
PciBus: Discovered PCI @ [00|00|00]  [VID = 0x8086, DID = 0x29C0]

PciBus: Discovered PCI @ [00|01|00]  [VID = 0x1234, DID = 0x1111]
   BAR[0]: Type = PMem32; Alignment = 0xFFFFFF; Length = 0x1000000;     Offset = 0x10
   BAR[2]: Type =  Mem32; Alignment = 0xFFF;    Length = 0x1000;        Offset = 0x18

PciBus: Discovered PCI @ [00|02|00]  [VID = 0x8086, DID = 0x10D3]
   BAR[0]: Type =  Mem32; Alignment = 0x1FFFF;  Length = 0x20000;       Offset = 0x10
   BAR[1]: Type =  Mem32; Alignment = 0x1FFFF;  Length = 0x20000;       Offset = 0x14
   BAR[2]: Type =   Io32; Alignment = 0x1F;     Length = 0x20;  Offset = 0x18
   BAR[3]: Type =  Mem32; Alignment = 0x3FFF;   Length = 0x4000;        Offset = 0x1C

PciBus: Discovered PCI @ [00|03|00]  [VID = 0x1AF4, DID = 0x1048]
   BAR[1]: Type =  Mem32; Alignment = 0xFFF;    Length = 0x1000;        Offset = 0x14
   BAR[4]: Type = PMem64; Alignment = 0x3FFF;   Length = 0x4000;        Offset = 0x20

PciBus: Discovered PCI @ [00|1F|00]  [VID = 0x8086, DID = 0x2918]

PciBus: Discovered PCI @ [00|1F|02]  [VID = 0x8086, DID = 0x2922]
   BAR[4]: Type =   Io32; Alignment = 0x1F;     Length = 0x20;  Offset = 0x20
   BAR[5]: Type =  Mem32; Alignment = 0xFFF;    Length = 0x1000;        Offset = 0x24

PciBus: Discovered PCI @ [00|1F|03]  [VID = 0x8086, DID = 0x2930]
   BAR[4]: Type =   Io32; Alignment = 0x3F;     Length = 0x40;  Offset = 0x20

PCI Bus Second Scanning
PciBus: Discovered PCI @ [00|00|00]  [VID = 0x8086, DID = 0x29C0]

PciBus: Discovered PCI @ [00|01|00]  [VID = 0x1234, DID = 0x1111]
   BAR[0]: Type = PMem32; Alignment = 0xFFFFFF; Length = 0x1000000;     Offset = 0x10
   BAR[2]: Type =  Mem32; Alignment = 0xFFF;    Length = 0x1000;        Offset = 0x18

PciBus: Discovered PCI @ [00|02|00]  [VID = 0x8086, DID = 0x10D3]
   BAR[0]: Type =  Mem32; Alignment = 0x1FFFF;  Length = 0x20000;       Offset = 0x10
   BAR[1]: Type =  Mem32; Alignment = 0x1FFFF;  Length = 0x20000;       Offset = 0x14
   BAR[2]: Type =   Io32; Alignment = 0x1F;     Length = 0x20;  Offset = 0x18
   BAR[3]: Type =  Mem32; Alignment = 0x3FFF;   Length = 0x4000;        Offset = 0x1C

PciBus: Discovered PCI @ [00|03|00]  [VID = 0x1AF4, DID = 0x1048]
   BAR[1]: Type =  Mem32; Alignment = 0xFFF;    Length = 0x1000;        Offset = 0x14
   BAR[4]: Type = PMem64; Alignment = 0x3FFF;   Length = 0x4000;        Offset = 0x20

PciBus: Discovered PCI @ [00|1F|00]  [VID = 0x8086, DID = 0x2918]

PciBus: Discovered PCI @ [00|1F|02]  [VID = 0x8086, DID = 0x2922]
   BAR[4]: Type =   Io32; Alignment = 0x1F;     Length = 0x20;  Offset = 0x20
   BAR[5]: Type =  Mem32; Alignment = 0xFFF;    Length = 0x1000;        Offset = 0x24

PciBus: Discovered PCI @ [00|1F|03]  [VID = 0x8086, DID = 0x2930]
   BAR[4]: Type =   Io32; Alignment = 0x3F;     Length = 0x40;  Offset = 0x20

PciBus: Discovered PCI @ [00|00|00]  [VID = 0x8086, DID = 0x29C0]

PciBus: Discovered PCI @ [00|01|00]  [VID = 0x1234, DID = 0x1111]
   BAR[0]: Type = PMem32; Alignment = 0xFFFFFF; Length = 0x1000000;     Offset = 0x10
   BAR[2]: Type =  Mem32; Alignment = 0xFFF;    Length = 0x1000;        Offset = 0x18

PciBus: Discovered PCI @ [00|02|00]  [VID = 0x8086, DID = 0x10D3]
   BAR[0]: Type =  Mem32; Alignment = 0x1FFFF;  Length = 0x20000;       Offset = 0x10
   BAR[1]: Type =  Mem32; Alignment = 0x1FFFF;  Length = 0x20000;       Offset = 0x14
   BAR[2]: Type =   Io32; Alignment = 0x1F;     Length = 0x20;  Offset = 0x18
   BAR[3]: Type =  Mem32; Alignment = 0x3FFF;   Length = 0x4000;        Offset = 0x1C

PciBus: Discovered PCI @ [00|03|00]  [VID = 0x1AF4, DID = 0x1048]
   BAR[1]: Type =  Mem32; Alignment = 0xFFF;    Length = 0x1000;        Offset = 0x14
   BAR[4]: Type = PMem64; Alignment = 0x3FFF;   Length = 0x4000;        Offset = 0x20

PciBus: Discovered PCI @ [00|1F|00]  [VID = 0x8086, DID = 0x2918]

PciBus: Discovered PCI @ [00|1F|02]  [VID = 0x8086, DID = 0x2922]
   BAR[4]: Type =   Io32; Alignment = 0x1F;     Length = 0x20;  Offset = 0x20
   BAR[5]: Type =  Mem32; Alignment = 0xFFF;    Length = 0x1000;        Offset = 0x24

PciBus: Discovered PCI @ [00|1F|03]  [VID = 0x8086, DID = 0x2930]
   BAR[4]: Type =   Io32; Alignment = 0x3F;     Length = 0x40;  Offset = 0x20

PciHostBridge: SubmitResources for PciRoot(0x0)
 I/O: Granularity/SpecificFlag = 0 / 01
      Length/Alignment = 0x1000 / 0xFFF
 Mem: Granularity/SpecificFlag = 32 / 00
      Length/Alignment = 0x1100000 / 0xFFFFFF
 Mem: Granularity/SpecificFlag = 64 / 00
      Length/Alignment = 0x100000 / 0xFFFFF
PciBus: HostBridge->SubmitResources() - Success
PciHostBridge: NotifyPhase (AllocateResources)
 RootBridge: PciRoot(0x0)
  Mem: Base/Length/Alignment = 80000000/1100000/FFFFFF - Success
  Mem64: Base/Length/Alignment = C000000000/100000/FFFFF - Success
  I/O: Base/Length/Alignment = 6000/1000/FFF - Success
PciBus: HostBridge->NotifyPhase(AllocateResources) - Success
Process Option ROM: BAR Base/Length = 81000000/40000
qemu-system-x86_64: kvm_set_user_memory_region: KVM_SET_USER_MEMORY_REGION2 failed, slot=6, start=0x81000000, size=0x10000, flags=0x2, guest_memfd=-1, guest_memfd_offset=0x0: Invalid argument
kvm_set_phys_mem: error registering slot: Invalid argument
/tmp/cmdline.274341: line 1: 274371 Aborted                 (core dumped) /usr/local/bin/qemu-system-x86_64 -enable-kvm -cpu EPYC-v4 -machine q35 -smp 32,maxcpus=32 -m 4096M,slots=5,maxmem=12288M -no-reboot -bios /home/choehojun/ovmf/OVMF.fd -object secret,id=mysecret,file=./disk_enc.key -drive file=/home/choehojun/guest/ubuntu-22.04-kernel.qcow2,if=none,id=disk0,format=qcow2,encrypt.key-secret=mysecret -device virtio-scsi-pci,id=scsi0,disable-legacy=on,iommu_platform=true -device scsi-hd,drive=disk0 -machine memory-encryption=sev0,vmport=off -object memory-backend-memfd,id=ram1,size=4096M,share=true,prealloc=false -machine memory-backend=ram1 -object sev-snp-guest,id=sev0,policy=0x30000,cbitpos=51,reduced-phys-bits=5 -kernel ./vmlinuz-6.10.0-snp-guest-0c3836482481 -append "console=ttyS0 earlyprintk=serial root=/dev/sda1" -initrd ./initrd.img-6.10.0-snp-guest-0c3836482481 -nographic -monitor pty -monitor unix:monitor,server,nowait -net user,hostfwd=tcp::8080-:8080,hostfwd=tcp::2222-:22 -net nic
@tlendacky
Copy link
Collaborator

VerifyBlob: Verifier called but no hashes table discoverd in MEMFD

You need to add kernel-hashes=on to your sev-snp-guest object. I'm not sure if that will solve your issue, but it could be related.

@fitzthum, is this case allowed? AmdSev pkg running but kernel-hashes not specified on the qemu command line?

@fitzthum
Copy link

fitzthum commented Jan 2, 2025

It seems like @choehojun wants to extend the measurement to cover more components, but they don't seem to have injected the kernel hash given the message @tlendacky points out. Probably an extra flag must be provided to the hypervisor.

AFAIK booting with AMDSEV but without the kernel hashes should work. It should revert to OVMF's default boot flow. I'm not sure what it's getting caught up on here. It might be a good idea to test that the snp-latest scripts are building this in a way that works and that no changes have crept in and broken this. Ofc this wouldn't measure anything so I don't think it's what @choehojun wants to do.

@choehojun
Copy link
Author

@tlendacky
I added kernel-hashes=on option to sev-snp-guest object like below:

-object sev-snp-guest,id=sev0,policy=0x30000,cbitpos=51,reduced-phys-bits=5,kernel-hashes=on

However, the problem was not solved. Boot was failed because of same issue.

@choehojun
Copy link
Author

@fitzthum
My boot script was originally taken from the snp-latest branch and changed a little bit. (Change was for disk encryption and port forwarding) So, again, the success or failure of booting depends on OVMF's package. Here's my boot script:

#!/bin/bash

#
# user changeable parameters
#
HDA="/home/amd/fedora-30.raw"
MEM="4096"
SMP="32"
VNC=""
CONSOLE="serial"
USE_VIRTIO="1"
USE_DEFAULT_NETWORK="0"
CPU_MODEL="EPYC-v4"
MONITOR_PATH=monitor
QEMU_CONSOLE_LOG=`pwd`/stdout.log
CERTS_PATH=


SEV=
SEV_ES=
SEV_SNP=
ENCRYPTED=
ALLOW_DEBUG=

EXEC_PATH="/usr/local"
#EXEC_PATH="/home/choehojun/AMDSEV/usr/local"
#UEFI_PATH="/home/choehojun/att_report/edk2/Build/OvmfX64/DEBUG_GCC5/FV"
UEFI_PATH="/home/choehojun/ovmf"

usage() {
        echo "$0 [options]"
        echo "Available <commands>:"
        echo " -sev               launch SEV guest"
        echo " -sev-es            launch SEV guest"
        echo " -sev-snp           launch SNP guest"
        echo " -bios              the bios to use (default $UEFI_PATH)"
        echo " -encrypted PATH    using encrypted disk image, providing path of key file"
        echo " -hda PATH          hard disk file (default $HDA)"
        echo " -mem MEM           guest memory size in MB (default $MEM)"
        echo " -smp NCPUS         number of virtual cpus (default $SMP)"
        echo " -cpu CPU_MODEL     QEMU CPU model/type to use (default $CPU_MODEL)."
        echo "                    You can also specify additional CPU flags, e.g. -cpu $CPU_MODEL,+avx512f,+avx512dq"
        echo " -allow-debug       dump vmcb on exit and enable the trace"
        echo " -kernel PATH       kernel to use"
        echo " -initrd PATH       initrd to use"
        echo " -append ARGS       kernel command line arguments to use"
        echo " -cdrom PATH        CDROM image"
        echo " -default-network   enable default usermode networking"
        echo "                    (Requires that QEMU is built on a host that supports libslirp-dev 4.7 or newer)"
        echo " -monitor PATH      Path to QEMU monitor socket (default: $MONITOR_PATH)"
        echo " -log PATH          Path to QEMU console log (default: $QEMU_CONSOLE_LOG)"
        echo " -certs PATH        Path to SNP certificate blob for guest (default: none)"
        exit 1
}

add_opts() {
        echo -n "$* " >> ${QEMU_CMDLINE}
}

exit_from_int() {
        rm -rf ${QEMU_CMDLINE}
        # restore the mapping
        stty intr ^c
        exit 1
}

run_cmd () {
        $*
        if [ $? -ne 0 ]; then
                echo "command $* failed"
                exit 1
        fi
}

get_cbitpos() {
        modprobe cpuid
        #
        # Get C-bit position directly from the hardware
        #   Reads of /dev/cpu/x/cpuid have to be 16 bytes in size
        #     and the seek position represents the CPUID function
        #     to read.
        #   The skip parameter of DD skips ibs-sized blocks, so
        #     can't directly go to 0x8000001f function (since it
        #     is not a multiple of 16). So just start at 0x80000000
        #     function and read 32 functions to get to 0x8000001f
        #   To get to EBX, which contains the C-bit position, skip
        #     the first 4 bytes (EAX) and then convert 4 bytes.
        #

        EBX=$(dd if=/dev/cpu/0/cpuid ibs=16 count=32 skip=134217728 | tail -c 16 | od -An -t u4 -j 4 -N 4 | sed -re 's|^ *||')
        CBITPOS=$((EBX & 0x3f))
}

trap exit_from_int SIGINT

if [ `id -u` -ne 0 ]; then
        echo "Must be run as root!"
        exit 1
fi

while [ -n "$1" ]; do
        case "$1" in
                -sev-snp)       SEV_SNP="1"
                                SEV_ES="1"
                                SEV="1"
                                ;;
                -sev-es)        SEV_ES="1"
                                SEV="1"
                                ;;
                -sev)           SEV="1"
                                ;;
                -encrypted)     ENCRYPTED="1"
                                ENC_KEY_PATH="$2"
                                shift
                                ;;
                -hda)           HDA="$2"
                                shift
                                ;;
                -mem)           MEM="$2"
                                shift
                                ;;
                -smp)           SMP="$2"
                                shift
                                ;;
                -cpu)           CPU_MODEL="$2"
                                shift
                                ;;
                -bios)          UEFI_PATH="$2"
                                shift
                                ;;
                -allow-debug)   ALLOW_DEBUG="1"
                                ;;
                -kernel)        KERNEL_FILE=$2
                                shift
                                ;;
                -initrd)        INITRD_FILE=$2
                                shift
                                ;;
                -append)        APPEND=$2
                                shift
                                ;;
                -cdrom)         CDROM_FILE="$2"
                                shift
                                ;;
                -default-network)
                                USE_DEFAULT_NETWORK="1"
                                ;;
                -monitor)       MONITOR_PATH="$2"
                                shift
                                ;;
                -log)           QEMU_CONSOLE_LOG="$2"
                                shift
                                ;;
                -certs) CERTS_PATH="$2"
                                shift
                                ;;
                *)              usage
                                ;;
        esac

        shift
done

TMP="$EXEC_PATH/bin/qemu-system-x86_64"
QEMU_EXE="$(readlink -e $TMP)"
[ -z "$QEMU_EXE" ] && {
        echo "Can't locate qemu executable [$TMP]"
        usage
}

[ -n "$HDA" ] && {
        TMP="$HDA"
        HDA="$(readlink -e $TMP)"
        [ -z "$HDA" ] && {
                echo "Can't locate guest image file [$TMP]"
                usage
        }

        GUEST_NAME="$(basename $TMP | sed -re 's|\.[^\.]+$||')"
}

[ -n "$CDROM_FILE" ] && {
        TMP="$CDROM_FILE"
        CDROM_FILE="$(readlink -e $TMP)"
        [ -z "$CDROM_FILE" ] && {
                echo "Can't locate CD-Rom file [$TMP]"
                usage
        }

        [ -z "$GUEST_NAME" ] && GUEST_NAME="$(basename $TMP | sed -re 's|\.[^\.]+$||')"
}

TMP="$UEFI_PATH/OVMF_CODE.fd"
if [ -n "${SEV_SNP}" ]; then
        TMP="$UEFI_PATH/OVMF.fd"
fi
UEFI_CODE="$(readlink -e $TMP)"
[ -z "$UEFI_CODE" ] && {
        echo "Can't locate UEFI code file [$TMP]"
        usage
}

[ -e "./$GUEST_NAME.fd" ] || {
        TMP="$UEFI_PATH/OVMF_VARS.fd"
        UEFI_VARS="$(readlink -e $TMP)"
        [ -z "$UEFI_VARS" ] && {
                echo "Can't locate UEFI variable file [$TMP]"
                usage
        }

        run_cmd "cp $UEFI_VARS ./$GUEST_NAME.fd"
}
UEFI_VARS="$(readlink -e ./$GUEST_NAME.fd)"

if [ -n "${ALLOW_DEBUG}" ]; then
        # This will dump all the VMCB on VM exit
        echo 1 > /sys/module/kvm_amd/parameters/dump_all_vmcbs

        # Enable some KVM tracing to the debug
        #echo kvm: >/sys/kernel/debug/tracing/set_event
        #echo kvm:* >/sys/kernel/debug/tracing/set_event
        #echo kvm:kvm_page_fault >/sys/kernel/debug/tracing/set_event
        #echo >/sys/kernel/debug/tracing/set_event
        #echo > /sys/kernel/debug/tracing/trace
        #echo 1 > /sys/kernel/debug/tracing/tracing_on
fi

# we add all the qemu command line options into a file
QEMU_CMDLINE=/tmp/cmdline.$$
rm -rf $QEMU_CMDLINE

add_opts "$QEMU_EXE"

# Basic virtual machine property
add_opts "-enable-kvm -cpu ${CPU_MODEL} -machine q35"

# add number of VCPUs
[ -n "${SMP}" ] && add_opts "-smp ${SMP},maxcpus=32"

# define guest memory
add_opts "-m ${MEM}M,slots=5,maxmem=$((${MEM} + 8192))M"

# don't reboot for SEV-ES guest
add_opts "-no-reboot"

# The OVMF binary, including the non-volatile variable store, appears as a
# "normal" qemu drive on the host side, and it is exposed to the guest as a
# persistent flash device.
if [ -n "${SEV_SNP}" ]; then
    add_opts "-bios ${UEFI_CODE}"
else
    add_opts "-drive if=pflash,format=raw,unit=0,file=${UEFI_CODE},readonly"
    add_opts "-drive if=pflash,format=raw,unit=1,file=${UEFI_VARS}"
fi

# add CDROM if specified
[ -n "${CDROM_FILE}" ] && add_opts "-drive file=${CDROM_FILE},media=cdrom -boot d"

# NOTE: as of QEMU 7.2.0, libslirp-dev 4.7+ is needed, but fairly recent
# distros like Ubuntu 20.04 still only provide 4.1, so only enable
# usermode network if specifically requested.
if [ "$USE_DEFAULT_NETWORK" = "1" ]; then
    #echo "guest port 22 is fwd to host 8000..."
    #add_opts "-netdev user,id=vmnic,hostfwd=tcp::8000-:22 -device e1000,netdev=vmnic,romfile="
    add_opts "-netdev user,id=vmnic"
    add_opts " -device virtio-net-pci,disable-legacy=on,iommu_platform=true,netdev=vmnic,romfile="
fi

if [ -n "${ENCRYPTED}" ]; then
        add_opts "-object secret,id=mysecret,file=${ENC_KEY_PATH}"
fi

# If harddisk file is specified then add the HDD drive
if [ -n "${HDA}" ]; then
        if [ "$USE_VIRTIO" = "1" ]; then
                if [[ ${HDA} = *"qcow2" ]]; then
                        if [ -n "${ENCRYPTED}" ]; then
                                add_opts "-drive file=${HDA},if=none,id=disk0,format=qcow2,encrypt.key-secret=mysecret"
                        else
                                add_opts "-drive file=${HDA},if=none,id=disk0,format=qcow2"
                        fi
                else
                        add_opts "-drive file=${HDA},if=none,id=disk0,format=raw"
                fi
                add_opts "-device virtio-scsi-pci,id=scsi0,disable-legacy=on,iommu_platform=true"
                add_opts "-device scsi-hd,drive=disk0"
        else
                if [[ ${HDA} = *"qcow2" ]]; then
                        if [ -n "${ENCRYPTED}" ]; then
                                add_opts "-drive file=${HDA},format=qcow2,encrypt.key-secret=mysecret"
                        else
                                add_opts "-drive file=${HDA},format=qcow2"
                        fi
                else
                        add_opts "-drive file=${HDA},format=raw"
                fi
        fi
fi

# If this is SEV guest then add the encryption device objects to enable support
if [ -n "${SEV}" ]; then
        add_opts "-machine memory-encryption=sev0,vmport=off"
        get_cbitpos

        if [ -n "${SEV_SNP}" ]; then
                POLICY=$((0x30000))
                [ -n "${ALLOW_DEBUG}" ] && POLICY=$((POLICY | 0x80000))

                POLICY=$(printf "%#x" $POLICY)

                add_opts "-object memory-backend-memfd,id=ram1,size=${MEM}M,share=true,prealloc=false"
                add_opts "-machine memory-backend=ram1"
                if [ "${CERTS_PATH}" != "" ]; then
                        add_opts "-object sev-snp-guest,id=sev0,policy=${POLICY},cbitpos=${CBITPOS},reduced-phys-bits=5,certs-path=${CERTS_PATH}"
                else
                        add_opts "-object sev-snp-guest,id=sev0,policy=${POLICY},cbitpos=${CBITPOS},reduced-phys-bits=5,kernel-hashes=on"
                fi
        else
                POLICY=$((0x01))
                [ -n "${SEV_ES}" ] && POLICY=$((POLICY | 0x04))
                [ -n "${ALLOW_DEBUG}" ] && POLICY=$((POLICY & ~0x01))

                POLICY=$(printf "%#x" $POLICY)

                add_opts "-object sev-guest,id=sev0,policy=${POLICY},cbitpos=${CBITPOS},reduced-phys-bits=5"
        fi
fi

# if -kernel arg is specified then use the kernel provided in command line for boot
if [ "${KERNEL_FILE}" != "" ]; then
        add_opts "-kernel $KERNEL_FILE"
        if [ -n "$APPEND" ]; then
                add_opts "-append \"$APPEND\""
        else
                add_opts "-append \"console=ttyS0 earlyprintk=serial root=/dev/sda2\""
        fi
        [ -n "${INITRD_FILE}" ] && add_opts "-initrd ${INITRD_FILE}"
fi

# if console is serial then disable graphical interface
if [ "${CONSOLE}" = "serial" ]; then
        add_opts "-nographic"
else
        add_opts "-vga ${CONSOLE}"
fi

# start monitor on pty and named socket 'monitor'
add_opts "-monitor pty -monitor unix:${MONITOR_PATH},server,nowait"
add_opts "-net user,hostfwd=tcp::8080-:8080,hostfwd=tcp::2222-:22"
#add_opts "-net user,hostfwd=tcp::2222-:22"
add_opts "-net nic"

# save the command line args into log file
cat $QEMU_CMDLINE | tee ${QEMU_CONSOLE_LOG}
echo | tee -a ${QEMU_CONSOLE_LOG}

#touch /tmp/events
#add_opts "-trace events=/tmp/events"

# map CTRL-C to CTRL ]
echo "Mapping CTRL-C to CTRL-]"
stty intr ^]

echo "Launching VM ..."
echo "  $QEMU_CMDLINE"
sleep 1
bash ${QEMU_CMDLINE} 2>&1 | tee -a ${QEMU_CONSOLE_LOG}

# restore the mapping
stty intr ^c

rm -rf ${QEMU_CMDLINE}

@choehojun
Copy link
Author

I launched guest VM with this command:

sudo ./launch-qemu.sh -hda ubuntu-22.04-kernel.qcow2 -sev-snp -encrypted ./disk_enc.key -kernel ./vmlinuz-6.10.0-snp-guest-0c3836482481 -initrd ./initrd.img-6.10.0-snp-guest-0c3836482481 -append "console=ttyS0 earlyprintk=serial root=/dev/sda1"

@natesales
Copy link

I'm seeing this same issue.

I've tried building various versions of OvmfPkg/AmdSev/AmdSevX64.dsc:

All the above have the same error that you're seeing:

qemu-system-x86_64: kvm_set_user_memory_region: KVM_SET_USER_MEMORY_REGION2 failed, slot=6, start=0x81000000, size=0x10000, flags=0x2, guest_memfd=-1, guest_memfd_offset=0x0: Invalid argument

I'm using a very similar QEMU command, but without disk encryption or networking:

sudo ~/AMDSEV/usr/local/bin/qemu-system-x86_64 \
  -enable-kvm \
  -cpu EPYC-v4 \
  -machine q35 -smp 32,maxcpus=32 \
  -m 4096M,slots=5,maxmem=12288M \
  -no-reboot \
  -bios ~/edk2/Build/AmdSev/DEBUG_GCC5/FV/OVMF.fd \
  -drive file=./cvm.raw,if=none,id=disk0,format=raw \
  -device virtio-scsi-pci,id=scsi0,disable-legacy=on,iommu_platform=true \
  -device scsi-hd,drive=disk0 -machine memory-encryption=sev0,vmport=off \
  -object memory-backend-memfd,id=ram1,size=4096M,share=true,prealloc=false \
  -machine memory-backend=ram1 -object sev-snp-guest,id=sev0,policy=0x30000,cbitpos=51,reduced-phys-bits=5,kernel-hashes=on \
  -kernel ./cvm.vmlinuz \
  -append "console=ttyS0 earlyprintk=serial root=/dev/sda2" \
  -initrd ./cvm.initrd \
  -nographic -monitor pty -monitor unix:monitor,server,nowait

My process for building OVMF is as follows:

git clone https://github.com/tianocore/edk2 && cd edk2

git checkout edk2-stable202411

git rm -rf UnitTestFrameworkPkg
touch OvmfPkg/AmdSev/Grub/grub.efi

git submodule update --init --recursive
make -C BaseTools
. ./edksetup.sh --reconfig
nice build -q --cmd-len=64436 -DDEBUG_ON_SERIAL_PORT=TRUE -n 32 -t GCC5 -a X64 -p OvmfPkg/AmdSev/AmdSevX64.dsc

ls -lah Build/AmdSev/DEBUG_GCC5/FV/OVMF.fd

@tlendacky
Copy link
Collaborator

One of the differences between the OvmfPkgX64 and AmdSev happens at the failure:

OvmfPkgX64:

Process Option ROM: BAR Base/Length = 0/0

AmdSev:

Process Option ROM: BAR Base/Length = 81000000/10000

And it appears that attempting to map this range is failing. @kraxel, any idea why a PCI option ROM would be present in the AmdSev package but not the OvmfX64Pkg?

@tlendacky
Copy link
Collaborator

I noticed AmdSev was using the CcProbeLib NULL library. When I added the same CcProbeLib definitions as are in OvmfPkgX64.dsc, I was able to successfully boot with AmdSev.

Can @choehojun and/or @natesales test this patch:

diff --git a/OvmfPkg/AmdSev/AmdSevX64.dsc b/OvmfPkg/AmdSev/AmdSevX64.dsc
index c875d9e56e33..64d5ab819a1f 100644
--- a/OvmfPkg/AmdSev/AmdSevX64.dsc
+++ b/OvmfPkg/AmdSev/AmdSevX64.dsc
@@ -142,7 +142,6 @@ [LibraryClasses]
   PciCapLib|OvmfPkg/Library/BasePciCapLib/BasePciCapLib.inf
   PciCapPciSegmentLib|OvmfPkg/Library/BasePciCapPciSegmentLib/BasePciCapPciSegmentLib.inf
   PciCapPciIoLib|OvmfPkg/Library/UefiPciCapPciIoLib/UefiPciCapPciIoLib.inf
-  CcProbeLib|MdePkg/Library/CcProbeLibNull/CcProbeLibNull.inf
   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsicSev.inf
   OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
   SerialPortLib|PcAtChipsetPkg/Library/SerialIoLib/SerialIoLib.inf
@@ -173,6 +172,7 @@ [LibraryClasses]
   PeiHardwareInfoLib|OvmfPkg/Library/HardwareInfoLib/PeiHardwareInfoLib.inf
   DxeHardwareInfoLib|OvmfPkg/Library/HardwareInfoLib/DxeHardwareInfoLib.inf
   ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
+  CcProbeLib|OvmfPkg/Library/CcProbeLib/DxeCcProbeLib.inf
 
 !if $(SOURCE_DEBUG_ENABLE) == TRUE
   PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLibDebug.inf
@@ -232,6 +232,7 @@ [LibraryClasses.common.SEC]
   CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf
   CcExitLib|OvmfPkg/Library/CcExitLib/SecCcExitLib.inf
   MemEncryptSevLib|OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLib.inf
+  CcProbeLib|OvmfPkg/Library/CcProbeLib/SecPeiCcProbeLib.inf
 
 [LibraryClasses.common.PEI_CORE]
   HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
@@ -248,6 +249,7 @@ [LibraryClasses.common.PEI_CORE]
   DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPort.inf
 !endif
   PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
+  CcProbeLib|OvmfPkg/Library/CcProbeLib/SecPeiCcProbeLib.inf
 
 [LibraryClasses.common.PEIM]
   HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
@@ -277,6 +279,7 @@ [LibraryClasses.common.PEIM]
   QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgPeiLib.inf
 
   MemEncryptSevLib|OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLib.inf
+  CcProbeLib|OvmfPkg/Library/CcProbeLib/SecPeiCcProbeLib.inf
   PlatformInitLib|OvmfPkg/Library/PlatformInitLib/PlatformInitLib.inf
 
 [LibraryClasses.common.DXE_CORE]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants