qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Eduardo Habkost" <ehabkost@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Marc Marí" <markmb@redhat.com>,
	"Richard Henderson" <rth@twiddle.net>
Subject: [Qemu-devel] [PULL v2 6/7] Enable fw_cfg DMA interface for x86
Date: Tue, 20 Oct 2015 08:11:31 +0200	[thread overview]
Message-ID: <1445321492-2902-7-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1445321492-2902-1-git-send-email-kraxel@redhat.com>

From: Marc Marí <markmb@redhat.com>

Enable the fw_cfg DMA interface for all the x86 platforms.

Based on Gerd Hoffman's initial implementation.

Signed-off-by: Marc Marí <markmb@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/i386/pc.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 682867a..b25a872 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -752,14 +752,15 @@ static void pc_build_smbios(FWCfgState *fw_cfg)
     }
 }
 
-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 = pc_apic_id_limit(max_cpus);
 
-    fw_cfg = fw_cfg_init_io(BIOS_CFG_IOPORT);
+    fw_cfg = 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 hotplug
@@ -1393,7 +1394,8 @@ FWCfgState *pc_memory_init(PCMachineState *pcms,
                                         option_rom_mr,
                                         1);
 
-    fw_cfg = bochs_bios_init();
+    fw_cfg = bochs_bios_init(&address_space_memory);
+
     rom_set_fw(fw_cfg);
 
     if (guest_info->has_reserved_memory && pcms->hotplug_memory.base) {
-- 
1.8.3.1

  parent reply	other threads:[~2015-10-20  6:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-20  6:11 [Qemu-devel] [PULL v2 0/7] fw_cfg: add dma interface, add strings via cmdline Gerd Hoffmann
2015-10-20  6:11 ` [Qemu-devel] [PULL v2 1/7] fw_cfg: insert string blobs via qemu cmdline Gerd Hoffmann
2015-10-20  6:11 ` [Qemu-devel] [PULL v2 2/7] fw_cfg: document fw_cfg_modify_iXX() update functions Gerd Hoffmann
2015-10-20  6:11 ` [Qemu-devel] [PULL v2 3/7] fw_cfg DMA interface documentation Gerd Hoffmann
2015-10-20  6:11 ` [Qemu-devel] [PULL v2 4/7] Implement fw_cfg DMA interface Gerd Hoffmann
2015-10-20  6:11 ` [Qemu-devel] [PULL v2 5/7] Enable fw_cfg DMA interface for ARM Gerd Hoffmann
2015-10-20  6:11 ` Gerd Hoffmann [this message]
2015-10-20  6:11 ` [Qemu-devel] [PULL v2 7/7] fw_cfg: Define a static signature to be returned on DMA port reads Gerd Hoffmann
2015-10-20 11:17 ` [Qemu-devel] [PULL v2 0/7] fw_cfg: add dma interface, add strings via cmdline Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1445321492-2902-7-git-send-email-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=markmb@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).