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://github.com/kraxel/edk2/commits/devel/sev-regression/

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 (#122148): https://edk2.groups.io/g/devel/message/122148
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