diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2021-10-20 14:48:10 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-11-02 15:57:27 +0100 |
commit | f014c974595a1e3482c6afb57557a6e479b80328 (patch) | |
tree | 048b4cd4294cdf3002d84beb0a229da60cf40b38 /hw/i386/x86.c | |
parent | 0b09d44164b54505490f1771854d0b87441a3e2f (diff) | |
download | qemu-f014c974595a1e3482c6afb57557a6e479b80328.zip qemu-f014c974595a1e3482c6afb57557a6e479b80328.tar.gz qemu-f014c974595a1e3482c6afb57557a6e479b80328.tar.bz2 |
target/i386: move linuxboot_dma_enabled to X86MachineState
This removes a parameter from x86_load_linux, and will avoid code
duplication between the linux and multiboot cases once multiboot
starts to support DMA.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/i386/x86.c')
-rw-r--r-- | hw/i386/x86.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/i386/x86.c b/hw/i386/x86.c index 76de7e2..a34498f 100644 --- a/hw/i386/x86.c +++ b/hw/i386/x86.c @@ -764,9 +764,9 @@ static bool load_elfboot(const char *kernel_filename, void x86_load_linux(X86MachineState *x86ms, FWCfgState *fw_cfg, int acpi_data_size, - bool pvh_enabled, - bool linuxboot_dma_enabled) + bool pvh_enabled) { + bool linuxboot_dma_enabled = X86_MACHINE_GET_CLASS(x86ms)->fwcfg_dma_enabled; uint16_t protocol; int setup_size, kernel_size, cmdline_size; int dtb_size, setup_data_offset; @@ -1332,6 +1332,7 @@ static void x86_machine_class_init(ObjectClass *oc, void *data) mc->possible_cpu_arch_ids = x86_possible_cpu_arch_ids; x86mc->compat_apic_id_mode = false; x86mc->save_tsc_khz = true; + x86mc->fwcfg_dma_enabled = true; nc->nmi_monitor_handler = x86_nmi; object_class_property_add(oc, X86_MACHINE_SMM, "OnOffAuto", |