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

2010-04-23 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] [RFC PATCH 00/20] Kemari for KVM v0.1

2010-04-23 Thread Fernando Luis Vázquez Cao
On 04/23/2010 02:17 PM, Yoshiaki Tamura wrote: Dor Laor wrote: [...] Second, even if it wasn't the case, the tsc delta and kvmclock are synchronized as part of the VM state so there is no use of trapping it in the middle. I should study the clock in KVM, but won't tsc get updated by the HW

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

2010-04-23 Thread Gui Jianfeng
Gui Jianfeng wrote: Take sp level into account when calculating quadrant, because only when level == PT_PAGE_TABLE_LEVEL, quadrant is needed. Please ignore this patch, Sorry for the noise. Gui Signed-off-by: Gui Jianfeng guijianf...@cn.fujitsu.com --- arch/x86/kvm/mmu.c |3 ++- 1

Re: PXE Boot Timeout Issue...

2010-04-23 Thread Stefan Hajnoczi
On Fri, Apr 23, 2010 at 1:45 AM, Stuart Sheldon s...@actusa.net wrote: 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

[PATCH] KVM: no need to test bit before setting dirty bit these days

2010-04-23 Thread Takuya Yoshikawa
As Avi pointed out, testing bit part in mark_page_dirty() was important in the days of shadow paging, but currently EPT and NPT has already become common and the chance of faulting a page more that once per iteration is small. So let's remove the test bit to avoid extra access. Signed-off-by:

Re: how to tweak kernel to get the best out of kvm?

2010-04-23 Thread Alec Istomin
Hi there! I'm trying to understand kvm performance bottleneck and I was hoping to get sharing statistics form ksm. Was not able to locate it so far, the below mentioned /sys entry is missing, while ksm module is loaded. I'm using latest from rhel 5 x64: 2.6.18-194.el5, kmod-kvm-83-164.el5 and I'm

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

2010-04-23 Thread Avi Kivity
On 04/23/2010 04:44 AM, Zachary Amsden wrote: Or apply this patch. time-warp.patch diff -rup a/time-warp-test.c b/time-warp-test.c --- a/time-warp-test.c 2010-04-15 16:30:13.955981607 -1000 +++ b/time-warp-test.c 2010-04-15 16:35:37.777982377 -1000 @@ -91,7 +91,7 @@ static inline unsigned

Linux Plumbers Conference 2010 - call for tracks

2010-04-23 Thread Jes Sorensen
Hi, I am organizing a Virtualization track at LPC 2010 (Linux Plumbers Conference 2010). Please see the official call for tracks below. LPC is particular well suited for work in progress and subjects that needs discussion and collaboration between communities, for example between KVM/QEMU and

Re: [RFC PATCH 04/20] Make QEMUFile buf expandable, and introduce qemu_realloc_buffer() and qemu_clear_buffer().

2010-04-23 Thread Avi Kivity
On 04/21/2010 08:57 AM, Yoshiaki Tamura wrote: Currently buf size is fixed at 32KB. It would be useful if it could be flexible. Why is this needed? The real buffering is in the kernel anyways; this is only used to reduce the number of write() syscalls. -- Do not meddle in the

Re: [RFC PATCH 04/20] Make QEMUFile buf expandable, and introduce qemu_realloc_buffer() and qemu_clear_buffer().

2010-04-23 Thread Yoshiaki Tamura
Avi Kivity wrote: On 04/21/2010 08:57 AM, Yoshiaki Tamura wrote: Currently buf size is fixed at 32KB. It would be useful if it could be flexible. Why is this needed? The real buffering is in the kernel anyways; this is only used to reduce the number of write() syscalls. This was introduced

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

2010-04-23 Thread Fernando Luis Vázquez Cao
On 04/23/2010 08:29 AM, Alexander Graf wrote: 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,

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

2010-04-23 Thread Alexander Graf
On 23.04.2010, at 12:17, Fernando Luis Vázquez Cao wrote: On 04/23/2010 08:29 AM, Alexander Graf wrote: 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

