Skip to content

vl: avoid SIGSEGV on invalid [accel] configuration

Paolo Bonzini qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4vl: catch [accel] entry without acceleratorsoftmmu/vl.c+11 -41 reply
2/4libqtest: split qtest_spawn_qemu functiontests/qtest/libqtest.c+55 -482 replies
3/4libqtest: ensure waitpid() is only called oncetests/qtest/libqtest.c+20 -91 reply
4/4readconfig-test: add test for accelerator configurationtests/qtest/libqtest.c tests/qtest/libqtest.h tests/qtest/readconfig-test.c+70 -152 replies

Reviews trailers per patch

2 of 4 patches have a Reviewed-by or Acked-by.

PatchPhilippe Mathieu-DaudéThomas Huth
1/4
2/4R-b
3/4R-b
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/4] vl: avoid SIGSEGV on invalid [accel] configuration

While QEMU catches invalid -accel command line options:

    $ qemu-system-x86_64 -accel foo=bar
    Accelerators supported in QEMU binary:
    tcg
    xen
    kvm

the same is not true of configuration files, which instead crash. Patch 1 is the trivial fix, but writing a test is a bit more complex: there are no existing testcases where the qtest socket would not even start. So the series does the required refactoring and cleanup before adding tests for both valid and invalid [accel] sections in patch 4.

Paolo Bonzini (4):
vl: catch [accel] entry without accelerator
libqtest: split qtest_spawn_qemu function
libqtest: ensure waitpid() is only called once
readconfig-test: add test for accelerator configuration

 softmmu/vl.c                  |  15 +++-
 tests/qtest/libqtest.c        | 160 +++++++++++++++++++++-------------
 tests/qtest/libqtest.h        |  12 +++
 tests/qtest/readconfig-test.c |  45 ++++++++--
 4 files changed, 156 insertions(+), 76 deletions(-)
Signature · 1 line
2.38.1