qemu-kvm-0.12.4 with bochs bios

2010-05-10 Thread Sasha Levin
Hi, I've tried running an image using the new qemu-kvm-0.12.4 using a BOCHS BIOS (using the -bios parameter). When the machine starts the QEMU window gets minimized into a 1x1 pixel box and just stops. Starting the same machine with the same BIOS on 0.12.3 is working great. Is starting qemu

Re: qemu-kvm-0.12.4 with bochs bios

2010-05-10 Thread Sasha Levin
On Mon, May 10, 2010 at 11:35 AM, Avi Kivity a...@redhat.com wrote: On 05/10/2010 11:16 AM, Sasha Levin wrote: Hi, I've tried running an image using the new qemu-kvm-0.12.4 using a BOCHS BIOS (using the -bios parameter). When the machine starts the QEMU window gets minimized into a 1x1

[PATCH] numa: Don't limit node count by smp count

2011-03-28 Thread Sasha Levin
It is possible to create CPU-less NUMA nodes, node amount shouldn't be limited by amount of CPUs. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- vl.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vl.c b/vl.c index 8bcf2ae..8cc1aa8 100644 --- a/vl.c +++ b

[PATCH] kvm tools: Free memory and FDs on exit

2011-04-06 Thread Sasha Levin
Following patch adds more cleanup code when exiting. Close disk image, free msrs array and destroy the timer fd. Signed-off-by: Justin P. Mattock justinmatt...@gmail.com --- tools/kvm/include/kvm/kvm.h |1 + tools/kvm/kvm.c | 14 ++ tools/kvm/main.c|

[PATCH] kvm tools: Free memory and FDs on exit

2011-04-06 Thread Sasha Levin
Please ignore previous mail, Silly copypaste mistake on the signed-off :) Following patch adds more cleanup code when exiting. Close disk image, free msrs array and destroy the timer fd. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/include/kvm/kvm.h |1 + tools/kvm

[PATCH 1/2] kvm tool: Use mmap for working with disk image

2011-04-09 Thread Sasha Levin
% Random seek latency: 82% Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/disk-image.c | 54 +-- tools/kvm/include/kvm/disk-image.h |3 +- 2 files changed, 46 insertions(+), 11 deletions(-) diff --git a/tools/kvm/disk-image.c b

[PATCH 2/2] kvm tool: Close kernel FD after loading it into memory

2011-04-09 Thread Sasha Levin
Once the kernel has been loaded into the guest memory, close the FD of the file. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/kvm.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/tools/kvm/kvm.c b/tools/kvm/kvm.c index af1f65f..5027a0d 100644

[PATCH] kvm tools: Use mmap for working with disk image V2

2011-04-09 Thread Sasha Levin
/sec %CP /sec %CP 16 + +++ + +++ + +++ + +++ + +++ + +++ Latency 1000us1000us1000us2000us1000us1999us Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/disk-image.c | 55

[PATCH] kvm tools: Use mmap for working with disk image V3

2011-04-09 Thread Sasha Levin
/sec %CP /sec %CP 16 + +++ + +++ + +++ + +++ + +++ + +++ Latency 1000us1000us1000us2000us1000us1999us Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/disk-image.c | 54

[PATCH] kvm tools: Use mmap for working with disk image V4

2011-04-09 Thread Sasha Levin
%CP /sec %CP /sec %CP /sec %CP /sec %CP 16 + +++ + +++ + +++ + +++ + +++ + +++ Latency 1000us1000us2000us1999us1000us1000us Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/disk-image.c | 54

[PATCH] kvm tools: Add option to load disk image read only

2011-04-12 Thread Sasha Levin
-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/disk-image.c | 52 +++ tools/kvm/include/kvm/disk-image.h |5 ++- tools/kvm/kvm-run.c|5 +++- 3 files changed, 53 insertions(+), 9 deletions(-) diff --git a/tools/kvm/disk

[PATCH 1/2] kvm tools: Add OPT_GROUP to cmdline parser

2011-04-12 Thread Sasha Levin
Add the OPT_GROUP parser option to allow the creation of an organized help menu. Used code taken from the git project. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/include/kvm/parse-options.h |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/tools

[PATCH 2/2] kvm tools: Arrange cmdline help menu

2011-04-12 Thread Sasha Levin
Group the cmdline menu into simple groups instead of one messy list. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/kvm-run.c | 23 ++- 1 files changed, 14 insertions(+), 9 deletions(-) diff --git a/tools/kvm/kvm-run.c b/tools/kvm/kvm-run.c index ba02172

Kernel oops in host caused by mmaping RAM

2011-04-12 Thread Sasha Levin
Hello, I've tried using mmap to map the RAM of a guest instead of posix_memalign which is used both in the kvm tool and qemu. Doing so caused a kernel Oops, which happens every time I run the code and was confirmed both on 2.6.38 and the latest git build of 2.6.39. [32109.368018] BUG: unable to

[PATCH 2/2] kvm tools: Make host side IP configurable