Re: [PATCH] KVM: Document mmu

2010-04-23 Thread Avi Kivity
On 04/22/2010 11:16 PM, Marcelo Tosatti wrote: Looks good otherwise. Perhaps add a pointer to Joerg's NPT slides, although they're AMD specific. Fixed all the comments, added a Further reading section and applied. Note that this is still complete (example: large pages); patches

Re: [PATCH] KVM: Document mmu

2010-04-23 Thread Avi Kivity
On 04/23/2010 10:12 AM, Gui Jianfeng wrote: +Guest memory (gpa) is part of user address space of the process that is using +kvm. Userspace defines the translation between guest addresses and user +addresses (gpa-gva); note that two gpas may alias to the same gva, but not Do you mean

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

2010-04-23 Thread Avi Kivity
On 04/22/2010 11:57 AM, Takuya Yoshikawa wrote: And about x86_32 copy_in_user(). They are using copy_user_generic() which is implemented only for 64bit. So I'll show them current copy_from_user() and copy_to_user() version and see their response. If rejected, though I hope not, please give

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

2010-04-23 Thread Avi Kivity
On 04/22/2010 12:07 PM, Takuya Yoshikawa wrote: + slots-memslots[i].dirty_bitmap = NULL; + slots-memslots[i].dirty_bitmap_old = NULL; kvm_free_physmem_slot(slots-memslots[i], NULL); + } +/* + * Please use generic *_user bitops once they become available. + * Be careful setting the bit

Re: [PATCH] KVM: no need to test bit before setting dirty bit these days

2010-04-23 Thread Avi Kivity
On 04/23/2010 11:48 AM, Takuya Yoshikawa wrote: As Avi pointed out, testing bit part in mark_page_dirty() was important in the days of shadow paging, but currently EPT and NPT has already become common and the chance of faulting a page more that once per iteration is small. So let's remove the

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

2010-04-23 Thread Avi Kivity
On 04/22/2010 01:27 PM, Liu Yu-B13201 wrote: I met this error when built kernel. Anything wrong? CC init/main.o In file included from include/linux/ftrace_event.h:8, from include/trace/syscall.h:6, from include/linux/syscalls.h:75,

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

2010-04-23 Thread Avi Kivity
On 04/22/2010 10:55 PM, Gleb Natapov wrote: What about converting PIC/IOAPIC mutexes into spinlocks? Works for me, but on large guests the spinning will be noticeable. I believe. For interrupts going through IOPIC, but we know this is not scalable anyway. Yes. We also

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

2010-04-23 Thread Avi Kivity
On 04/23/2010 12:15 AM, Eric Northup wrote: 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. Wasn't it a lot more fun to

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

2010-04-23 Thread Takuya Yoshikawa
(2010/04/23 19:28), Avi Kivity wrote: OK, I will do in the next version. In this RFC, I would be happy if I can know the overall design is right or not. Everything looks reasonable to me. Thank you! Do you have performance numbers? I'm interested in both measurements of

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

2010-04-23 Thread Avi Kivity
On 04/22/2010 09:12 AM, Xiao Guangrong wrote: If the guest is 32-bit, we should use 'quadrant' to adjust gpa offset Good catch. Only affects kvm_mmu_pte_write(), so I don't think this had ill effects other than not prefetching the correct address? @@ -478,9 +478,14 @@ static void

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

2010-04-23 Thread Avi Kivity
On 04/22/2010 09:12 AM, Xiao Guangrong wrote: 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 Guangrongxiaoguangr...@cn.fujitsu.com ---

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

2010-04-23 Thread Yoshiaki Tamura
2010/4/23 Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp: (2010/04/23 19:28), Avi Kivity wrote: OK, I will do in the next version. In this RFC, I would be happy if I can know the overall design is right or not. Everything looks reasonable to me. Thank you! Do you have performance

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

2010-04-23 Thread Avi Kivity
On 04/22/2010 09:13 AM, 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 Sorry, I don't understand this patch. Can you clarify?

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

2010-04-23 Thread Avi Kivity
On 04/23/2010 02:27 PM, Avi Kivity wrote: On 04/22/2010 09:12 AM, Xiao Guangrong wrote: 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 I think we should keep it in -

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

2010-04-23 Thread Avi Kivity
On 04/23/2010 02:14 PM, Takuya Yoshikawa wrote: Do you have performance numbers? I'm interested in both measurements of KVM_SWITCH_DIRTY_LOG under various conditions and macro benchmarks (for example, total guest throughput improvement under Kemari). Currently, I'm just checking the

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

2010-04-23 Thread Avi Kivity
On 04/23/2010 01:20 PM, Alexander Graf wrote: I would say the reason is that if we did not convert the user-space pointer to a void * kvm_get_dirty_log() would end up copying the dirty log to (log-dirty_bitmap 32) | 0x Well yes, that was the problem. If we always set the __u64

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

2010-04-23 Thread Avi Kivity
On 04/22/2010 12:34 PM, Takuya Yoshikawa wrote: 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 { +

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

2010-04-23 Thread Xiao Guangrong
Avi Kivity wrote: On 04/22/2010 09:12 AM, Xiao Guangrong wrote: If the guest is 32-bit, we should use 'quadrant' to adjust gpa offset Good catch. Only affects kvm_mmu_pte_write(), so I don't think this had ill effects other than not prefetching the correct address? Yes @@

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

2010-04-23 Thread Avi Kivity
On 04/22/2010 09:13 AM, Xiao Guangrong wrote: 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 This is something I wanted for a long time. -- Do not meddle in the

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

2010-04-23 Thread Avi Kivity
On 04/23/2010 03:05 PM, Xiao Guangrong wrote: @@ -478,9 +478,14 @@ static void FNAME(invlpg)(struct kvm_vcpu *vcpu, gva_t gva) ((level == PT_DIRECTORY_LEVEL is_large_pte(*sptep))) || ((level == PT_PDPE_LEVEL is_large_pte(*sptep { struct

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

2010-04-23 Thread Alexander Graf
On 23.04.2010, at 13:57, Avi Kivity wrote: On 04/23/2010 01:20 PM, Alexander Graf wrote: I would say the reason is that if we did not convert the user-space pointer to a void * kvm_get_dirty_log() would end up copying the dirty log to (log-dirty_bitmap 32) | 0x Well

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

2010-04-23 Thread Arnd Bergmann
On Friday 23 April 2010, Avi Kivity wrote: On 04/23/2010 01:20 PM, Alexander Graf wrote: I would say the reason is that if we did not convert the user-space pointer to a void * kvm_get_dirty_log() would end up copying the dirty log to (log-dirty_bitmap 32) | 0x

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

2010-04-23 Thread Avi Kivity
On 04/23/2010 03:27 PM, Arnd Bergmann wrote: Using a 64-bit integer avoids the problem (though perhaps not sufficient for s390, Arnd?) When there is only a __u64 for the address, it will work on s390 as well, gcc is smart enough to clear the upper bit on a cast from long to pointer.

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

2010-04-23 Thread Arnd Bergmann
On Friday 23 April 2010, Avi Kivity wrote: On 04/23/2010 03:27 PM, Arnd Bergmann wrote: Using a 64-bit integer avoids the problem (though perhaps not sufficient for s390, Arnd?) When there is only a __u64 for the address, it will work on s390 as well, gcc is smart enough to

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

2010-04-23 Thread Avi Kivity
On 04/23/2010 03:46 PM, Arnd Bergmann wrote: On Friday 23 April 2010, Avi Kivity wrote: On 04/23/2010 03:27 PM, Arnd Bergmann wrote: Using a 64-bit integer avoids the problem (though perhaps not sufficient for s390, Arnd?) When there is only a __u64 for the

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

2010-04-23 Thread Alexander Graf
On 23.04.2010, at 14:53, Avi Kivity wrote: On 04/23/2010 03:46 PM, Arnd Bergmann wrote: On Friday 23 April 2010, Avi Kivity wrote: On 04/23/2010 03:27 PM, Arnd Bergmann wrote: Using a 64-bit integer avoids the problem (though perhaps not sufficient for s390, Arnd?)

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

2010-04-23 Thread Chris Lalancette
On 04/23/2010 07:05 AM, Avi Kivity wrote: On 04/22/2010 10:55 PM, Gleb Natapov wrote: What about converting PIC/IOAPIC mutexes into spinlocks? Works for me, but on large guests the spinning will be noticeable. I believe. For interrupts going through IOPIC, but we know this

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

2010-04-23 Thread Anthony Liguori
On 04/22/2010 07:45 PM, Yoshiaki Tamura wrote: Anthony Liguori wrote: I think it would make sense to separate out the things that are actually optimizations (like the dirty bitmap changes and the writev/readv changes) and to attempt to justify them with actual performance data. I agree with

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

2010-04-23 Thread Arnd Bergmann
On Friday 23 April 2010, Avi Kivity wrote: Ah so the 31st bit is optional as far as userspace is concerned? What does it mean? (just curious) On data pointers it's ignored. When you branch to a function, this bit determines whether the target function is run in 24 or 31 bit mode. This allows

Re: [RFC PATCH 04/20] Make QEMUFile buf expandable, and introduce qemu_realloc_buffer() and qemu_clear_buffer().

2010-04-23 Thread Avi Kivity
On 04/23/2010 12:59 PM, Yoshiaki Tamura wrote: Avi Kivity wrote: On 04/21/2010 08:57 AM, Yoshiaki Tamura wrote: Currently buf size is fixed at 32KB. It would be useful if it could be flexible. Why is this needed? The real buffering is in the kernel anyways; this is only used to reduce the

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

2010-04-23 Thread Anthony Liguori
On 04/22/2010 08:53 PM, Yoshiaki Tamura wrote: 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

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

2010-04-23 Thread Avi Kivity
On 04/23/2010 03:59 PM, Alexander Graf wrote: Ah so the 31st bit is optional as far as userspace is concerned? What does it mean? (just curious) The 0x8000 bit declares that a pointer is in 24-bit mode, so that applications can use the spare upper bits for random data. See

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

2010-04-23 Thread Anthony Liguori
On 04/22/2010 10:37 PM, Yoshiaki Tamura wrote: 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

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

2010-04-23 Thread Anthony Liguori
On 04/22/2010 11:02 PM, Yoshiaki Tamura wrote: 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,

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

2010-04-23 Thread Avi Kivity
On 04/21/2010 08:57 AM, Yoshiaki Tamura wrote: Kemari starts synchronizing VMs when QEMU handles I/O requests. Without this patch VCPU state is already proceeded before synchronization, and after failover to the VM on the receiver, it hangs because of this. We discussed moving the barrier

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

2010-04-23 Thread Xiao Guangrong
Avi Kivity wrote: On 04/23/2010 02:27 PM, Avi Kivity wrote: On 04/22/2010 09:12 AM, Xiao Guangrong wrote: 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 I think we

Re: [RFC PATCH 04/20] Make QEMUFile buf expandable, and introduce qemu_realloc_buffer() and qemu_clear_buffer().

2010-04-23 Thread Anthony Liguori
On 04/23/2010 04:53 AM, Avi Kivity wrote: On 04/21/2010 08:57 AM, Yoshiaki Tamura wrote: Currently buf size is fixed at 32KB. It would be useful if it could be flexible. Why is this needed? The real buffering is in the kernel anyways; this is only used to reduce the number of write()

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

2010-04-23 Thread Avi Kivity
On 04/23/2010 04:21 PM, Xiao Guangrong wrote: OK, i'll keep invlpg code in paging_tmpl.h and directly call FNAME(update_pte). But, i don't see mmu_guess_page_from_pte_write() code depends on pte size. :-( It doesn't indeed, I misremembered. It's mmu_pte_write_new_pte() (which is no

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

2010-04-23 Thread Avi Kivity
On 04/23/2010 04:02 PM, Chris Lalancette wrote: On 04/23/2010 07:05 AM, Avi Kivity wrote: On 04/22/2010 10:55 PM, Gleb Natapov wrote: What about converting PIC/IOAPIC mutexes into spinlocks? Works for me, but on large guests the spinning will be noticeable. I

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

2010-04-23 Thread Alexander Graf
Hey Joerg, On 22.04.2010, at 12:33, 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

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

2010-04-23 Thread Alexander Graf
On 22.04.2010, at 12:33, Joerg Roedel wrote: 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

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

2010-04-23 Thread Alexander Graf
On 22.04.2010, at 13:04, Avi Kivity wrote: 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.

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

2010-04-23 Thread Avi Kivity
On 04/23/2010 04:22 PM, Anthony Liguori wrote: I currently don't have data, but I'll prepare it. There were two things I wanted to avoid. 1. Pages to be copied to QEMUFile buf through qemu_put_buffer. 2. Calling write() everytime even when we want to send multiple pages at once. I think 2

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

2010-04-23 Thread Alexander Graf
On 22.04.2010, at 12:33, Joerg Roedel wrote: 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

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

2010-04-23 Thread Alexander Graf
On 22.04.2010, at 12:33, Joerg Roedel wrote: This patch implements propagation of a failes guest vmrun back into the guest instead of killing the whole guest. Oh, nice one. Ack. Alex -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to

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

2010-04-23 Thread Alexander Graf
On 22.04.2010, at 12:33, Joerg Roedel wrote: 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 Please don't CC stable. There is a

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

2010-04-23 Thread Alexander Graf
On 22.04.2010, at 12:33, Joerg Roedel wrote: 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 Again,

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

2010-04-23 Thread Alexander Graf
On 22.04.2010, at 12:33, Joerg Roedel wrote: 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

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

2010-04-23 Thread Alexander Graf
On 22.04.2010, at 12:33, Joerg Roedel wrote: This patch prevents MCE intercepts from being propagated into the L1 guest if they happened in an L2 guest. Good catch. How did you stumble over this? Ack. Alex -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a

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

2010-04-23 Thread Avi Kivity
On 04/23/2010 04:52 PM, Alexander Graf wrote: On 22.04.2010, at 12:33, Joerg Roedel wrote: 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:

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

2010-04-23 Thread Joerg Roedel
On Fri, Apr 23, 2010 at 03:46:07PM +0200, Alexander Graf wrote: On 22.04.2010, at 12:33, Joerg Roedel wrote: 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

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

2010-04-23 Thread Joerg Roedel
On Fri, Apr 23, 2010 at 03:50:20PM +0200, Alexander Graf wrote: On 22.04.2010, at 12:33, Joerg Roedel wrote: 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

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

2010-04-23 Thread Alexander Graf
On 23.04.2010, at 16:13, Joerg Roedel wrote: On Fri, Apr 23, 2010 at 03:46:07PM +0200, Alexander Graf wrote: On 22.04.2010, at 12:33, Joerg Roedel wrote: 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

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

2010-04-23 Thread Alexander Graf
On 23.04.2010, at 16:17, Joerg Roedel wrote: On Fri, Apr 23, 2010 at 03:50:20PM +0200, Alexander Graf wrote: On 22.04.2010, at 12:33, Joerg Roedel wrote: This patch syncs cr0 and cr3 from the vmcb to the kvm state before nested intercept handling is done. This allows to simplify the

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

2010-04-23 Thread Joerg Roedel
On Fri, Apr 23, 2010 at 03:55:15PM +0200, Alexander Graf wrote: On 22.04.2010, at 12:33, Joerg Roedel wrote: static void svm_set_supported_cpuid(u32 func, struct kvm_cpuid_entry2 *entry) { + switch (func) { + case 0x800A: + entry-eax = 1; /* SVM revision 1 */ +

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

