cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
5d360b
From f7572e4bdfc5c0c57d6a37712c6f5b79cc86e063 Mon Sep 17 00:00:00 2001
5d360b
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
5d360b
Date: Wed, 13 Dec 2017 13:38:39 +0100
5d360b
Subject: [PATCH 08/41] Enable fw_cfg DMA interface for x86
5d360b
MIME-Version: 1.0
5d360b
Content-Type: text/plain; charset=UTF-8
5d360b
Content-Transfer-Encoding: 8bit
5d360b
5d360b
RH-Author: Marc-André Lureau <marcandre.lureau@redhat.com>
5d360b
Message-id: <20171213133912.26176-9-marcandre.lureau@redhat.com>
5d360b
Patchwork-id: 78357
5d360b
O-Subject: [RHEL-7.5 qemu-kvm PATCH v3 08/41] Enable fw_cfg DMA interface for x86
5d360b
Bugzilla: 1411490
5d360b
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
5d360b
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
5d360b
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
5d360b
5d360b
From: Marc Marí <markmb@redhat.com>
5d360b
5d360b
Enable the fw_cfg DMA interface for all the x86 platforms.
5d360b
5d360b
Based on Gerd Hoffman's initial implementation.
5d360b
5d360b
Signed-off-by: Marc Marí <markmb@redhat.com>
5d360b
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
5d360b
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
5d360b
5d360b
(cherry picked from commit c886fc4c20ff8456b2f788a1404dd321b8b59243)
5d360b
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
5d360b
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
5d360b
---
5d360b
 hw/i386/pc.c | 6 +++---
5d360b
 1 file changed, 3 insertions(+), 3 deletions(-)
5d360b
5d360b
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
5d360b
index 29d6588..e2fd732 100644
5d360b
--- a/hw/i386/pc.c
5d360b
+++ b/hw/i386/pc.c
5d360b
@@ -600,7 +600,7 @@ static unsigned int pc_apic_id_limit(unsigned int max_cpus)
5d360b
     return x86_cpu_apic_id_from_index(max_cpus - 1) + 1;
5d360b
 }
5d360b
 
5d360b
-static FWCfgState *bochs_bios_init(void)
5d360b
+static FWCfgState *bochs_bios_init(AddressSpace *as)
5d360b
 {
5d360b
     FWCfgState *fw_cfg;
5d360b
     uint8_t *smbios_table;
5d360b
@@ -609,7 +609,7 @@ static FWCfgState *bochs_bios_init(void)
5d360b
     int i, j;
5d360b
     unsigned int apic_id_limit = pc_apic_id_limit(max_cpus);
5d360b
 
5d360b
-    fw_cfg = fw_cfg_init(BIOS_CFG_IOPORT, BIOS_CFG_IOPORT + 1, 0, 0);
5d360b
+    fw_cfg = fw_cfg_init_io_dma(BIOS_CFG_IOPORT, BIOS_CFG_IOPORT + 4, as);
5d360b
     /* FW_CFG_MAX_CPUS is a bit confusing/problematic on x86:
5d360b
      *
5d360b
      * SeaBIOS needs FW_CFG_MAX_CPUS for CPU hotplug, but the CPU hotplug
5d360b
@@ -1172,7 +1172,7 @@ FWCfgState *pc_memory_init(MemoryRegion *system_memory,
5d360b
                                         option_rom_mr,
5d360b
                                         1);
5d360b
 
5d360b
-    fw_cfg = bochs_bios_init();
5d360b
+    fw_cfg = bochs_bios_init(&address_space_memory);
5d360b
     rom_set_fw(fw_cfg);
5d360b
 
5d360b
     if (linux_boot) {
5d360b
-- 
5d360b
1.8.3.1
5d360b