Blob Blame History Raw
From eda659afb7bf5b641cf4d9c2c93c681e04f64424 Mon Sep 17 00:00:00 2001
From: Igor Mammedov <imammedo@redhat.com>
Date: Wed, 24 May 2017 07:57:45 +0200
Subject: [PATCH 3/6] disable linuxboot_dma.bin option rom for 7.3 machine
 types

RH-Author: Igor Mammedov <imammedo@redhat.com>
Message-id: <1495612665-46614-3-git-send-email-imammedo@redhat.com>
Patchwork-id: 75404
O-Subject: [RHEL7.4 qemu-kvm-rhev v2 2/2] disable linuxboot_dma.bin option rom for 7.3 machine types
Bugzilla: 1441394
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>

DMA enabled option rom used to be disabled for 7.3 machine types
however with rebase to 2.9 we brought regression it introduced
which loads DMA enabled option rom.

Upstream commit in 2.10
98e753a6e (pc/fwcfg: unbreak migration from qemu-2.5 and qemu-2.6 during firmware boot)
tries to fix it upstream and this patch is RHEL conterpart
that keeps legacy linuxboot.bin being loaded on 7.3 machine
types in 7.4 QEMU build.

This patch complements RHEL only commit:
f5095ba58c62 (re-enable DMA for 7.3 machine type)

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 hw/i386/pc_piix.c | 2 ++
 hw/i386/pc_q35.c  | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index bbdf2a8..038dda5 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -1155,10 +1155,12 @@ static void pc_init_rhel730(MachineState *machine)
 
 static void pc_machine_rhel730_options(MachineClass *m)
 {
+    PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
     pc_machine_rhel740_options(m);
     m->alias = NULL;
     m->is_default = 0;
     m->desc = "RHEL 7.3.0 PC (i440FX + PIIX, 1996)";
+    pcmc->linuxboot_dma_enabled = false;
     SET_MACHINE_COMPAT(m, PC_RHEL7_3_COMPAT);
 }
 
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index aad1ae7..c2125ca 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -405,10 +405,12 @@ static void pc_q35_init_rhel730(MachineState *machine)
 
 static void pc_q35_machine_rhel730_options(MachineClass *m)
 {
+    PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
     pc_q35_machine_rhel740_options(m);
     m->alias = NULL;
     m->desc = "RHEL-7.3.0 PC (Q35 + ICH9, 2009)";
     m->max_cpus = 255;
+    pcmc->linuxboot_dma_enabled = false;
     SET_MACHINE_COMPAT(m, PC_RHEL7_3_COMPAT);
 }
 
-- 
1.8.3.1