2010-04-23 Thread Joerg Roedel
On Fri, Apr 23, 2010 at 04:19:40PM +0200, Alexander Graf wrote: On 23.04.2010, at 16:13, Joerg Roedel wrote: On Fri, Apr 23, 2010 at 03:46:07PM +0200, Alexander Graf wrote: On 22.04.2010, at 12:33, Joerg Roedel wrote: The patch introducing nested nmi handling had a bug. The

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

2010-04-23 Thread Alexander Graf
On 23.04.2010, at 16:22, Joerg Roedel wrote: On Fri, Apr 23, 2010 at 04:19:40PM +0200, Alexander Graf wrote: On 23.04.2010, at 16:13, Joerg Roedel wrote: On Fri, Apr 23, 2010 at 03:46:07PM +0200, Alexander Graf wrote: On 22.04.2010, at 12:33, Joerg Roedel wrote: The patch

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

2010-04-23 Thread Joerg Roedel
On Fri, Apr 23, 2010 at 03:57:32PM +0200, Alexander Graf wrote: On 22.04.2010, at 12:33, Joerg Roedel wrote: 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

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

2010-04-23 Thread Joerg Roedel
On Fri, Apr 23, 2010 at 03:58:18PM +0200, Alexander Graf wrote: On 22.04.2010, at 12:33, Joerg Roedel wrote: This patch prevents MCE intercepts from being propagated into the L1 guest if they happened in an L2 guest. Good catch. How did you stumble over this? While thinking about

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

