diff options
| author | Xiaoyao Li <xiaoyao.li@intel.com> | 2024-04-03 10:59:53 -0400 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-04-23 17:35:25 +0200 |
| commit | 292dd287e78e0cbafde9d1522c729349d132d844 (patch) | |
| tree | d81d1316e03c2bfff0b4c53d50c29461bfc575bf /hw/i386/acpi-common.c | |
| parent | b07bf7b73fd02d24a7baa64a580f4974b86bbc86 (diff) | |
| download | focaccia-qemu-292dd287e78e0cbafde9d1522c729349d132d844.tar.gz focaccia-qemu-292dd287e78e0cbafde9d1522c729349d132d844.zip | |
hw/i386/acpi: Set PCAT_COMPAT bit only when pic is not disabled
A value 1 of PCAT_COMPAT (bit 0) of MADT.Flags indicates that the system also has a PC-AT-compatible dual-8259 setup, i.e., the PIC. When PIC is not enabled (pic=off) for x86 machine, the PCAT_COMPAT bit needs to be cleared. The PIC probe should then print: [ 0.155970] Using NULL legacy PIC However, no such log printed in guest kernel unless PCAT_COMPAT is cleared. Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com> Message-ID: <20240403145953.3082491-1-xiaoyao.li@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/i386/acpi-common.c')
| -rw-r--r-- | hw/i386/acpi-common.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/i386/acpi-common.c b/hw/i386/acpi-common.c index 20f19269da..0cc2919bb8 100644 --- a/hw/i386/acpi-common.c +++ b/hw/i386/acpi-common.c @@ -107,7 +107,9 @@ void acpi_build_madt(GArray *table_data, BIOSLinker *linker, acpi_table_begin(&table, table_data); /* Local APIC Address */ build_append_int_noprefix(table_data, APIC_DEFAULT_ADDRESS, 4); - build_append_int_noprefix(table_data, 1 /* PCAT_COMPAT */, 4); /* Flags */ + /* Flags. bit 0: PCAT_COMPAT */ + build_append_int_noprefix(table_data, + x86ms->pic != ON_OFF_AUTO_OFF ? 1 : 0 , 4); for (i = 0; i < apic_ids->len; i++) { pc_madt_cpu_entry(i, apic_ids, table_data, false); |