lkml.org 
[lkml]   [2015]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Qemu-devel] [PATCH v3 01/16] Introduce probe mode for machine type none
On Mon, 02 Mar 2015 17:57:01 +0100
Andreas Färber <afaerber@suse.de> wrote:

> Am 02.03.2015 um 17:43 schrieb Michael Mueller:
> > On Mon, 02 Mar 2015 14:57:21 +0100
> > Andreas Färber <afaerber@suse.de> wrote:
> >
> >>> int configure_accelerator(MachineState *ms)
> >>> {
> >>> - const char *p;
> >>> + const char *p, *name;
> >>> char buf[10];
> >>> int ret;
> >>> bool accel_initialised = false;
> >>> bool init_failed = false;
> >>> AccelClass *acc = NULL;
> >>> + ObjectClass *oc;
> >>> + bool probe_mode = false;
> >>>
> >>> p = qemu_opt_get(qemu_get_machine_opts(), "accel");
> >>> if (p == NULL) {
> >>> - /* Use the default "accelerator", tcg */
> >>> - p = "tcg";
> >>> + oc = (ObjectClass *) MACHINE_GET_CLASS(current_machine);
> >>> + name = object_class_get_name(oc);
> >>> + probe_mode = !strcmp(name, "none" TYPE_MACHINE_SUFFIX);
> >>> + if (probe_mode) {
> >>> + /* Use these accelerators in probe mode, tcg should be last */
> >>> + p = probe_mode_accels;
> >>> + } else {
> >>> + /* Use the default "accelerator", tcg */
> >>> + p = "tcg";
> >>> + }
> >>> }
> >>
> >> Can't we instead use an explicit ,accel=probe or ,accel=auto?
> >> That would then obsolete the next patch.
> >
> > How would you express the following with the accel=<pseudo-accel> approach?
> >
> > -probe -machine s390-ccw,accel=kvm
> >
> > Using machine "none" as default with tcg as last accelerator initialized should not break
> > anything.
> >
> > -M none
>
> Let me ask differently: What does -machine none or -M none have to do
> with probing? It reads as if you are introducing two probe modes. Why do

The machine none? nothing directly, I guess. What are real world use cases for that
machine type?

> you need both? If we have -probe, isn't that independent of which

It is just two different means to switch on the same mode.

> machine we specify? Who is going to call either, with which respective goal?

-probe itself would be sufficient but I currently do not want to enforce the use of
a new parameter. Best would be not to have that mode at all if possible.

The intended use case is driven by management interfaces that need to draw decisions
on, in this particular case runnable cpu models, with information originated by qemu.

Let me walk through Eduardo's suggestion first and crosscheck it with my requirements
before we enter in a maybe afterwards obsolete discussion.

Thanks,
Michael

>
> I think that changing the semantics of an absent ,accel=foo parameter to
> mean something else than its longtime default of tcg is a bad idea.
>
> Have you testing qtest with it? Doesn't -qtest imply accel=qtest or is
> that always passed explicitly?
>
> Regards,
> Andreas
>



\
 
 \ /
  Last update: 2015-03-03 12:01    [W:0.077 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site