[PATCH v3 22/22] [RfC] acpi: flip default to off for microvm

Gerd Hoffmann posted 22 patches 5 years, 7 months ago
Maintainers: Peter Maydell <peter.maydell@linaro.org>, Sergio Lopez <slp@redhat.com>, Igor Mammedov <imammedo@redhat.com>, Eduardo Habkost <ehabkost@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Paolo Bonzini <pbonzini@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Richard Henderson <rth@twiddle.net>, Shannon Zhao <shannon.zhaosl@gmail.com>
There is a newer version of this series
[PATCH v3 22/22] [RfC] acpi: flip default to off for microvm
Posted by Gerd Hoffmann 5 years, 7 months ago
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/i386/microvm.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c
index 602c6a8f75f3..b5c445b5403b 100644
--- a/hw/i386/microvm.c
+++ b/hw/i386/microvm.c
@@ -517,6 +517,7 @@ static void microvm_machine_initfn(Object *obj)
 static void microvm_class_init(ObjectClass *oc, void *data)
 {
     MachineClass *mc = MACHINE_CLASS(oc);
+    X86MachineClass *x86mc = X86_MACHINE_CLASS(oc);
 
     mc->init = microvm_machine_state_init;
 
@@ -537,6 +538,9 @@ static void microvm_class_init(ObjectClass *oc, void *data)
     /* Machine class handlers */
     mc->reset = microvm_machine_reset;
 
+    /* acpi is off by default */
+    x86mc->acpi_default = false;
+
     object_class_property_add(oc, MICROVM_MACHINE_PIC, "OnOffAuto",
                               microvm_machine_get_pic,
                               microvm_machine_set_pic,
-- 
2.18.4


Re: [PATCH v3 22/22] [RfC] acpi: flip default to off for microvm
Posted by Igor Mammedov 5 years, 7 months ago
On Wed, 20 May 2020 15:20:03 +0200
Gerd Hoffmann <kraxel@redhat.com> wrote:

> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  hw/i386/microvm.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c
> index 602c6a8f75f3..b5c445b5403b 100644
> --- a/hw/i386/microvm.c
> +++ b/hw/i386/microvm.c
> @@ -517,6 +517,7 @@ static void microvm_machine_initfn(Object *obj)
>  static void microvm_class_init(ObjectClass *oc, void *data)
>  {
>      MachineClass *mc = MACHINE_CLASS(oc);
> +    X86MachineClass *x86mc = X86_MACHINE_CLASS(oc);
>  
>      mc->init = microvm_machine_state_init;
>  
> @@ -537,6 +538,9 @@ static void microvm_class_init(ObjectClass *oc, void *data)
>      /* Machine class handlers */
>      mc->reset = microvm_machine_reset;
>  
> +    /* acpi is off by default */
> +    x86mc->acpi_default = false;

Since we don't care about compat stuff for microvm yet,
I'd preffer default 'on', as in long run it allows to boot larger range of guests
without need for tuning QEMU and guest configuration
(i.e. it's the least troublesome case for ordinary user)

> +
>      object_class_property_add(oc, MICROVM_MACHINE_PIC, "OnOffAuto",
>                                microvm_machine_get_pic,
>                                microvm_machine_set_pic,


Re: [PATCH v3 22/22] [RfC] acpi: flip default to off for microvm
Posted by Gerd Hoffmann 5 years, 6 months ago
On Thu, May 21, 2020 at 12:36:24PM +0200, Igor Mammedov wrote:
> On Wed, 20 May 2020 15:20:03 +0200
> Gerd Hoffmann <kraxel@redhat.com> wrote:
> 
> > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> > ---
> >  hw/i386/microvm.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c
> > index 602c6a8f75f3..b5c445b5403b 100644
> > --- a/hw/i386/microvm.c
> > +++ b/hw/i386/microvm.c
> > @@ -517,6 +517,7 @@ static void microvm_machine_initfn(Object *obj)
> >  static void microvm_class_init(ObjectClass *oc, void *data)
> >  {
> >      MachineClass *mc = MACHINE_CLASS(oc);
> > +    X86MachineClass *x86mc = X86_MACHINE_CLASS(oc);
> >  
> >      mc->init = microvm_machine_state_init;
> >  
> > @@ -537,6 +538,9 @@ static void microvm_class_init(ObjectClass *oc, void *data)
> >      /* Machine class handlers */
> >      mc->reset = microvm_machine_reset;
> >  
> > +    /* acpi is off by default */
> > +    x86mc->acpi_default = false;
> 
> Since we don't care about compat stuff for microvm yet,
> I'd preffer default 'on', as in long run it allows to boot larger range of guests
> without need for tuning QEMU and guest configuration
> (i.e. it's the least troublesome case for ordinary user)

I fully agree and I'll happily drop patches 21+22 and have microvm
default to acpi=on.  See also:
   https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg01315.html

Older patch versions got multiple review comments asking for acpi=off by
default, so I've added these two patches as RfC to show how this could
be done.  RfC because (1) the topic is controversial and (2) these are
not final.  I'd move 21/22 up in the series and squash 22/22 into the
"add acpi to microvm" patch in case we decide for acpi=off as default.

take care,
  Gerd