On Thu, 10 Feb 2022, Philippe Mathieu-Daudé wrote:
> On 10/2/22 14:28, Ani Sinha wrote: > > When adding E820_RESERVED entries we also accidentally allocate dynamic > > entries. This is incorrect. We should simply return early with the count of > > the number of reserved entries added. > > > > fixes: 7d67110f2d9a6("pc: add etc/e820 fw_cfg file") > > 8 years old, so this path is clearly untested (unused...?). > untested, yes. unused? nope! $ git grep e820_add_entry 2>/dev/null | grep E820_RESERVED hw/i386/pc.c: e820_add_entry(pcms->sgx_epc.base, pcms->sgx_epc.size, E820_RESERVED); target/i386/kvm/kvm.c: ret = e820_add_entry(identity_base, 0x4000, E820_RESERVED); particulatly the kvm code path.