[RFC v2 PATCH] kvm tools, qcow: Add the support for copy-on-write clusters

2011-11-18 Thread Lan Tianyu
When meeting request to write the cluster without copied flag, allocate a new cluster and write original data with modification to the new cluster. This also adds support for the writing operation of the qcow2 compressed image. After testing, image file can pass through qemu-img check. Please

[PATCH v2 0/6] KVM: optimize memslots searching

2011-11-18 Thread Xiao Guangrong
This is the more work base on my v1 patchset which is posted some months ago, it can be found at: https://lkml.org/lkml/2011/2/22/68 Change log: - sort memslots base on its size and do the line search instead of binary search base on gfn, it is from Avi's idea. - in order to reduce cache

[PATCH v2 1/6] KVM: introduce KVM_MEM_SLOTS_NUM macro

2011-11-18 Thread Xiao Guangrong
Introduce KVM_MEM_SLOTS_NUM macro to instead of KVM_MEMORY_SLOTS + KVM_PRIVATE_MEM_SLOTS Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/include/asm/kvm_host.h |4 +++- arch/x86/kvm/mmu.c |2 +- include/linux/kvm_host.h|7 +--

[PATCH v2 2/6] KVM: introduce update_memslots function

2011-11-18 Thread Xiao Guangrong
Introduce update_memslots to update slot which will be update to kvm-memslots Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/x86.c |2 +- include/linux/kvm_host.h |1 + virt/kvm/kvm_main.c | 22 +++--- 3 files changed, 17

[PATCH v2 3/6] KVM: introduce kvm_for_each_memslot macro

2011-11-18 Thread Xiao Guangrong
Introduce kvm_for_each_memslot to walk all valid memslot Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/ia64/kvm/kvm-ia64.c |4 +--- arch/x86/kvm/mmu.c |9 + include/linux/kvm_host.h |4 virt/kvm/iommu.c | 13 +++--

[PATCH v2 4/6] KVM: introduce id_to_memslot function

2011-11-18 Thread Xiao Guangrong
Introduce id_to_memslot to get memslot by slot id Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/ia64/kvm/kvm-ia64.c |2 +- arch/powerpc/kvm/book3s.c |2 +- arch/x86/kvm/vmx.c|6 -- arch/x86/kvm/x86.c|8 +---

[PATCH v2 5/6] KVM: sort memslots by its size and use line search

2011-11-18 Thread Xiao Guangrong
Sort memslots base on its size and use line search to find it, so the larger memslots have better fit The idea is from Avi Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- include/linux/kvm_host.h | 22 +--- virt/kvm/kvm_main.c | 82

[PATCH] vhost-net: Acquire device lock when releasing device

2011-11-18 Thread Sasha Levin
Device lock should be held when releasing a device, and specifically when calling vhost_dev_cleanup(). Otherwise, RCU complains about it: [ 2025.642835] === [ 2025.643838] [ INFO: suspicious RCU usage. ] [ 2025.645182] --- [ 2025.645927]

[PATCH v2 6/6] KVM: introduce a table to map slot id to index in memslots arry

2011-11-18 Thread Xiao Guangrong
The operation of getting dirty log is frequency When framebuffer-based displays are used(for example, Xwindow), so, we introduce a mapping table to speed up id_to_memslot() Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- include/linux/kvm_host.h | 13 +++--

Re: [PATCH v2 0/6] KVM: optimize memslots searching

2011-11-18 Thread Sasha Levin
On Fri, 2011-11-18 at 17:16 +0800, Xiao Guangrong wrote: This is the more work base on my v1 patchset which is posted some months ago, it can be found at: https://lkml.org/lkml/2011/2/22/68 Change log: - sort memslots base on its size and do the line search instead of binary search base

Re: [PATCH v2 6/6] KVM: introduce a table to map slot id to index in memslots arry

2011-11-18 Thread Sasha Levin
On Fri, 2011-11-18 at 17:20 +0800, Xiao Guangrong wrote: The operation of getting dirty log is frequency When framebuffer-based displays are used(for example, Xwindow), so, we introduce a mapping table to speed up id_to_memslot() Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com

Re: [PATCH v2 0/6] KVM: optimize memslots searching

2011-11-18 Thread Xiao Guangrong
On 11/18/2011 05:41 PM, Sasha Levin wrote: autotest for RHEL.6.1 setup/boot/reboot/shutdown(average): ept=1: before: 449.5 after: 447.8 ept=0: before: 532.7 after: 529.8 kernbench(average): ept=1: before: 127.94 after: 126.98 ept=0: before: 196.85 after:

Re: [PATCH v2 6/6] KVM: introduce a table to map slot id to index in memslots arry

