Today, QEMU enables KSM by default if the (Linux) host supports it. However, it may be desirable by mngt apps to not enable it by default and also to be able to enable or disable KSM at run-time.
This series allows this by adding the -disable-mem-merge command-line option and the set-memory-merge command in QMP and HMP. This is an RFC because there are a few different ways to do this and I'd like to get feedback on the way I implemented it (which is the simplest one). cpu-all.h | 2 ++ exec-obsolete.h | 1 + exec.c | 43 +++++++++++++++++++++++++++++++++++++++---- hmp-commands.hx | 14 ++++++++++++++ hmp.c | 6 ++++++ hmp.h | 1 + memory.c | 5 +++++ memory.h | 5 +++++ monitor.c | 6 ++++++ osdep.h | 2 ++ qapi-schema.json | 18 ++++++++++++++++++ qemu-options.hx | 7 +++++++ qmp-commands.hx | 5 +++++ vl.c | 3 +++ 14 files changed, 114 insertions(+), 4 deletions(-)