All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] hw/core/null-machine: Print error message when using the -kernel parameter
@ 2017-02-28  8:52 Thomas Huth
  2017-02-28 13:17 ` Marcel Apfelbaum
  2017-03-03 18:35 ` Eduardo Habkost
  0 siblings, 2 replies; 4+ messages in thread
From: Thomas Huth @ 2017-02-28  8:52 UTC (permalink / raw)
  To: qemu-devel, Eduardo Habkost, Marcel Apfelbaum; +Cc: Peter Maydell

If the user currently tries to use the -kernel parameter, simply nothing
happens, and the user might get confused that there is nothing loaded
to memory, but also no error message has been issued. Since there is no
real generic way to load a kernel on all CPU types (but on some targets,
the generic loader can be used instead), issue an appropriate error
message here now to avoid the possible confusion.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/core/null-machine.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/hw/core/null-machine.c b/hw/core/null-machine.c
index 27c8369..864832d 100644
--- a/hw/core/null-machine.c
+++ b/hw/core/null-machine.c
@@ -40,6 +40,12 @@ static void machine_none_init(MachineState *mch)
         memory_region_allocate_system_memory(ram, NULL, "ram", mch->ram_size);
         memory_region_add_subregion(get_system_memory(), 0, ram);
     }
+
+    if (mch->kernel_filename) {
+        error_report("The -kernel parameter is not supported "
+                     "(use the generic 'loader' device instead).");
+        exit(1);
+    }
 }
 
 static void machine_none_machine_init(MachineClass *mc)
-- 
1.8.3.1

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

* Re: [Qemu-devel] [PATCH] hw/core/null-machine: Print error message when using the -kernel parameter
  2017-02-28  8:52 [Qemu-devel] [PATCH] hw/core/null-machine: Print error message when using the -kernel parameter Thomas Huth
@ 2017-02-28 13:17 ` Marcel Apfelbaum
  2017-02-28 19:41   ` Philippe Mathieu-Daudé
  2017-03-03 18:35 ` Eduardo Habkost
  1 sibling, 1 reply; 4+ messages in thread
From: Marcel Apfelbaum @ 2017-02-28 13:17 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel, Eduardo Habkost; +Cc: Peter Maydell

On 02/28/2017 10:52 AM, Thomas Huth wrote:
> If the user currently tries to use the -kernel parameter, simply nothing
> happens, and the user might get confused that there is nothing loaded
> to memory, but also no error message has been issued. Since there is no
> real generic way to load a kernel on all CPU types (but on some targets,
> the generic loader can be used instead), issue an appropriate error
> message here now to avoid the possible confusion.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  hw/core/null-machine.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/hw/core/null-machine.c b/hw/core/null-machine.c
> index 27c8369..864832d 100644
> --- a/hw/core/null-machine.c
> +++ b/hw/core/null-machine.c
> @@ -40,6 +40,12 @@ static void machine_none_init(MachineState *mch)
>          memory_region_allocate_system_memory(ram, NULL, "ram", mch->ram_size);
>          memory_region_add_subregion(get_system_memory(), 0, ram);
>      }
> +
> +    if (mch->kernel_filename) {
> +        error_report("The -kernel parameter is not supported "
> +                     "(use the generic 'loader' device instead).");
> +        exit(1);
> +    }
>  }
>
>  static void machine_none_machine_init(MachineClass *mc)
>


Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>

Thanks,
Marcel

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

* Re: [Qemu-devel] [PATCH] hw/core/null-machine: Print error message when using the -kernel parameter
  2017-02-28 13:17 ` Marcel Apfelbaum
@ 2017-02-28 19:41   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-02-28 19:41 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel; +Cc: Marcel Apfelbaum, Eduardo Habkost, Peter Maydell

On 02/28/2017 10:17 AM, Marcel Apfelbaum wrote:
> On 02/28/2017 10:52 AM, Thomas Huth wrote:
>> If the user currently tries to use the -kernel parameter, simply nothing
>> happens, and the user might get confused that there is nothing loaded
>> to memory, but also no error message has been issued. Since there is no
>> real generic way to load a kernel on all CPU types (but on some targets,
>> the generic loader can be used instead), issue an appropriate error
>> message here now to avoid the possible confusion.
>>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>>  hw/core/null-machine.c | 6 ++++++
>>  1 file changed, 6 insertions(+)
>>
>> diff --git a/hw/core/null-machine.c b/hw/core/null-machine.c
>> index 27c8369..864832d 100644
>> --- a/hw/core/null-machine.c
>> +++ b/hw/core/null-machine.c
>> @@ -40,6 +40,12 @@ static void machine_none_init(MachineState *mch)
>>          memory_region_allocate_system_memory(ram, NULL, "ram",
>> mch->ram_size);
>>          memory_region_add_subregion(get_system_memory(), 0, ram);
>>      }
>> +
>> +    if (mch->kernel_filename) {
>> +        error_report("The -kernel parameter is not supported "
>> +                     "(use the generic 'loader' device instead).");
>> +        exit(1);
>> +    }
>>  }
>>
>>  static void machine_none_machine_init(MachineClass *mc)
>>
>
>
> Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

>
> Thanks,
> Marcel
>

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

* Re: [Qemu-devel] [PATCH] hw/core/null-machine: Print error message when using the -kernel parameter
  2017-02-28  8:52 [Qemu-devel] [PATCH] hw/core/null-machine: Print error message when using the -kernel parameter Thomas Huth
  2017-02-28 13:17 ` Marcel Apfelbaum
@ 2017-03-03 18:35 ` Eduardo Habkost
  1 sibling, 0 replies; 4+ messages in thread
From: Eduardo Habkost @ 2017-03-03 18:35 UTC (permalink / raw)
  To: Thomas Huth; +Cc: qemu-devel, Marcel Apfelbaum, Peter Maydell

On Tue, Feb 28, 2017 at 09:52:51AM +0100, Thomas Huth wrote:
> If the user currently tries to use the -kernel parameter, simply nothing
> happens, and the user might get confused that there is nothing loaded
> to memory, but also no error message has been issued. Since there is no
> real generic way to load a kernel on all CPU types (but on some targets,
> the generic loader can be used instead), issue an appropriate error
> message here now to avoid the possible confusion.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>

Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>

Applied to my machine-next branch, but I'm unsure if we should
break soft freeze and include this on 2.9. I will probably hold
it for 2.10.

> ---
>  hw/core/null-machine.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/hw/core/null-machine.c b/hw/core/null-machine.c
> index 27c8369..864832d 100644
> --- a/hw/core/null-machine.c
> +++ b/hw/core/null-machine.c
> @@ -40,6 +40,12 @@ static void machine_none_init(MachineState *mch)
>          memory_region_allocate_system_memory(ram, NULL, "ram", mch->ram_size);
>          memory_region_add_subregion(get_system_memory(), 0, ram);
>      }
> +
> +    if (mch->kernel_filename) {
> +        error_report("The -kernel parameter is not supported "
> +                     "(use the generic 'loader' device instead).");
> +        exit(1);
> +    }
>  }
>  
>  static void machine_none_machine_init(MachineClass *mc)
> -- 
> 1.8.3.1
> 

-- 
Eduardo

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

end of thread, other threads:[~2017-03-03 18:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-28  8:52 [Qemu-devel] [PATCH] hw/core/null-machine: Print error message when using the -kernel parameter Thomas Huth
2017-02-28 13:17 ` Marcel Apfelbaum
2017-02-28 19:41   ` Philippe Mathieu-Daudé
2017-03-03 18:35 ` Eduardo Habkost

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.