Re: [PATCH 4/8] KVM: MMU: drop unsync_child_bitmap

2011-12-18 Thread Avi Kivity
On 12/16/2011 12:16 PM, Xiao Guangrong wrote: > unsync_child_bitmap is used to record which spte has unsync page or unsync > children, we can set a free bit in the spte instead of it > unsync_child_bitmap takes one cacheline; the shadow page table takes 64. This will make unsync/resync much more

Re: [PATCH 8/8] KVM: MMU: remove PT64_SECOND_AVAIL_BITS_SHIFT

2011-12-18 Thread Avi Kivity
On 12/16/2011 12:18 PM, Xiao Guangrong wrote: > It is not used, remove it > > Signed-off-by: Xiao Guangrong > --- > arch/x86/kvm/mmu.c |1 - > 1 files changed, 0 insertions(+), 1 deletions(-) > > diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c > index 5d0f0e3..234a32e 100644 > --- a/arch

[PATCH] kvm tools: Define __compiletime_error helper

2011-12-18 Thread Cyrill Gorcunov
To eliminate compile errors like | CC builtin-run.o | In file included from ../../arch/x86/include/asm/system.h:7:0, | from include/kvm/barrier.h:13, | from builtin-run.c:16: | ../../arch/x86/include/asm/cmpxchg.h:11:13: error: no previous prototype for

Re: [PATCH 2/2] kvm tools: Submit multiple virtio-blk requests in parallel

2011-12-18 Thread Sasha Levin
On Fri, 2011-12-16 at 22:57 +0800, Asias He wrote: > On 12/15/2011 08:15 PM, Sasha Levin wrote: > > When using AIO, submit all requests which exists in the vring in a > single > > io_submit instead of one io_submit for each descriptor. > > > > Benchmarks: > > > > Short version: 15%+ increase in I

[PATCH] kvm tools: Rename pr_error to pr_err to follow kernel convention

2011-12-18 Thread Cyrill Gorcunov
The kernel already has pr_err helper lets do the same. Signed-off-by: Cyrill Gorcunov --- tools/kvm/builtin-stat.c |2 +- tools/kvm/disk/core.c |2 +- tools/kvm/include/kvm/util.h |2 +- tools/kvm/kvm.c|2 +- tools/kvm/util/parse-options.c | 16

[PATCH] kvm tools: sdl -- Fix array size for keymap

2011-12-18 Thread Cyrill Gorcunov
Index is u8 value so array size should be 256. Signed-off-by: Cyrill Gorcunov --- tools/kvm/ui/sdl.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-2.6.git/tools/kvm/ui/sdl.c === --- linux-2.6.git.orig/tools/

[RFC] kvm tools: Make kvm__arch_setup_firmware to return error code

2011-12-18 Thread Cyrill Gorcunov
If some of subsequent calls fails we better to return error code instead of dying with a message. This is a first step in getting rid of number of die() calls we have in code. Signed-off-by: Cyrill Gorcunov --- tools/kvm/builtin-run.c |5 - tools/kvm/include/kvm/kvm.h

[PATCH RFC v3 0/2] Initial support for Microsoft Hyper-V.

2011-12-18 Thread Vadim Rozenfeld
With the following series of patches we are starting to implement some basic Microsoft Hyper-V Enlightenment functionality. This series is mostly about adding support for relaxed timing, spinlock, and virtual apic. For more Hyper-V related information please see: "Hypervisor Functional Specificati

[PATCH RFC v3 1/2] hyper-v: introduce Hyper-V support infrastructure.

2011-12-18 Thread Vadim Rozenfeld
--- Makefile.target |2 + target-i386/cpuid.c | 14 ++ target-i386/hyperv.c | 65 ++ target-i386/hyperv.h | 37 4 files changed, 118 insertions(+), 0 deletions(-) create mode 100644 target-i386/hy

[PATCH RFC v3 2/2] hyper-v: initialize Hyper-V CPUID leaves.

2011-12-18 Thread Vadim Rozenfeld
--- target-i386/kvm.c | 65 +++- 1 files changed, 63 insertions(+), 2 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 9080996..731cc8d 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -29,6 +29,7 @@ #include "hw/pc.

Re: [RFT PATCH] blkio: alloc per cpu data from worker thread context( Re: kvm deadlock)

