lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 2 Mar 2015 16:17:33 -0300 From: Eduardo Habkost <ehabkost@...hat.com> To: Michael Mueller <mimu@...ux.vnet.ibm.com> Cc: qemu-devel@...gnu.org, kvm@...r.kernel.org, linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org, Gleb Natapov <gleb@...nel.org>, Alexander Graf <agraf@...e.de>, Christian Borntraeger <borntraeger@...ibm.com>, "Jason J. Herne" <jjherne@...ux.vnet.ibm.com>, Cornelia Huck <cornelia.huck@...ibm.com>, Paolo Bonzini <pbonzini@...hat.com>, Andreas Faerber <afaerber@...e.de>, Richard Henderson <rth@...ddle.net> Subject: Re: [PATCH v3 01/16] Introduce probe mode for machine type none 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 <mimu@...ux.vnet.ibm.com> > --- [...] > 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists