Re: [PATCH 1/1] kvm-s390: Provide guest TOD Clock Get/Set Controls

2014-11-06 Thread Christian Borntraeger
Am 05.11.2014 20:45, schrieb Paolo Bonzini: On 05/11/2014 18:56, Christian Borntraeger wrote: Whether you want to follow that approach or do it as VM attribute straight away, I don't mind much :). given that top programmable field and epoch are available as ONEREG, lets do the same for

Re: [PATCH 1/1] kvm-s390: Provide guest TOD Clock Get/Set Controls

2014-11-06 Thread Christian Borntraeger
Am 06.11.2014 09:43, schrieb Christian Borntraeger: Am 05.11.2014 20:45, schrieb Paolo Bonzini: On 05/11/2014 18:56, Christian Borntraeger wrote: Whether you want to follow that approach or do it as VM attribute straight away, I don't mind much :). given that top programmable field and

Re: [PATCH 08/21] KVM: x86: Reset FPU state during reset

2014-11-06 Thread Paolo Bonzini
On 05/11/2014 21:31, Nadav Amit wrote: You are correct, it does not appear clearly in the SDM, but that is what real hardware does. If you look at bochs - http://code.metager.de/source/xref/bochs/bochs/cpu/init.cc - you’ll see they call BX_CPU_THIS_PTR xcr0.set32(0x1);” regardless to

Re: [PATCH 08/21] KVM: x86: Reset FPU state during reset

2014-11-06 Thread Nadav Amit
On Nov 6, 2014, at 10:58, Paolo Bonzini pbonz...@redhat.com wrote: On 05/11/2014 21:31, Nadav Amit wrote: You are correct, it does not appear clearly in the SDM, but that is what real hardware does. If you look at bochs - http://code.metager.de/source/xref/bochs/bochs/cpu/init.cc -

[PATCH] KVM: x86: Save bits by merging Mmx/Sse/Avx bits

2014-11-06 Thread Nadav Amit
As we run out of bits in the KVM emulator instruction flags, we can merge together the Mmx/Sse/Avx bits. These bits are mutual exclusive (i.e., each instruction is either MMX, SSE, AVX, or none), so we can save one bit in the flags by merging them. Signed-off-by: Nadav Amit

Re: [PATCH 20/21] KVM: x86: MOVNTI emulation min opsize is not respected

2014-11-06 Thread Paolo Bonzini
On 02/11/2014 10:55, Nadav Amit wrote: Signed-off-by: Nadav Amit na...@cs.technion.ac.il --- Applied, thanks. Paolo -- 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

Re: [PATCH 14/21] KVM: x86: Software disabled APIC should still deliver NMIs