2011-12-18 Thread Nate Custer
On Dec 16, 2011, at 2:29 PM, Vivek Goyal wrote: > Thanks for testing it Nate. I did some debugging and found out that patch > is doing double free on per cpu pointer hence the crash you are running > into. I could reproduce this problem on my box. It is just a matter of > doing rmdir on the blkio

[PATCH] kvm tools: Use assert() helper to check a variable value

2011-12-18 Thread Cyrill Gorcunov
BUILD_BUG_ON is unable to catch errors on expression which can't be evaluated at compile time. Signed-off-by: Cyrill Gorcunov --- tools/kvm/x86/bios.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Index: linux-2.6.git/tools/kvm/x86/bios.c ===

[PATCH] KVM: Don't mistreat edge-triggered INIT IPI as INIT de-assert. (LAPIC)

2011-12-18 Thread Julian Stecklina
If the guest programs an IPI with level=0 (de-assert) and trig_mode=0 (edge), it is erroneously treated as INIT de-assert and ignored, but to quote the spec: "For this delivery mode [INIT de-assert], the level flag must be set to 0 and trigger mode flag to 1." Signed-off-by: Julian Stecklina ---

Re: [PATCH v4] kvm: make vcpu life cycle separated from kvm instance

2011-12-18 Thread Takuya Yoshikawa
Liu ping fan wrote: Suppose the following scene, Firstly, creating 10 kvm_vcpu for guest to take the advantage of multi-core. Now, reclaiming some of the kvm_vcpu, so we can limit the guest's usage of cpu. Then what about the kvm_vcpu unused? Currently they are just idle in kernel, but with this

Re: [RFC] virtio: use mandatory barriers for remote processor vdevs

2011-12-18 Thread Amos Kong
On 12/12/11 13:12, Rusty Russell wrote: On Mon, 12 Dec 2011 11:06:53 +0800, Amos Kong wrote: On 12/12/11 06:27, Benjamin Herrenschmidt wrote: On Sun, 2011-12-11 at 14:25 +0200, Michael S. Tsirkin wrote: Forwarding some results by Amos, who run multiple netperf streams in parallel, from an ex

Re: [PATCH 1/8] KVM: MMU: combine unsync and unsync_children

2011-12-18 Thread Takuya Yoshikawa
About naming issues in the kvm mmu code. Not restricted to your patch series, so please take as a suggestion for the future. (2011/12/16 19:13), Xiao Guangrong wrote: +static bool sp_is_unsync(struct kvm_mmu_page *sp) +{ + return sp->role.level == PT_PAGE_TABLE_LEVEL&& sp->unsync; +} i

Re: [PATCH 3/8] KVM: MMU: do not add a nonpresent spte to rmaps of its child

