[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 01/16] Introduce probe mode for machine type
From: |
Eduardo Habkost |
Subject: |
Re: [Qemu-devel] [PATCH v3 01/16] Introduce probe mode for machine type none |
Date: |
Mon, 2 Mar 2015 16:17:33 -0300 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Mon, Mar 02, 2015 at 01:43:53PM +0100, Michael Mueller wrote:
> QEMU now switches into "probe mode" when the selected machine is "none" and no
> specific accelerator(s) has been requested (i.e.: "-machine none").
>
> In probe mode a by "<ARCH>_CONFIG" defines predefined list of accelerators run
> their init() methods.
>
> Signed-off-by: Michael Mueller <address@hidden>
> ---
[...]
> 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;
I don't fully understand the purpose of this patch yet (I will discuss
it in a reply to the cover letter). But if you really want -machine none
to trigger different behavior, why you didn't add a probe_mode field
to MachineClass, so you can set it in the mahine_none class code?
> + } else {
> + /* Use the default "accelerator", tcg */
> + p = "tcg";
> + }
> }
[...]
--
Eduardo
- [Qemu-devel] [PATCH v3 00/16] s390x cpu model implementation, Michael Mueller, 2015/03/02
- [Qemu-devel] [PATCH v3 01/16] Introduce probe mode for machine type none, Michael Mueller, 2015/03/02
- Re: [Qemu-devel] [PATCH v3 01/16] Introduce probe mode for machine type none, Andreas Färber, 2015/03/02
- Re: [Qemu-devel] [PATCH v3 01/16] Introduce probe mode for machine type none, Michael Mueller, 2015/03/02
- Re: [Qemu-devel] [PATCH v3 01/16] Introduce probe mode for machine type none, Andreas Färber, 2015/03/02
- Re: [Qemu-devel] [PATCH v3 01/16] Introduce probe mode for machine type none, Michael Mueller, 2015/03/03
- Re: [Qemu-devel] [PATCH v3 01/16] Introduce probe mode for machine type none, Eduardo Habkost, 2015/03/04
- Re: [Qemu-devel] [PATCH v3 01/16] Introduce probe mode for machine type none, Michael Mueller, 2015/03/05
- Re: [Qemu-devel] [PATCH v3 01/16] Introduce probe mode for machine type none, Eduardo Habkost, 2015/03/05
Re: [Qemu-devel] [PATCH v3 01/16] Introduce probe mode for machine type none,
Eduardo Habkost <=
[Qemu-devel] [PATCH v3 03/16] Introduce stub routine cpu_desc_avail, Michael Mueller, 2015/03/02
[Qemu-devel] [PATCH v3 12/16] target-s390x: Prepare accelerator during cpu object realization, Michael Mueller, 2015/03/02
[Qemu-devel] [PATCH v3 13/16] target-s390x: New QMP command query-cpu-model, Michael Mueller, 2015/03/02
[Qemu-devel] [PATCH v3 07/16] target-s390x: Define cpu model specific facility lists, Michael Mueller, 2015/03/02
[Qemu-devel] [PATCH v3 11/16] target-s390x: Add cpu class initialization routines, Michael Mueller, 2015/03/02
[Qemu-devel] [PATCH v3 06/16] target-s390x: Introduce cpu models, Michael Mueller, 2015/03/02
[Qemu-devel] [PATCH v3 05/16] target-s390x: Generate facility defines per cpu model, Michael Mueller, 2015/03/02
[Qemu-devel] [PATCH v3 02/16] Introduce option --probe to switch into probe mode, Michael Mueller, 2015/03/02
[Qemu-devel] [PATCH v3 08/16] target-s390x: Add cpu model alias definition routines, Michael Mueller, 2015/03/02