2011-11-18 Thread Xiao Guangrong
On 11/18/2011 05:45 PM, Sasha Levin wrote: struct kvm { @@ -340,14 +342,13 @@ static inline struct kvm_memslots *kvm_memslots(struct kvm *kvm) static inline struct kvm_memory_slot * id_to_memslot(struct kvm_memslots *slots, int id) { -int i; +int index =

Re: [RFC v2 PATCH] kvm tools, qcow: Add the support for copy-on-write clusters

2011-11-18 Thread Kevin Wolf
Am 18.11.2011 09:47, schrieb Lan Tianyu: When meeting request to write the cluster without copied flag, allocate a new cluster and write original data with modification to the new cluster. This also adds support for the writing operation of the qcow2 compressed image. After testing, image file

Re: Memory sync algorithm during migration

2011-11-18 Thread Oliver Hookins
On Tue, Nov 15, 2011 at 11:47:58AM +0100, ext Juan Quintela wrote: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp wrote: Adding qemu-devel ML to CC. Your question should have been sent to qemu-devel ML because the logic is implemented in QEMU, not KVM. (2011/11/11 1:35), Oliver

Re: [PATCH 0/6] KVM: PPC: mostly booke: race and idle fixes, paravirt

2011-11-18 Thread Alexander Graf
On 09.11.2011, at 01:22, Scott Wood wrote: The first couple patches are some minor reorganization of the checking done prior to entering the guest, which should avoid some races relative to exception qeueing, and give us a more clearly-named place (which later patches in the series use) to

Re: [PATCH v2] KVM: PPC: booke: Improve timer register emulation

2011-11-18 Thread Alexander Graf
On 17.11.2011, at 23:39, Scott Wood wrote: Decrementers are now properly driven by TCR/TSR, and the guest has full read/write access to these registers. The decrementer keeps ticking (and setting the TSR bit) regardless of whether the interrupts are enabled with TCR. The decrementer

Re: [RFC PATCH 0/11] KVM: PPC: Update Book3S HV memory handling

2011-11-18 Thread Alexander Graf
On 16.11.2011, at 23:50, Paul Mackerras wrote: This series of patches updates the Book3S-HV KVM code that manages the guest hashed page table (HPT) to enable several things: * MMIO emulation and MMIO pass-through * Use of small pages (4kB or 64kB, depending on config) to back the guest

Guest floppy regression hits qemu-kvm, qemu is not affected

2011-11-18 Thread Lucas Meneghel Rodrigues
Hi guys, Today during the last 'sanity' qemu-kvm testing, we've noticed a recurring problem: guest OS does not see the floppy, making the windows installs time out. This problem has been extensively discussed on qemu and qemu is fine here, problem is specific with qemu-kvm.

Re: [RFC] [ver3 PATCH 3/6] virtio_net: virtio_net driver changes

2011-11-18 Thread Ben Hutchings
On Fri, 2011-11-18 at 08:24 +0200, Sasha Levin wrote: On Fri, 2011-11-18 at 01:08 +, Ben Hutchings wrote: On Fri, 2011-11-11 at 18:34 +0530, Krishna Kumar wrote: Changes for multiqueue virtio_net driver. [...] @@ -677,25 +730,35 @@ static struct rtnl_link_stats64 *virtnet {

Re: [RFC] [ver3 PATCH 3/6] virtio_net: virtio_net driver changes

2011-11-18 Thread Sasha Levin
On Fri, 2011-11-18 at 15:40 +, Ben Hutchings wrote: On Fri, 2011-11-18 at 08:24 +0200, Sasha Levin wrote: On Fri, 2011-11-18 at 01:08 +, Ben Hutchings wrote: On Fri, 2011-11-11 at 18:34 +0530, Krishna Kumar wrote: Changes for multiqueue virtio_net driver. [...] @@ -677,25

KVM for the enterprise

2011-11-18 Thread Michael Waite
Hi, The Open Virtualization Alliance is going to be having a webinar on December 8th which is intended to help promote KVM as an enterprise class hypervisor. I see so much great engineering work going on to make KVM a really robust technology and we want to help tell this story to the

Re: [net-next-2.6 PATCH 0/6 v4] macvlan: MAC Address filtering support for passthru mode

2011-11-18 Thread Greg Rose
On 11/17/2011 4:44 PM, Ben Hutchings wrote: On Thu, 2011-11-17 at 16:32 -0800, Greg Rose wrote: On 11/17/2011 4:15 PM, Ben Hutchings wrote: Sorry to come to this rather late. On Tue, 2011-11-08 at 23:55 -0800, Roopa Prabhu wrote: [...] v2 - v3 - Moved set and get filter ops from

Re: [RFC] [ver3 PATCH 3/6] virtio_net: virtio_net driver changes

2011-11-18 Thread Ben Hutchings
On Fri, 2011-11-18 at 18:18 +0200, Sasha Levin wrote: On Fri, 2011-11-18 at 15:40 +, Ben Hutchings wrote: On Fri, 2011-11-18 at 08:24 +0200, Sasha Levin wrote: On Fri, 2011-11-18 at 01:08 +, Ben Hutchings wrote: On Fri, 2011-11-11 at 18:34 +0530, Krishna Kumar wrote: Changes

Re: [net-next-2.6 PATCH 0/6 v4] macvlan: MAC Address filtering support for passthru mode

2011-11-18 Thread Ben Hutchings
On Fri, 2011-11-18 at 08:58 -0800, Greg Rose wrote: On 11/17/2011 4:44 PM, Ben Hutchings wrote: On Thu, 2011-11-17 at 16:32 -0800, Greg Rose wrote: On 11/17/2011 4:15 PM, Ben Hutchings wrote: Sorry to come to this rather late. On Tue, 2011-11-08 at 23:55 -0800, Roopa Prabhu wrote:

Re: [RFC PATCH] vfio: VFIO Driver core framework

2011-11-18 Thread Alex Williamson
On Thu, 2011-11-17 at 11:02 +1100, David Gibson wrote: On Tue, Nov 15, 2011 at 11:01:28AM -0700, Alex Williamson wrote: On Tue, 2011-11-15 at 17:34 +1100, David Gibson wrote: On Thu, Nov 03, 2011 at 02:12:24PM -0600, Alex Williamson wrote: snip +Groups, Devices, IOMMUs, oh my

Re: [RFC PATCH] vfio: VFIO Driver core framework

2011-11-18 Thread Scott Wood
On Fri, Nov 18, 2011 at 01:32:56PM -0700, Alex Williamson wrote: Hmm, that might be cleaner than eliminating the size with just using _IO(). So we might have something like: #define VFIO_IOMMU_MAP_DMA _IOWR(';', 106, struct vfio_dma_map) #define VFIO_IOMMU_MAP_DMA_V2

Re: [RFC PATCH 0/11] KVM: PPC: Update Book3S HV memory handling

2011-11-18 Thread Paul Mackerras
On Fri, Nov 18, 2011 at 02:57:11PM +0100, Alexander Graf wrote: This touches areas that I'm sure non-PPC people would want to see as well. Could you please CC kvm@vger too next time? Avi, Marcelo, mind to review some of the bits in this patch set? :) I did cc the last patch (the one that

RE: [RFC v2 PATCH] kvm tools, qcow: Add the support for copy-on-write clusters

2011-11-18 Thread Lan, Tianyu
Hi Kevin: Thanks for your review. The following means that there should be a fsync after updating metadata(refcunt block, l1 table and l2 table). Thanks Tianyu Lan -Original Message- + /*write l2 table*/ + l2t-dirty = 1; + if

Re: [PATCH 0/6] KVM: PPC: mostly booke: race and idle fixes, paravirt

2011-11-18 Thread Alexander Graf
On 09.11.2011, at 01:22, Scott Wood wrote: The first couple patches are some minor reorganization of the checking done prior to entering the guest, which should avoid some races relative to exception qeueing, and give us a more clearly-named place (which later patches in the series use) to

Re: [PATCH v2] KVM: PPC: booke: Improve timer register emulation

2011-11-18 Thread Alexander Graf
On 17.11.2011, at 23:39, Scott Wood wrote: Decrementers are now properly driven by TCR/TSR, and the guest has full read/write access to these registers. The decrementer keeps ticking (and setting the TSR bit) regardless of whether the interrupts are enabled with TCR. The decrementer

Re: [RFC PATCH 0/11] KVM: PPC: Update Book3S HV memory handling

2011-11-18 Thread Alexander Graf
On 16.11.2011, at 23:50, Paul Mackerras wrote: This series of patches updates the Book3S-HV KVM code that manages the guest hashed page table (HPT) to enable several things: * MMIO emulation and MMIO pass-through * Use of small pages (4kB or 64kB, depending on config) to back the guest

Re: [RFC PATCH 0/11] KVM: PPC: Update Book3S HV memory handling

2011-11-18 Thread Paul Mackerras
On Fri, Nov 18, 2011 at 02:57:11PM +0100, Alexander Graf wrote: This touches areas that I'm sure non-PPC people would want to see as well. Could you please CC kvm@vger too next time? Avi, Marcelo, mind to review some of the bits in this patch set? :) I did cc the last patch (the one that