lkvm {pause,resume} do not give any feedback to user who uses these
commands in the console where the command run.
This patch makes the command output in the command console instead of
guest console.
Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Remove struct pause_cmd/resume_cmd and use kvm_ipc__send().
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Use stack variable.
Remove unneeded branch.
Close opened file.
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Commands' usage : Change the binary name from *kvm* to *lkvm*,
since commit ad3efb18 has done it.
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
This patch changes the IPC method to use UNIX sockets instead of
signals.
This allows for more flexibility in moving data between processes, for example
it would allow avoid printing output in the terminal of the guest.
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
This patch fixes an error where pids used u64 instead of pid_t, causing them
to never be negative.
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
There was a mixup in the balloon usage string and some of the commands were
retrieving the instance name from the wrong place. This will cause the commands
to issue kill() with negative PIDs (which sends the signal to every process in
the system). Without this patch, 'kvm command instance' will do crazy things
like restart whole Gnome session.
Tested-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
kvm pause now uses the git option parser to parse parameters.
Added option to pause instance by PID and pause all instances.
Improved usage message.
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
This patch connects usage helpers to 'kvm help' callbacks, allowing
to see help about a command by doing 'kvm help [command]'.
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
callback function maybe fail, so we should deal with the return value.
Signed-off-by: Liming Wang <walimisdev@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
This patch seperates 'kvm pause' into 'kvm pause' and 'kvm resume',
'kvm pause' no longer acts as a switch between running and paused state but
instead just switches the instance into paused and reume is handled by
the new 'kvm resume'.
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Rename kvm-[command] into builtin-[command] to prevent
clashes with non-command files such as kvm-cpu.h
Suggested-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>