aboutsummaryrefslogtreecommitdiff
path: root/accel
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-05-14 09:55:08 +0100
committerPeter Maydell <peter.maydell@linaro.org>2018-05-14 09:55:09 +0100
commit9ba1733a7639243500fc71a31e7b86fdfeb58e7b (patch)
tree89eceaee703e0fff3e2233aebc10d83380a38d5b /accel
parentf5583c527f0e1ed2496ee49bcff25ca1b481139f (diff)
parent5b27a92dcc5afb11d38c7fe0a637d5d64d31108a (diff)
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
* Don't silently truncate extremely long words in the command line * dtc configure fixes * MemoryRegionCache second try * Deprecated option removal * add support for Hyper-V reenlightenment MSRs # gpg: Signature made Fri 11 May 2018 13:33:46 BST # gpg: using RSA key BFFBD25F78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini/tags/for-upstream: (29 commits) rename included C files to foo.inc.c, remove osdep.h pc-dimm: fix error messages if no slots were defined build: Silence dtc directory creation shippable: Remove Debian 8 libfdt kludge configure: Display if libfdt is from system or git configure: Really use local libfdt if the system one is too old i386/kvm: add support for Hyper-V reenlightenment MSRs qemu-doc: provide details of supported build platforms qemu-options: Remove deprecated -no-kvm-irqchip qemu-options: Remove deprecated -no-kvm-pit-reinjection qemu-options: Bail out on unsupported options instead of silently ignoring them qemu-options: Remove remainders of the -tdf option qemu-options: Mark -virtioconsole as deprecated target/i386: sev: fix memory leaks opts: don't silently truncate long option values opts: don't silently truncate long parameter keys accel: use g_strsplit for parsing accelerator names update-linux-headers: drop hyperv.h qemu-thread: always keep the posix wrapper layer exec: reintroduce MemoryRegion caching ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'accel')
-rw-r--r--accel/accel.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/accel/accel.c b/accel/accel.c
index 9cfab115d0..966b2d8f53 100644
--- a/accel/accel.c
+++ b/accel/accel.c
@@ -70,8 +70,8 @@ static int accel_init_machine(AccelClass *acc, MachineState *ms)
void configure_accelerator(MachineState *ms)
{
- const char *accel, *p;
- char buf[10];
+ const char *accel;
+ char **accel_list, **tmp;
int ret;
bool accel_initialised = false;
bool init_failed = false;
@@ -83,13 +83,10 @@ void configure_accelerator(MachineState *ms)
accel = "tcg";
}
- p = accel;
- while (!accel_initialised && *p != '\0') {
- if (*p == ':') {
- p++;
- }
- p = get_opt_name(buf, sizeof(buf), p, ':');
- acc = accel_find(buf);
+ accel_list = g_strsplit(accel, ":", 0);
+
+ for (tmp = accel_list; !accel_initialised && tmp && *tmp; tmp++) {
+ acc = accel_find(*tmp);
if (!acc) {
continue;
}
@@ -107,6 +104,7 @@ void configure_accelerator(MachineState *ms)
accel_initialised = true;
}
}
+ g_strfreev(accel_list);
if (!accel_initialised) {
if (!init_failed) {