2010-04-23 Thread Joerg Roedel
On Fri, Apr 23, 2010 at 04:24:54PM +0200, Alexander Graf wrote: On 23.04.2010, at 16:22, Joerg Roedel wrote: No, nested_svm_nmi runs in atomic context where we can't emulate a vmexit. We set exit_required and emulate the vmexit later. So we modify the L2 rflags and then trigger a

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

2010-04-23 Thread Alexander Graf
On 23.04.2010, at 16:27, Joerg Roedel wrote: On Fri, Apr 23, 2010 at 03:57:32PM +0200, Alexander Graf wrote: On 22.04.2010, at 12:33, Joerg Roedel wrote: This patch adds logic to kvm/x86 which allows to mark an injected exception as reinjected. This allows to remove an ugly hack from

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

2010-04-23 Thread Alexander Graf
On 23.04.2010, at 16:31, Joerg Roedel wrote: On Fri, Apr 23, 2010 at 04:24:54PM +0200, Alexander Graf wrote: On 23.04.2010, at 16:22, Joerg Roedel wrote: No, nested_svm_nmi runs in atomic context where we can't emulate a vmexit. We set exit_required and emulate the vmexit later. So we

kvm apparently still has issues with blockdev 1Tb

2010-04-23 Thread Michael Tokarev
Not many details, but JFYI: at least 0.12 still has issues (leads to silent data corruption) with block devices of size = 1Tb. There were several such cases reported on #...@oftc in last two months. Usually reducing the device size to something less than 1Tb solves that issue (i.e., stops new

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

