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 886593 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), v2; approach #2
0001-qemu_loadvm_state-shadow-SeaBIOS-for-VM-incoming-fro.patch (text/plain), 4.83 KB, created by
Laszlo Ersek
on 2014-04-15 18:15:42 UTC
(
hide
)
Description:
proposed patch (downstream only), v2; approach #2
Filename:
MIME Type:
Creator:
Laszlo Ersek
Created:
2014-04-15 18:15:42 UTC
Size:
4.83 KB
patch
obsolete
>From 6ed9b4abf927d32910acbe23586b7fb64618501e 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 v2] qemu_loadvm_state(): shadow SeaBIOS for > VM incoming from RHEL-6 host > >SeaBIOS's shadowing logic has no effect on "pc.ram" (only on "pc.bios" and >"pc.rom") 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, >these two UMBs under 1MB simply disappear from the guest's view, breaking >reboot and S3 resume. > >Signed-off-by: Laszlo Ersek <lersek@redhat.com> >--- > >Notes: > Changes in v2: > - print message to stderr when we shadow the UMBs manually [Dave] > - also copy C and D segments from pc.rom to pc.ram > - move to qemu_loadvm_state() from ram_load() -- we must shadow only > when all RAMBlocks have been loaded > > include/sysemu/sysemu.h | 1 + > hw/i386/pc_piix.c | 1 + > savevm.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++++ > 3 files changed, 68 insertions(+) > >diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h >index 8dc0a4c..07181ac 100644 >--- a/include/sysemu/sysemu.h >+++ b/include/sysemu/sysemu.h >@@ -84,6 +84,7 @@ void qemu_savevm_state_complete(QEMUFile *f); > void qemu_savevm_state_cancel(void); > uint64_t qemu_savevm_state_pending(QEMUFile *f, uint64_t max_size); > int qemu_loadvm_state(QEMUFile *f); >+extern bool shadow_bios_after_incoming; > > /* SLIRP */ > void do_info_slirp(Monitor *mon); >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) >diff --git a/savevm.c b/savevm.c >index 4d92a7b..6efbb75 100644 >--- a/savevm.c >+++ b/savevm.c >@@ -52,6 +52,8 @@ > #define ARP_PTYPE_IP 0x0800 > #define ARP_OP_REQUEST_REV 0x3 > >+bool shadow_bios_after_incoming; >+ > static int announce_self_create(uint8_t *buf, > uint8_t *mac_addr) > { >@@ -2195,6 +2197,63 @@ typedef struct LoadStateEntry { > int version_id; > } LoadStateEntry; > >+static void shadow_bios(void) >+{ >+ RAMBlock *block, *ram, *oprom, *bios; >+ size_t one_meg, oprom_size, bios_size; >+ uint8_t *cd_seg_host, *ef_seg_host; >+ >+ ram = NULL; >+ oprom = 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.rom", block->idstr) == 0) { >+ assert(oprom == NULL); >+ oprom = block; >+ } else if (strcmp("pc.bios", block->idstr) == 0) { >+ assert(bios == NULL); >+ bios = block; >+ } >+ } >+ assert(ram != NULL); >+ assert(oprom != NULL); >+ assert(bios != NULL); >+ assert(memory_region_is_ram(ram->mr)); >+ assert(memory_region_is_ram(oprom->mr)); >+ assert(memory_region_is_ram(bios->mr)); >+ assert(int128_eq(ram->mr->size, int128_make64(ram->length))); >+ assert(int128_eq(oprom->mr->size, int128_make64(oprom->length))); >+ assert(int128_eq(bios->mr->size, int128_make64(bios->length))); >+ >+ one_meg = 1024 * 1024; >+ oprom_size = 128 * 1024; >+ bios_size = 128 * 1024; >+ assert(ram->length >= one_meg); >+ assert(oprom->length == oprom_size); >+ assert(bios->length == bios_size); >+ >+ ef_seg_host = memory_region_get_ram_ptr(ram->mr) + (one_meg - bios_size); >+ cd_seg_host = ef_seg_host - oprom_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)) { >+ fprintf(stderr, "copying E and F segments from pc.bios to pc.ram\n"); >+ memcpy(ef_seg_host, memory_region_get_ram_ptr(bios->mr), bios_size); >+ } >+ if (buffer_is_zero(cd_seg_host, oprom_size)) { >+ fprintf(stderr, "copying C and D segments from pc.rom to pc.ram\n"); >+ memcpy(cd_seg_host, memory_region_get_ram_ptr(oprom->mr), oprom_size); >+ } >+} >+ > int qemu_loadvm_state(QEMUFile *f) > { > QLIST_HEAD(, LoadStateEntry) loadvm_handlers = >@@ -2297,6 +2356,13 @@ int qemu_loadvm_state(QEMUFile *f) > } > } > >+ /* Supplement SeaBIOS's shadowing now, because it was useless when the >+ * incoming VM started on the RHEL-6 emulator. >+ */ >+ if (shadow_bios_after_incoming) { >+ shadow_bios(); >+ } >+ > cpu_synchronize_all_post_init(); > > ret = 0; >-- >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