|
|
7711c0 |
From 874453e6bed4da39f9860236148efdb09d285203 Mon Sep 17 00:00:00 2001
|
|
|
7711c0 |
From: Markus Armbruster <armbru@redhat.com>
|
|
|
7711c0 |
Date: Fri, 17 May 2019 06:51:03 +0200
|
|
|
7711c0 |
Subject: [PATCH 36/53] hw/mips/malta: Restrict 'bios_size' variable scope
|
|
|
7711c0 |
MIME-Version: 1.0
|
|
|
7711c0 |
Content-Type: text/plain; charset=UTF-8
|
|
|
7711c0 |
Content-Transfer-Encoding: 8bit
|
|
|
7711c0 |
|
|
|
7711c0 |
RH-Author: Markus Armbruster <armbru@redhat.com>
|
|
|
7711c0 |
Message-id: <20190517065120.12028-15-armbru@redhat.com>
|
|
|
7711c0 |
Patchwork-id: 88003
|
|
|
7711c0 |
O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH v3 14/31] hw/mips/malta: Restrict 'bios_size' variable scope
|
|
|
7711c0 |
Bugzilla: 1624009
|
|
|
7711c0 |
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
|
|
7711c0 |
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
|
|
7711c0 |
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
7711c0 |
|
|
|
7711c0 |
From: Philippe Mathieu-Daudé <philmd@redhat.com>
|
|
|
7711c0 |
|
|
|
7711c0 |
The 'bios_size' variable is only used in the 'if (!kernel_filename &&
|
|
|
7711c0 |
!dinfo)' clause. This is the case when we don't provide -pflash command
|
|
|
7711c0 |
line option, and also don't provide a -kernel option. In this case we
|
|
|
7711c0 |
will check for the -bios option, or use the default BIOS_FILENAME file.
|
|
|
7711c0 |
|
|
|
7711c0 |
The 'bios' term is valid in this if statement, but is confuse in the
|
|
|
7711c0 |
whole mips_malta_init() scope. Restrict his scope.
|
|
|
7711c0 |
|
|
|
7711c0 |
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
|
|
7711c0 |
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
|
|
|
7711c0 |
Signed-off-by: Markus Armbruster <armbru@redhat.com>
|
|
|
7711c0 |
Message-Id: <20190308094610.21210-13-armbru@redhat.com>
|
|
|
7711c0 |
(cherry picked from commit 74c02ebd80fa331361c431d8dbfcba45a2a36e85)
|
|
|
7711c0 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
7711c0 |
---
|
|
|
7711c0 |
hw/mips/mips_malta.c | 2 +-
|
|
|
7711c0 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
7711c0 |
|
|
|
7711c0 |
diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
|
|
|
7711c0 |
index 0566d18..857bdb8 100644
|
|
|
7711c0 |
--- a/hw/mips/mips_malta.c
|
|
|
7711c0 |
+++ b/hw/mips/mips_malta.c
|
|
|
7711c0 |
@@ -990,7 +990,6 @@ void mips_malta_init(MachineState *machine)
|
|
|
7711c0 |
MemoryRegion *ram_low_preio = g_new(MemoryRegion, 1);
|
|
|
7711c0 |
MemoryRegion *ram_low_postio;
|
|
|
7711c0 |
MemoryRegion *bios, *bios_copy = g_new(MemoryRegion, 1);
|
|
|
7711c0 |
- target_long bios_size = FLASH_SIZE;
|
|
|
7711c0 |
const size_t smbus_eeprom_size = 8 * 256;
|
|
|
7711c0 |
uint8_t *smbus_eeprom_buf = g_malloc0(smbus_eeprom_size);
|
|
|
7711c0 |
int64_t kernel_entry, bootloader_run_addr;
|
|
|
7711c0 |
@@ -1097,6 +1096,7 @@ void mips_malta_init(MachineState *machine)
|
|
|
7711c0 |
bootloader_run_addr, kernel_entry);
|
|
|
7711c0 |
}
|
|
|
7711c0 |
} else {
|
|
|
7711c0 |
+ target_long bios_size = FLASH_SIZE;
|
|
|
7711c0 |
/* The flash region isn't executable from a KVM guest */
|
|
|
7711c0 |
if (kvm_enabled()) {
|
|
|
7711c0 |
error_report("KVM enabled but no -kernel argument was specified. "
|
|
|
7711c0 |
--
|
|
|
7711c0 |
1.8.3.1
|
|
|
7711c0 |
|