Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 885838 Details for
Bug 1027565
fail to reboot guest after migration from RHEL6.5 host to RHEL7.0 host
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
proposed patch (downstream only)
0001-ram_load-shadow-SeaBIOS-to-pc.ram-for-VM-incoming-fr.patch (text/plain), 4.01 KB, created by
Laszlo Ersek
on 2014-04-13 07:48:18 UTC
(
hide
)
Description:
proposed patch (downstream only)
Filename:
MIME Type:
Creator:
Laszlo Ersek
Created:
2014-04-13 07:48:18 UTC
Size:
4.01 KB
patch
obsolete
>From 1fc9875f87bc748acda55f6f3824f32341c6de3e Mon Sep 17 00:00:00 2001 >From: Laszlo Ersek <lersek@redhat.com> >Date: Sun, 13 Apr 2014 09:04:49 +0200 >Subject: [RHEL-7.0 qemu-kvm PATCH] ram_load(): shadow SeaBIOS to pc.ram for VM > incoming from RHEL-6 host > >SeaBIOS's shadowing logic has no effect on "pc.ram" (only on "pc.bios) >when it runs on the RHEL-6 emulator. When such a guest is migrated to the >RHEL-7 emulator, where the PAM registers actually work, the BIOS copy >under 1MB simply disappears from the guest's view, breaking reboot and S3 >resume. > >Reading bug 1027565 wholly is strongly recommended. > >Signed-off-by: Laszlo Ersek <lersek@redhat.com> >--- > include/sysemu/arch_init.h | 1 + > arch_init.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++ > hw/i386/pc_piix.c | 1 + > 3 files changed, 52 insertions(+) > >diff --git a/include/sysemu/arch_init.h b/include/sysemu/arch_init.h >index be71bca..ddfcf73 100644 >--- a/include/sysemu/arch_init.h >+++ b/include/sysemu/arch_init.h >@@ -25,6 +25,7 @@ enum { > }; > > extern const uint32_t arch_type; >+extern bool shadow_bios_after_incoming; > > void select_soundhw(const char *optarg); > void do_acpitable_option(const QemuOpts *opts); >diff --git a/arch_init.c b/arch_init.c >index f5d521a..dbe9fef 100644 >--- a/arch_init.c >+++ b/arch_init.c >@@ -106,6 +106,7 @@ int graphic_depth = 15; > #endif > > const uint32_t arch_type = QEMU_ARCH; >+bool shadow_bios_after_incoming; > static bool mig_throttle_on; > static int dirty_rate_high_cnt; > static void check_guest_throttling(void); >@@ -950,6 +951,48 @@ void ram_handle_compressed(void *host, uint8_t ch, uint64_t size) > } > } > >+static void shadow_bios(void) >+{ >+ RAMBlock *block, *ram, *bios; >+ size_t one_meg, bios_size; >+ void *ef_seg_host; >+ >+ ram = NULL; >+ bios = NULL; >+ QTAILQ_FOREACH(block, &ram_list.blocks, next) { >+ if (strcmp("pc.ram", block->idstr) == 0) { >+ assert(ram == NULL); >+ ram = block; >+ } else if (strcmp("pc.bios", block->idstr) == 0) { >+ assert(bios == NULL); >+ bios = block; >+ } >+ } >+ assert(ram != NULL); >+ assert(bios != NULL); >+ assert(memory_region_is_ram(ram->mr)); >+ assert(memory_region_is_ram(bios->mr)); >+ assert(int128_eq(ram->mr->size, int128_make64(ram->length))); >+ assert(int128_eq(bios->mr->size, int128_make64(bios->length))); >+ >+ one_meg = 1024 * 1024; >+ bios_size = 128 * 1024; >+ assert(ram->length >= one_meg); >+ assert(bios->length == bios_size); >+ >+ ef_seg_host = memory_region_get_ram_ptr(ram->mr) + (one_meg - bios_size); >+ >+ /* This is a crude hack, but we must distinguish a rhel6.x.0 machtype guest >+ * coming in from a RHEL-6 emulator (where shadowing has had no effect on >+ * "pc.ram") from a similar guest coming in from a RHEL-7 emulator (where >+ * shadowing has worked). In the latter case we must not trample the live >+ * SeaBIOS variables in "pc.ram". >+ */ >+ if (buffer_is_zero(ef_seg_host, bios_size)) { >+ memcpy(ef_seg_host, memory_region_get_ram_ptr(bios->mr), bios_size); >+ } >+} >+ > static int ram_load(QEMUFile *f, void *opaque, int version_id) > { > ram_addr_t addr; >@@ -1048,6 +1091,13 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id) > } while (!(flags & RAM_SAVE_FLAG_EOS)); > > done: >+ /* Supplement SeaBIOS's shadowing now, because it was useless when the >+ * incoming VM started on the RHEL-6 emulator. >+ */ >+ if (ret == 0 && shadow_bios_after_incoming) { >+ shadow_bios(); >+ } >+ > DPRINTF("Completed load of VM with exit code %d seq iteration " > "%" PRIu64 "\n", ret, seq_iter); > return ret; >diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c >index 940816f..fea98b6 100644 >--- a/hw/i386/pc_piix.c >+++ b/hw/i386/pc_piix.c >@@ -954,6 +954,7 @@ static void pc_compat_rhel650(QEMUMachineInitArgs *args) > rom_file_has_mr = false; > has_acpi_build = false; > gigabyte_align = false; >+ shadow_bios_after_incoming = true; > } > > static void pc_init_rhel650(QEMUMachineInitArgs *args) >-- >1.8.3.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1027565
:
885244
|
885245
|
885252
|
885649
|
885650
|
885795
|
885838
|
886494
|
886593
|
886840
|
886841
|
886964
|
888022
|
888273