Hi,
Commit 7735ed4f8eb3afaf1a97d27a8862f382c387f0bc
("OvmfPkg/PlatformInitLib: Set dynamic MMIO window size to 1/4")
breaks boot for both SEV-ES and SEV-SNP guests. The guest never reaches
the OS; firmware stops after binding the virtio-blk device.
bad : 7735ed4f8eb OvmfPkg/PlatformInitLib: Set dynamic MMIO window
size to 1/4
good : d98a39d4ce (its parent)
Same QEMU, same host, same guest image; only the OVMF commit differs.
How to reproduce (SEV-SNP)
--------------------------
Build OVMF from 7735ed4f8eb and run:
qemu-system-x86_64 \
-machine q35,confidential-guest-support=sev0,memory-backend=mem0 \
-object memory-backend-memfd,size=4096M,id=mem0 \
-object
sev-snp-guest,id=sev0,cbitpos=51,reduced-phys-bits=1,policy=0x30000 \
-cpu EPYC \
-smp 1 \
-m 4096 \
-bios OVMF.fd \
-nodefaults -vga none -nographic \
-device pcie-root-port,id=rp0,bus=pcie.0,addr=0x1,chassis=1 \
-device pcie-root-port,id=rp1,bus=pcie.0,addr=0x2,chassis=2 \
-blockdev node-name=file0,driver=file,filename=guest.qcow2 \
-blockdev node-name=drive0,driver=qcow2,file=file0 \
-device virtio-blk-pci,id=blk0,drive=drive0,bus=rp1,addr=0x0 \
-serial file:serial.log \
-enable-kvm
Observed:
Found Mass Storage device: PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)
InstallProtocolInterface: FA920010-6785-4941-B6EC-498C579F160A 7DD42020
qemu-system-x86_64: Convert non guest_memfd backed memory region
(0x8040000000 ,+ 0x1000) to private
EAX=00000000 EBX=00000000 ECX=00000000 EDX=00800f12
ESI=00000000 EDI=00000000 EBP=00000000 ESP=00000000
EIP=0000fff0 EFL=00000202 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =0000 00000000 0000ffff 00009300
CS =f000 ffff0000 0000ffff 00009b00
SS =0000 00000000 0000ffff 00009300
DS =0000 00000000 0000ffff 00009300
FS =0000 00000000 0000ffff 00009300
GS =0000 00000000 0000ffff 00009300
LDT=0000 00000000 0000ffff 00008200
TR =0000 00000000 0000ffff 00008b00
GDT= 00000000 0000ffff
IDT= 00000000 0000ffff
CR0=60000010 CR2=00000000 CR3=00000000 CR4=00000000
DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000
DR3=0000000000000000
DR6=00000000ffff0ff0 DR7=0000000000000400
EFER=0000000000000000
Code=c5 5a 08 2d 00 00 00 00 00 00 00 00 00 00 00 00 56 54 46 00 <0f> 20
c0 a8 01 74 05 e9 0c ff ff ff e9 f1 fe 90 00 00 00 00 00 00 00 00 00 00
00 00 00 00
SEV-ES
------
The same topology with -object sev-guest (host booted with sev=nosnp)
fails at the same point:
2026-08-27 03:16:02: Found Mass Storage device:
PciRoot(0x0)/Pci(0x1,0x1)/Pci(0x0,0x0)
2026-08-27 03:16:02: InstallProtocolInterface:
FA920010-6785-4941-B6EC-498C579F160A 7BA7F920
2026-08-27 03:16:02: MMIO using encrypted memory: 8040000014
2026-08-27 03:16:02: !!!! X64 Exception Type - 0D(#GP - General
Protection) CPU Apic ID - 00000000 !!!!
2026-08-27 03:16:02: ExceptionData - 0000000000000000
2026-08-27 03:16:02: RIP - 000000007E650800, CS - 0000000000000038,
RFLAGS - 0000000000010246
2026-08-27 03:16:02: RAX - 0000000000000000, RCX - 0000000000000000,
RDX - 000000007E651580
2026-08-27 03:16:02: RBX - 0000008040000014, RSP - 000000007EDE4490,
RBP - 000000007EDE4510
2026-08-27 03:16:02: RSI - 0000000000000000, RDI - 0000000000000001
2026-08-27 03:16:02: R8 - 000000007EDE4628, R9 - 0000008040000014,
R10 - 0000000000000000
2026-08-27 03:16:02: R11 - 0000000000000000, R12 - 000000007EDE4628,
R13 - 0000000000000000
2026-08-27 03:16:02: R14 - 0000000000000001, R15 - 0000000000000001
2026-08-27 03:16:02: DS - 0000000000000030, ES - 0000000000000030,
FS - 0000000000000030
2026-08-27 03:16:02: GS - 0000000000000030, SS - 0000000000000030
2026-08-27 03:16:02: CR0 - 0000000080010033, CR2 - 0000000000000000,
CR3 - 000000007EA01000
2026-08-27 03:16:02: CR4 - 0000000000000668, CR8 - 0000000000000000
2026-08-27 03:16:02: DR0 - 0000000000000000, DR1 - 0000000000000000,
DR2 - 0000000000000000
2026-08-27 03:16:02: DR3 - 0000000000000000, DR6 - 0000000000000000,
DR7 - 0000000000000000
2026-08-27 03:16:02: GDTR - 000000007DEF5000 0000000000000057, LDTR -
0000000000000000
2026-08-27 03:16:02: IDTR - 000000007B822F58 0000000000000FFF, TR -
0000000000000048
2026-08-27 03:16:02: FXSAVE_STATE - 000000007EDE40F0
2026-08-27 03:16:02: !!!! Find image based on IP(0x7E650800)
/home/VT_BUILD/ovmf/Build/OvmfX64/DEBUG_GCC/X64/UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe/DEBUG/CpuIo2Dxe.dll
(ImageBase=000000007E64E000, EntryPoint=000000007E6509E4) !!!!
If I boot guest with host-phys-bits, things works fine.
----------
-cpu EPYC,host-phys-bits=true boots fine with the same command line.
Environment
-----------
Host CPU : AMD EPYC (SEV-SNP capable)
QEMU : 11.0.2 (v11.0.2)
OVMF : OvmfPkg/OvmfPkgX64.dsc
Thanks,
Srikanth Aithal <[email protected]>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#122134): https://edk2.groups.io/g/devel/message/122134
Mute This Topic: https://groups.io/mt/120969895/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-