#
ee8b1456 |
| 17-Dec-2011 |
Wanlong Gao <wanlong.gao@gmail.com> |
kvm tools: change the binary name from kvm to lkvm in print message
Introduce a new macro KVM_BINARY_NAME for the binary name of kvm tools, also for future using in printing command messages like th
kvm tools: change the binary name from kvm to lkvm in print message
Introduce a new macro KVM_BINARY_NAME for the binary name of kvm tools, also for future using in printing command messages like these.
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
8d2ff5da |
| 17-Dec-2011 |
Wanlong Gao <wanlong.gao@gmail.com> |
kvm tools: change the binary name from kvm to lkvm for commands' usage
Commands' usage : Change the binary name from *kvm* to *lkvm*, since commit ad3efb18 has done it.
Signed-off-by: Wanlong Gao <
kvm tools: change the binary name from kvm to lkvm for commands' usage
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>
show more ...
|
#
5173b4af |
| 16-Dec-2011 |
Lai Jiangshan <laijs@cn.fujitsu.com> |
kvm-tools: write the sandbox command exactly as expect
sandbox.sh is a shell script, it will translate its meta chars to anather things.
example(before this patch applied): ./lkvm sandbox -- echo '
kvm-tools: write the sandbox command exactly as expect
sandbox.sh is a shell script, it will translate its meta chars to anather things.
example(before this patch applied): ./lkvm sandbox -- echo 'success; please try again!' it fails with: /virt/sandbox.sh: line 3: please: command not found
Acked-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
2c908af9 |
| 16-Dec-2011 |
Lai Jiangshan <laijs@cn.fujitsu.com> |
kvm-tools: only one rootfs directory atmost
It makes no sense when we use several rootfs directories. Only the last one works.
Acked-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Lai Jia
kvm-tools: only one rootfs directory atmost
It makes no sense when we use several rootfs directories. Only the last one works.
Acked-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
cb540c93 |
| 15-Dec-2011 |
Sasha Levin <levinsasha928@gmail.com> |
kvm tools: Fix rootfs name resolving when specified with image
Fix the case when using a rootfs combined with a virtio-blk disk.
Also, simplify custon rootfs name lookup.
Signed-off-by: Sasha Levi
kvm tools: Fix rootfs name resolving when specified with image
Fix the case when using a rootfs combined with a virtio-blk disk.
Also, simplify custon rootfs name lookup.
Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
c5174622 |
| 15-Dec-2011 |
Matt Evans <matt@ozlabs.org> |
kvm tools: Fix running with --initrd and no real discs/rootfs
It's useful to boot with no -d and no implicit 9p root, with --initrd. Since commit eaf720b285947a6f4e29174d0eba1899de31d8ab, we die() f
kvm tools: Fix running with --initrd and no real discs/rootfs
It's useful to boot with no -d and no implicit 9p root, with --initrd. Since commit eaf720b285947a6f4e29174d0eba1899de31d8ab, we die() failing to create the 2nd stage custom rootfs. This patch doesn't try to set up a custom rootfs by default if user specifies an initrd on the commandline.
Signed-off-by: Matt Evans <matt@ozlabs.org> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
e2077857 |
| 15-Dec-2011 |
Matt Evans <matt@ozlabs.org> |
kvm tools: Remove KVM_NR_CPUS
The KVM_NR_CPUS define is only really used to statically size the global kvm_cpus array, which can just as easily be allocated on startup. There is some checking of th
kvm tools: Remove KVM_NR_CPUS
The KVM_NR_CPUS define is only really used to statically size the global kvm_cpus array, which can just as easily be allocated on startup. There is some checking of the -c <nr cpus> value given against NR_CPUs but this is later again checked against a dynamically-determined limit from KVM_CAP_MAX_VCPUS anyway. The hardwired limit is arbitrary and not strictly necessary.
This patch removes the #define, replacing the statically-sized array with a malloc; the array is kvm->nrcpus+1 in size so that any iterator can halt at the end (this is done in kvm_cpu__reboot, which doesn't have access to a struct kvm* and therefore kvm->nrcpus).
An unused #define in x86/mptable.c is also removed.
Signed-off-by: Matt Evans <matt@ozlabs.org> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
e1337781 |
| 14-Dec-2011 |
Sasha Levin <levinsasha928@gmail.com> |
kvm tools: Don't use ioeventfds if no KVM_CAP_IOEVENTFD
Check KVM_CAP_IOEVENTFD before using ioeventfds.
Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@ke
kvm tools: Don't use ioeventfds if no KVM_CAP_IOEVENTFD
Check KVM_CAP_IOEVENTFD before using ioeventfds.
Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
61061257 |
| 13-Dec-2011 |
Matt Evans <matt@ozlabs.org> |
kvm tools: Add ability to map guest RAM from hugetlbfs
Add a --hugetlbfs commandline option to give a path to hugetlbfs-map guest memory (down in kvm__arch_init()). For x86, guest memory is a norma
kvm tools: Add ability to map guest RAM from hugetlbfs
Add a --hugetlbfs commandline option to give a path to hugetlbfs-map guest memory (down in kvm__arch_init()). For x86, guest memory is a normal ANON mmap() if this option is not provided, otherwise a hugetlbfs mmap.
This maps directly from a hugetlbfs temp file rather than using something like MADV_HUGEPAGES so that, if the user asks for hugepages, we definitely are using hugepages. (This is particularly useful for architectures that don't yet support KVM without hugepages, so we definitely need to use them for the whole of guest RAM.)
Signed-off-by: Matt Evans <matt@ozlabs.org> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
ec52d504 |
| 12-Dec-2011 |
Lai Jiangshan <laijs@cn.fujitsu.com> |
kvm tools: move strlcat() to util/strbuf.c
strlcat() is a string related function.
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
|
#
7070414a |
| 12-Dec-2011 |
Sasha Levin <levinsasha928@gmail.com> |
kvm tools: Clean up 'kvm debug'
Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
|
#
4b1c6f6e |
| 11-Dec-2011 |
Sasha Levin <levinsasha928@gmail.com> |
kvm tools: Add NMI ability to 'kvm debug'
This allows triggering NMI on guests using 'kvm debug -m [cpu]'.
Please note that the default behaviour of 'kvm debug' dumping guest's cpu state has been m
kvm tools: Add NMI ability to 'kvm debug'
This allows triggering NMI on guests using 'kvm debug -m [cpu]'.
Please note that the default behaviour of 'kvm debug' dumping guest's cpu state has been modified to require a '-d'/--dump.
Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
3c29e2aa |
| 05-Dec-2011 |
Sasha Levin <levinsasha928@gmail.com> |
kvm tools: Add 'kvm sandbox'
This patch adds 'kvm sandbox' which is a wrapper on top of 'kvm run' which allows the user to easily specify sandboxed command to run in a custom rootfs guest.
Example
kvm tools: Add 'kvm sandbox'
This patch adds 'kvm sandbox' which is a wrapper on top of 'kvm run' which allows the user to easily specify sandboxed command to run in a custom rootfs guest.
Example usage:
kvm sandbox -d test_guest -k some_kernel -- do_something_in_guest
Suggested-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
1a007c82 |
| 05-Dec-2011 |
Sasha Levin <levinsasha928@gmail.com> |
kvm tools: Ignore parameters after dashdash in 'kvm run'
This allows other commands to wrap 'kvm run' and use the parameters user provides after a dash-dash for it's own use.
Signed-off-by: Sasha L
kvm tools: Ignore parameters after dashdash in 'kvm run'
This allows other commands to wrap 'kvm run' and use the parameters user provides after a dash-dash for it's own use.
Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
d50fe489 |
| 05-Dec-2011 |
Sasha Levin <levinsasha928@gmail.com> |
kvm tools: Allow easily sandboxing applications within a guest
This patch adds a '--sandbox' argument when used in conjuction with a custom rootfs, it allows running a script or an executable in the
kvm tools: Allow easily sandboxing applications within a guest
This patch adds a '--sandbox' argument when used in conjuction with a custom rootfs, it allows running a script or an executable in the guest environment by using executables and other files from the host.
This is useful when testing code that might cause problems on the host, or to automate kernel testing since it's now easy to link a kvm tools test script with 'git bisect run'.
Suggested-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
9cec19c8 |
| 05-Dec-2011 |
Sasha Levin <levinsasha928@gmail.com> |
kvm tools: Split custom rootfs init into two stages
Currently custom rootfs init is built along with the main KVM tools executable and is copied into custom rootfs directories when they are created
kvm tools: Split custom rootfs init into two stages
Currently custom rootfs init is built along with the main KVM tools executable and is copied into custom rootfs directories when they are created with 'kvm setup'. The problem there is that if the init code changes, they have to be manually copied to custom rootfs directories.
Instead, this patch splits init process into two parts. One part that simply handles mounts, and passes it to stage 2 of the init.
Stage 2 really sits along in the code tree, and does all the heavy lifting.
This allows us to make init changes in the code tree and have it automatically be updated in custom rootfs guests without having to copy files over manua
Signed-off-by: Sasha Levin <levinsasha928@gmail.com> [ penberg@kernel.org: fix 'make check' breakage in Makefile ] Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
19e6c8b8 |
| 09-Dec-2011 |
Matt Evans <matt@ozlabs.org> |
kvm tools: Init IRQs after determining nrcpus
IRQ init may involve per-CPU setup/allocation of resources, so make sure kvm->nrcpus is initialised before calling irq__init().
Signed-off-by: Matt Eva
kvm tools: Init IRQs after determining nrcpus
IRQ init may involve per-CPU setup/allocation of resources, so make sure kvm->nrcpus is initialised before calling irq__init().
Signed-off-by: Matt Evans <matt@ozlabs.org> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
25af47ee |
| 09-Dec-2011 |
Matt Evans <matt@ozlabs.org> |
kvm tools: Perform CPU and firmware setup after devices are added
Currently some devices (in this case kbd, fb, vesa) are initialised after CPU/firmware setup. On some platforms (e.g. PPC) kvm__arc
kvm tools: Perform CPU and firmware setup after devices are added
Currently some devices (in this case kbd, fb, vesa) are initialised after CPU/firmware setup. On some platforms (e.g. PPC) kvm__arch_setup_firmware() may be making a device tree. Any devices added after this point will be missed!
Tiny refactor of builtin-run.c, moving timer start, firmware setup, cpu init to occur last.
Signed-off-by: Matt Evans <matt@ozlabs.org> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
b91be965 |
| 09-Dec-2011 |
Matt Evans <matt@ozlabs.org> |
kvm tools: Initialise PCI before devices start getting registered with PCI
Re-arrange pci__init() in builtin-run such that it comes before devices are initialised.
Signed-off-by: Matt Evans <matt@o
kvm tools: Initialise PCI before devices start getting registered with PCI
Re-arrange pci__init() in builtin-run such that it comes before devices are initialised.
Signed-off-by: Matt Evans <matt@ozlabs.org> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
3bbc49b6 |
| 09-Dec-2011 |
Matt Evans <matt@ozlabs.org> |
kvm tools: Add CONSOLE_HV term type and allow it to be selected
This patch paves the way for adding a hypervisor console, useful on systems that support one out of the box yet don't have either seri
kvm tools: Add CONSOLE_HV term type and allow it to be selected
This patch paves the way for adding a hypervisor console, useful on systems that support one out of the box yet don't have either serial port or virtio console support (e.g. kernels expecting POWER SPAPR).
Signed-off-by: Matt Evans <matt@ozlabs.org> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
8e704a7a |
| 09-Dec-2011 |
Matt Evans <matt@ozlabs.org> |
kvm tools: Move arch-specific cmdline init into kvm__arch_set_cmdline()
Different systems will want different base kernel commandlines, e.g. non-x86 systems probably don't need noapic, i8042.* etc.,
kvm tools: Move arch-specific cmdline init into kvm__arch_set_cmdline()
Different systems will want different base kernel commandlines, e.g. non-x86 systems probably don't need noapic, i8042.* etc., so set the commandline up in arch-specific code. Then, if the resulting commandline is empty, don't strcat a space onto the front.
Signed-off-by: Matt Evans <matt@ozlabs.org> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
0b69bdef |
| 09-Dec-2011 |
Matt Evans <matt@ozlabs.org> |
kvm tools: Add kvm__arch_periodic_poll()
Currently, the SIGALRM handler calls device poll functions (for serial, virtio console) directly. Which devices are present and which require polling is a s
kvm tools: Add kvm__arch_periodic_poll()
Currently, the SIGALRM handler calls device poll functions (for serial, virtio console) directly. Which devices are present and which require polling is a system-specific decision, so create a new function called from common code & move the x86-specific poll calls into it.
Signed-off-by: Matt Evans <matt@ozlabs.org> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
57d7832b |
| 09-Dec-2011 |
Matt Evans <matt@ozlabs.org> |
kvm tools: Only build/init i8042 on x86
Not every architecture has an i8042 kbd controller, so only use this when building for x86.
Signed-off-by: Matt Evans <matt@ozlabs.org> Signed-off-by: Pekka
kvm tools: Only build/init i8042 on x86
Not every architecture has an i8042 kbd controller, so only use this when building for x86.
Signed-off-by: Matt Evans <matt@ozlabs.org> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
90c05188 |
| 08-Dec-2011 |
Matt Evans <matt@ozlabs.org> |
kvm tools: Correctly limit nrcpus to max_cpus
Fix a typo where kvm->nrcpus was set, then immediately overwritten with older value.
Signed-off-by: Matt Evans <matt@ozlabs.org> Signed-off-by: Pekka E
kvm tools: Correctly limit nrcpus to max_cpus
Fix a typo where kvm->nrcpus was set, then immediately overwritten with older value.
Signed-off-by: Matt Evans <matt@ozlabs.org> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|
#
f19edd1e |
| 07-Dec-2011 |
Sasha Levin <levinsasha928@gmail.com> |
kvm tools: Allow the user to pass a FD to use as a TAP device
This allows users to pass a pre-configured fd to use for the network interface.
For example: kvm run -n mode=tap,fd=3 3<>/dev/n
kvm tools: Allow the user to pass a FD to use as a TAP device
This allows users to pass a pre-configured fd to use for the network interface.
For example: kvm run -n mode=tap,fd=3 3<>/dev/net/tap3
Acked-by: Daniel P. Berrange <berrange@redhat.com> Cc: Osier Yang <jyang@redhat.com> Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
show more ...
|