aboutsummaryrefslogtreecommitdiff
path: root/hw/i386/pc.c
diff options
context:
space:
mode:
authorStefano Garzarella <sgarzare@redhat.com>2019-01-22 13:10:48 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2019-02-05 16:50:17 +0100
commitfda672b50e3e5613d0110e0e7c1f773bfaa1fb3d (patch)
tree20a96c2143d65d1b5969f7c5b50b3576ccbdce89 /hw/i386/pc.c
parentb1b876ca70f1b240852ad24e7d3ff788f2c47153 (diff)
hw/i386/pc: enable PVH only for machine type >= 4.0
In order to avoid migration issues, we enable PVH only for machine type >= 4.0 Suggested-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/i386/pc.c')
-rw-r--r--hw/i386/pc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 9efbd16fa7..00166d19d8 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1220,7 +1220,8 @@ static void load_linux(PCMachineState *pcms,
* saving the PVH entry point used by the x86/HVM direct boot ABI.
* If load_elfboot() is successful, populate the fw_cfg info.
*/
- if (load_elfboot(kernel_filename, kernel_size,
+ if (pcmc->pvh_enabled &&
+ load_elfboot(kernel_filename, kernel_size,
header, pvh_start_addr, fw_cfg)) {
fclose(f);
@@ -2783,6 +2784,7 @@ static void pc_machine_class_init(ObjectClass *oc, void *data)
pcmc->acpi_data_size = 0x20000 + 0x8000;
pcmc->save_tsc_khz = true;
pcmc->linuxboot_dma_enabled = true;
+ pcmc->pvh_enabled = true;
assert(!mc->get_hotplug_handler);
mc->get_hotplug_handler = pc_get_hotplug_handler;
mc->cpu_index_to_instance_props = pc_cpu_index_to_props;