On 18 September 2015 at 11:58, Gerd Hoffmann <kra...@redhat.com> wrote: > Hi, > >> - fw_cfg = fw_cfg_init_io(BIOS_CFG_IOPORT); >> + fw_cfg = fw_cfg_init_io_dma(BIOS_CFG_IOPORT, BIOS_CFG_IOPORT + 4, as); > >> + as = g_malloc(sizeof(*as)); >> + address_space_init(as, ram_below_4g, "pc.as"); >> + fw_cfg = bochs_bios_init(as); > > I think we can use address_space_memory on x86 too (and can remove the > AddressSpace argument to fw_cfg_init_io_dma).
I would prefer to keep the AS argument to fw_cfg_init_io_dma(). Random devices shouldn't have their own ideas about what buses they're plugged into to do DMA (which is effectively what this is doing) -- the board should be responsible for wiring them up appropriately. thanks -- PMM