#
e830cce7 |
| 05-Sep-2012 |
Sasha Levin <levinsasha928@gmail.com> |
kvm tools: move mmio_debug into struct kvm_config
This config option was 'extern'ed between different objects. Clean it up and move it into struct kvm_config.
Signed-off-by: Sasha Levin <levinsasha
kvm tools: move mmio_debug into struct kvm_config
This config option was 'extern'ed between different objects. Clean it up and move it into struct kvm_config.
Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
5765977d |
| 05-Sep-2012 |
Sasha Levin <levinsasha928@gmail.com> |
kvm tools: move ioport_debug into struct kvm_config
This config option was 'extern'ed between different objects. Clean it up and move it into struct kvm_config.
Signed-off-by: Sasha Levin <levinsas
kvm tools: move ioport_debug into struct kvm_config
This config option was 'extern'ed between different objects. Clean it up and move it into struct kvm_config.
Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
809f088b |
| 05-Sep-2012 |
Sasha Levin <levinsasha928@gmail.com> |
kvm tools: remove redundancy between kvm_config and kvm
Remove some redundant members between struct kvm_config and struct kvm since options are now contained within struct kvm.
Signed-off-by: Sash
kvm tools: remove redundancy between kvm_config and kvm
Remove some redundant members between struct kvm_config and struct kvm since options are now contained within struct kvm.
Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
47621338 |
| 05-Sep-2012 |
Sasha Levin <levinsasha928@gmail.com> |
kvm tools: move kvm_config into struct kvm
Contain the options within struct kvm itself. This way options are specific to a given struct kvm and not just global.
Signed-off-by: Sasha Levin <levinsa
kvm tools: move kvm_config into struct kvm
Contain the options within struct kvm itself. This way options are specific to a given struct kvm and not just global.
Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
b816364a |
| 05-Sep-2012 |
Sasha Levin <levinsasha928@gmail.com> |
kvm tools: generate command line options dynamically
Since we now store options in a struct, we should generate the command line options dynamically. This is a pre-requisite to the following patch m
kvm tools: generate command line options dynamically
Since we now store options in a struct, we should generate the command line options dynamically. This is a pre-requisite to the following patch moving the options into struct kvm.
Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
b54cb31c |
| 05-Sep-2012 |
Sasha Levin <levinsasha928@gmail.com> |
kvm tools: introduce kvm_config to store instance-specific config options
Move all the configurable options from global static variables to a self-contained structure.
Signed-off-by: Sasha Levin <l
kvm tools: introduce kvm_config to store instance-specific config options
Move all the configurable options from global static variables to a self-contained structure.
Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
91d6a8e3 |
| 22-Aug-2012 |
Asias He <asias.hejun@gmail.com> |
kvm tools: Merge guest init and init_stage2.c
Two stages init process is introduced in
commit eaf720b285947a6f4e29174d0eba1899de31d8ab kvm tools: Split custom rootfs init into two stages
to
kvm tools: Merge guest init and init_stage2.c
Two stages init process is introduced in
commit eaf720b285947a6f4e29174d0eba1899de31d8ab kvm tools: Split custom rootfs init into two stages
to address the outdated init binary issue.
Currenly, init binary is embedded in lkvm binary and generated on the fly. So there is no need to split the init process.
This makes 1) the size of lkvm binary smaller becasue only one statically linked init binary. 2) the init process simpler and cleaner.
Signed-off-by: Asias He <asias.hejun@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
afc2c7c0 |
| 22-Aug-2012 |
Asias He <asias.hejun@gmail.com> |
kvm tools: Embed init and init_stage2 into lkvm binary
We generate guest init and init_stage2 on the fly and put them in
~/.lkvm/$guest/virt/init ~/.lkvm/$guest/virt/init_stage2 .
This makes
kvm tools: Embed init and init_stage2 into lkvm binary
We generate guest init and init_stage2 on the fly and put them in
~/.lkvm/$guest/virt/init ~/.lkvm/$guest/virt/init_stage2 .
This makes 'lkvm run' no longer depending on guest/{int, init_stage2}.
Further, we can merge init and init_stage2 since there is no need to split the init function into two stages any more.
Signed-off-by: Asias He <asias.hejun@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
a67da3be |
| 17-Aug-2012 |
Asias He <asias.hejun@gmail.com> |
kvm tools: Add initial virtio-scsi support
This patch brings virito-scsi support to kvm tool.
With the introduce of tcm_vhost (vhost-scsi)
tcm_vhost: Initial merge for vhost level target fabric
kvm tools: Add initial virtio-scsi support
This patch brings virito-scsi support to kvm tool.
With the introduce of tcm_vhost (vhost-scsi)
tcm_vhost: Initial merge for vhost level target fabric driver
we can implement virito-scsi by simply having vhost-scsi to handle the SCSI command.
Howto use: 1) Setup the tcm_vhost target through /sys/kernel/config
[Stefan Hajnoczi, Thanks for the script to setup tcm_vhost]
** Setup wwpn and tpgt $ wwpn="naa.0" $ tpgt=/sys/kernel/config/target/vhost/$wwpn/tpgt_0 $ nexus=$tpgt/nexus $ mkdir -p $tpgt $ echo -n $wwpn > $nexus
** Setup lun using /dev/ram $ n=0 $ lun=$tpgt/lun/lun_${n} $ data=/sys/kernel/config/target/core/iblock_0/data_${n} $ ram=/dev/ram${n} $ mkdir -p $lun $ mkdir -p $data $ echo -n udev_path=${ram} > $data/control $ echo -n 1 > $data/enable $ ln -s $data $lun
2) Run kvm tool with the new disk option '-d scsi:$wwpn:$tpgt', e.g $ lkvm run -k /boot/bzImage -d ~/img/sid.img -d scsi:naa.0:0
Signed-off-by: Asias He <asias.hejun@gmail.com> Cc: Nicholas A. Bellinger <nab@linux-iscsi.org> Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
e120b624 |
| 13-Aug-2012 |
Paul Neumann <paul104x@yahoo.de> |
kvm tools: Fix segfault on "lkvm run"
The segfault is triggered by just running "lkvm run". On my system, it does not find any kernel, so kvm_cmd_run_init() returns EINVAL which fails the (r < 0) ch
kvm tools: Fix segfault on "lkvm run"
The segfault is triggered by just running "lkvm run". On my system, it does not find any kernel, so kvm_cmd_run_init() returns EINVAL which fails the (r < 0) check in kvm_cmd_run(). Since kvm_cmd_run_init() does not get to initialize the cpus, kvm_cpus gets mistakenly dereferenced in kvm_cmd_run_work().
The errors from kvm_cmd_run_init() are not handled properly as they are returned as positive values.
Acked-by: Asias He <asias.hejun@gmail.com> Signed-off-by: Paul Neumann <paul104x@yahoo.de> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
21aa628e |
| 10-Aug-2012 |
Michael Ellerman <michael@ellerman.id.au> |
kvm tools: Check for unknown parameters in network option handling
Currently the parsing of network command line parameters doesn't check for unknown parameters.
For example "-n mod=none" will caus
kvm tools: Check for unknown parameters in network option handling
Currently the parsing of network command line parameters doesn't check for unknown parameters.
For example "-n mod=none" will cause kvmtool to setup TAP networking.
Save users from their typos by checking for unknown parameters and bailing.
Acked-by: Asias He <asias.hejun@gmail.com> Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
eb8dad9d |
| 02-Aug-2012 |
Sasha Levin <levinsasha928@gmail.com> |
kvm tools: prevent guest softlockup errors when pausing
Use the new KVM_KVMCLOCK_CTRL ioctl to prevent guests from wrongfully detecting lockups when in fact they were paused.
Signed-off-by: Sasha L
kvm tools: prevent guest softlockup errors when pausing
Use the new KVM_KVMCLOCK_CTRL ioctl to prevent guests from wrongfully detecting lockups when in fact they were paused.
Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
5236b505 |
| 03-Aug-2012 |
Asias He <asias.hejun@gmail.com> |
kvm tools: Enable O_DIRECT support
With Direct I/O, file reads and writes go directly from the applications to the storage device, bypassing the operating system read and write caches. This is usefu
kvm tools: Enable O_DIRECT support
With Direct I/O, file reads and writes go directly from the applications to the storage device, bypassing the operating system read and write caches. This is useful for applications that manage their own caches.
Open a disk image with O_DIRECT: $ lkvm run -d ~/img/test.img,direct
The original readonly flag is still supported. Open a disk image with O_DIRECT and readonly: $ lkvm run -d ~/img/test.img,direct,ro
Signed-off-by: Asias He <asias.hejun@gmail.com> Acked-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
226e727b |
| 22-Jul-2012 |
Sasha Levin <levinsasha928@gmail.com> |
kvm tools: support injecting arbitrary sysrqs
Add support to 'lkvm debug' to inject arbitrary sysrqs using a new '-s <sysrq>' argument.
Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-o
kvm tools: support injecting arbitrary sysrqs
Add support to 'lkvm debug' to inject arbitrary sysrqs using a new '-s <sysrq>' argument.
Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
97f16d66 |
| 11-Jul-2012 |
Asias He <asias.hejun@gmail.com> |
kvm tools: Introduce struct disk_image_params
Introduce struct disk_image_params to contain all the disk image parameters. This is useful for adding more disk image parameters, e.g. disk image cache
kvm tools: Introduce struct disk_image_params
Introduce struct disk_image_params to contain all the disk image parameters. This is useful for adding more disk image parameters, e.g. disk image cache mode.
Signed-off-by: Asias He <asias.hejun@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
d562e086 |
| 03-May-2012 |
Cyrill Gorcunov <gorcunov@openvz.org> |
kvm tools: Add --debug-mmio option
This switches the default behaviour of lkvm if access on unregistered MMIO address happens -- we don't spam a user with warning messages anymore. If one needs deta
kvm tools: Add --debug-mmio option
This switches the default behaviour of lkvm if access on unregistered MMIO address happens -- we don't spam a user with warning messages anymore. If one needs details on unhandled MMIOs the --debug-mmio option should be passed.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
69205aa1 |
| 07-Apr-2012 |
Asias He <asias.hejun@gmail.com> |
kvm tools: Introduce trans=mmio parameter for virtio-net
To select virtio-mmio instead of virito-pci transport:
lkvm run --network trans=mmio
Signed-off-by: Asias He <asias.hejun@gmail.com> Sig
kvm tools: Introduce trans=mmio parameter for virtio-net
To select virtio-mmio instead of virito-pci transport:
lkvm run --network trans=mmio
Signed-off-by: Asias He <asias.hejun@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
de3f75c9 |
| 09-Mar-2012 |
Pekka Enberg <penberg@kernel.org> |
kvm tools: Fix realpath() error checking
The realpath() function can fail, so check for errors to fix up compilation with "-Werror".
Reported-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by
kvm tools: Fix realpath() error checking
The realpath() function can fail, so check for errors to fix up compilation with "-Werror".
Reported-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
c2c742d9 |
| 08-Mar-2012 |
Pekka Enberg <penberg@kernel.org> |
kvm tools, sandbox: Fix running guest commands
This patch fixes "vm sandbox" for guest commands that are not on host filesytem.
Signed-off-by: Pekka Enberg <penberg@kernel.org>
|
#
5cd19aa0 |
| 07-Mar-2012 |
Pekka Enberg <penberg@kernel.org> |
kvm tools: Make 'vm sandbox' more user-friendly
This patch changes 'vm sandbox' to automatically prefix a program path with "/host" in the guest side making this, for example, work as expected:
$
kvm tools: Make 'vm sandbox' more user-friendly
This patch changes 'vm sandbox' to automatically prefix a program path with "/host" in the guest side making this, for example, work as expected:
$ ./vm sandbox -- ~/trinity/trinity --mode=random --dangerous
Cc: Asias He <asias.hejun@gmail.com> Cc: Cyrill Gorcunov <gorcunov@openvz.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
5ad8db5e |
| 24-Feb-2012 |
Pekka Enberg <penberg@kernel.org> |
kvm tools, seabios: Add "--firmware" option to "vm run"
This patch adds a "--firmware" command line option to "vm run". You can use this to try to boot with SeaBIOS, for example:
./vm run --firmw
kvm tools, seabios: Add "--firmware" option to "vm run"
This patch adds a "--firmware" command line option to "vm run". You can use this to try to boot with SeaBIOS, for example:
./vm run --firmware=/usr/share/seabios/bios.bin \ --disk $HOME/images/debian_lenny_amd64_standard.qcow2
This doesn't boot yet for obvious reasons but at least people can now start to play with external BIOS images easily.
Acked-by Cyrill Gorcunov <gorcunov@openvz.org> Cc: Yang Bai <hamo.by@gmail.com> Cc: Matt Evans <matt@ozlabs.org> Cc: Ron Minnich <rminnich@gmail.com> Cc: Anthony Liguori <aliguori@us.ibm.com> Cc: John Floren <john@jfloren.net> Cc: Sasha Levin <levinsasha928@gmail.com> Cc: Asias He <asias.hejun@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
d648dbf5 |
| 05-Feb-2012 |
Cyrill Gorcunov <gorcunov@openvz.org> |
kvm tool: Don't close not yet opened files and SIGSEV fix
In case if there error happened in kvm__init and we have no files opened -- we should not try to close them.
Also once kvm failed to init t
kvm tool: Don't close not yet opened files and SIGSEV fix
In case if there error happened in kvm__init and we have no files opened -- we should not try to close them.
Also once kvm failed to init the caller should not try to dereference a pointer obtained, otherwise we might get SIGSEV
| [cyrill@moon kvm]$ ./lkvm run ... | Error: '/dev/kvm' not found. Please make sure your kernel has CONFIG_KVM | enabled and that the KVM modules are loaded. | Segmentation fault (core dumped) | [cyrill@moon kvm]$
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
c4b716ec |
| 04-Feb-2012 |
Pekka Enberg <penberg@kernel.org> |
kvm tools: Use pr_debug() for symbol lookup init failure
There's absolutely no point in printing out an error message for symbol lookup init failure because we run just fine without them.
Suggested
kvm tools: Use pr_debug() for symbol lookup init failure
There's absolutely no point in printing out an error message for symbol lookup init failure because we run just fine without them.
Suggested-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
49777800 |
| 04-Feb-2012 |
Pekka Enberg <penberg@kernel.org> |
kvm tools: Fix another use-after-free in shutdown sequence
Valgrind spotted another issue:
==2343== Invalid read of size 8 ==2343== at 0x408EAD: kvm__pause (kvm.c:529) ==2343== by 0x407
kvm tools: Fix another use-after-free in shutdown sequence
Valgrind spotted another issue:
==2343== Invalid read of size 8 ==2343== at 0x408EAD: kvm__pause (kvm.c:529) ==2343== by 0x407E07: ioport__unregister (ioport.c:100) ==2343== by 0x409537: pci__exit (pci.c:210) ==2343== by 0x406303: kvm_cmd_run (builtin-run.c:1314) ==2343== by 0x410670: handle_command (kvm-cmd.c:84) ==2343== by 0x3DE682139C: (below main) (in /lib64/libc-2.14.so) ==2343== Address 0x4c30ca0 is 0 bytes inside a block of size 520 free'd ==2343== at 0x4A055FE: free (vg_replace_malloc.c:366) ==2343== by 0x406293: kvm_cmd_run (builtin-run.c:1292) ==2343== by 0x410670: handle_command (kvm-cmd.c:84) ==2343== by 0x3DE682139C: (below main) (in /lib64/libc-2.14.so)
Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
807b77b9 |
| 01-Feb-2012 |
Cyrill Gorcunov <gorcunov@openvz.org> |
kvm tools: Cleanup BDF searching code
- drop double underscopes in names - a variable which return integer error code should be either 'ret' either 'err'
Signed-off-by: Cyrill Gorcunov <gorcun
kvm tools: Cleanup BDF searching code
- drop double underscopes in names - a variable which return integer error code should be either 'ret' either 'err'
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|