2011-04-13 Thread Sasha Levin
Add --host-ip-addr parameter to allow changing the host-side IP address. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/include/kvm/virtio-net.h |2 +- tools/kvm/kvm-run.c|9 - tools/kvm/virtio-net.c |9 - 3 files changed

[PATCH 1/2] kvm tools: Set up tun interface using ioctls

2011-04-13 Thread Sasha Levin
Use ioctls to assign IP address and bring interface up instead of using ifconfig. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/virtio-net.c | 25 ++--- 1 files changed, 22 insertions(+), 3 deletions(-) diff --git a/tools/kvm/virtio-net.c b/tools/kvm

Re: Kernel oops in host caused by mmaping RAM

2011-04-13 Thread Sasha Levin
On Wed, Apr 13, 2011 at 3:50 PM, Pekka Enberg penb...@kernel.org wrote: On Wed, Apr 13, 2011 at 12:09 AM, Jan Kiszka jan.kis...@web.de wrote: On 2011-04-12 21:41, Sasha Levin wrote: Hello, I've tried using mmap to map the RAM of a guest instead of posix_memalign which is used both in the kvm

Re: [PATCH 2/2] kvm tools: Make host side IP configurable

2011-04-13 Thread Sasha Levin
On Wed, Apr 13, 2011 at 4:28 PM, Asias He asias.he...@gmail.com wrote: On 04/13/2011 08:28 PM, Asias He wrote: On 04/13/2011 08:13 PM, Sasha Levin wrote: Add --host-ip-addr parameter to allow changing the host-side IP address. I'd personally prefer something like this: --network=model

[PATCH 1/2 V2] kvm tools: Set up tun interface using ioctls

2011-04-13 Thread Sasha Levin
Use ioctls to assign IP address and bring interface up instead of using ifconfig. Not breaking aliasing rules this time. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/virtio-net.c | 29 ++--- 1 files changed, 26 insertions(+), 3 deletions(-) diff

[PATCH 2/2 V2] kvm tools: Make host side IP configurable

2011-04-13 Thread Sasha Levin
Add --host-ip-addr parameter to allow changing the host-side IP address. Add a networking group to the cmdline menu. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/include/kvm/virtio-net.h |2 +- tools/kvm/kvm-run.c| 15 --- tools/kvm/virtio

[PATCH 1/2 V2] kvm tools: Fix leak in QCOW

2011-04-16 Thread Sasha Levin
Fixed leak when reading a zero sector, also simplified flow a bit. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/qcow.c | 16 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/kvm/qcow.c b/tools/kvm/qcow.c index 9b9af86..ceac721 100644

[PATCH 2/2] kvm tools: Add scatter-gather support for disk images

2011-04-16 Thread Sasha Levin
Add optional support for scatter-gather to disk_image. Formats that can't take advantage of scatter-gather fallback to simple IO. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/disk-image.c | 22 tools/kvm/include/kvm/disk-image.h | 31

[PATCH 1/2 V2] kvm tools: Add scatter-gather variants of IO functions

2011-04-16 Thread Sasha Levin
Added scatter-gather variants of [x,xp][read,write]() and [p]read_in_full(). Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/include/kvm/read-write.h | 13 +++ tools/kvm/read-write.c | 172 2 files changed, 185 insertions(+), 0

[PATCH 2/2 V2] kvm tools: Add scatter-gather support for disk images

2011-04-16 Thread Sasha Levin
Add optional support for scatter-gather to disk_image. Formats that can't take advantage of scatter-gather fallback to simple IO. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/disk-image.c | 16 tools/kvm/include/kvm/disk-image.h | 31

Re: [PATCH 1/2 V2] kvm tools: Add scatter-gather variants of IO functions

