q35: set split kernel irqchip as default
Starting from QEMU 4.0, let's specify "split" as the default value for kernel-irqchip. So for QEMU>=4.0 we'll have: allowed=Y,required=N,split=Y for QEMU<=3.1 we'll have: allowed=Y,required=N,split=N (omitting all the "kernel_irqchip_" prefix) Note that this will let the default q35 machine type to depend on Linux version 4.4 or newer because that's where split irqchip is introduced in kernel. But it's fine since we're boosting supported Linux version for QEMU 4.0 to around Linux 4.5. For more information please refer to the discussion on AMD's RDTSCP: https://lore.kernel.org/lkml/20181210181328.GA762@zn.tnic/ Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
c2077e2ca0
commit
b2fc91db84
@ -653,8 +653,10 @@ static void machine_class_base_init(ObjectClass *oc, void *data)
|
||||
static void machine_initfn(Object *obj)
|
||||
{
|
||||
MachineState *ms = MACHINE(obj);
|
||||
MachineClass *mc = MACHINE_GET_CLASS(obj);
|
||||
|
||||
ms->kernel_irqchip_allowed = true;
|
||||
ms->kernel_irqchip_split = mc->default_kernel_irqchip_split;
|
||||
ms->kvm_shadow_mem = -1;
|
||||
ms->dump_guest_core = true;
|
||||
ms->mem_merge = true;
|
||||
|
@ -304,6 +304,7 @@ static void pc_q35_machine_options(MachineClass *m)
|
||||
m->units_per_default_bus = 1;
|
||||
m->default_machine_opts = "firmware=bios-256k.bin";
|
||||
m->default_display = "std";
|
||||
m->default_kernel_irqchip_split = true;
|
||||
m->no_floppy = 1;
|
||||
machine_class_allow_dynamic_sysbus_dev(m, TYPE_AMD_IOMMU_DEVICE);
|
||||
machine_class_allow_dynamic_sysbus_dev(m, TYPE_INTEL_IOMMU_DEVICE);
|
||||
@ -323,6 +324,7 @@ DEFINE_Q35_MACHINE(v4_0, "pc-q35-4.0", NULL,
|
||||
static void pc_q35_3_1_machine_options(MachineClass *m)
|
||||
{
|
||||
pc_q35_4_0_machine_options(m);
|
||||
m->default_kernel_irqchip_split = false;
|
||||
m->alias = NULL;
|
||||
SET_MACHINE_COMPAT(m, PC_COMPAT_3_1);
|
||||
}
|
||||
|
@ -195,6 +195,7 @@ struct MachineClass {
|
||||
const char *hw_version;
|
||||
ram_addr_t default_ram_size;
|
||||
const char *default_cpu_type;
|
||||
bool default_kernel_irqchip_split;
|
||||
bool option_rom_has_mr;
|
||||
bool rom_file_has_mr;
|
||||
int minimum_page_bits;
|
||||
|
Loading…
Reference in New Issue
Block a user