2011-12-18 Thread Takuya Yoshikawa
(2011/12/16 19:15), Xiao Guangrong wrote: -static void mmu_page_add_parent_pte(struct kvm_vcpu *vcpu, - struct kvm_mmu_page *sp, u64 *parent_pte) +static void mmu_page_add_set_parent_pte(struct kvm_vcpu *vcpu, + struct kvm_m

Re: [PATCH] kvm tools: Make the whole guest memory mergeable

2011-12-18 Thread Zang Hongyong
于 2011/12/16,星期五 17:46, Sasha Levin 写道: On Fri, 2011-12-16 at 17:33 +0800, Zang Hongyong wrote: Do you see an issue with increasing kvm->ram_size? Yes, it will cause some problems after simply increase the kvm->ram_size. For examples: In kvm__init_ram() code we use kvm->ram_size to calculate t

Re: [RFC] virtio: use mandatory barriers for remote processor vdevs

2011-12-18 Thread Benjamin Herrenschmidt
On Mon, 2011-12-19 at 10:19 +0800, Amos Kong wrote: > I tested with the same environment and scenarios. > tested one scenarios for three times and compute the average for more > precision. > > Thanks, Amos > > - compare results --- > Mon Dec 19 09:51:09 2011 > > 1 - avg-old.net

Re: [RFC] virtio: use mandatory barriers for remote processor vdevs

2011-12-18 Thread Amos Kong
On 19/12/11 10:19, Amos Kong wrote: On 12/12/11 13:12, Rusty Russell wrote: On Mon, 12 Dec 2011 11:06:53 +0800, Amos Kong wrote: On 12/12/11 06:27, Benjamin Herrenschmidt wrote: On Sun, 2011-12-11 at 14:25 +0200, Michael S. Tsirkin wrote: Forwarding some results by Amos, who run multiple net

[PATCH v2] kvm tool: Change kvm->ram_size to real mapped size.

2011-12-18 Thread zanghongyong
From: Hongyong Zang If a guest's ram_size exceeds KVM_32BIT_GAP_START, the corresponding kvm tool's virtual address size should be (ram_size + KVM_32BIT_GAP_SIZE), rather than ram_size. Signed-off-by: Hongyong Zang --- tools/kvm/x86/bios.c |2 +- tools/kvm/x86/kvm.c | 12 ++--

Re: [RFC] virtio: use mandatory barriers for remote processor vdevs

2011-12-18 Thread Rusty Russell
On Tue, 13 Dec 2011 07:56:36 +0800, Amos Kong wrote: > On 12/12/2011 01:12 PM, Rusty Russell wrote: > > On Mon, 12 Dec 2011 11:06:53 +0800, Amos Kong wrote: > >> On 12/12/11 06:27, Benjamin Herrenschmidt wrote: > >>> On Sun, 2011-12-11 at 14:25 +0200, Michael S. Tsirkin wrote: > >>> > Forwar

Re: [Qemu-devel] [PATCH] virtio-serial: Allow one MSI-X vector per virtqueue

2011-12-18 Thread Zang Hongyong
于 2011/12/16,星期五 17:39, Amit Shah 写道: On (Fri) 16 Dec 2011 [09:14:26], zanghongy...@huawei.com wrote: From: Hongyong Zang In pci_enable_msix(), the guest's virtio-serial driver tries to set msi-x with one vector per queue. But it fails and eventually all virtio-serial ports share one MSI-X vect

Re: [PATCH v5 11/13] ARM: KVM: Support SMP hosts

2011-12-18 Thread Antonios Motakis
On 12/11/2011 11:25 AM, Christoffer Dall wrote: WARNING: This code is in development and guests do not fully boot on SMP hosts yet. Hello, What would still be needed to fully booted SMP? For example, are there identified critical sections and structures that need to be worked on, or there are

Re: [PATCH] kvm tools: Use assert() helper to check a variable value

2011-12-18 Thread Pekka Enberg
On Mon, 19 Dec 2011, Cyrill Gorcunov wrote: BUILD_BUG_ON is unable to catch errors on expression which can't be evaluated at compile time. Signed-off-by: Cyrill Gorcunov --- tools/kvm/x86/bios.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Index: linux-2.6.git/tools/kvm/x86/bios.c

Re: [RFC] virtio: use mandatory barriers for remote processor vdevs

2011-12-18 Thread Amos Kong
On 19/12/11 10:41, Benjamin Herrenschmidt wrote: On Mon, 2011-12-19 at 10:19 +0800, Amos Kong wrote: I tested with the same environment and scenarios. tested one scenarios for three times and compute the average for more precision. Thanks, Amos - compare results --- Mon Dec 19

Re: [Qemu-devel] [PATCH] virtio-serial: Allow one MSI-X vector per virtqueue

2011-12-18 Thread Amit Shah
On (Mon) 19 Dec 2011 [14:09:43], Zang Hongyong wrote: > 于 2011/12/16,星期五 17:39, Amit Shah 写道: > >On (Fri) 16 Dec 2011 [09:14:26], zanghongy...@huawei.com wrote: > >>From: Hongyong Zang > >> > >>In pci_enable_msix(), the guest's virtio-serial driver tries to set msi-x > >>with one vector per queue.

Re: [PATCH] kvm tools: Use assert() helper to check a variable value

2011-12-18 Thread Cyrill Gorcunov
On Mon, Dec 19, 2011 at 09:13:28AM +0200, Pekka Enberg wrote: > > > >-BUILD_BUG_ON(i > E820_X_MAX); > >+assert(i <= E820_X_MAX); > > We should use BUG_ON() like tools/perf does. > We dont have it yet. So I'll introduce this helper later, but note that we will have to cover _all_ assert()