2011-04-16 Thread Sasha Levin
On Sat, 2011-04-16 at 22:40 +0400, Konstantin Khlebnikov wrote: It might be better to add an helper function, something like this: static inline void shift_iovec(const struct iovec **iov, int *iovcnt, size_t nr, ssize_t *total, off_t *offset) { while (nr =

Re: [PATCH 1/2 V2] kvm tools: Add scatter-gather variants of IO functions

2011-04-17 Thread Sasha Levin
On Sun, 2011-04-17 at 14:03 +0400, Konstantin Khlebnikov wrote: Avi Kivity wrote: What if nr is nonzero when the loop terminates? You need to update the first iovec entry so you don't redo that segment. Oh yes, it is simple (hunk above), so const from prototype must be removed, while

Re: [PATCH 1/2 V2] kvm tools: Add scatter-gather variants of IO functions

2011-04-17 Thread Sasha Levin
On Sun, 2011-04-17 at 14:34 +0400, Konstantin Khlebnikov wrote: Sasha Levin wrote: On Sun, 2011-04-17 at 14:03 +0400, Konstantin Khlebnikov wrote: Avi Kivity wrote: What if nr is nonzero when the loop terminates? You need to update the first iovec entry so you don't redo that segment

[PATCH 1/4] kvm tools: Thread virtio-blk

2011-04-18 Thread Sasha Levin
or queue more I/O while waiting for the original I/O request to complete. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/virtio-blk.c | 61 1 files changed, 56 insertions(+), 5 deletions(-) diff --git a/tools/kvm/virtio-blk.c b

[PATCH 2/4] kvm tools: Use virtio_blk_parameters to configure virtio-blk

2011-04-18 Thread Sasha Levin
Like in virtio-net, use virtio_blk_parameters to pass configuration parameters Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/include/kvm/virtio-blk.h |6 +- tools/kvm/kvm-run.c|7 ++- tools/kvm/virtio-blk.c |4 +++- 3 files

[PATCH 3/4] kvm tools: Add debug feature to test the IO thread

2011-04-18 Thread Sasha Levin
Add --debug-io-delay-cycles and --debug-io-delay-amount to delay the completion of IO requests within virtio-blk. This feature allows to verify and debug the threading within virtio-blk. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/include/kvm/virtio-blk.h |6

[PATCH 4/4] kvm tools: Complete missing segments in a iov op using regular op

2011-04-18 Thread Sasha Levin
If any of the iov operations return mid-block, use regular ops to complete the current block and continue using iov ops. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/read-write.c | 58 ++- 1 files changed, 51 insertions(+), 7

[PATCH 4/4 V2] kvm tools: Complete missing segments in a iov op using regular op

2011-04-18 Thread Sasha Levin
If any of the iov operations return mid-block, use regular ops to complete the current block and continue using iov ops. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/read-write.c | 58 ++- 1 files changed, 51 insertions(+), 7

[PATCH] kvm tools: Fix possible leak in disk_image

2011-04-19 Thread Sasha Levin
Close leaking fd if ioctl fails. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/disk-image.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/tools/kvm/disk-image.c b/tools/kvm/disk-image.c index 252ff1c..0fb2083 100644 --- a/tools/kvm/disk-image.c

Re: [PATCH 3/4] kvm tools: Add debug feature to test the IO thread

2011-04-19 Thread Sasha Levin
On Tue, 2011-04-19 at 19:52 +0300, Pekka Enberg wrote: On Mon, Apr 18, 2011 at 4:02 PM, Sasha Levin levinsasha...@gmail.com wrote: Add --debug-io-delay-cycles and --debug-io-delay-amount to delay the completion of IO requests within virtio-blk. This feature allows to verify and debug

Re: KVM_MAX_VCPUS

2012-10-13 Thread Sasha Levin
On 10/13/2012 06:29 PM, Chegu Vinod wrote: Hello, Wanted to get a clarification about KVM_MAX_VCPUS(currently set to 254) in kvm_host.h file. The kvm_vcpu *vcpus array is sized based on KVM_MAX_VCPUS. (i.e. a max of 254 elements in the array). An 8bit APIC id should allow for 256

[PATCH] kvm, async_pf: exit idleness when handling KVM_PV_REASON_PAGE_NOT_PRESENT

2012-10-19 Thread Sasha Levin
] [81139c25] ? prepare_to_wait+0x25/0x90 [ 732.790032] [810a3a66] do_async_page_fault+0x56/0xa0 [ 732.790032] [83a6a6e8] async_page_fault+0x28/0x30 Signed-off-by: Sasha Levin sasha.le...@oracle.com --- arch/x86/kernel/kvm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH 2/2] kvm tools: name threads

2012-10-24 Thread Sasha Levin
Give threads a meaningful name. This makes debugging much easier, and everything else much prettier. Suggested-by: Ingo Molnar mi...@kernel.org Signed-off-by: Sasha Levin sasha.le...@oracle.com --- tools/kvm/disk/core.c | 2 ++ tools/kvm/include/kvm/kvm.h | 7 +++ tools/kvm/ioeventfd.c

[PATCH 1/2] kvm tools: use correct init group for the PCI controller

2012-10-24 Thread Sasha Levin
PCI controller is what deals with PCI devices, and it depends on vcpus being there, so it should be in the dev_base group. Signed-off-by: Sasha Levin sasha.le...@oracle.com --- tools/kvm/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/kvm/pci.c b/tools/kvm

[RFC 1/3] kvm tools: use mutex abstraction instead of pthread mutex

2012-10-24 Thread Sasha Levin
We already have something to wrap pthread with mutex_[init,lock,unlock] calls. This patch creates a new struct mutex abstraction and moves everything to work with it. Signed-off-by: Sasha Levin sasha.le...@oracle.com --- tools/kvm/hw/serial.c | 10 +- tools/kvm/include/kvm

[RFC 2/3] lockdep: be nice about compiling from userspace

2012-10-24 Thread Sasha Levin
sounds wrong as well. - debug_show_all_locks() - we don't actually call it from userspace yet, but I think we might want to, so I'm not sure how to make it pretty using existing kernel code. Signed-off-by: Sasha Levin sasha.le...@oracle.com --- kernel/lockdep.c | 9 +++-- 1 file changed, 7

