From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34246) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZhfAO-0005H3-Ee for qemu-devel@nongnu.org; Thu, 01 Oct 2015 10:49:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZhfAK-0002bH-7i for qemu-devel@nongnu.org; Thu, 01 Oct 2015 10:49:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47509) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZhfAK-0002aw-2N for qemu-devel@nongnu.org; Thu, 01 Oct 2015 10:49:00 -0400 References: <1443701677-13629-1-git-send-email-markmb@redhat.com> <1443701819-13855-1-git-send-email-markmb@redhat.com> <1443701819-13855-6-git-send-email-markmb@redhat.com> From: Laszlo Ersek Message-ID: <560D47D8.3070305@redhat.com> Date: Thu, 1 Oct 2015 16:48:56 +0200 MIME-Version: 1.0 In-Reply-To: <1443701819-13855-6-git-send-email-markmb@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v4 5/7] Enable fw_cfg DMA interface for x86 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Marc_Mar=c3=ad?= , qemu-devel@nongnu.org Cc: "Gabriel L. Somlo" , Stefan Hajnoczi , Drew , Kevin O'Connor , Gerd Hoffmann On 10/01/15 14:16, Marc Mar=C3=AD wrote: > Enable the fw_cfg DMA interface for all the x86 platforms. >=20 > Based on Gerd Hoffman's initial implementation. >=20 > Signed-off-by: Marc Mar=C3=AD > --- > hw/i386/pc.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) >=20 > diff --git a/hw/i386/pc.c b/hw/i386/pc.c > index 461c128..81d93b4 100644 > --- a/hw/i386/pc.c > +++ b/hw/i386/pc.c > @@ -753,14 +753,15 @@ static void pc_build_smbios(FWCfgState *fw_cfg) > } > } > =20 > -static FWCfgState *bochs_bios_init(void) > +static FWCfgState *bochs_bios_init(AddressSpace *as) > { > FWCfgState *fw_cfg; > uint64_t *numa_fw_cfg; > int i, j; > unsigned int apic_id_limit =3D pc_apic_id_limit(max_cpus); > =20 > - fw_cfg =3D fw_cfg_init_io(BIOS_CFG_IOPORT); > + fw_cfg =3D fw_cfg_init_io_dma(BIOS_CFG_IOPORT, BIOS_CFG_IOPORT + 4= , as); > + > /* FW_CFG_MAX_CPUS is a bit confusing/problematic on x86: > * > * SeaBIOS needs FW_CFG_MAX_CPUS for CPU hotplug, but the CPU hotp= lug > @@ -1407,7 +1408,8 @@ FWCfgState *pc_memory_init(PCMachineState *pcms, > option_rom_mr, > 1); > =20 > - fw_cfg =3D bochs_bios_init(); > + fw_cfg =3D bochs_bios_init(&address_space_memory); > + > rom_set_fw(fw_cfg); > =20 > if (guest_info->has_reserved_memory && pcms->hotplug_memory.base) = { >=20 Looks like this matches the agreement between Gerd and Peter. http://thread.gmane.org/gmane.comp.emulators.qemu/363030/focus=3D363058 Reviewed-by: Laszlo Ersek