2010-04-23 Thread Joerg Roedel
On Fri, Apr 23, 2010 at 04:42:52PM +0200, Alexander Graf wrote: On 23.04.2010, at 16:31, Joerg Roedel wrote: On Fri, Apr 23, 2010 at 04:24:54PM +0200, Alexander Graf wrote: On 23.04.2010, at 16:22, Joerg Roedel wrote: No, nested_svm_nmi runs in atomic context where we can't

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

2010-04-23 Thread Jamie Lokier
Yoshiaki Tamura wrote: 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

Mount and unmount CD

2010-04-23 Thread Matt Burkhardt
I'm having a problem with a virtual machine running under RHEL 5.4 64-bit. I take out the CD / insert a new and the main machine sees the new cd and makes it available. However, the virtual machines still see the old CD. I've tried mounting the new CD, but it just keeps mounting what it thinks

Re: PXE Boot Timeout Issue...

2010-04-23 Thread Stuart Sheldon
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Stefan Hajnoczi wrote: On Fri, Apr 23, 2010 at 1:45 AM, Stuart Sheldon s...@actusa.net wrote: 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

RHEL5.5, 32-bit VM repeatedly locks up due to kvmclock

2010-04-23 Thread David S. Ahern
After a few days of debugging I think kvmclock is the source of lockups for a RHEL5.5-based VM. The VM works fine on one host, but repeatedly locks up on another. Server 1 - VM locks up repeatedly -- DL580 G5 -- 4 quad-core X7350 processors at 2.93GHz -- 48GB RAM Server 2 - VM works just fine --