[RFC 3/3] kvm tools: use lockdep to detect locking issues

2012-10-24 Thread Sasha Levin
[0x40c411] ./vm(lock_acquire+0x3e)[0x426eee] ./vm[0x41219e] ./vm(kvm_cmd_run+0x5a)[0x426dda] ./vm(handle_command+0x41)[0x420611] /lib64/libc.so.6(__libc_start_main+0xf5)[0x7fd640ab76c5] ./vm[0x40985d] Signed-off-by: Sasha Levin sasha.le...@oracle.com --- tools/kvm/Makefile| 14

Re: [PATCH 3/5] kvm tools: correctly handle mem ballooning

2012-10-24 Thread Sasha Levin
This one was actually correct originally. When we inflate (-i) the balloon we increase num_pages, which is a counter of how many pages the balloon has. Thanks, Sasha On Wed, Oct 24, 2012 at 8:51 AM, William Dauchy will...@gandi.net wrote: from the virtio_balloon.h: num_pages is the number of

Re: [RFC 2/3] lockdep: be nice about compiling from userspace

2012-10-25 Thread Sasha Levin
On 10/25/2012 04:05 AM, Ingo Molnar wrote: * Sasha Levin sasha.le...@oracle.com wrote: We can rather easily make lockdep work from userspace, although 3 issues remain which I'm not sure about: - Kernel naming - we can just wrap init_utsname() to return kvmtool related utsname

Re: [PATCH 1/5] kvm tools: check ioctl return value for msi signal

2012-10-25 Thread Sasha Levin
On Thu, Oct 25, 2012 at 5:15 AM, William Dauchy will...@gandi.net wrote: On Oct25 10:01, Pekka Enberg wrote: Is this something that happens on your machine? I wonder if it makes more sense to return the error from virtio_pci__signal_vq() and virtio_pci__signal_config() and make the callers

Re: [RFC 2/3] lockdep: be nice about compiling from userspace

2012-10-25 Thread Sasha Levin
On 10/25/2012 01:06 PM, Ingo Molnar wrote: * Sasha Levin sasha.le...@oracle.com wrote: Yes, we can wrap both static_obj() and debug_show_all_locks() with #ifndefs and let kvmtool provide it's own version of those two. Only static_obj() - I see no immediate reason why you shouldn't

Re: [PATCH 2/5] kvm tools: use the correct config vector interrupt

