cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
Blob Blame History Raw
From 478b5f940bb1898c2bdc8dce560f82da3b55e78f Mon Sep 17 00:00:00 2001
From: Michael S. Tsirkin <mst@redhat.com>
Date: Wed, 12 Mar 2014 07:00:11 +0100
Subject: [PATCH 09/16] loader: rename in_ram/has_mr

Message-id: <1394390868-24135-1-git-send-email-mst@redhat.com>
Patchwork-id: 58053
O-Subject: [PATCH qemu-kvm RHEL7.0 v3 1/2] loader: rename in_ram/has_mr
Bugzilla: 1064018
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
RH-Acked-by: Marcel Apfelbaum <marcel.a@redhat.com>
RH-Acked-by: Gerd Hoffmann <kraxel@redhat.com>

we put copy of ROMs in MR for migration.
but the name rom_in_ram makes one think we
load it in guest RAM.
Rename has_mr to make intent clearer.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

Upstream: posted
Brew build: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=7173355
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1064018#c6
Tested: by developer
---
 include/hw/loader.h | 2 +-
 hw/core/loader.c    | 6 +++---
 hw/i386/pc_piix.c   | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 hw/core/loader.c    |    6 +++---
 hw/i386/pc_piix.c   |    2 +-
 include/hw/loader.h |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/hw/core/loader.c b/hw/core/loader.c
index 4e72e01..c363aef 100644
--- a/hw/core/loader.c
+++ b/hw/core/loader.c
@@ -54,7 +54,7 @@
 
 #include <zlib.h>
 
-bool rom_file_in_ram = true;
+bool rom_file_has_mr = true;
 
 static int roms_loaded;
 
@@ -642,7 +642,7 @@ int rom_add_file(const char *file, const char *fw_dir,
                  basename);
         snprintf(devpath, sizeof(devpath), "/rom@%s", fw_file_name);
 
-        if (rom_file_in_ram) {
+        if (rom_file_has_mr) {
             data = rom_set_mr(rom, devpath);
         } else {
             data = rom->data;
@@ -686,7 +686,7 @@ void *rom_add_blob(const char *name, const void *blob, size_t len,
 
         snprintf(devpath, sizeof(devpath), "/rom@%s", fw_file_name);
 
-        if (rom_file_in_ram) {
+        if (rom_file_has_mr) {
             data = rom_set_mr(rom, devpath);
         } else {
             data = rom->data;
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 6773fff..be68098 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -948,7 +948,7 @@ static void pc_compat_rhel650(QEMUMachineInitArgs *args)
 
     disable_kvm_pv_unhalt();
 
-    rom_file_in_ram = false; 
+    rom_file_has_mr = false; 
     has_acpi_build = false;
     gigabyte_align = false;
 }
diff --git a/include/hw/loader.h b/include/hw/loader.h
index 50a017b..7ceccce 100644
--- a/include/hw/loader.h
+++ b/include/hw/loader.h
@@ -23,7 +23,7 @@ void pstrcpy_targphys(const char *name,
                       hwaddr dest, int buf_size,
                       const char *source);
 
-extern bool rom_file_in_ram;
+extern bool rom_file_has_mr;
 
 int rom_add_file(const char *file, const char *fw_dir,
                  hwaddr addr, int32_t bootindex);
-- 
1.7.1