qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] KVM: x86: deprecate -M kernel-irqchip=off except for -M isapc
@ 2021-03-01 11:17 Paolo Bonzini
  2021-03-01 13:11 ` Maxim Levitsky
  0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2021-03-01 11:17 UTC (permalink / raw)
  To: qemu-devel; +Cc: mlevitsk

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.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 docs/system/deprecated.rst | 7 +++++++
 hw/intc/apic.c             | 5 +++++
 2 files changed, 12 insertions(+)

diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst
index 561c916da2..ae180dc887 100644
--- a/docs/system/deprecated.rst
+++ b/docs/system/deprecated.rst
@@ -153,6 +153,13 @@ The ``-writeconfig`` option is not able to serialize the entire contents
 of the QEMU command line.  It is thus considered a failed experiment
 and deprecated, with no current replacement.
 
+Userspace local APIC with KVM (x86, since 6.0)
+'''''''''''''''''''''''''''''''''''''''''
+
+Using ``-M kernel-irqchip=off`` with x86 machine types that include a local
+APIC is deprecated.  The ``split`` setting is supported, as is using
+``-M kernel-irqchip=off`` with the ISA PC machine type.
+
 QEMU Machine Protocol (QMP) commands
 ------------------------------------
 
diff --git a/hw/intc/apic.c b/hw/intc/apic.c
index 3ada22f427..7e9601b89d 100644
--- a/hw/intc/apic.c
+++ b/hw/intc/apic.c
@@ -875,6 +875,11 @@ static void apic_realize(DeviceState *dev, Error **errp)
         return;
     }
 
+    if (kvm_enabled()) {
+        warn_report("Userspace local APIC is deprecated for KVM.");
+        warn_report("Do not use kernel-irqchip except for the -M isapc machine type.");
+    }
+
     memory_region_init_io(&s->io_memory, OBJECT(s), &apic_io_ops, s, "apic-msi",
                           APIC_SPACE_SIZE);
 
-- 
2.29.2



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] KVM: x86: deprecate -M kernel-irqchip=off except for -M isapc
  2021-03-01 11:17 [PATCH] KVM: x86: deprecate -M kernel-irqchip=off except for -M isapc Paolo Bonzini
@ 2021-03-01 13:11 ` Maxim Levitsky
  0 siblings, 0 replies; 2+ messages in thread
From: Maxim Levitsky @ 2021-03-01 13:11 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel

On Mon, 2021-03-01 at 12:17 +0100, Paolo Bonzini wrote:
> 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.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>

Best regards,
	Maxim Levitsky

> ---
>  docs/system/deprecated.rst | 7 +++++++
>  hw/intc/apic.c             | 5 +++++
>  2 files changed, 12 insertions(+)
> 
> diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst
> index 561c916da2..ae180dc887 100644
> --- a/docs/system/deprecated.rst
> +++ b/docs/system/deprecated.rst
> @@ -153,6 +153,13 @@ The ``-writeconfig`` option is not able to serialize the entire contents
>  of the QEMU command line.  It is thus considered a failed experiment
>  and deprecated, with no current replacement.
>  
> +Userspace local APIC with KVM (x86, since 6.0)
> +'''''''''''''''''''''''''''''''''''''''''
> +
> +Using ``-M kernel-irqchip=off`` with x86 machine types that include a local
> +APIC is deprecated.  The ``split`` setting is supported, as is using
> +``-M kernel-irqchip=off`` with the ISA PC machine type.
> +
>  QEMU Machine Protocol (QMP) commands
>  ------------------------------------
>  
> diff --git a/hw/intc/apic.c b/hw/intc/apic.c
> index 3ada22f427..7e9601b89d 100644
> --- a/hw/intc/apic.c
> +++ b/hw/intc/apic.c
> @@ -875,6 +875,11 @@ static void apic_realize(DeviceState *dev, Error **errp)
>          return;
>      }
>  
> +    if (kvm_enabled()) {
> +        warn_report("Userspace local APIC is deprecated for KVM.");
> +        warn_report("Do not use kernel-irqchip except for the -M isapc machine type.");
> +    }
> +
>      memory_region_init_io(&s->io_memory, OBJECT(s), &apic_io_ops, s, "apic-msi",
>                            APIC_SPACE_SIZE);
>  




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-01 13:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-01 11:17 [PATCH] KVM: x86: deprecate -M kernel-irqchip=off except for -M isapc Paolo Bonzini
2021-03-01 13:11 ` Maxim Levitsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).