qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] map 64-bit PCI BARs at location provided by emu


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH] map 64-bit PCI BARs at location provided by emulator
Date: Fri, 11 Oct 2013 14:35:50 +0200

On Fr, 2013-10-11 at 12:19 +0200, Igor Mammedov wrote:
> Currently 64-bit PCI BARs are unconditionally mapped by BIOS right
> over 4G + RamSizeOver4G location, which doesn't allow to reserve
> extra space before 64-bit PCI window. For memory hotplug an extra
> RAM space might be reserved after present 64-bit RAM end and BIOS
> should map 64-bit PCI BARs after it.
> 
> Introduce "etc/pcimem64-start" romfile to provide BIOS a hint
> where it should start mapping of 64-bit PCI BARs. If romfile is
> missing BIOS reverts to legacy behavior and starts mapping right
> after high memory.

Looks good overall.


>          struct pci_region r64_mem, r64_pref;
> +        u64 base64 = le64_to_cpu(romfile_loadint("etc/pcimem64-start",
> +                                 0x100000000ULL + RamSizeOver4G));

Should we sanity-check base64 maybe?
Make sure it isn't smaller than 0x100000000ULL + RamSizeOver4G?

cheers,
  Gerd
       





reply via email to

[Prev in Thread] Current Thread [Next in Thread]