Re: [Qemu-devel] Re: QEMU-KVM and video performance

2010-04-22 Thread Gerhard Wiesinger
On Wed, 21 Apr 2010, Avi Kivity wrote: On 04/21/2010 09:50 PM, Gerhard Wiesinger wrote: I don't think changing VGA window is a problem because there are 500.000-1Mio changes/s possible. 1MB/s, 500k-1M changes/s Coincidence? Is it taking a page fault or trap on every write? To

Re: [PATCH RFC v2 6/6] KVM: introduce a new API for getting dirty bitmaps

2010-04-22 Thread Fernando Luis Vázquez Cao
On 04/22/2010 11:45 AM, Fernando Luis Vázquez Cao wrote: On 04/21/2010 06:41 PM, Alexander Graf wrote: On 21.04.2010, at 10:29, Fernando Luis Vázquez Cao wrote: On 04/20/2010 08:03 PM, Takuya Yoshikawa wrote: @@ -318,7 +318,7 @@ struct kvm_dirty_log { __u32 padding1; union {

Re: [Qemu-devel] Re: QEMU-KVM and video performance

2010-04-22 Thread Gerhard Wiesinger
On Wed, 21 Apr 2010, Jamie Lokier wrote: Gerhard Wiesinger wrote: Hmmm. I'm very new to QEMU and KVM but at least accessing the virtual HW of QEMU even from KVM must be possible (e.g. memory and port accesses are done on nearly every virtual device) and therefore I'm ending in C code in the

[PATCH 0/10] KVM MMU: allow more shadow pages become asynchronous

2010-04-22 Thread Xiao Guangrong
In current code, shadow page can become asynchronous only if one shadow page for a gfn, this rule is too strict, in fact, we can let all last mapping page(i.e, it's the pte page) become unsync and sync them at invlpg or flush tlb time. Address this thinking, a gfn may have many shadow pages, for

[PATCH 1/10] KVM MMU: fix for calculating gpa in invlpg code

2010-04-22 Thread Xiao Guangrong
If the guest is 32-bit, we should use 'quadrant' to adjust gpa offset Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/paging_tmpl.h |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h

[PATCH 2/10] KVM MMU: convert mmu tracepoints

2010-04-22 Thread Xiao Guangrong
Convert mmu tracepoints by using DECLARE_EVENT_CLASS Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/mmutrace.h | 69 +- 1 files changed, 26 insertions(+), 43 deletions(-) diff --git a/arch/x86/kvm/mmutrace.h

[PATCH 3/10] KVM MMU: move unsync/sync tracpoints to proper place

2010-04-22 Thread Xiao Guangrong
Move unsync/sync tracepoints to the proper place, it's good for us to obtain unsync page live time Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/mmu.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c

[PATCH 4/10] KVM MMU: Move invlpg code out of paging_tmpl.h

2010-04-22 Thread Xiao Guangrong
Using '!sp-role.cr4_pae' replaces 'PTTYPE == 32' and using 'pte_size = sp-role.cr4_pae ? 8 : 4' replaces sizeof(pt_element_t) Then no need compile twice for this code Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/mmu.c | 60

[PATCH 5/10] KVM MMU: cleanup invlpg code

2010-04-22 Thread Xiao Guangrong
Using is_last_spte() to cleanup invlpg code Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/mmu.c |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index fac7c09..fd027a6 100644 --- a/arch/x86/kvm/mmu.c

[PATCH 6/10] KVM MMU: don't write-protect if have new mapping to unsync page

2010-04-22 Thread Xiao Guangrong
If have new mapping to the unsync page(i.e, add a new parent), just update the page from sp-gfn but not write-protect gfn, and if need create new shadow page form sp-gfn, we should sync it Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/mmu.c | 27

[PATCH 7/10] KVM MMU: allow more page become unsync at gfn mapping time

2010-04-22 Thread Xiao Guangrong
In current code, shadow page can become asynchronous only if one shadow page for a gfn, this rule is too strict, in fact, we can let all last mapping page(i.e, it's the pte page) become unsync, and sync them at invlpg or flush tlb time. This patch allow more page become asynchronous at gfn

[PATCH 8/10] KVM MMU: allow more page become unsync at getting sp time

2010-04-22 Thread Xiao Guangrong
Allow more page become asynchronous at getting sp time, if need create new shadow page for gfn but it not allow unsync(level 0), we should unsync all gfn's unsync page Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/mmu.c | 22 -- 1 files

[PATCH 9/10] KVM MMU: separate invlpg code form kvm_mmu_pte_write()

2010-04-22 Thread Xiao Guangrong
Let invlpg not depends on kvm_mmu_pte_write path, later patch will need this feature Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/mmu.c | 40 1 files changed, 24 insertions(+), 16 deletions(-) diff --git

[PATCH 10/10] KVM MMU: optimize sync/update unsync-page

2010-04-22 Thread Xiao Guangrong
invlpg only need update unsync page, sp-unsync and sp-unsync_children can help us to find it Now, a gfn may have many shadow pages, when one sp need be synced, we write protect sp-gfn and sync this sp but we keep other shadow pages asynchronous So, while gfn happen page fault, let it not touch

Re: KVM Page Fault Question

2010-04-22 Thread Avi Kivity
On 04/22/2010 08:26 AM, Marek Olszewski wrote: Under VMX without EPT, I do not seeing any VM Exits due to task switches. Is there a way to enable these? I'm looking to intercept the guest whenever it does a iret. See EXIT_REASON_TASK_SWITCH. However, that won't fire on any iret, only

Re: [Qemu-devel] Re: QEMU-KVM and video performance

2010-04-22 Thread Avi Kivity
On 04/22/2010 08:37 AM, Gerhard Wiesinger wrote: On Wed, 21 Apr 2010, Avi Kivity wrote: On 04/21/2010 09:14 PM, Gerhard Wiesinger wrote: Can you explain which code files/functions of KVM is involved in handling VGA memory window and page switching through the port write to the VGA window

Re: [Qemu-devel] Re: QEMU-KVM and video performance

2010-04-22 Thread Avi Kivity
On 04/22/2010 09:04 AM, Gerhard Wiesinger wrote: On Wed, 21 Apr 2010, Avi Kivity wrote: On 04/21/2010 09:50 PM, Gerhard Wiesinger wrote: I don't think changing VGA window is a problem because there are 500.000-1Mio changes/s possible. 1MB/s, 500k-1M changes/s Coincidence? Is it taking

Re: [PATCH] KVM: Document mmu

2010-04-22 Thread Karl Vogel
Avi Kivity wrote: +Translation +=== + +The primary job of the mmu is to program the processor's mmu to translate +addresses for the guest. Different translations are required at different +times: + +- when guest paging is disabled, we translate guest physical addresses to + host

Re: [PATCH] KVM: Document mmu

2010-04-22 Thread Avi Kivity
On 04/22/2010 10:13 AM, Karl Vogel wrote: Avi Kivity wrote: +Translation +=== + +The primary job of the mmu is to program the processor's mmu to translate +addresses for the guest. Different translations are required at different +times: + +- when guest paging is disabled, we

Re: Timedrift in KVM guests after livemigration.

2010-04-22 Thread Thomas Treutner
On Sunday 18 April 2010 11:33:44 Espen Berg wrote: All guest are Debian lenny with latest upstream kernel, hvm/kvm. We are using kvm-clock as guest source clock. cat /sys/devices/system/clocksource/clocksource0/current_clocksource kvm-clock I had to deactivate C1E (AMD CPUs) and use acpi

Re:[RFC][PATCH v3 1/3] A device for zero-copy based on KVM virtio-net.

2010-04-22 Thread xiaohui . xin
From: Xin Xiaohui xiaohui@intel.com Add a device to utilize the vhost-net backend driver for copy-less data transfer between guest FE and host NIC. It pins the guest user space to the host memory and provides proto_ops as sendmsg/recvmsg to vhost-net. Signed-off-by: Xin Xiaohui

RE: Re:[RFC][PATCH v3 1/3] A device for zero-copy based on KVM virtio-net.

2010-04-22 Thread Xin, Xiaohui
Michael, Sorry, it's based on the suggestion to hook an iocb completion callback to handle the iocb list in vhost-net. Thanks Xiaohui -Original Message- From: Xin, Xiaohui Sent: Thursday, April 22, 2010 4:24 PM To: m...@redhat.com Cc: a...@arndb.de; net...@vger.kernel.org;

Re:[RFC][PATCH v3 2/3] Provides multiple submits and asynchronous notifications.

2010-04-22 Thread xiaohui . xin
From: Xin Xiaohui xiaohui@intel.com The vhost-net backend now only supports synchronous send/recv operations. The patch provides multiple submits and asynchronous notifications. This is needed for zero-copy case. Signed-off-by: Xin Xiaohui xiaohui@intel.com --- Michael, Can't vhost

Re: [Qemu-devel] [PATCH][STABLE] block: Free iovec arrays allocated by multiwrite_merge()

2010-04-22 Thread Kevin Wolf
Am 21.04.2010 21:35, schrieb Stefan Hajnoczi: A new iovec array is allocated when creating a merged write request. This patch ensures that the iovec array is deleted in addition to its qiov owner. Reported-by: Leszek Urbanski tyg...@moo.pl Signed-off-by: Stefan Hajnoczi

Re: [PATCH RFC v2 3/6] KVM: introduce a wrapper function to copy dirty bitmaps to user space

2010-04-22 Thread Takuya Yoshikawa
(2010/04/21 20:12), Avi Kivity wrote: On 04/20/2010 01:59 PM, Takuya Yoshikawa wrote: We will replace copy_to_user() to copy_in_user() when we move the dirty bitmaps to user space. But sadly, we have copy_in_user() only for 64 bits architectures. So this function should work as a wrapper to

Re: [Qemu-devel] [RFC PATCH 00/20] Kemari for KVM v0.1

2010-04-22 Thread Dor Laor
On 04/21/2010 08:57 AM, Yoshiaki Tamura wrote: Hi all, We have been implementing the prototype of Kemari for KVM, and we're sending this message to share what we have now and TODO lists. Hopefully, we would like to get early feedback to keep us in the right direction. Although advanced

RE: [RFC][PATCH v2 0/3] Provide a zero-copy method on KVM virtio-net.

2010-04-22 Thread Xin, Xiaohui
Michael, Yes, I think this packet split mode probably maps well to mergeable buffer support. Note that 1. Not all devices support large packets in this way, others might map to indirect buffers better Do the indirect buffers accord to deal with the skb-frag_list? So we have to figure out

Re: [PATCH RFC v2 5/6] KVM: moving dirty bitmaps to user space

2010-04-22 Thread Takuya Yoshikawa
(2010/04/21 20:26), Avi Kivity wrote: r = 0; @@ -1858,7 +1866,7 @@ int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm, if (memslot-is_dirty) { kvm_flush_remote_tlbs(kvm); n = kvm_dirty_bitmap_bytes(memslot); - memset(memslot-dirty_bitmap, 0, n); + clear_user(memslot-dirty_bitmap, n);

Re: [RFC][PATCH v2 0/3] Provide a zero-copy method on KVM virtio-net.

2010-04-22 Thread Michael S. Tsirkin
On Thu, Apr 22, 2010 at 04:57:56PM +0800, Xin, Xiaohui wrote: Michael, Yes, I think this packet split mode probably maps well to mergeable buffer support. Note that 1. Not all devices support large packets in this way, others might map to indirect buffers better Do the indirect

Re: [PATCH RFC v2 6/6] KVM: introduce a new API for getting dirty bitmaps

2010-04-22 Thread Takuya Yoshikawa
Thanks, I can know basic rules about kvm/api . (2010/04/21 20:46), Avi Kivity wrote: +Type: vm ioctl +Parameters: struct kvm_dirty_log (in/out) +Returns: 0 on success, -1 on error + +/* for KVM_SWITCH_DIRTY_LOG */ +struct kvm_dirty_log { + __u32 slot; + __u32 padding; Please put a flags

[PATCH 2/3] KVM MMU: fix sp-unsync type error in trace event definition.

2010-04-22 Thread Gui Jianfeng
sp-unsync is bool now, so update trace event declaration. Signed-off-by: Gui Jianfeng guijianf...@cn.fujitsu.com --- arch/x86/kvm/mmutrace.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/mmutrace.h b/arch/x86/kvm/mmutrace.h index 3851f1f..9966e80 100644

[PATCH 3/3] KVM MMU: Take sp level into account when calculating quadran

2010-04-22 Thread Gui Jianfeng
Take sp level into account when calculating quadrant, because only when level == PT_PAGE_TABLE_LEVEL, quadrant is needed. Signed-off-by: Gui Jianfeng guijianf...@cn.fujitsu.com --- arch/x86/kvm/mmu.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/mmu.c

Re: [RFC][PATCH v3 2/3] Provides multiple submits and asynchronous notifications.

2010-04-22 Thread Michael S. Tsirkin
On Thu, Apr 22, 2010 at 04:37:16PM +0800, xiaohui@intel.com wrote: From: Xin Xiaohui xiaohui@intel.com The vhost-net backend now only supports synchronous send/recv operations. The patch provides multiple submits and asynchronous notifications. This is needed for zero-copy case.

32-bit color graphic on KVM virtual machines

2010-04-22 Thread shacky
Hi. Is it possible to have 32-bit color graphic on KVM virtual machines? I installed a Windows virtual machine, but it allows me to configure only 24-bit color display and it does not have any display driver installed. Is there a way to solve this problem? Thank youv very much! Bye. -- To

RE: [PATCH V5 1/3] perf kvm: Enhance perf to collect KVM guest os statistics from host side

2010-04-22 Thread Liu Yu-B13201
-Original Message- From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf Of Zhang, Yanmin Sent: Monday, April 19, 2010 1:33 PM To: Avi Kivity Cc: Ingo Molnar; Peter Zijlstra; Avi Kivity; Sheng Yang; linux-ker...@vger.kernel.org; kvm@vger.kernel.org;

[PATCH 1/8] KVM: SVM: Fix nested nmi handling

2010-04-22 Thread Joerg Roedel
The patch introducing nested nmi handling had a bug. The check does not belong to enable_nmi_window but must be in nmi_allowed. This patch fixes this. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/kvm/svm.c | 16 +--- 1 files changed, 9 insertions(+), 7 deletions(-)

[PATCH 4/8] KVM: SVM: Propagate nested entry failure into guest hypervisor

2010-04-22 Thread Joerg Roedel
This patch implements propagation of a failes guest vmrun back into the guest instead of killing the whole guest. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/kvm/svm.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/svm.c

[PATCH 3/8] KVM: SVM: Sync cr0 and cr3 to kvm state before nested handling

2010-04-22 Thread Joerg Roedel
This patch syncs cr0 and cr3 from the vmcb to the kvm state before nested intercept handling is done. This allows to simplify the vmexit path. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/kvm/svm.c | 15 ++- 1 files changed, 6 insertions(+), 9 deletions(-) diff

[PATCH 7/8] KVM: x86: Allow marking an exception as reinjected

2010-04-22 Thread Joerg Roedel
This patch adds logic to kvm/x86 which allows to mark an injected exception as reinjected. This allows to remove an ugly hack from svm_complete_interrupts that prevented exceptions from being reinjected at all in the nested case. The hack was necessary because an reinjected exception into the

[PATCH 8/8] KVM: SVM: Handle MCE intercepts always on host level

2010-04-22 Thread Joerg Roedel
This patch prevents MCE intercepts from being propagated into the L1 guest if they happened in an L2 guest. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/kvm/svm.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c

[PATCH 6/8] KVM: SVM: Report emulated SVM features to userspace

2010-04-22 Thread Joerg Roedel
This patch implements the reporting of the emulated SVM features to userspace instead of the real hardware capabilities. Every real hardware capability needs emulation in nested svm so the old behavior was broken. Cc: sta...@kernel.org Signed-off-by: Joerg Roedel joerg.roe...@amd.com ---

[PATCH 5/8] KVM: X86: Add callback to let modules decide over some supported cpuid bits

2010-04-22 Thread Joerg Roedel
This patch adds the get_supported_cpuid callback to kvm_x86_ops. It will be used in do_cpuid_ent to delegate the decission about some supported cpuid bits to the architecture modules. Cc: sta...@kernel.org Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/include/asm/kvm_host.h |

[PATCH 0/8] More fixes for nested svm

2010-04-22 Thread Joerg Roedel
Hi Avi, Marcelo, here is another set of nested svm fixes. They fix NMI code to make UP Hyper-V root domain booting. The patches also add better handling for nested entry failures and mce intercepts. Also in this patchset are the fixes for the supported cpuid reporting for svm features. These

[PATCH 2/8] KVM: SVM: Make sure rip is synced to vmcb before nested vmexit

2010-04-22 Thread Joerg Roedel
This patch fixes a bug where a nested guest always went over the same instruction because the rip was not advanced on a nested vmexit. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/kvm/svm.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git

Re: [Qemu-devel] [RFC PATCH 00/20] Kemari for KVM v0.1

2010-04-22 Thread Yoshiaki Tamura
Dor Laor wrote: On 04/21/2010 08:57 AM, Yoshiaki Tamura wrote: Hi all, We have been implementing the prototype of Kemari for KVM, and we're sending this message to share what we have now and TODO lists. Hopefully, we would like to get early feedback to keep us in the right direction. Although

[PATCH] qemu-kvm: Ask kernel about supported svm features

2010-04-22 Thread Joerg Roedel
This patch adds code to ask the kernel about the svm features it supports for its guests and propagates them to the guest. The new capability is necessary because the old behavior of the kernel was to just return the host svm features but every svm-feature needs emulation in the nested svm kernel

Re: [PATCH 0/8] More fixes for nested svm

2010-04-22 Thread Avi Kivity
On 04/22/2010 01:33 PM, Joerg Roedel wrote: Hi Avi, Marcelo, here is another set of nested svm fixes. They fix NMI code to make UP Hyper-V root domain booting. The patches also add better handling for nested entry failures and mce intercepts. Also in this patchset are the fixes for the

Re: [PATCH] qemu-kvm: Ask kernel about supported svm features

2010-04-22 Thread Avi Kivity
On 04/22/2010 01:57 PM, Joerg Roedel wrote: This patch adds code to ask the kernel about the svm features it supports for its guests and propagates them to the guest. The new capability is necessary because the old behavior of the kernel was to just return the host svm features but every

Re: [PATCH] kvm vmx: free vpid when fail to create vcpu

2010-04-22 Thread Avi Kivity
On 04/17/2010 11:41 AM, Lai Jiangshan wrote: Fix bug of the exception path, free allocated vpid when fail to create vcpu. Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a

Re: [PATCH] qemu-kvm: Ask kernel about supported svm features

2010-04-22 Thread Joerg Roedel
On Thu, Apr 22, 2010 at 02:07:14PM +0300, Avi Kivity wrote: On 04/22/2010 01:57 PM, Joerg Roedel wrote: This patch adds code to ask the kernel about the svm features it supports for its guests and propagates them to the guest. The new capability is necessary because the old behavior of the

Re: [PATCH] qemu-kvm: Ask kernel about supported svm features

2010-04-22 Thread Avi Kivity
On 04/22/2010 03:02 PM, Joerg Roedel wrote: Signed-off-by: Joerg Roedeljoerg.roe...@amd.com --- qemu-kvm-x86.c | 14 -- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c index 748ff69..6eccd69 100644 --- a/qemu-kvm-x86.c +++

Re: [Qemu-devel] [RFC PATCH 00/20] Kemari for KVM v0.1

2010-04-22 Thread Dor Laor
On 04/22/2010 01:35 PM, Yoshiaki Tamura wrote: Dor Laor wrote: On 04/21/2010 08:57 AM, Yoshiaki Tamura wrote: Hi all, We have been implementing the prototype of Kemari for KVM, and we're sending this message to share what we have now and TODO lists. Hopefully, we would like to get early

Re: [PATCH] qemu-kvm: Ask kernel about supported svm features

2010-04-22 Thread Joerg Roedel
On Thu, Apr 22, 2010 at 03:13:14PM +0300, Avi Kivity wrote: On 04/22/2010 03:02 PM, Joerg Roedel wrote: We can't just take the host-cpuid because most of the additional svm features need special emulation in the kernel. Or do you think this should better be handled in target-i386/cpuid.c?

[qemu-kvm tests 0/3] qemu-kvm tests cleanup

2010-04-22 Thread Naphtali Sprei
Cleanup, mostly x86 oriented. Patches against 'next' branch. Naphtali Sprei (3): qemu-kvm tests cleanup qemu-kvm tests cleanup: adapt stringio test to kernel-mode run qemu-kvm tests cleanup: Added printing for passing tests Also typo fix kvm/user/README| 23 ++

[qemu-kvm tests 1/3] qemu-kvm tests cleanup

2010-04-22 Thread Naphtali Sprei
Mainly removed unused/unnecessary files and references to them Signed-off-by: Naphtali Sprei nsp...@redhat.com --- kvm/user/README| 23 ++ kvm/user/balloon_ctl.c | 92 -- kvm/user/bootstrap.lds | 15 - kvm/user/config-x86-common.mak | 24 +--

[qemu-kvm tests 2/3] qemu-kvm tests cleanup: adapt stringio test to kernel-mode run

2010-04-22 Thread Naphtali Sprei
Also use testdev for output, call exit to quit. Currently, test reboots endlessly because of a triple-fault. Need to run test with -no-reboot till issue fixed (in kvm ??) Signed-off-by: Naphtali Sprei nsp...@redhat.com --- kvm/user/config-x86-common.mak |2 +- kvm/user/test/x86/stringio.S

[qemu-kvm tests 3/3] qemu-kvm tests cleanup: Added printing for passing tests Also typo fix

2010-04-22 Thread Naphtali Sprei
Signed-off-by: Naphtali Sprei nsp...@redhat.com --- kvm/user/test/x86/realmode.c | 106 +++-- 1 files changed, 100 insertions(+), 6 deletions(-) diff --git a/kvm/user/test/x86/realmode.c b/kvm/user/test/x86/realmode.c index bfc2942..bc4ed97 100644 ---

Re: [Qemu-devel] [RFC PATCH 00/20] Kemari for KVM v0.1

2010-04-22 Thread Yoshiaki Tamura
2010/4/22 Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp: (2010/04/22 19:35), Yoshiaki Tamura wrote: A trivial one would we to : - do X online snapshots/sec I currently don't have good numbers that I can share right now. Snapshots/sec depends on what kind of workload is running, and if

Re: [PATCH 1/5] Add a global synchronization point for pvclock

2010-04-22 Thread Glauber Costa
On Tue, Apr 20, 2010 at 12:42:17PM -0700, Jeremy Fitzhardinge wrote: On 04/20/2010 11:54 AM, Avi Kivity wrote: On 04/20/2010 09:23 PM, Jeremy Fitzhardinge wrote: On 04/20/2010 02:31 AM, Avi Kivity wrote: btw, do you want this code in pvclock.c, or shall we keep it kvmclock specific?

Re: [PATCH] qemu-kvm: Ask kernel about supported svm features

2010-04-22 Thread Avi Kivity
On 04/22/2010 03:28 PM, Joerg Roedel wrote: Yes. -cpu host should take KVM_GET_SUPPORTED_CPUID output and loop it back to the vcpu configuration, others just take the qemu configuration, mask it with supported bits, and pass it back (see check_features_against_host()). Hmm, the plan

Re: [Qemu-devel] [RFC PATCH 00/20] Kemari for KVM v0.1

2010-04-22 Thread Jamie Lokier
Yoshiaki Tamura wrote: Dor Laor wrote: On 04/21/2010 08:57 AM, Yoshiaki Tamura wrote: Event tapping is the core component of Kemari, and it decides on which event the primary should synchronize with the secondary. The basic assumption here is that outgoing I/O operations are idempotent,

Re: [UNTESTED] KVM: do not call kvm_set_irq from irq disabled section

2010-04-22 Thread Marcelo Tosatti
On Wed, Apr 21, 2010 at 09:38:39PM +0300, Gleb Natapov wrote: On Wed, Apr 21, 2010 at 03:29:11PM -0300, Marcelo Tosatti wrote: On Wed, Apr 21, 2010 at 08:58:48PM +0300, Gleb Natapov wrote: On Wed, Apr 21, 2010 at 02:37:34PM -0300, Marcelo Tosatti wrote: On Wed, Apr 21, 2010 at 08:12:27PM

[PATCH] Enable pvclock flags in vcpu_time_info structure

2010-04-22 Thread Glauber Costa
This patch removes one padding byte and transform it into a flags field. New versions of guests using pvclock will query these flags upon each read. Flags, however, will only be interpreted when the guest decides to. It uses the pvclock_valid_flags function to signal that a specific set of flags

Re: [PATCH v4] Add mergeable RX bufs support to vhost

2010-04-22 Thread David Stevens
Michael S. Tsirkin m...@redhat.com wrote on 04/22/2010 05:02:25 AM: On Mon, Apr 19, 2010 at 03:12:19PM -0700, David L Stevens wrote: This patch adds the mergeable RX buffers feature to vhost. Signed-off-by: David L Stevens dlstev...@us.ibm.com Looks pretty clean to me. Could you send

Re: [PATCH v4] Add mergeable RX bufs support to vhost

2010-04-22 Thread Michael S. Tsirkin
On Mon, Apr 19, 2010 at 03:12:19PM -0700, David L Stevens wrote: This patch adds the mergeable RX buffers feature to vhost. Signed-off-by: David L Stevens dlstev...@us.ibm.com BTW, which userspace should I use for testing this? -- To unsubscribe from this list: send the line unsubscribe kvm

Re: [PATCH v4] Add mergeable RX bufs support to vhost

2010-04-22 Thread Michael S. Tsirkin
On Thu, Apr 22, 2010 at 11:47:15AM -0600, David Stevens wrote: Michael S. Tsirkin m...@redhat.com wrote on 04/22/2010 05:02:25 AM: On Mon, Apr 19, 2010 at 03:12:19PM -0700, David L Stevens wrote: This patch adds the mergeable RX buffers feature to vhost. Signed-off-by: David L

Re: [PATCH v4] Add mergeable RX bufs support to vhost

2010-04-22 Thread David Stevens
Michael S. Tsirkin m...@redhat.com wrote on 04/22/2010 10:43:49 AM: On Mon, Apr 19, 2010 at 03:12:19PM -0700, David L Stevens wrote: This patch adds the mergeable RX buffers feature to vhost. Signed-off-by: David L Stevens dlstev...@us.ibm.com BTW, which userspace should I use for

Re: [PATCH v4] Add mergeable RX bufs support to vhost

2010-04-22 Thread Michael S. Tsirkin
On Thu, Apr 22, 2010 at 11:59:55AM -0600, David Stevens wrote: Michael S. Tsirkin m...@redhat.com wrote on 04/22/2010 10:43:49 AM: On Mon, Apr 19, 2010 at 03:12:19PM -0700, David L Stevens wrote: This patch adds the mergeable RX buffers feature to vhost. Signed-off-by: David L

Re: [RFC PATCH 01/20] Modify DIRTY_FLAG value and introduce DIRTY_IDX to use as indexes of bit-based phys_ram_dirty.

2010-04-22 Thread Anthony Liguori
Hi, On 04/21/2010 12:57 AM, Yoshiaki Tamura wrote: Replaces byte-based phys_ram_dirty bitmap with four (MASTER, VGA, CODE, MIGRATION) bit-based phys_ram_dirty bitmap. On allocation, it sets all bits in the bitmap. It uses ffs() to convert DIRTY_FLAG to DIRTY_IDX. Modifies wrapper functions

Re: [RFC PATCH 07/20] Introduce qemu_put_vector() and qemu_put_vector_prepare() to use put_vector() in QEMUFile.

2010-04-22 Thread Anthony Liguori
On 04/21/2010 12:57 AM, Yoshiaki Tamura wrote: For fool proof purpose, qemu_put_vector_parepare should be called before qemu_put_vector. Then, if qemu_put_* functions except this is called after qemu_put_vector_prepare, program will abort(). Signed-off-by: Yoshiaki

Re: [RFC PATCH 08/20] Introduce RAMSaveIO and use cpu_physical_memory_get_dirty_range() to check multiple dirty pages.

2010-04-22 Thread Anthony Liguori
On 04/21/2010 12:57 AM, Yoshiaki Tamura wrote: Introduce RAMSaveIO to use writev for saving ram blocks, and modifies ram_save_block() and ram_save_remaining() to use cpu_physical_memory_get_dirty_range() to check multiple dirty and non-dirty pages at once. Signed-off-by: Yoshiaki

Re: [PATCH 6/10] KVM MMU: don't write-protect if have new mapping to unsync page

2010-04-22 Thread Marcelo Tosatti
On Thu, Apr 22, 2010 at 02:13:04PM +0800, Xiao Guangrong wrote: If have new mapping to the unsync page(i.e, add a new parent), just update the page from sp-gfn but not write-protect gfn, and if need create new shadow page form sp-gfn, we should sync it Signed-off-by: Xiao Guangrong

Re: [RFC PATCH 10/20] Introduce skip_header parameter to qemu_loadvm_state() so that it can be called iteratively without reading the header.

2010-04-22 Thread Anthony Liguori
On 04/21/2010 12:57 AM, Yoshiaki Tamura wrote: Signed-off-by: Yoshiaki Tamuratamura.yoshi...@lab.ntt.co.jp I think the more appropriate thing to do is have qemu_savevm_state_complete() not write QEMU_VM_EOF when doing a continuous live migration. You would then want qemu_loadvm_state()

Re: [RFC PATCH 14/20] Upgrade QEMU_FILE_VERSION from 3 to 4, and introduce qemu_savevm_state_all().

2010-04-22 Thread Anthony Liguori
On 04/21/2010 12:57 AM, Yoshiaki Tamura wrote: Make a 32bit entry after QEMU_VM_FILE_VERSION to recognize whether the transfered data is QEMU_VM_FT_MODE or QEMU_VM_LIVE_MIGRATION_MODE. I'd rather you encapsulate the current protocol as opposed to extending it with a new version. You

Re: [RFC PATCH 15/20] Introduce FT mode support to configure.

2010-04-22 Thread Anthony Liguori
On 04/21/2010 12:57 AM, Yoshiaki Tamura wrote: Signed-off-by: Yoshiaki Tamuratamura.yoshi...@lab.ntt.co.jp No need for this. Regards, Anthony Liguori --- configure |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/configure b/configure index

Re: [RFC PATCH 19/20] Insert do_event_tap() to virtio-{blk, net}, comment out assert() on cpu_single_env temporally.

2010-04-22 Thread Anthony Liguori
On 04/21/2010 12:57 AM, Yoshiaki Tamura wrote: do_event_tap() is inserted to functions which actually fire outputs. By synchronizing VMs before outputs are fired, we can failover to the receiver upon failure. To save VM continuously, comment out assert() on cpu_single_env temporally.

Re: [UNTESTED] KVM: do not call kvm_set_irq from irq disabled section

2010-04-22 Thread Marcelo Tosatti
On Thu, Apr 22, 2010 at 09:11:30PM +0300, Gleb Natapov wrote: On Thu, Apr 22, 2010 at 01:40:38PM -0300, Marcelo Tosatti wrote: On Wed, Apr 21, 2010 at 09:38:39PM +0300, Gleb Natapov wrote: On Wed, Apr 21, 2010 at 03:29:11PM -0300, Marcelo Tosatti wrote: On Wed, Apr 21, 2010 at 08:58:48PM

Re: [RFC PATCH 00/20] Kemari for KVM v0.1

2010-04-22 Thread Anthony Liguori
On 04/21/2010 12:57 AM, Yoshiaki Tamura wrote: Hi all, We have been implementing the prototype of Kemari for KVM, and we're sending this message to share what we have now and TODO lists. Hopefully, we would like to get early feedback to keep us in the right direction. Although advanced

Re: [RFC PATCH 05/20] Introduce put_vector() and get_vector to QEMUFile and qemu_fopen_ops().

2010-04-22 Thread Anthony Liguori
On 04/21/2010 12:57 AM, Yoshiaki Tamura wrote: QEMUFile currently doesn't support writev(). For sending multiple data, such as pages, using writev() should be more efficient. Signed-off-by: Yoshiaki Tamuratamura.yoshi...@lab.ntt.co.jp Is there performance data that backs this up? Since

Re: [UNTESTED] KVM: do not call kvm_set_irq from irq disabled section

2010-04-22 Thread Gleb Natapov
On Thu, Apr 22, 2010 at 04:40:30PM -0300, Marcelo Tosatti wrote: On Thu, Apr 22, 2010 at 09:11:30PM +0300, Gleb Natapov wrote: On Thu, Apr 22, 2010 at 01:40:38PM -0300, Marcelo Tosatti wrote: On Wed, Apr 21, 2010 at 09:38:39PM +0300, Gleb Natapov wrote: On Wed, Apr 21, 2010 at 03:29:11PM

Re: [Qemu-devel] [RFC PATCH 00/20] Kemari for KVM v0.1

2010-04-22 Thread Dor Laor
On 04/22/2010 04:16 PM, Yoshiaki Tamura wrote: 2010/4/22 Dor Laordl...@redhat.com: On 04/22/2010 01:35 PM, Yoshiaki Tamura wrote: Dor Laor wrote: On 04/21/2010 08:57 AM, Yoshiaki Tamura wrote: Hi all, We have been implementing the prototype of Kemari for KVM, and we're sending this

using ftrace with kvm

2010-04-22 Thread David S. Ahern
I have a VM that is spinning (both vcpus at 100%). As I recall kvm_stat has been deprecated in favor or ftrace. Is there a wiki page or document that gives suggestions on this? David -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to

[PATCH RFC] KVM MMU: fix hashing for TDP and non-paging modes

2010-04-22 Thread Eric Northup
I've been reading the x86's mmu.c recently and had been wondering about something. Avi's recent mmu documentation (thanks!) seems to have confirmed my understanding of how the shadow paging is supposed to be working. In TDP mode, when mmu_alloc_roots() calls kvm_mmu_get_page(), why does it pass

Re: using ftrace with kvm

2010-04-22 Thread Manish Regmi
On Thu, Apr 22, 2010 at 3:53 PM, David S. Ahern daah...@cisco.com wrote: I have a VM that is spinning (both vcpus at 100%). As I recall kvm_stat has been deprecated in favor or ftrace. Is there a wiki page or document that gives suggestions on this? David Documentation/trace/* is the place to

Re: [PATCH RFC v2 6/6] KVM: introduce a new API for getting dirty bitmaps

2010-04-22 Thread Alexander Graf
On 22.04.2010, at 08:09, Fernando Luis Vázquez Cao wrote: On 04/22/2010 11:45 AM, Fernando Luis Vázquez Cao wrote: On 04/21/2010 06:41 PM, Alexander Graf wrote: On 21.04.2010, at 10:29, Fernando Luis Vázquez Cao wrote: On 04/20/2010 08:03 PM, Takuya Yoshikawa wrote: @@ -318,7 +318,7 @@

Re: [Qemu-devel] [RFC PATCH 00/20] Kemari for KVM v0.1

2010-04-22 Thread Yoshiaki Tamura
Jamie Lokier wrote: Yoshiaki Tamura wrote: Dor Laor wrote: On 04/21/2010 08:57 AM, Yoshiaki Tamura wrote: Event tapping is the core component of Kemari, and it decides on which event the primary should synchronize with the secondary. The basic assumption here is that outgoing I/O operations

Re: [RFC PATCH 00/20] Kemari for KVM v0.1

2010-04-22 Thread Yoshiaki Tamura
Anthony Liguori wrote: On 04/21/2010 12:57 AM, Yoshiaki Tamura wrote: Hi all, We have been implementing the prototype of Kemari for KVM, and we're sending this message to share what we have now and TODO lists. Hopefully, we would like to get early feedback to keep us in the right direction.

PXE Boot Timeout Issue...

2010-04-22 Thread Stuart Sheldon
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi all, Just upgraded to 12.3 user space tools from 11.0, and now when I attempt to netboot a guest, it appears that the pxe rom is timing out on dhcp before the bridge has enough time to come up. Is there a command line switch to set the dhcp

Re: [PATCH 1/5] Add a global synchronization point for pvclock

2010-04-22 Thread Zachary Amsden
On 04/22/2010 03:11 AM, Glauber Costa wrote: On Tue, Apr 20, 2010 at 12:42:17PM -0700, Jeremy Fitzhardinge wrote: On 04/20/2010 11:54 AM, Avi Kivity wrote: On 04/20/2010 09:23 PM, Jeremy Fitzhardinge wrote: On 04/20/2010 02:31 AM, Avi Kivity wrote: btw, do you

[RFC PATCH] asm-generic: bitops: introduce le bit offset macro

2010-04-22 Thread Takuya Yoshikawa
Although we can use *_le_bit() helpers to treat bitmaps le arranged, having le bit offset calculation as a seperate macro gives us more freedom. For example, KVM has le arranged dirty bitmaps for VGA, live-migration, etc. and we use them in user space too. To avoid bitmap copies between kernel

Re: [Qemu-devel] [RFC PATCH 00/20] Kemari for KVM v0.1

2010-04-22 Thread Yoshiaki Tamura
Anthony Liguori wrote: On 04/22/2010 08:16 AM, Yoshiaki Tamura wrote: 2010/4/22 Dor Laordl...@redhat.com: On 04/22/2010 01:35 PM, Yoshiaki Tamura wrote: Dor Laor wrote: On 04/21/2010 08:57 AM, Yoshiaki Tamura wrote: Hi all, We have been implementing the prototype of Kemari for KVM, and

Re: [RFC PATCH 01/20] Modify DIRTY_FLAG value and introduce DIRTY_IDX to use as indexes of bit-based phys_ram_dirty.

2010-04-22 Thread Yoshiaki Tamura
Anthony Liguori wrote: Hi, On 04/21/2010 12:57 AM, Yoshiaki Tamura wrote: Replaces byte-based phys_ram_dirty bitmap with four (MASTER, VGA, CODE, MIGRATION) bit-based phys_ram_dirty bitmap. On allocation, it sets all bits in the bitmap. It uses ffs() to convert DIRTY_FLAG to DIRTY_IDX.

Re: [RFC PATCH 15/20] Introduce FT mode support to configure.

2010-04-22 Thread Yoshiaki Tamura
Anthony Liguori wrote: On 04/21/2010 12:57 AM, Yoshiaki Tamura wrote: Signed-off-by: Yoshiaki Tamuratamura.yoshi...@lab.ntt.co.jp No need for this. OK. Regards, Anthony Liguori --- configure | 8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/configure

Re: [RFC PATCH 14/20] Upgrade QEMU_FILE_VERSION from 3 to 4, and introduce qemu_savevm_state_all().

2010-04-22 Thread Yoshiaki Tamura
Anthony Liguori wrote: On 04/21/2010 12:57 AM, Yoshiaki Tamura wrote: Make a 32bit entry after QEMU_VM_FILE_VERSION to recognize whether the transfered data is QEMU_VM_FT_MODE or QEMU_VM_LIVE_MIGRATION_MODE. I'd rather you encapsulate the current protocol as opposed to extending it with a new

Re: [RFC PATCH 05/20] Introduce put_vector() and get_vector to QEMUFile and qemu_fopen_ops().

2010-04-22 Thread Yoshiaki Tamura
Anthony Liguori wrote: On 04/21/2010 12:57 AM, Yoshiaki Tamura wrote: QEMUFile currently doesn't support writev(). For sending multiple data, such as pages, using writev() should be more efficient. Signed-off-by: Yoshiaki Tamuratamura.yoshi...@lab.ntt.co.jp Is there performance data that

Re: [PATCH 6/10] KVM MMU: don't write-protect if have new mapping to unsync page

2010-04-22 Thread Xiao Guangrong
Marcelo Tosatti wrote: role = vcpu-arch.mmu.base_role; @@ -1332,12 +1336,16 @@ static struct kvm_mmu_page *kvm_mmu_get_page(struct kvm_vcpu *vcpu, hlist_for_each_entry_safe(sp, node, tmp, bucket, hash_link) if (sp-gfn == gfn) { if (sp-unsync)

Re: [PATCH 1/3] KVM MMU: make kvm_mmu_zap_page() return the number of zapped sp in total.

2010-04-22 Thread Xiao Guangrong
Gui Jianfeng wrote: Currently, in kvm_mmu_change_mmu_pages(kvm, page), used_pages-- is performed after calling kvm_mmu_zap_page() in spite of that whether page is actually reclaimed. Because root sp won't be reclaimed by kvm_mmu_zap_page(). So making kvm_mmu_zap_page() return total

Re: [RFC PATCH 07/20] Introduce qemu_put_vector() and qemu_put_vector_prepare() to use put_vector() in QEMUFile.

2010-04-22 Thread Yoshiaki Tamura
Anthony Liguori wrote: On 04/21/2010 12:57 AM, Yoshiaki Tamura wrote: For fool proof purpose, qemu_put_vector_parepare should be called before qemu_put_vector. Then, if qemu_put_* functions except this is called after qemu_put_vector_prepare, program will abort(). Signed-off-by: Yoshiaki

Re: [RFC PATCH 10/20] Introduce skip_header parameter to qemu_loadvm_state() so that it can be called iteratively without reading the header.

2010-04-22 Thread Yoshiaki Tamura
Anthony Liguori wrote: On 04/21/2010 12:57 AM, Yoshiaki Tamura wrote: Signed-off-by: Yoshiaki Tamuratamura.yoshi...@lab.ntt.co.jp I think the more appropriate thing to do is have qemu_savevm_state_complete() not write QEMU_VM_EOF when doing a continuous live migration. You would then want

Re: [RFC PATCH 19/20] Insert do_event_tap() to virtio-{blk, net}, comment out assert() on cpu_single_env temporally.

2010-04-22 Thread Yoshiaki Tamura
Anthony Liguori wrote: On 04/21/2010 12:57 AM, Yoshiaki Tamura wrote: do_event_tap() is inserted to functions which actually fire outputs. By synchronizing VMs before outputs are fired, we can failover to the receiver upon failure. To save VM continuously, comment out assert() on cpu_single_env

  1   2   >