[uq/master patch 1/5] vga: fix typo in length passed to kvm_log_stop

2010-04-23 Thread Marcelo Tosatti
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Index: qemu-kvm/hw/vga.c === --- qemu-kvm.orig/hw/vga.c +++ qemu-kvm/hw/vga.c @@ -1613,8 +1613,8 @@ void vga_dirty_log_stop(VGACommonState * kvm_log_stop(s-map_addr,

[uq/master patch 0/5] prepare for qemu-kvm's usage of upstream memslot code

2010-04-23 Thread Marcelo Tosatti
-- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: PXE Boot Timeout Issue...

2010-04-23 Thread Stuart Sheldon
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Jim Paris wrote: Stuart Sheldon wrote: Stefan Hajnoczi wrote: On Fri, Apr 23, 2010 at 1:45 AM, Stuart Sheldon s...@actusa.net wrote: Just upgraded to 12.3 user space tools from 11.0, and now when I attempt to netboot a guest, it appears that

Re: [PATCH v4] Shared memory uio_pci driver

2010-04-23 Thread Cam Macdonell
On Mon, Apr 12, 2010 at 2:57 PM, Avi Kivity a...@redhat.com wrote: There is work now to bring msi to the generic pci 2.3 driver, perhaps we can use that instead.  From a quick look it looks fine. I'd be interested to follow this development. I can't find anything on LKML, is it being

Re: Mount and unmount CD

2010-04-23 Thread David S. Ahern
I saw this with RHEL5.3. I ended up hacking qemu to re_open the CD every so often. See attached. David On 04/23/2010 09:10 AM, Matt Burkhardt wrote: I'm having a problem with a virtual machine running under RHEL 5.4 64-bit. I take out the CD / insert a new and the main machine sees the new

Re: Mount and unmount CD

2010-04-23 Thread David S. Ahern
oops. the previous patch rides on top of this one. David On 04/23/2010 12:18 PM, David S. Ahern wrote: I saw this with RHEL5.3. I ended up hacking qemu to re_open the CD every so often. See attached. David On 04/23/2010 09:10 AM, Matt Burkhardt wrote: I'm having a problem with a

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

2010-04-23 Thread Alexander Graf
On 23.04.2010, at 16:51, Joerg Roedel wrote: On Fri, Apr 23, 2010 at 04:42:52PM +0200, Alexander Graf wrote: On 23.04.2010, at 16:31, Joerg Roedel wrote: On Fri, Apr 23, 2010 at 04:24:54PM +0200, Alexander Graf wrote: On 23.04.2010, at 16:22, Joerg Roedel wrote: No, nested_svm_nmi

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

2010-04-23 Thread Alexander Graf
On 22.04.2010, at 13:04, Avi Kivity wrote: 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.

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

2010-04-23 Thread Jeremy Fitzhardinge
On 04/23/2010 02:34 AM, Avi Kivity wrote: diff -rup a/time-warp-test.c b/time-warp-test.c --- a/time-warp-test.c2010-04-15 16:30:13.955981607 -1000 +++ b/time-warp-test.c2010-04-15 16:35:37.777982377 -1000 @@ -91,7 +91,7 @@ static inline unsigned long long __rdtsc {

Re: PXE Boot Timeout Issue...

2010-04-23 Thread Stefan Hajnoczi
For reference, my libvirt managed virbr0 has forwarding delay 0. This is the default: http://libvirt.org/formatnetwork.html#elementsConnect I know that my VM is a leaf node (it only has one NIC and isn't going to create a loop in the network) and therefore it makes sense to eliminate the

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

2010-04-23 Thread Avi Kivity
On 04/23/2010 10:22 PM, Jeremy Fitzhardinge wrote: On 04/23/2010 02:34 AM, Avi Kivity wrote: diff -rup a/time-warp-test.c b/time-warp-test.c --- a/time-warp-test.c2010-04-15 16:30:13.955981607 -1000 +++ b/time-warp-test.c2010-04-15 16:35:37.777982377 -1000 @@ -91,7 +91,7 @@ static

[PATCHv5] add mergeable receiver buffers support to vhost

2010-04-23 Thread David L Stevens
This patch adds mergeable receive buffers support to vhost. Signed-off-by: David L Stevens dlstev...@us.ibm.com diff -ruNp net-next-v0/drivers/vhost/net.c net-next-v5/drivers/vhost/net.c --- net-next-v0/drivers/vhost/net.c 2010-04-22 11:31:57.0 -0700 +++

Don't confine mouse on grab

2010-04-23 Thread Harald Braumann
Hi, I'd like to propose a small change in the grab behaviour of the SDL window: Currently, when the mouse is moved over the window, the guest mouse is moved as well and the guest receives keyboard input (using absolute mouse here and focus-follow-mouse). However, the keyboard is not grabbed, and

questions about implementing a zero-copy solution to transfer data between VMs

2010-04-23 Thread JinShan Xiong
Hi all, Probably this is a stale question because I heard of we've already had some this kind of patches. I want to implement a zero-copy mechanism to transfer data between VMs. From what I've investigated, it's quite easy at sender side, because virtio is good at sharing data pages from VM to

Re: RHEL5.5, 32-bit VM repeatedly locks up due to kvmclock

2010-04-23 Thread Brian Jackson
On Friday 23 April 2010 12:08:22 David S. Ahern wrote: After a few days of debugging I think kvmclock is the source of lockups for a RHEL5.5-based VM. The VM works fine on one host, but repeatedly locks up on another. Server 1 - VM locks up repeatedly -- DL580 G5 -- 4 quad-core X7350

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

2010-04-23 Thread Zachary Amsden
On 04/22/2010 11:34 PM, Avi Kivity wrote: On 04/23/2010 04:44 AM, Zachary Amsden wrote: Or apply this patch. time-warp.patch diff -rup a/time-warp-test.c b/time-warp-test.c --- a/time-warp-test.c2010-04-15 16:30:13.955981607 -1000 +++ b/time-warp-test.c2010-04-15 16:35:37.777982377

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

2010-04-23 Thread Jeremy Fitzhardinge
On 04/23/2010 02:31 PM, Zachary Amsden wrote: Does lfence / mfence actually serialize? I thought there was some great confusion about that not being the case on all AMD processors, and possibly not at all on Intel. A trap, however is a great way to serialize. I think, there is no

Re: RHEL5.5, 32-bit VM repeatedly locks up due to kvmclock

2010-04-23 Thread Zachary Amsden
On 04/23/2010 10:39 AM, Brian Jackson wrote: On Friday 23 April 2010 12:08:22 David S. Ahern wrote: After a few days of debugging I think kvmclock is the source of lockups for a RHEL5.5-based VM. The VM works fine on one host, but repeatedly locks up on another. Server 1 - VM locks up

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

2010-04-23 Thread Zachary Amsden
On 04/23/2010 11:35 AM, Jeremy Fitzhardinge wrote: On 04/23/2010 02:31 PM, Zachary Amsden wrote: Does lfence / mfence actually serialize? I thought there was some great confusion about that not being the case on all AMD processors, and possibly not at all on Intel. A trap, however is a

Re: RHEL5.5, 32-bit VM repeatedly locks up due to kvmclock

2010-04-23 Thread David S. Ahern
On 04/23/2010 03:39 PM, Zachary Amsden wrote: On 04/23/2010 10:39 AM, Brian Jackson wrote: On Friday 23 April 2010 12:08:22 David S. Ahern wrote: After a few days of debugging I think kvmclock is the source of lockups for a RHEL5.5-based VM. The VM works fine on one host, but repeatedly

  1   2   >