- Jun 01, 2015
-
-
Asias He authored
CONFIG_FB_VESA is needed for --sdl or --vnc. Update README for it. Signed-off-by:
Asias He <asias.hejun@gmail.com> Signed-off-by:
Pekka Enberg <penberg@kernel.org>
-
Asias He authored
Commit b4a932d175c6aa975c456e9b05339aa069c961cb sets sdl's .start ops to sdl__stop which makes the sdl never start. Fix it up. Signed-off-by:
Asias He <asias.hejun@gmail.com> Signed-off-by:
Pekka Enberg <penberg@kernel.org>
-
Asias He authored
Previously, we use mmaped host root partition as guest's root filesystem. As virtio-9p based root filesystem is supported, mmaped host root partition approach is not used anymore. It is useful to use raw block device as guest's disk backend for some user. e.g. bypass host's fs layer. This patch makes raw block device work as disk image, user can do read/write on raw block device, by using DISK_IMAGE_REGULAR instead of DISK_IMAGE_MMAP for block device Signed-off-by:
Asias He <asias.hejun@gmail.com> Signed-off-by:
Pekka Enberg <penberg@kernel.org>
-
Asias He authored
Signed-off-by:
Asias He <asias.hejun@gmail.com> Signed-off-by:
Pekka Enberg <penberg@kernel.org>
-
Asias He authored
Signed-off-by:
Asias He <asias.hejun@gmail.com> Signed-off-by:
Pekka Enberg <penberg@kernel.org>
-
Asias He authored
Signed-off-by:
Asias He <asias.hejun@gmail.com> Signed-off-by:
Pekka Enberg <penberg@kernel.org>
-
Asias He authored
This makes the naming more consistent. Signed-off-by:
Asias He <asias.hejun@gmail.com> Signed-off-by:
Pekka Enberg <penberg@kernel.org>
-
Asias He authored
set_size_vq does not do the actual work, we can implement this later. Signed-off-by:
Asias He <asias.hejun@gmail.com> Signed-off-by:
Pekka Enberg <penberg@kernel.org>
-
Asias He authored
set_size_vq does not do the actual work, we can implement this later. Signed-off-by:
Asias He <asias.hejun@gmail.com> Signed-off-by:
Pekka Enberg <penberg@kernel.org>
-
Asias He authored
Increase virtio-blk and virtio-net queue size to 256. This makes virtio-mmio work. Signed-off-by:
Asias He <asias.hejun@gmail.com> Signed-off-by:
Pekka Enberg <penberg@kernel.org>
-
Asias He authored
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>
-
Asias He authored
This patch adds virtio-mmio support in virtio_init. Signed-off-by:
Asias He <asias.hejun@gmail.com> Signed-off-by:
Pekka Enberg <penberg@kernel.org>
-
Asias He authored
This patch is based on Sasha's 'kvm tools: Add support for virtio-mmio' patch. ioeventfds support is added which was missing in the previous one. VQ size/align is still not supported. It adds support for the new virtio-mmio transport layer added in 3.2-rc1. The purpose of this new layer is to allow virtio to work on systems which don't necessarily support PCI, such as embedded systems. To apply the patch on top of the KVM tools tree, you must first pull Linus' tree on top. Also, CONFIG_VIRTIO_MMIO=y should be set in the guest kernel. To easily test it it's recommended to apply Pawel Moll's patch named 'virtio-mmio: Devices parameter parsing' on top, and define the virtio-mmio device using kernel command line. LKVM will print a message to help user to figure out how to add kernel command line to support virtio-mmio. To instantiate guest virtio-mmio devices using kernel command line (or module) parameter, e.g. virtio_mmio.devices=0x200@0xd2000000:5,0x200@0xd2000200:6 Cc: Pawel Moll <pawel.moll@arm.com> Cc: Peter Maydell <peter.maydell@linaro.org> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: virtualization@lists.linux-foundation.org Signed-off-by:
Sasha Levin <levinsasha928@gmail.com> Signed-off-by:
Asias He <asias.hejun@gmail.com> Signed-off-by:
Pekka Enberg <penberg@kernel.org>
-
Asias He authored
This area is used for virtio-mmio. Signed-off-by:
Asias He <asias.hejun@gmail.com> Signed-off-by:
Pekka Enberg <penberg@kernel.org>
-
Asias He authored
Reanme callback_mmio_table to virtio_pci__mmio_callback Signed-off-by:
Asias He <asias.hejun@gmail.com> Signed-off-by:
Pekka Enberg <penberg@kernel.org>
-
Asias He authored
This patch reworks on virtio transport abstraction. * Move virtio transport operations to virtio operations and drop virtio/trans.c This makes the abstraction much cleaner. * Rename struct virtio_trans to struct virtio_device struct virtio_trans { void *virtio; enum virtio_trans_type type; struct virtio_trans_ops *trans_ops; struct virtio_ops *virtio_ops; }; struct virtio_device { void *virtio; struct virtio_ops *ops; }; The virtio_trans struct is bit confusing since it also includes virtio operations. * Introduce virtio_init() To init device, e.g. Before: virtio_trans_init() ndev->vtrans.trans_ops->init() ndev->vtrans.virtio_ops = &net_dev_virtio_ops After: virtio_init() Signed-off-by:
Asias He <asias.hejun@gmail.com> Signed-off-by:
Pekka Enberg <penberg@kernel.org>
-
Asias He authored
Add is_pio flag to set KVM_IOEVENTFD_FLAG_PIO. This is useful for attaching an ioeventfd to MMIO address as well as PIO address. virtio-mmio needs an ioeventfd to MMIO address. Signed-off-by:
Asias He <asias.hejun@gmail.com> Signed-off-by:
Pekka Enberg <penberg@kernel.org>
-
Ingo Molnar authored
Signed-off-by:
Ingo Molnar <mingo@kernel.org> Signed-off-by:
Pekka Enberg <penberg@kernel.org>
-
Pekka Enberg authored
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>
-
Cyrill Gorcunov authored
Otherwise overlaps might happen (and actually having anything but .text here at moment make no sense) and it triggers the following error on Golden ld # ld: error: load segment overlap [0x0 -> 0x38c] and [0x0 -> 0x0] Reported-and-tested-by:
Ingo Molnar <mingo@elte.hu> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pekka Enberg <penberg@kernel.org>
-
Pekka Enberg authored
This patch fixes "vm sandbox" for guest commands that are not on host filesytem. Signed-off-by:
Pekka Enberg <penberg@kernel.org>
-
Pekka Enberg authored
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>
-
Cyrill Gorcunov authored
In case if no firmware used we should put mptables at repdefined address thus kernel scanner will recognized it. For this make a distinction between firmware address and own bios address. Reported-by:
Sasha Levin <levinsasha928@gmail.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by:
Pekka Enberg <penberg@kernel.org>
-
Pekka Enberg authored
SeaBIOS outputs debugging messages to special debug port ("0x0402"). This patch unconditionally hooks the PIO port to LKVM so that when user specifies a SeaBIOS image, you'll see this for "vm run": [penberg@tux kvm]$ ./vm run --firmware /usr/share/seabios/bios.bin # lkvm run -k ../../arch/x86/boot/bzImage -m 448 -c 4 --name guest-25983 Start bios (version 0.6.0) Unable to unlock ram - bridge not found Ram Size=0x00100000 (0x0000000000000000 high) <hangs here> Once we have SeaBIOS fully operational, we probably should hide the feature under "--debug-seabios" command line option. 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>
-
Pekka Enberg authored
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>
-
Pekka Enberg authored
Program name and directory name were swapped in the help text. Signed-off-by:
Pekka Enberg <penberg@kernel.org>
-
Yang Bai authored
Signed-off-by:
Yang Bai <hamo.by@gmail.com> Signed-off-by:
Pekka Enberg <penberg@kernel.org>
-
Yang Bai authored
By checking the return value from kvm_ipc__register_handler, we can ensure that it succeeds. Signed-off-by:
Yang Bai <hamo.by@gmail.com> Signed-off-by:
Pekka Enberg <penberg@kernel.org>
-
Yang Bai authored
If kvm_ipc__start failed, it returns a negative and by checking this return value, we can ensure that it succeeds. Signed-off-by:
Yang Bai <hamo.by@gmail.com> Signed-off-by:
Pekka Enberg <penberg@kernel.org>
-
Yang Bai authored
When error occurs, just set the ret to the reason, then jump to the error handle labels. This makes the code more readable. Signed-off-by:
Yang Bai <hamo.by@gmail.com> Signed-off-by:
Pekka Enberg <penberg@kernel.org>
-
Yang Bai authored
If kvm__check_extensions found that some of the required KVM extention is not supported by OS, we should stop the init and free all allocated resources. Signed-off-by:
Yang Bai <hamo.by@gmail.com> Signed-off-by:
Pekka Enberg <penberg@kernel.org>
-
Michael Ellerman authored
Since 44287dd (Repair running on non ioeventfd-capable platforms) it's possible that ioeventfd__init() fails, but the VM still runs. This means we end up calling ioeventfd__exit(), which writes() and then reads() epoll_stop_fd. Because we failed the init, epoll_stop_fd is 0, so we end up writing/reading stdin, which exhibits as kvm-tool blocking until something is entered on the console. Once we break out of the read we close epoll_fd and epoll_stop_fd, both 0, and so term_exit() fails to cleanup the terminal properly. The fix is simply to check ioeventfd_avail in ioevetfd__exit() and do nothing if it is false. Signed-off-by:
Michael Ellerman <michael@ellerman.id.au> Signed-off-by:
Pekka Enberg <penberg@kernel.org>
-
Matt Evans authored
By "enable", I mean "fix"; the re-jigged commit 7ef85e8b builds libfdt using OBJS rather than OTHEROBJS hence ignores the relaxed CFLAGS. This commit builds it via OTHEROBJS. Signed-off-by:
Matt Evans <matt@ozlabs.org> Signed-off-by:
Pekka Enberg <penberg@kernel.org>
-
Cyrill Gorcunov authored
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>
-
Cyrill Gorcunov authored
If default guest name is used (which is the default case) the kvm might end up carrying the pointer to a name which is allocated on stack. kvm_cmd_run_init (on stack) default_name kvm__init(..., default_name) kvm->name = default_name So make it to carry a copy of name. Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by:
Pekka Enberg <penberg@kernel.org>
-
Matt Evans authored
This is the final piece of the puzzle for PPC SPAPR PCI; this function splits MMIO accesses into the two PHB windows & directs things to MMIO/IO emulation as appropriate. Signed-off-by:
Matt Evans <matt@ozlabs.org> Signed-off-by:
Pekka Enberg <penberg@kernel.org>
-
Matt Evans authored
This provides the PCI bridge, definitions for the address layout of the windows and wires in IRQs. Once PCI devices are all registered, they are enumerated and DT nodes generated for each. Signed-off-by:
Matt Evans <matt@ozlabs.org> Signed-off-by:
Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au> Signed-off-by:
Pekka Enberg <penberg@kernel.org>
-
Matt Evans authored
This patch adds XICS emulation code (heavily borrowed from QEMU), and wires this into kvm_cpu__irq() to fire a CPU IRQ via KVM. A device tree entry is also added. IPIs work, xics_alloc_irqnum() is added to allocate an external IRQ (which will later be used by the PHB PCI code) and finally, kvm__irq_line() can be called to raise an IRQ on XICS. Signed-off-by:
Matt Evans <matt@ozlabs.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au> Signed-off-by:
Pekka Enberg <penberg@kernel.org>
-
Matt Evans authored
This adds the console code, plus VIO HV terminal nodes are added to the device tree so the guest kernel will pick it up. Signed-off-by:
Matt Evans <matt@ozlabs.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au> Signed-off-by:
Pekka Enberg <penberg@kernel.org>
-
Matt Evans authored
This patch adds the basic structure for HV calls, their registration and some of the simpler calls. A similar layout for RTAS calls is also added, again with some of the simpler RTAS calls used by the guest. The SPAPR RTAS stub is generated inline. Also, nodes for RTAS are added to the device tree. Signed-off-by:
Matt Evans <matt@ozlabs.org> Signed-off-by:
David Gibson <david@gibson.dropbear.id.au> Signed-off-by:
Pekka Enberg <penberg@kernel.org>
-