• M
    pc: avoid duplicate names for ROM MRs · ac41881b
    Michael S. Tsirkin 提交于
    Since
    commit 04920fc0
        loader: store FW CFG ROM files in RAM
    RAM MRs including ROM files in FW CFGs are created
    and named using the file basename.
    
    This becomes problematic if these names are
    supplied by user, since the basename might not
    be unique.
    
    There are two cases we care about:
    - option-rom flag.
    - option ROM for devices. This triggers e.g. when
      using rombar=0.
    
    At the moment we get an assert. E.g
    qemu -option-rom /usr/share/ipxe/8086100e.rom -option-rom
    /usr/share/ipxe.efi/8086100e.rom
    RAMBlock "/rom@genroms/8086100e.rom" already registered, abort!
    
    This is a regression from 1.6.
    
    For now let's keep it simple and just avoid creating the
    MRs in case of option ROMs.
    
    when using 1.7 machine types, enable
    option ROMs in RAM to match that version.
    Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
    ac41881b
pc_q35.c 11.4 KB