Skip to content

Commit 2c933ac

Browse files
committed
KVM: x86: deprecate -M kernel-irqchip=off except for -M isapc
The userspace local APIC is basically untested and does not support many features such as TSC deadline timer, x2APIC or PV spinlocks. On the other hand, the PIT and IOAPIC are okay as they are not tied to the processor and are tested with -M kernel-irqchip=split. Therefore, deprecate the local APIC and, with it, limit -M kernel-irqchip=off to the ISA PC machine type, which does not have a local APIC at all. Reviewed-by: Maxim Levitsky <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent c6986f1 commit 2c933ac

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

docs/system/deprecated.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,13 @@ The ``-writeconfig`` option is not able to serialize the entire contents
153153
of the QEMU command line. It is thus considered a failed experiment
154154
and deprecated, with no current replacement.
155155

156+
Userspace local APIC with KVM (x86, since 6.0)
157+
''''''''''''''''''''''''''''''''''''''''''''''
158+
159+
Using ``-M kernel-irqchip=off`` with x86 machine types that include a local
160+
APIC is deprecated. The ``split`` setting is supported, as is using
161+
``-M kernel-irqchip=off`` with the ISA PC machine type.
162+
156163
QEMU Machine Protocol (QMP) commands
157164
------------------------------------
158165

hw/intc/apic.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include "hw/intc/i8259.h"
2626
#include "hw/pci/msi.h"
2727
#include "qemu/host-utils.h"
28+
#include "sysemu/kvm.h"
2829
#include "trace.h"
2930
#include "hw/i386/apic-msidef.h"
3031
#include "qapi/error.h"
@@ -875,6 +876,11 @@ static void apic_realize(DeviceState *dev, Error **errp)
875876
return;
876877
}
877878

879+
if (kvm_enabled()) {
880+
warn_report("Userspace local APIC is deprecated for KVM.");
881+
warn_report("Do not use kernel-irqchip except for the -M isapc machine type.");
882+
}
883+
878884
memory_region_init_io(&s->io_memory, OBJECT(s), &apic_io_ops, s, "apic-msi",
879885
APIC_SPACE_SIZE);
880886

0 commit comments

Comments
 (0)