Public bug reported:

Historically, AMD processors reserved a 1 TB memory hole in the physical
address space around the 1 TB boundary (specifically from 1 TB to ~ 2
TB). This reservation was a legacy requirement from
the HyperTransport era to maintain compatibility with older IOMMU (I/O
Memory Management Unit) implementations that expected this address space
to be reserved for I/O devices and memory-mapped I/O operations.

ISSUE:

This 1 TB hole meant that:

Systems couldn't use physical memory addresses in that range for actual
DRAM

With large memory configurations (approaching/exceeding 1 TB), this
created inefficiencies in memory mapping

It limited the contiguous addressable memory space available to the OS
and applications

The reservation was maintained for legacy compatibility.

SOLUTION: 
Starting with EPYC 9005 (Turin), AMD introduced the ability to eliminate this 
legacy 1 TB IOMMU/HyperTransport memory hole. This feature: 

Reclaims the 1 TB address space previously reserved for legacy
compatibility

Allows systems to use more contiguous physical memory addressing

Improves memory efficiency for large-memory configurations

Is controlled via BIOS/firmware settings

Represents a clean break from HyperTransport-era constraints


Pre-6.1 QEMU would report the host e820 to the guest. BUT QEMU did not
detect if the hole was present or not. QEMU IOMMU emulation had
assumptions about the hole. QEMU memory accounting didn’t properly
handle both cases. When the hole was absent, QEMU's internal
calculations were wrong.


                                        QEMU Pre-6.1                      QEMU 
6.1+
Legacy (with hole) + No pass-through    Works as expected                 Works 
as expected
Legacy (with hole) + with pass-through  Works as expected                 Works 
as expected
Modern (no hole) + No pass-through      Memory in the hole is STRANDED    Works 
as expected
Modern (no hole) + with pass-through    DMA to wrong memory system crash  Works 
as expected

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2166076

Title:
   QEMU : ELIMINATION OF HYPERTRANSPORT MEMORY HOLE

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2166076/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to