On 9/8/2026 6:36 PM, Ramkumar Santhanakrishnan wrote:
[Some people who received this message don't often get email from 
[email protected]. Learn why this is important at 
https://aka.ms/LearnAboutSenderIdentification ]

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.
Found Mass Storage device: PciRoot(0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)
InstallProtocolInterface: FA920010-6785-4941-B6EC-498C579F160A
7DD42020
Reproduces with any kind of virtio device.

qemu-system-x86_64: Convert non guest_memfd backed memory region
(0x8040000000 ,+ 0x1000) to private
2026-08-27 03:16:02: MMIO using encrypted memory: 8040000014
Hmm.  So the patch moves the mmio window around and makes it larger:

-PlatformDynamicMmioWindow:   MMIO Space 0x2000000000 (128 GB)
+PlatformDynamicMmioWindow:   MMIO Space 0x4000000000 (256 GB)

-PlatformDynamicMmioWindow:   Pci64 Base 0xC000000000
-PlatformDynamicMmioWindow:   Pci64 Size 0x2000000000
+PlatformDynamicMmioWindow:   Pci64 Base 0x8000000000
+PlatformDynamicMmioWindow:   Pci64 Size 0x4000000000

In both cases the region is covered by an
MemEncryptSevClearMmioPageEncMask call, so the encryption bit should
not be set.  The error messages suggest it is set though.
There is absolutely no difference in the logs beside the changed
address and size.

Test branch with some debug logging is here:
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_kraxel
_edk2_commits_devel_sev-2Dregression_&d=DwICaQ&c=s883GpUCOChKOHiocYtGc
g&r=bgO5TLA4ABSXtFOlOt6oU_TMINnYWY2E7WIcTKTpOtQ&m=RkXFnAnsgWAeSLbDiN4Y
5cjjsp7tvjy5FEUjmox14mtAUlGrPEJJVJr7dPETHWJL&s=NdpKIGb6DoNr2ynZDZInqZT
mqbWrr3ujJk_VWza3Qts&e=
Recreated the issue with above branch, attaching the serial log captured.
Not, sure if the address 0x8040000000 has any significance, we are seeing this 
issue when device's BAR fall in the address 0x8040000000, in your CLI you are 
creating 2 root port and attaching the block device on RP1. If I attach my 
block device on RP0 I don't see this issue. That is if I change the CLI like 
this I don't see the error, So I assume there is no issue in DXE driver.

      -device virtio-blk-pci,id=blk0,drive=drive0,bus=rp0,addr=0x0 \


On the two root ports: that command line is a cut-down version of what
our CI runs actually use. The real topology has four root ports, each
for a different purpose:
  pcie-root-port-0       -> pcie-pci-bridge-0
  pcie-root-port-1       -> virtio-blk-pci (boot disk)
  pcie-root-port-2       -> virtio-net-pci
  pcie_extra_root_port_0 -> spare port for hotplug
I only trimmed it to two ports and one disk to give the smallest CLI
that still recreates the failure.

This is a regression from 7735ed4f8eb. The same command line boots
with the parent commit (d98a39d4ce).




The branch also has patches explicitly tagging the 64-bit pci mmio
window as mmio region.  Noticed this is not the case while looking
into this.  That change doesn't make any difference in behavior
though.

Tom?  Any clue what this might be?  Maybe something in the page table
code?  IIRC you have a branch switching the home-grown sev page table
code to use CpuPageTableLib instead, maybe this fixes the issue?

take care,
    Gerd



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#122159): https://edk2.groups.io/g/devel/message/122159
Mute This Topic: https://groups.io/mt/120969895/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to