2014-11-06 Thread Paolo Bonzini
On 05/11/2014 21:45, Nadav Amit wrote: If I understand the SDM correctly, in such scenario (all APICs are software disabled) the mode is left as the default - flat mode (see section 10.6.2.2 Logical Destination Mode”): All processors that have their APIC software enabled (using the spurious

Re: [PATCH 08/21] KVM: x86: Reset FPU state during reset

2014-11-06 Thread Paolo Bonzini
On 06/11/2014 10:13, Nadav Amit wrote: On Nov 6, 2014, at 10:58, Paolo Bonzini pbonz...@redhat.com wrote: On 05/11/2014 21:31, Nadav Amit wrote: You are correct, it does not appear clearly in the SDM, but that is what real hardware does. If you look at bochs -

Re: [PATCH 08/21] KVM: x86: Reset FPU state during reset

2014-11-06 Thread Nadav Amit
On Nov 6, 2014, at 11:44, Paolo Bonzini pbonz...@redhat.com wrote: On 06/11/2014 10:13, Nadav Amit wrote: On Nov 6, 2014, at 10:58, Paolo Bonzini pbonz...@redhat.com wrote: On 05/11/2014 21:31, Nadav Amit wrote: You are correct, it does not appear clearly in the SDM, but that is

Re: [PATCH 1/1] kvm-s390: Provide guest TOD Clock Get/Set Controls

2014-11-06 Thread Paolo Bonzini
On 06/11/2014 09:43, Christian Borntraeger wrote: Am 05.11.2014 20:45, schrieb Paolo Bonzini: On 05/11/2014 18:56, Christian Borntraeger wrote: Whether you want to follow that approach or do it as VM attribute straight away, I don't mind much :). given that top programmable field and

Re: [PATCH v12 2/6] KVM: Add generic support for dirty page logging

2014-11-06 Thread Paolo Bonzini
On 06/11/2014 00:05, Mario Smarduch wrote: On 11/05/2014 08:09 AM, Paolo Bonzini wrote: On 01/11/2014 11:12, James Hogan wrote: AFAICT all of the arch implementations of kvm_vm_ioctl_get_dirty_log() except x86 and ppc hv (i.e. ia60, mips, ppc pv, s390) already make use of the existing

Re: [PATCH 08/21] KVM: x86: Reset FPU state during reset

2014-11-06 Thread Paolo Bonzini
On 06/11/2014 10:56, Nadav Amit wrote: On Nov 6, 2014, at 11:44, Paolo Bonzini pbonz...@redhat.com wrote: On 06/11/2014 10:13, Nadav Amit wrote: On Nov 6, 2014, at 10:58, Paolo Bonzini pbonz...@redhat.com wrote: On 05/11/2014 21:31, Nadav Amit wrote: You are correct, it does not

Re: [PATCH] kvm: x86: Fix kvm clock versioning.

2014-11-06 Thread Paolo Bonzini
On 04/11/2014 01:57, Owen Hofmann wrote: kvm updates the version number for the guest paravirt clock structure by incrementing the version of its private copy. It does not read the guest version, so will write version = 2 in the first update for every new VM, including after restoring a

Re: [PATCH] kvm: x86: add trace event for pvclock updates

2014-11-06 Thread Paolo Bonzini
On 05/11/2014 20:46, David Matlack wrote: The new trace event records: * the id of vcpu being updated * the pvclock_vcpu_time_info struct being written to guest memory This is useful for debugging pvclock bugs, such as the bug fixed by [PATCH] kvm: x86: Fix kvm clock versioning..

[PATCH] KVM: x86: flush TLBs last before returning from KVM_GET_DIRTY_LOG

2014-11-06 Thread Paolo Bonzini
In the next patches, we will move parts of x86's kvm_vm_ioctl_get_dirty_log implementation to generic code; leave the arch-specific code at the end, similar to the existing generic function kvm_get_dirty_log. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- arch/x86/kvm/x86.c | 22

Re: [PATCH] KVM: x86: Save bits by merging Mmx/Sse/Avx bits

2014-11-06 Thread Paolo Bonzini
On 06/11/2014 10:15, Nadav Amit wrote: As we run out of bits in the KVM emulator instruction flags, we can merge together the Mmx/Sse/Avx bits. These bits are mutual exclusive (i.e., each instruction is either MMX, SSE, AVX, or none), so we can save one bit in the flags by merging them. Do

[PATCH] kvm: x86: increase user memory slots to 509

2014-11-06 Thread Igor Mammedov
With the 3 private slots, this gives us 512 slots total. Motivation for this is in addition to assigned devices support more memory hotplug slots, where 1 slot is used by a hotplugged memory stick. It will allow to support upto 256 hotplug memory slots and leave 253 slots for assigned devices and

Re: [PATCH] kvm: x86: increase user memory slots to 509

2014-11-06 Thread Paolo Bonzini
On 06/11/2014 16:52, Igor Mammedov wrote: With the 3 private slots, this gives us 512 slots total. Motivation for this is in addition to assigned devices support more memory hotplug slots, where 1 slot is used by a hotplugged memory stick. It will allow to support upto 256 hotplug memory

Re: [PATCH 14/21] KVM: x86: Software disabled APIC should still deliver NMIs

2014-11-06 Thread Radim Krčmář
2014-11-06 10:34+0100, Paolo Bonzini: On 05/11/2014 21:45, Nadav Amit wrote: If I understand the SDM correctly, in such scenario (all APICs are software disabled) the mode is left as the default - flat mode (see APIC doesn't have any global mode (it is just KVM's simplification), so when a

Re: [PATCH 08/21] KVM: x86: Reset FPU state during reset

2014-11-06 Thread Radim Krčmář
2014-11-06 10:44+0100, Paolo Bonzini: On 06/11/2014 10:13, Nadav Amit wrote: On Nov 6, 2014, at 10:58, Paolo Bonzini pbonz...@redhat.com wrote: On 05/11/2014 21:31, Nadav Amit wrote: You are correct, it does not appear clearly in the SDM, but that is what real hardware does.

[PATCH] KVM: x86: save a bit in the decoding flags

2014-11-06 Thread Paolo Bonzini
AVX instructions are just tweaks of the operand length and the alignment restrictions of SSE instructions, and in fact the Avx bit is just a duplicate of Unaligned. Drop it. Suggested-by: Nadav Amit na...@cs.technion.ac.il Signed-off-by: Paolo Bonzini pbonz...@redhat.com ---

Re: [PATCH v12 2/6] KVM: Add generic support for dirty page logging

2014-11-06 Thread Mario Smarduch
On 11/06/2014 02:14 AM, Paolo Bonzini wrote: On 06/11/2014 00:05, Mario Smarduch wrote: On 11/05/2014 08:09 AM, Paolo Bonzini wrote: On 01/11/2014 11:12, James Hogan wrote: AFAICT all of the arch implementations of kvm_vm_ioctl_get_dirty_log() except x86 and ppc hv (i.e. ia60, mips, ppc

Re: [PATCH] KVM: x86: Save bits by merging Mmx/Sse/Avx bits

2014-11-06 Thread Nadav Amit
On Nov 6, 2014, at 16:10, Paolo Bonzini pbonz...@redhat.com wrote: On 06/11/2014 10:15, Nadav Amit wrote: As we run out of bits in the KVM emulator instruction flags, we can merge together the Mmx/Sse/Avx bits. These bits are mutual exclusive (i.e., each instruction is either MMX, SSE,

Re: [PATCH 07/17] mm: madvise MADV_USERFAULT: prepare vm_flags to allow more than 32bits

2014-11-06 Thread Konstantin Khlebnikov
On Fri, Oct 3, 2014 at 9:07 PM, Andrea Arcangeli aarca...@redhat.com wrote: We run out of 32bits in vm_flags, noop change for 64bit archs. What? Again? As I see there are some free bits: 0x200, 0x1000, 0x8 I prefer to reserve 0x0200 for VM_ARCH_2 Signed-off-by: Andrea Arcangeli

Re: [PATCH] KVM: x86: Save bits by merging Mmx/Sse/Avx bits

2014-11-06 Thread Paolo Bonzini
On 06/11/2014 19:52, Nadav Amit wrote: On Nov 6, 2014, at 16:10, Paolo Bonzini pbonz...@redhat.com wrote: On 06/11/2014 10:15, Nadav Amit wrote: As we run out of bits in the KVM emulator instruction flags, we can merge together the Mmx/Sse/Avx bits. These bits are mutual exclusive

[PATCH v13 0/7] KVM/arm/x86: dirty page logging support for ARMv7 (3.17.0-rc1)

2014-11-06 Thread Mario Smarduch
Patch series adds support for ARMv7 and generic dirty page logging support. As we try to move towards generic dirty page logging additional logic is moved to generic code. Initially armv7 KVM_GET_DIRTY_LOG ioctl reuses generic code, to be followed by armv8 and x86. Testing: - Generally live

[PATCH v13 1/7] KVM: Add architecture-defined TLB flush support

2014-11-06 Thread Mario Smarduch
Allow architectures to override the generic kvm_flush_remote_tlbs() function via HAVE_KVM_ARCH_TLB_FLUSH_ALL. ARMv7 will need this to provide its own TLB flush interface. Reviewed-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Mario Smarduch m.smard...@samsung.com --- virt/kvm/Kconfig|

[PATCH v13 2/7] KVM: Add generic support for dirty page logging

2014-11-06 Thread Mario Smarduch
kvm_get_dirty_log() provides generic handling of dirty bitmap, currently reused by several architectures. Building on that we intrdoduce kvm_get_dirty_log_protect() adding write protection to mark these pages dirty for future write access, before next KVM_GET_DIRTY_LOG ioctl call from user space.

[PATCH v13 3/7] KVM: x86: flush TLBs last before returning from KVM_GET_DIRTY_LOG

2014-11-06 Thread Mario Smarduch
In the next patches, we will move parts of x86's kvm_vm_ioctl_get_dirty_log implementation to generic code; leave the arch-specific code at the end, similar to the existing generic function kvm_get_dirty_log. Reviewed-by: Mario Smarduch m.smard...@samsung.com Signed-off-by: Paolo Bonzini

[PATCH v13 4/7] arm: KVM: Add ARMv7 API to flush TLBs

2014-11-06 Thread Mario Smarduch
This patch adds ARMv7 architecture TLB Flush function. Acked-by: Christoffer Dall christoffer.dall at linaro.org Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/include/asm/kvm_asm.h |1 + arch/arm/include/asm/kvm_host.h | 12 arch/arm/kvm/Kconfig

[PATCH v13 5/7] arm: KVM: Add initial dirty page locking infrastructure

2014-11-06 Thread Mario Smarduch
Add support for initial write protection of VM memlsot. This patch series assumes that huge PUDs will not be used in 2nd stage tables, which is awlays valid on ARMv7. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/include/asm/kvm_host.h |2 +

[PATCH v13 6/7] arm: KVM: dirty log read write protect support

2014-11-06 Thread Mario Smarduch
Add support to track dirty pages between user space KVM_GET_DIRTY_LOG ioctl calls. We call kvm_get_dirty_log_protect() function to do most of the work. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/kvm/arm.c | 37 + arch/arm/kvm/mmu.c |

[PATCH v13 7/7] arm: KVM: ARMv7 dirty page logging 2nd stage page fault

2014-11-06 Thread Mario Smarduch
This patch adds support for handling 2nd stage page faults during migration, it disables faulting in huge pages, and dissolves huge pages to page tables. In case migration is canceled huge pages are used again. Reviewed-by: Christoffer Dall christoffer.dall at linaro.org Signed-off-by: Mario

Re: [Qemu-devel] [question] updating the base image for all clones which have been running for months

2014-11-06 Thread Zhang Haoyu
Hi, all I used base image A to clone so many vm, after running for months, each vm has its own private applications and data, which maybe different from each other. Now, I want to install some applications for all of the clones, what should I do? How would you do it for bare metal? Do

Seeking a KVM benchmark

2014-11-06 Thread Andy Lutomirski
Is there an easy benchmark that's sensitive to the time it takes to round-trip from userspace to guest and back to userspace? I think I may have a big speedup. --Andy -- Andy Lutomirski AMA Capital Management, LLC -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a

Re: Seeking a KVM benchmark

2014-11-06 Thread Paolo Bonzini
On 07/11/2014 07:27, Andy Lutomirski wrote: Is there an easy benchmark that's sensitive to the time it takes to round-trip from userspace to guest and back to userspace? I think I may have a big speedup. The simplest is vmexit.flat from

Re: [PATCH v13 6/7] arm: KVM: dirty log read write protect support

2014-11-06 Thread Paolo Bonzini
On 07/11/2014 01:40, Mario Smarduch wrote: Add support to track dirty pages between user space KVM_GET_DIRTY_LOG ioctl calls. We call kvm_get_dirty_log_protect() function to do most of the work. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/kvm/arm.c | 37

Re: [PATCH v13 3/7] KVM: x86: flush TLBs last before returning from KVM_GET_DIRTY_LOG

2014-11-06 Thread Paolo Bonzini
On 07/11/2014 01:40, Mario Smarduch wrote: In the next patches, we will move parts of x86's kvm_vm_ioctl_get_dirty_log implementation to generic code; leave the arch-specific code at the end, similar to the existing generic function kvm_get_dirty_log. Reviewed-by: Mario Smarduch

[PATCH v13 0/7] KVM/arm/x86: dirty page logging support for ARMv7 (3.17.0-rc1)

2014-11-06 Thread Mario Smarduch
Patch series adds support for ARMv7 and generic dirty page logging support. As we try to move towards generic dirty page logging additional logic is moved to generic code. Initially armv7 KVM_GET_DIRTY_LOG ioctl reuses generic code, to be followed by armv8 and x86. Testing: - Generally live

[PATCH v13 1/7] KVM: Add architecture-defined TLB flush support

2014-11-06 Thread Mario Smarduch
Allow architectures to override the generic kvm_flush_remote_tlbs() function via HAVE_KVM_ARCH_TLB_FLUSH_ALL. ARMv7 will need this to provide its own TLB flush interface. Reviewed-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Mario Smarduch m.smard...@samsung.com --- virt/kvm/Kconfig|

[PATCH v13 2/7] KVM: Add generic support for dirty page logging

2014-11-06 Thread Mario Smarduch
kvm_get_dirty_log() provides generic handling of dirty bitmap, currently reused by several architectures. Building on that we intrdoduce kvm_get_dirty_log_protect() adding write protection to mark these pages dirty for future write access, before next KVM_GET_DIRTY_LOG ioctl call from user space.

[PATCH v13 3/7] KVM: x86: flush TLBs last before returning from KVM_GET_DIRTY_LOG

2014-11-06 Thread Mario Smarduch
In the next patches, we will move parts of x86's kvm_vm_ioctl_get_dirty_log implementation to generic code; leave the arch-specific code at the end, similar to the existing generic function kvm_get_dirty_log. Reviewed-by: Mario Smarduch m.smard...@samsung.com Signed-off-by: Paolo Bonzini

[PATCH v13 4/7] arm: KVM: Add ARMv7 API to flush TLBs

2014-11-06 Thread Mario Smarduch
This patch adds ARMv7 architecture TLB Flush function. Acked-by: Christoffer Dall christoffer.dall at linaro.org Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/include/asm/kvm_asm.h |1 + arch/arm/include/asm/kvm_host.h | 12 arch/arm/kvm/Kconfig

[PATCH v13 5/7] arm: KVM: Add initial dirty page locking infrastructure

2014-11-06 Thread Mario Smarduch
Add support for initial write protection of VM memlsot. This patch series assumes that huge PUDs will not be used in 2nd stage tables, which is awlays valid on ARMv7. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/include/asm/kvm_host.h |2 +

[PATCH v13 6/7] arm: KVM: dirty log read write protect support

2014-11-06 Thread Mario Smarduch
Add support to track dirty pages between user space KVM_GET_DIRTY_LOG ioctl calls. We call kvm_get_dirty_log_protect() function to do most of the work. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/kvm/arm.c | 37 + arch/arm/kvm/mmu.c |

[PATCH v13 7/7] arm: KVM: ARMv7 dirty page logging 2nd stage page fault

2014-11-06 Thread Mario Smarduch
This patch adds support for handling 2nd stage page faults during migration, it disables faulting in huge pages, and dissolves huge pages to page tables. In case migration is canceled huge pages are used again. Reviewed-by: Christoffer Dall christoffer.dall at linaro.org Signed-off-by: Mario

Re: [PATCH v13 6/7] arm: KVM: dirty log read write protect support

2014-11-06 Thread Paolo Bonzini
On 07/11/2014 01:40, Mario Smarduch wrote: Add support to track dirty pages between user space KVM_GET_DIRTY_LOG ioctl calls. We call kvm_get_dirty_log_protect() function to do most of the work. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/kvm/arm.c | 37

Re: [PATCH v13 3/7] KVM: x86: flush TLBs last before returning from KVM_GET_DIRTY_LOG

2014-11-06 Thread Paolo Bonzini
On 07/11/2014 01:40, Mario Smarduch wrote: In the next patches, we will move parts of x86's kvm_vm_ioctl_get_dirty_log implementation to generic code; leave the arch-specific code at the end, similar to the existing generic function kvm_get_dirty_log. Reviewed-by: Mario Smarduch