[PATCH v2 10/13] microvm: disable virtio-mmio cmdline hack

Gerd Hoffmann posted 13 patches 5 years, 7 months ago
Maintainers: Eduardo Habkost <ehabkost@redhat.com>, Igor Mammedov <imammedo@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, "Michael S. Tsirkin" <mst@redhat.com>, Richard Henderson <rth@twiddle.net>, Paolo Bonzini <pbonzini@redhat.com>, Sergio Lopez <slp@redhat.com>
There is a newer version of this series
[PATCH v2 10/13] microvm: disable virtio-mmio cmdline hack
Posted by Gerd Hoffmann 5 years, 7 months ago
... in case we are using ACPI.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/i386/microvm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c
index 6ba2d9d3f028..a3708fdf1e39 100644
--- a/hw/i386/microvm.c
+++ b/hw/i386/microvm.c
@@ -369,7 +369,8 @@ static void microvm_machine_reset(MachineState *machine)
     CPUState *cs;
     X86CPU *cpu;
 
-    if (machine->kernel_filename != NULL &&
+    if (!x86_machine_is_acpi_enabled(X86_MACHINE(machine)) &&
+        machine->kernel_filename != NULL &&
         mms->auto_kernel_cmdline && !mms->kernel_cmdline_fixed) {
         microvm_fix_kernel_cmdline(machine);
         mms->kernel_cmdline_fixed = true;
-- 
2.18.4


Re: [PATCH v2 10/13] microvm: disable virtio-mmio cmdline hack
Posted by Igor Mammedov 5 years, 7 months ago
On Tue,  5 May 2020 15:43:02 +0200
Gerd Hoffmann <kraxel@redhat.com> wrote:

> ... in case we are using ACPI.
> 
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>

Reviewed-by: Igor Mammedov <imammedo@redhat.com>

> ---
>  hw/i386/microvm.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c
> index 6ba2d9d3f028..a3708fdf1e39 100644
> --- a/hw/i386/microvm.c
> +++ b/hw/i386/microvm.c
> @@ -369,7 +369,8 @@ static void microvm_machine_reset(MachineState *machine)
>      CPUState *cs;
>      X86CPU *cpu;
>  
> -    if (machine->kernel_filename != NULL &&
> +    if (!x86_machine_is_acpi_enabled(X86_MACHINE(machine)) &&
> +        machine->kernel_filename != NULL &&
>          mms->auto_kernel_cmdline && !mms->kernel_cmdline_fixed) {
>          microvm_fix_kernel_cmdline(machine);
>          mms->kernel_cmdline_fixed = true;