Set accelerator options after user options #139
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@limboemu, in version 6.0 you changed TCG initialization options:
– in version 5.1, "-accel tcg,thread=multi" was added only if MTTCG was activated;
– in version 6.0, "-accel tcg" is added always, with "thread=multi" or "thread=single" option.
Although it is a better solution, because it allows to explicitly set single-threaded execution on 64-bit hosts, but now it's impossible to set additional TCG options in "Extra QEMU Params" field.
The reason is that in QEMU 5.1+, the TCG seems to be initialized only once, and all subsequent "-accel tcg" options are ignored.
After you're setting "-accel tcg" in Qemu 5.1, you can later write in extra options "-accel tcg,ANYTHING", options do not matter, they are skipped.
It makes impossible to set TCG buffer size with:
"-accel tcg,tb-size=128,thread=multi" or
"-accel tcg,tb-size=128,thread=single", for example.
The default size is convenient because it does not use much memory, but if machine does not need large RAM, it's possible to set more memory for TCG buffer, and then machine runs noticeably smoother.
The suggested solution is to set TCG options after user options – in that case user options will be set first and TCG will be initialized by them.
Or, if extra field is not set, TCG will be initialized as usual, with MTTCG checkbox.
It is compatible with QEMU 2.9.1, 5.1 and should be compatible with next versions.
And thank you for Limbo! :)