diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2011-06-06 08:25:06 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-06-06 08:54:56 -0500 |
commit | a16c53b101a9897b0b2be96a1bb3bde7c04380f2 (patch) | |
tree | 033b72681e6c3d6ad96eede109f06b8c7edb633f /vl.c | |
parent | 25f3151ece1d5881826232bebccc21b588d4e03e (diff) | |
download | qemu-a16c53b101a9897b0b2be96a1bb3bde7c04380f2.zip qemu-a16c53b101a9897b0b2be96a1bb3bde7c04380f2.tar.gz qemu-a16c53b101a9897b0b2be96a1bb3bde7c04380f2.tar.bz2 |
Fix regression introduced by -machine accel=
Commit 85097db6 changed the timing when kvm_allowed is set until after
kvm is initialized. During initialization, the ioeventfd initialization code
checks kvm_enabled() and after this change, ioeventfd is effectively disabled.
This causes a significant regression in performance.
Fix this by setting kvm_allowed before calling init.
Reported-by: Khoa Huynh <khoa@us.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1933,6 +1933,7 @@ static int configure_accelerator(void) p = get_opt_name(buf, sizeof (buf), p, ':'); for (i = 0; i < ARRAY_SIZE(accel_list); i++) { if (strcmp(accel_list[i].opt_name, buf) == 0) { + *(accel_list[i].allowed) = 1; ret = accel_list[i].init(); if (ret < 0) { init_failed = 1; @@ -1944,9 +1945,9 @@ static int configure_accelerator(void) accel_list[i].name, strerror(-ret)); } + *(accel_list[i].allowed) = 0; } else { accel_initalised = 1; - *(accel_list[i].allowed) = 1; } break; } |