2012-10-25 Thread Sasha Levin
]); + virtio_pci__signal_msi(kvm, vpci, vpci-config_vector); else kvm__irq_trigger(kvm, vpci-config_gsi); } else { Sasha? Indeed, we tried signaling the config vector by signaling vq0, woops. Acked-by: Sasha Levin levinsasha...@gmail.com

Re: [BUG] lkvm crash on crashkernel boot

2012-10-25 Thread Sasha Levin
On Thu, Oct 25, 2012 at 8:16 AM, Kirill A. Shutemov kirill.shute...@linux.intel.com wrote: On Thu, Oct 25, 2012 at 10:17:27AM +0300, Pekka Enberg wrote: On Wed, Oct 24, 2012 at 6:27 PM, Kirill A. Shutemov kirill.shute...@linux.intel.com wrote: Hi, I've tried to play with kexec using lkvm.

[PATCH] kvm tools: don't crash on virtio MSI-X reset

2012-10-29 Thread Sasha Levin
Handle VIRTIO_MSI_NO_VECTOR by not trying to use it as a valid vector. We still need to remove the GSI and everything, but this is enough to prevent crashes and keep everything working properly for now. Reported-by: Kirill A. Shutemov kirill.shute...@linux.intel.com Signed-off-by: Sasha Levin

Re: [PATCH v11] kvm: notify host when the guest is panicked

2012-10-30 Thread Sasha Levin
On Tue, Oct 30, 2012 at 9:48 PM, Wen Congyang we...@cn.fujitsu.com wrote: At 10/31/2012 09:12 AM, Marcelo Tosatti Wrote: It has been asked earlier why a simple virtio device is not usable for this (with no response IIRC). 1. We can't use virtio device when the kernel is booting. So the issue

Re: [PATCH v11] kvm: notify host when the guest is panicked

2012-11-09 Thread Sasha Levin
On Mon, Nov 5, 2012 at 8:58 PM, Hu Tao hu...@cn.fujitsu.com wrote: But in the case of panic notification, more dependency means more chances of failure of panic notification. Say, if we use a virtio device to do panic notification, then we will fail if: virtio itself has problems, virtio for

Re: [RFC PATCH 08/16] kvm tools: add generic device registration mechanism

2012-11-12 Thread Sasha Levin
On 11/12/2012 06:57 AM, Will Deacon wrote: PCI devices are currently registered into the pci_devices array via the pci__register function, which can then be indexed later by architecture code to construct device tree nodes. For MMIO devices, there is no such utility. Rather than invent a

Re: [RFC PATCH 13/16] kvm tools: keep track of registered memory banks in struct kvm

2012-11-12 Thread Sasha Levin
On 11/12/2012 06:57 AM, Will Deacon wrote: When registering memory banks for a guest, it is useful to keep the range information around for translating between guest and host address spaces. This patch adds a list of kvm_mem_bank structures to struct kvm, which is updated when a new bank is

Re: [RFC PATCH 14/16] kvm tools: teach guest_flat_to_host about memory banks starting above 0

2012-11-12 Thread Sasha Levin
On 11/12/2012 06:57 AM, Will Deacon wrote: Running a guest with multiple banks of memory based above 0 causes the guest_flat_to_host address conversion to fail, as it is assumed that guest memory addresses are offset linearly from 0. This patch changes the translation function so that the

Re: [RFC PATCH 13/16] kvm tools: keep track of registered memory banks in struct kvm

2012-11-13 Thread Sasha Levin
On 11/13/2012 07:16 AM, Will Deacon wrote: On Tue, Nov 13, 2012 at 04:37:38AM +, Sasha Levin wrote: On 11/12/2012 06:57 AM, Will Deacon wrote: +struct kvm_mem_bank { + struct list_headlist; + unsigned long guest_phys_addr; + void*host_addr

[PATCH] kvm tools: disable LTO by default

2012-11-19 Thread Sasha Levin
A bug only seen with LTO enabled was reported by Ron Minnich. Since the issue appears to be a linker issue, we disable LTO by default until it's more stable. We can still run LTO builds by setting LTO=1. Reported-by: Ron Minnich rminn...@gmail.com Signed-off-by: Sasha Levin sasha.le

Re: [RFC PATCH 13/16] kvm tools: keep track of registered memory banks in struct kvm

2012-11-20 Thread Sasha Levin
On 11/20/2012 12:15 PM, Will Deacon wrote: Hi Sasha, On Tue, Nov 13, 2012 at 04:37:38AM +, Sasha Levin wrote: On 11/12/2012 06:57 AM, Will Deacon wrote: struct kvm { struct kvm_arch arch; struct kvm_config cfg; @@ -49,6 +56,7 @@ struct kvm { u64

Re: [PATCH v2 1/8] rbtree: include linux/compiler.h for definition of __always_inline

2012-11-22 Thread Sasha Levin
On 11/22/2012 10:58 AM, Will Deacon wrote: Commit 29fc7c5a4f516d388fb6e1f6d24bfb04b8093e54 upstream. rb_erase_augmented() is a static function annotated with __always_inline. This causes a compile failure when attempting to use the rbtree implementation as a library (e.g. kvm tool):

[PATCH] kvm tools: remove unneeded checks in qcow code

2012-12-20 Thread Sasha Levin
We already know q!=NULL at that point, no need to retest. Signed-off-by: Sasha Levin sasha.le...@oracle.com --- tools/kvm/disk/qcow.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/kvm/disk/qcow.c b/tools/kvm/disk/qcow.c index ee2992e..64a2550 100644 --- a/tools

[PATCH] kvm tools: correctly compare pointer with NULL instead of 0

2012-12-20 Thread Sasha Levin
Signed-off-by: Sasha Levin sasha.le...@oracle.com --- tools/kvm/hw/pci-shmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/kvm/hw/pci-shmem.c b/tools/kvm/hw/pci-shmem.c index 00e5d93..ec3f771 100644 --- a/tools/kvm/hw/pci-shmem.c +++ b/tools/kvm/hw/pci-shmem.c

[PATCH] kvm tools: remove unneeded check from disk code

2012-12-20 Thread Sasha Levin
We already know 'disk' is non-null. Signed-off-by: Sasha Levin sasha.le...@oracle.com --- tools/kvm/disk/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/kvm/disk/core.c b/tools/kvm/disk/core.c index dd59751..4e9bda0 100644 --- a/tools/kvm/disk/core.c +++ b/tools

[PATCH 1/9] kvm tools: Don't dynamically allocate threadpool jobs

2011-06-29 Thread Sasha Levin
To allow efficient use of shorter-term threadpool jobs, don't allocate them dynamically upon creation. Instead, store them within 'job' structures. This will prevent some overhead creating/destroying jobs which live for a short time. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools

[PATCH 2/9] kvm tools: Process virtio-blk requests in parallel

2011-06-29 Thread Sasha Levin
with reads, and 2% improvement in writes. Suggested-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/virtio/blk.c | 74 --- 1 files changed, 38 insertions(+), 36 deletions(-) diff --git a/tools/kvm

[PATCH 3/9] kvm tools: Allow giving instance names

2011-06-29 Thread Sasha Levin
This will allow tracking instance names and sending commands to specific instances if multiple instances are running. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/include/kvm/kvm.h |5 +++- tools/kvm/kvm-run.c |5 +++- tools/kvm/kvm.c | 55

[PATCH 4/9] kvm tools: Provide instance name when running 'kvm debug'

2011-06-29 Thread Sasha Levin
Instead of sending a signal to the first instance found, send it to a specific instance. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/kvm-debug.c | 19 +++ 1 files changed, 15 insertions(+), 4 deletions(-) diff --git a/tools/kvm/kvm-debug.c b/tools/kvm/kvm

[PATCH 5/9] kvm tools: Provide instance name when running 'kvm pause'

2011-06-29 Thread Sasha Levin
Instead of sending a signal to the first instance found, send it to a specific instance. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/kvm-pause.c | 13 +++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/tools/kvm/kvm-pause.c b/tools/kvm/kvm

[PATCH 7/9] kvm tools: Advise memory allocated for guest RAM as KSM mergable

2011-06-29 Thread Sasha Levin
Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/kvm.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/tools/kvm/kvm.c b/tools/kvm/kvm.c index 4f723a6..15bcf08 100644 --- a/tools/kvm/kvm.c +++ b/tools/kvm/kvm.c @@ -345,6 +345,8 @@ struct kvm *kvm__init

[PATCH 6/9] kvm tools: Add virtio-balloon device

2011-06-29 Thread Sasha Levin
. - SIGKVMDELMEM: Remove 1M from the balloon driver (deflate). This will increase available memory within the guest. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/Makefile |1 + tools/kvm/include/kvm/kvm.h|3 + tools/kvm/include/kvm/virtio-balloon.h

[PATCH 8/9] kvm tools: Add 'kvm balloon' command

2011-06-29 Thread Sasha Levin
Add a command to allow easily inflate/deflate the balloon driver in running instances. Usage: kvm balloon [command] [instance name] [size] command is either inflate or deflate, and size is represented in MB. Target instance must be named (started with '--name'). Signed-off-by: Sasha Levin

[PATCH 9/9] kvm tools: Stop VCPUs before freeing struct kvm

2011-06-29 Thread Sasha Levin
Not stopping VCPUs before leads to seg faults and other errors due to synchronization between threads. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/term.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/tools/kvm/term.c b/tools/kvm/term.c index

Re: [PATCH 3/9] kvm tools: Allow giving instance names

2011-06-30 Thread Sasha Levin
On Thu, 2011-06-30 at 11:30 +0300, Avi Kivity wrote: On 06/30/2011 10:53 AM, Pekka Enberg wrote: On Wed, 29 Jun 2011, Sasha Levin wrote: This will allow tracking instance names and sending commands to specific instances if multiple instances are running. Signed-off-by: Sasha Levin

Re: [PATCH 3/9] kvm tools: Allow giving instance names

2011-06-30 Thread Sasha Levin
On Thu, 2011-06-30 at 10:53 +0300, Pekka Enberg wrote: On Wed, 29 Jun 2011, Sasha Levin wrote: This will allow tracking instance names and sending commands to specific instances if multiple instances are running. Signed-off-by: Sasha Levin levinsasha...@gmail.com I skipped

[PATCH v2 1/8] kvm tools: Don't dynamically allocate threadpool jobs

2011-07-01 Thread Sasha Levin
To allow efficient use of shorter-term threadpool jobs, don't allocate them dynamically upon creation. Instead, store them within 'job' structures. This will prevent some overhead creating/destroying jobs which live for a short time. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools

[PATCH v2 2/8] kvm tools: Process virtio-blk requests in parallel

2011-07-01 Thread Sasha Levin
with reads, and 2% improvement in writes. Suggested-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/virtio/blk.c | 74 --- 1 files changed, 38 insertions(+), 36 deletions(-) diff --git a/tools/kvm

[PATCH v2 3/8] kvm tools: Allow giving instance names

2011-07-01 Thread Sasha Levin
This will allow tracking instance names and sending commands to specific instances if multiple instances are running. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/include/kvm/kvm.h |5 +++- tools/kvm/kvm-run.c |5 +++- tools/kvm/kvm.c | 56

[PATCH v2 5/8] kvm tools: Provide instance name when running 'kvm pause'

2011-07-01 Thread Sasha Levin
Instead of sending a signal to the first instance found, send it to a specific instance. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/kvm-pause.c | 13 +++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/tools/kvm/kvm-pause.c b/tools/kvm/kvm

[PATCH v2 4/8] kvm tools: Provide instance name when running 'kvm debug'

2011-07-01 Thread Sasha Levin
Instead of sending a signal to the first instance found, send it to a specific instance. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/kvm-debug.c | 19 +++ 1 files changed, 15 insertions(+), 4 deletions(-) diff --git a/tools/kvm/kvm-debug.c b/tools/kvm/kvm

[PATCH v2 6/8] kvm tools: Add virtio-balloon device

2011-07-01 Thread Sasha Levin
. - SIGKVMDELMEM: Remove 1M from the balloon driver (deflate). This will increase available memory within the guest. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/Makefile |1 + tools/kvm/include/kvm/kvm.h|3 + tools/kvm/include/kvm/virtio-balloon.h

[PATCH v2 8/8] kvm tools: Add 'kvm balloon' command

2011-07-01 Thread Sasha Levin
Add a command to allow easily inflate/deflate the balloon driver in running instances. Usage: kvm balloon [command] [instance name] [size] command is either inflate or deflate, and size is represented in MB. Target instance must be named (started with '--name'). Signed-off-by: Sasha Levin

[PATCH 9/9] kvm tools: Stop VCPUs before freeing struct kvm

2011-07-01 Thread Sasha Levin
Not stopping VCPUs before leads to seg faults and other errors due to synchronization between threads. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/term.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/tools/kvm/term.c b/tools/kvm/term.c index

[PATCH v2 7/8] kvm tools: Advise memory allocated for guest RAM as KSM mergable

2011-07-01 Thread Sasha Levin
Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/kvm.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/tools/kvm/kvm.c b/tools/kvm/kvm.c index 23d31a3..2f5d633 100644 --- a/tools/kvm/kvm.c +++ b/tools/kvm/kvm.c @@ -346,6 +346,8 @@ struct kvm *kvm__init

[PATCH] virtio_balloon: Notify guest only after deflating the balloon

2011-07-01 Thread Sasha Levin
...@redhat.com Cc: virtualizat...@lists.linux-foundation.org Cc: kvm@vger.kernel.org Signed-off-by: Sasha Levin levinsasha...@gmail.com --- drivers/virtio/virtio_balloon.c | 16 ++-- 1 files changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/virtio/virtio_balloon.c b/drivers

Re: [PATCH] virtio_balloon: Notify guest only after deflating the balloon

2011-07-03 Thread Sasha Levin
is merely a courtesy. I've noticed that if I don't process the deflate vq the guest doesn't use the deflated pages at all - something which contradicts the feature that lets him use the deflated pages without waiting for the deflate vq. On Sat, Jul 02, 2011 at 06:06:56AM +0300, Sasha Levin

Re: [PATCH] virtio_balloon: Notify guest only after deflating the balloon

2011-07-03 Thread Sasha Levin
On Sun, 2011-07-03 at 13:30 +0300, Michael S. Tsirkin wrote: On Sun, Jul 03, 2011 at 12:46:59PM +0300, Sasha Levin wrote: On Sun, 2011-07-03 at 11:27 +0300, Michael S. Tsirkin wrote: Doesn't this basically just revert bf50e69f63d21091e525185c3ae761412be0ba72? Yes. I haven't

Re: [PATCH] virtio_balloon: Notify guest only after deflating the balloon

2011-07-03 Thread Sasha Levin
On Sun, 2011-07-03 at 15:11 +0300, Michael S. Tsirkin wrote: On Sun, Jul 03, 2011 at 01:52:29PM +0300, Sasha Levin wrote: On Sun, 2011-07-03 at 13:30 +0300, Michael S. Tsirkin wrote: On Sun, Jul 03, 2011 at 12:46:59PM +0300, Sasha Levin wrote: On Sun, 2011-07-03 at 11:27 +0300, Michael S

Re: [PATCH] virtio_balloon: Notify guest only after deflating the balloon

2011-07-03 Thread Sasha Levin
On Sun, 2011-07-03 at 16:44 +0300, Michael S. Tsirkin wrote: On Sun, Jul 03, 2011 at 03:32:36PM +0300, Sasha Levin wrote: On Sun, 2011-07-03 at 15:11 +0300, Michael S. Tsirkin wrote: On Sun, Jul 03, 2011 at 01:52:29PM +0300, Sasha Levin wrote: On Sun, 2011-07-03 at 13:30 +0300, Michael S

[PATCH 1/5] kvm tools: Fix home dir resolution

2011-07-03 Thread Sasha Levin
Previous code didn't properly resolve home directory. Resolve user's home dir using the $HOME enviroment variable. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/kvm.c | 12 +++- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/tools/kvm/kvm.c b/tools

[PATCH 2/5] kvm tools: Give guest instances default name

2011-07-03 Thread Sasha Levin
Name instances which aren't specifically named by the user (using the --name flag) with the following pattern: 'guest-pid' Suggested-by: Pekka Enberg penb...@kernel.org Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/kvm-run.c |9 +++-- 1 files changed, 7 insertions

[PATCH 3/5] kvm tools: Add instance enumerator

2011-07-03 Thread Sasha Levin
Add API kvm__enumerate_instances() to enumerate running guest instances. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/kvm.c | 25 + 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/tools/kvm/kvm.c b/tools/kvm/kvm.c index 378e035

[PATCH 4/5] kvm tools: Add 'kvm list' command

2011-07-03 Thread Sasha Levin
Use 'kvm list' to list running virtual guest. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/Makefile |5 +++-- tools/kvm/include/kvm/kvm-list.h |6 ++ tools/kvm/include/kvm/kvm.h |1 + tools/kvm/kvm-cmd.c |2 ++ tools/kvm/kvm

[PATCH 5/5] kvm tools: Allow pausing and debugging all running instances

2011-07-03 Thread Sasha Levin
Add a 'kvm [debug,pause] all' command to allow pausing or debugging all running guests on a host. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/kvm-debug.c | 10 ++ tools/kvm/kvm-pause.c | 10 ++ 2 files changed, 20 insertions(+), 0 deletions(-) diff --git

[PATCH] ioeventfd: Introduce KVM_IOEVENTFD_FLAG_PIPE

2011-07-03 Thread Sasha Levin
it on the guest. Cc: Avi Kivity a...@redhat.com Cc: Ingo Molnar mi...@elte.hu Cc: Marcelo Tosatti mtosa...@redhat.com Cc: Michael S. Tsirkin m...@redhat.com Cc: Pekka Enberg penb...@kernel.org Signed-off-by: Sasha Levin levinsasha...@gmail.com --- include/linux/kvm.h |2 + virt/kvm/eventfd.c

Re: [PATCH] ioeventfd: Introduce KVM_IOEVENTFD_FLAG_PIPE

2011-07-03 Thread Sasha Levin
On Sun, 2011-07-03 at 20:16 +0300, Avi Kivity wrote: On 07/03/2011 08:04 PM, Sasha Levin wrote: The new flag allows passing a write side of a pipe instead of an eventfd to be notified of writes to the specified memory region. Instead of signaling an event, the value written to the memory

Re: [PATCH 4/5] kvm tools: Add 'kvm list' command

2011-07-03 Thread Sasha Levin
On Sun, 2011-07-03 at 21:09 +0300, Pekka Enberg wrote: On Sun, 3 Jul 2011, Sasha Levin wrote: Use 'kvm list' to list running virtual guest. Signed-off-by: Sasha Levin levinsasha...@gmail.com The pidfiles don't seem to get cleaned after guests exit. I ran 'make check' a few times and I

Re: [PATCH] ioeventfd: Introduce KVM_IOEVENTFD_FLAG_PIPE

2011-07-04 Thread Sasha Levin
On Mon, 2011-07-04 at 13:27 +0300, Avi Kivity wrote: On 07/03/2011 08:44 PM, Sasha Levin wrote: On Sun, 2011-07-03 at 20:16 +0300, Avi Kivity wrote: On 07/03/2011 08:04 PM, Sasha Levin wrote: - eventfd_signal(p-eventfd, 1); + if (p-pipe

Re: [PATCH] ioeventfd: Introduce KVM_IOEVENTFD_FLAG_PIPE

2011-07-04 Thread Sasha Levin
On Mon, 2011-07-04 at 17:45 +0300, Avi Kivity wrote: On 07/04/2011 05:38 PM, Sasha Levin wrote: In general incremental development is great, but I don't want to fragment the ABI. I'd like to be able to forward an entire PCI BAR over a pipe. That means sending the address/data

[PATCH 1/2] vmx,svm: Add module parameter to ignore the 'in use' check

2011-07-04 Thread Sasha Levin
-by: Alexander Graf ag...@suse.de Signed-off-by: Sasha Levin levinsasha...@gmail.com --- arch/x86/kvm/svm.c |5 - arch/x86/kvm/vmx.c |5 - 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 475d1c9..5ca76e3 100644 --- a/arch/x86

[PATCH 2/2] vmx,svm: Print errors if SVM or VMX were already set

2011-07-04 Thread Sasha Levin
: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Sasha Levin levinsasha...@gmail.com --- arch/x86/kvm/svm.c |5 - arch/x86/kvm/vmx.c |4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 5ca76e3..2a1df2e 100644 --- a/arch

Re: [PATCH 1/2] vmx,svm: Add module parameter to ignore the 'in use' check

2011-07-05 Thread Sasha Levin
On Tue, 2011-07-05 at 11:09 +0300, Avi Kivity wrote: On 07/05/2011 02:09 AM, Sasha Levin wrote: Add a module parameter 'check_inuse' to allow disabling the check of whether virtualization has already been enabled on the given cpu. This is needed to deal with broken BIOS which set the SVM

Re: [PATCH 1/2] vmx,svm: Add module parameter to ignore the 'in use' check

2011-07-05 Thread Sasha Levin
On Tue, 2011-07-05 at 11:11 +0200, Joerg Roedel wrote: On Tue, Jul 05, 2011 at 11:14:43AM +0300, Sasha Levin wrote: I have no information about the machine. It was the result of trying to debug an issue reported on IRC where we found that the SVM flag is being set after boot even before

[PATCH 1/2] kvm tools: Export kvm__remove_pidfile

2011-07-05 Thread Sasha Levin
This will allow cleaning up ghost pid files outside of the module. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/include/kvm/kvm.h |1 + tools/kvm/kvm.c |9 +++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/tools/kvm/include/kvm/kvm.h

  1   2   3   4   5   6   7   8   9   10   >