Re: [PATCH] KVM: PPC: Book3S HV: Add missing HPTE unlock

2014-11-20 Thread Alexander Graf
On 05.11.14 02:21, Paul Mackerras wrote: From: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com In kvm_test_clear_dirty(), if we find an invalid HPTE we move on to the next HPTE without unlocking the invalid one. In fact we should never find an invalid and unlocked HPTE in the rmap chain,

Re: [PATCH] KVM: PPC: Book3S HV: ptes are big endian

2014-11-20 Thread Alexander Graf
On 03.11.14 16:35, Cédric Le Goater wrote: When being restored from qemu, the kvm_get_htab_header are in native endian, but the ptes are big endian. This patch fixes restore on a KVM LE host. Qemu also needs a fix for this :

Re: [PATCH 2/5] KVM: PPC: Book3S HV: Fix an issue where guest is paused on receiving HMI

2014-11-20 Thread Alexander Graf
On 03.11.14 05:51, Paul Mackerras wrote: From: Mahesh Salgaonkar mah...@linux.vnet.ibm.com When we get an HMI (hypervisor maintenance interrupt) while in a guest, we see that guest enters into paused state. The reason is, in kvmppc_handle_exit_hv it falls through default path and returns

Re: [PATCH 0/5] Some fixes for HV KVM on PPC

2014-11-20 Thread Alexander Graf
On 03.11.14 05:51, Paul Mackerras wrote: Here are fixes for five bugs which were found in the testing of our PowerKVM product. The bugs range from guest performance issues to guest crashes and memory corruption. Please apply. Thanks, applied patches 1-4 to kvm-ppc-queue. Alex -- To

Re: [PATCH 5/5] KVM: PPC: Book3S HV: Check wait conditions before sleeping in kvmppc_vcore_blocked

2014-11-20 Thread Alexander Graf
On 03.11.14 05:52, Paul Mackerras wrote: From: Suresh E. Warrier warr...@linux.vnet.ibm.com The kvmppc_vcore_blocked() code does not check for the wait condition after putting the process on the wait queue. This means that it is possible for an external interrupt to become pending, but the

[PATCH v2] KVM: PPC: Book3S HV: ptes are big endian

2014-11-20 Thread Cédric Le Goater
When being restored from qemu, the kvm_get_htab_header are in native endian, but the ptes are big endian. This patch fixes restore on a KVM LE host. Qemu also needs a fix for this : http://lists.nongnu.org/archive/html/qemu-ppc/2014-11/msg8.html Signed-off-by: Cédric Le Goater

Re: [PATCH] KVM: PPC: Book3S HV: Tracepoints for KVM HV guest interactions

2014-11-19 Thread Suresh E. Warrier
On 11/14/2014 04:56 AM, Alexander Graf wrote: Am 14.11.2014 um 00:29 schrieb Suresh E. Warrier warr...@linux.vnet.ibm.com: This patch adds trace points in the guest entry and exit code and also for exceptions handled by the host in kernel mode - hypercalls and page faults. The new

Fix Penguin Penalty 17th October2014 ( mail-archive.com )

2014-11-18 Thread broke21435
Dear Sir Did your website get hit by Google Penguin update on October 17th 2014? What basically is Google Penguin Update? It is actually a code name for Google algorithm which aims at decreasing your websites search engine rankings that violate Google’s guidelines by using black hat SEO

Re: [RFC 00/11]: powerKVM, release the compute power of secondary hwthread on host

2014-11-18 Thread Alexander Graf
On 16.10.14 21:29, kernelf...@gmail.com wrote: Nowadays, when running powerKVM(book3s, hv mode), we should make the secondary hwthread offline. Which means that if we run misc tsks other than dedicated KVM (e.g mix java and KVM), we will lose the compute power of the secondary hwthread on

Re: [RFC 01/11] sched: introduce sys_cpumask in tsk to adapt asymmetric system

2014-11-17 Thread Liu ping fan
On Wed, Nov 12, 2014 at 5:22 PM, Srikar Dronamraju sri...@linux.vnet.ibm.com wrote: * kernelf...@gmail.com kernelf...@gmail.com [2014-10-16 15:29:50]: Some system such as powerpc, some tsk (vcpu thread) can only run on the dedicated cpu. Since we adapt some asymmetric method to monitor the

Re: [RFC 03/11] powerpc: kvm: add interface to control kvm function on a core

2014-11-17 Thread Liu ping fan
On Mon, Oct 27, 2014 at 12:04 PM, Preeti U Murthy pre...@linux.vnet.ibm.com wrote: Hi Liu, On 10/17/2014 12:59 AM, kernelf...@gmail.com wrote: When kvm is enabled on a core, we migrate all external irq to primary thread. Since currently, the kvmirq logic is handled by the primary hwthread.

Re: [RFC 04/11] powerpc: kvm: introduce a kthread on primary thread to anti tickless

2014-11-17 Thread Liu ping fan
On Mon, Oct 27, 2014 at 12:45 PM, Preeti U Murthy pre...@linux.vnet.ibm.com wrote: On 10/17/2014 12:59 AM, kernelf...@gmail.com wrote: (This patch is a place holder.) If there is only one vcpu thread is ready(the other vcpu thread can wait for it to execute), the primary thread can enter

Re: [RFC 06/11] powerpc: kvm: introduce online in paca to indicate whether cpu is needed by host

2014-11-17 Thread Liu ping fan
On Mon, Oct 27, 2014 at 1:32 PM, Preeti U Murthy pre...@linux.vnet.ibm.com wrote: Hi Liu, On 10/17/2014 12:59 AM, kernelf...@gmail.com wrote: Nowadays, powerKVM runs with secondary hwthread offline. Although we can make all secondary hwthread online later, we still preserve this behavior for

Re: [RFC 09/11] powerpc: kvm: handle time base on secondary hwthread

2014-11-17 Thread Liu ping fan
On Mon, Oct 27, 2014 at 2:40 PM, Preeti U Murthy pre...@linux.vnet.ibm.com wrote: On 10/17/2014 12:59 AM, kernelf...@gmail.com wrote: (This is a place holder patch.) We need to store the time base for host on secondary hwthread. Later when switching back, we need to reprogram it with elapse

Re: [RFC 11/11] powerpc: kvm: Kconfig add an option for enabling secondary hwthread

2014-11-17 Thread Liu ping fan
On Mon, Oct 27, 2014 at 2:44 PM, Preeti U Murthy pre...@linux.vnet.ibm.com wrote: On 10/17/2014 01:00 AM, kernelf...@gmail.com wrote: Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com --- arch/powerpc/kvm/Kconfig | 4 1 file changed, 4 insertions(+) diff --git

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

2014-11-14 Thread Cornelia Huck
On Thu, 13 Nov 2014 17:57:41 -0800 Mario Smarduch m.smard...@samsung.com wrote: 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 x86, armv7 KVM_GET_DIRTY_LOG

Re: [PATCH v14 3/7] KVM: x86: switch to kvm_get_dirty_log_protect

2014-11-14 Thread Paolo Bonzini
On 14/11/2014 03:06, Mario Smarduch wrote: Hi Paolo, I changed your patch a little to use a Kconfig symbol, hope that's fine with you. Of course, thanks. Paolo - Mario On 11/13/2014 05:57 PM, Mario Smarduch wrote: From: Paolo Bonzini pbonz...@redhat.com We now have a generic

Re: [PATCH] KVM: PPC: Book3S HV: Tracepoints for KVM HV guest interactions

2014-11-14 Thread Alexander Graf
Am 14.11.2014 um 00:29 schrieb Suresh E. Warrier warr...@linux.vnet.ibm.com: This patch adds trace points in the guest entry and exit code and also for exceptions handled by the host in kernel mode - hypercalls and page faults. The new events are added to /sys/kernel/debug/tracing/events

Re: [PATCH v14 7/7] KVM: arm: page logging 2nd stage fault handling

2014-11-14 Thread Marc Zyngier
Hi Mario, On 14/11/14 01:57, Mario Smarduch wrote: 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

Re: [PATCH v14 7/7] KVM: arm: page logging 2nd stage fault handling

2014-11-14 Thread Mario Smarduch
On 11/14/2014 08:45 AM, Marc Zyngier wrote: Hi Mario, On 14/11/14 01:57, Mario Smarduch wrote: 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

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

2014-11-14 Thread Mario Smarduch
On 11/14/2014 12:06 AM, Cornelia Huck wrote: On Thu, 13 Nov 2014 17:57:41 -0800 Mario Smarduch m.smard...@samsung.com wrote: 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

Fix Penguin Penalty 17th October2014 ( mail-archive.com )

2014-11-13 Thread drivein87882
Dear Sir Did your website get hit by Google Penguin update on October 17th 2014? What basically is Google Penguin Update? It is actually a code name for Google algorithm which aims at decreasing your websites search engine rankings that violate Google’s guidelines by using black hat SEO

[PATCH] KVM: PPC: Book3S HV: Tracepoints for KVM HV guest interactions

2014-11-13 Thread Suresh E. Warrier
This patch adds trace points in the guest entry and exit code and also for exceptions handled by the host in kernel mode - hypercalls and page faults. The new events are added to /sys/kernel/debug/tracing/events under a new subsystem called kvm_hv. Acked-by: Paul Mackerras pau...@samba.org

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

2014-11-13 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 x86, armv7 KVM_GET_DIRTY_LOG reuses generic code, shortly followed by armv8 patches. Testing: - Generally live

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

2014-11-13 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 v14 1/7] KVM: Add architecture-defined TLB flush support

2014-11-13 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: Marc Zyngier marc.zyng...@arm.com Reviewed-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Mario Smarduch

[PATCH v14 5/7] KVM: arm: Add initial dirty page locking support

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

[PATCH v14 6/7] KVM: arm: dirty logging write protect support

2014-11-13 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. Reviewed-by: Marc Zyngier marc.zyng...@arm.com Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/kvm/Kconfig |1 +

[PATCH v14 7/7] KVM: arm: page logging 2nd stage fault handling

2014-11-13 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 v14 3/7] KVM: x86: switch to kvm_get_dirty_log_protect

2014-11-13 Thread Mario Smarduch
Hi Paolo, I changed your patch a little to use a Kconfig symbol, hope that's fine with you. - Mario On 11/13/2014 05:57 PM, Mario Smarduch wrote: From: Paolo Bonzini pbonz...@redhat.com We now have a generic function that does most of the work of kvm_vm_ioctl_get_dirty_log, now use it.

Re: [RFC 01/11] sched: introduce sys_cpumask in tsk to adapt asymmetric system

2014-11-12 Thread Srikar Dronamraju
* kernelf...@gmail.com kernelf...@gmail.com [2014-10-16 15:29:50]: Some system such as powerpc, some tsk (vcpu thread) can only run on the dedicated cpu. Since we adapt some asymmetric method to monitor the whole physical cpu. (powerKVM only allows the primary hwthread to set up runtime env

Re: [RFC 02/11] powerpc: kvm: ensure vcpu-thread run only on primary hwthread

2014-11-12 Thread Srikar Dronamraju
* kernelf...@gmail.com kernelf...@gmail.com [2014-10-16 15:29:51]: When vcpu thread runs at the first time, it will ensure to stick to the primary thread. Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com --- arch/powerpc/include/asm/kvm_host.h | 3 +++

Re: [RFC 03/11] powerpc: kvm: add interface to control kvm function on a core

2014-11-12 Thread Srikar Dronamraju
* kernelf...@gmail.com kernelf...@gmail.com [2014-10-16 15:29:52]: When kvm is enabled on a core, we migrate all external irq to primary thread. Since currently, the kvmirq logic is handled by the primary hwthread. Todo: this patch lacks re-enable of irqbalance when kvm is disable on the

[PATCH] KVM: PPC: BookE: Improve irq inject tracepoint

2014-11-10 Thread Alexander Graf
When injecting an IRQ, we only document which IRQ priority (which translates to IRQ type) gets injected. However, when reading traces you don't necessarily have all the numbers in your head to know which IRQ really is meant. This patch converts the IRQ number field to a symbolic name that is in

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

2014-11-07 Thread Cornelia Huck
On Thu, 06 Nov 2014 16:40:43 -0800 Mario Smarduch m.smard...@samsung.com wrote: 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

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

2014-11-07 Thread Paolo Bonzini
On 07/11/2014 10:07, Cornelia Huck wrote: +#if defined(CONFIG_S390) || defined(CONFIG_PPC) || defined(CONFIG_MIPS) || \ +defined(CONFIG_IA64) || defined(CONFIG_X86) || defined(CONFIG_ARM) || \ +defined(CONFIG_ARM64) Does this deserve a config symbol that can be selected by

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

2014-11-07 Thread Marc Zyngier
On 07/11/14 00:40, Mario Smarduch wrote: 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

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

2014-11-07 Thread Marc Zyngier
On 07/11/14 00:40, Mario Smarduch wrote: Add support for initial write protection of VM memlsot. This patch memslots series assumes that huge PUDs will not be used in 2nd stage tables, which is awlays valid on ARMv7. always Signed-off-by:

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

2014-11-07 Thread Marc Zyngier
On 07/11/14 00: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 7/7] arm: KVM: ARMv7 dirty page logging 2nd stage page fault

2014-11-07 Thread Marc Zyngier
On 07/11/14 00:40, Mario Smarduch wrote: 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

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

2014-11-07 Thread Mario Smarduch
On 11/07/2014 01:07 AM, Cornelia Huck wrote: On Thu, 06 Nov 2014 16:40:43 -0800 Mario Smarduch m.smard...@samsung.com wrote: kvm_get_dirty_log() provides generic handling of dirty bitmap, currently reused by several architectures. Building on that we intrdoduce

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

2014-11-07 Thread Mario Smarduch
On 11/07/2014 01:44 AM, Marc Zyngier wrote: On 07/11/14 00:40, Mario Smarduch wrote: 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 |

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

2014-11-07 Thread Mario Smarduch
On 11/07/2014 02:15 AM, Marc Zyngier wrote: On 07/11/14 00:40, Mario Smarduch wrote: Add support for initial write protection of VM memlsot. This patch memslots series assumes that huge PUDs will not be used in 2nd stage tables, which is awlays

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

2014-11-07 Thread Mario Smarduch
On 11/07/2014 02:33 AM, Marc Zyngier wrote: On 07/11/14 00:40, Mario Smarduch wrote: 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

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

2014-11-07 Thread Mario Smarduch
On 11/06/2014 11:38 PM, Paolo Bonzini wrote: 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

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

2014-11-07 Thread Mario Smarduch
On 11/06/2014 11:44 PM, Paolo Bonzini wrote: 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

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

2014-11-07 Thread Christoffer Dall
On Thu, Nov 06, 2014 at 04:40:45PM -0800, Mario Smarduch wrote: 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 +

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

2014-11-07 Thread Mario Smarduch
On 11/07/2014 12:02 PM, Christoffer Dall wrote: On Fri, Nov 07, 2014 at 11:50:09AM -0800, Mario Smarduch wrote: On 11/06/2014 11:44 PM, Paolo Bonzini wrote: 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

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

2014-11-07 Thread Mario Smarduch
On 11/07/2014 12:18 PM, Christoffer Dall wrote: On Thu, Nov 06, 2014 at 04:40:45PM -0800, Mario Smarduch wrote: 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 ---

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

2014-11-07 Thread Christoffer Dall
On Fri, Nov 07, 2014 at 12:44:13PM -0800, Mario Smarduch wrote: On 11/07/2014 12:02 PM, Christoffer Dall wrote: On Fri, Nov 07, 2014 at 11:50:09AM -0800, Mario Smarduch wrote: On 11/06/2014 11:44 PM, Paolo Bonzini wrote: On 07/11/2014 01:40, Mario Smarduch wrote: In the next patches,

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

2014-11-07 Thread Paolo Bonzini
On 07/11/2014 20:47, Mario Smarduch wrote: That can happen if the error occurred in the final copy to userspace, after page tables have been modified. Upon error return userspace should terminate logging, error out whether used for migration or other use cases, with some stale spte TLBs

[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

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

2014-11-05 Thread Paolo Bonzini
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 generic function kvm_get_dirty_log() to help implement their kvm_vm_ioctl_get_dirty_log

Re: [PATCH v12 1/6] KVM: Add architecture-defined TLB flush support

2014-11-05 Thread Paolo Bonzini
On 23/10/2014 00:34, Mario Smarduch wrote: This patch adds support for architecture implemented VM TLB flush, currently ARMv7 defines HAVE_KVM_ARCH_TLB_FLUSH_ALL. This leaves other architectures unaffected using the generic version. In subsequent patch ARMv7 defines

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

2014-11-05 Thread Mario Smarduch
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 generic function kvm_get_dirty_log() to help

Re: [RFC PATCH 0/4] vhost_net: support for cross endian guests

2014-11-04 Thread Cedric Le Goater
On 11/03/2014 05:23 PM, Michael S. Tsirkin wrote: On Wed, Oct 29, 2014 at 09:38:41AM +0100, Cédric Le Goater wrote: This patchset adds a VHOST_VRING_F_BYTESWAP flag to inform the host to byteswap data of the vring when the guest and the host have a different endian order. The flag is stored

[PATCH] KVM: PPC: Book3S HV: Add missing HPTE unlock

2014-11-04 Thread Paul Mackerras
From: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com In kvm_test_clear_dirty(), if we find an invalid HPTE we move on to the next HPTE without unlocking the invalid one. In fact we should never find an invalid and unlocked HPTE in the rmap chain, but for robustness we should unlock it. This

[PATCH] KVM: PPC: Book3S HV: ptes are big endian

2014-11-03 Thread Cédric Le Goater
When being restored from qemu, the kvm_get_htab_header are in native endian, but the ptes are big endian. This patch fixes restore on a KVM LE host. Qemu also needs a fix for this : http://lists.nongnu.org/archive/html/qemu-ppc/2014-11/msg8.html Signed-off-by: Cédric Le Goater

Re: [RFC PATCH 2/4] vhost: add byteswap routines

2014-11-03 Thread Cornelia Huck
On Wed, 29 Oct 2014 09:38:43 +0100 Cédric Le Goater c...@fr.ibm.com wrote: This patch adds a few helper routines around get_user and put_user to ease byteswapping. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- I am not sure these routines belong to this file. There is room for

Re: [RFC PATCH 0/4] vhost_net: support for cross endian guests

2014-11-03 Thread Michael S. Tsirkin
On Wed, Oct 29, 2014 at 09:38:41AM +0100, Cédric Le Goater wrote: This patchset adds a VHOST_VRING_F_BYTESWAP flag to inform the host to byteswap data of the vring when the guest and the host have a different endian order. The flag is stored at initialization in an attribute of the virtio

Re: [RFC PATCH 4/4] vhost_net: byteswap virtio_net header

2014-11-03 Thread Michael S. Tsirkin
On Wed, Oct 29, 2014 at 09:38:45AM +0100, Cédric Le Goater wrote: Signed-off-by: Cédric Le Goater c...@fr.ibm.com This patch casts userspace pointers to void *, this is generally unsafe. In particular sparse will warn. --- drivers/vhost/net.c | 39 ++-

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

2014-11-03 Thread Mario Smarduch
On 11/01/2014 03:12 AM, James Hogan wrote: Hi Mario, On Wed, Oct 22, 2014 at 03:34:07PM -0700, Mario Smarduch wrote: +/** + * kvm_vm_ioctl_get_dirty_log - get and clear the log of dirty pages in a slot + * @kvm: kvm instance + * @log: slot id and address to which we copy the log + * +

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

2014-11-03 Thread Mario Smarduch
On 11/02/2014 07:01 PM, Takuya Yoshikawa wrote: On Thu, 30 Oct 2014 12:19:00 -0700 Mario Smarduch m.smard...@samsung.com wrote: On 10/30/2014 05:14 AM, Cornelia Huck wrote: On Wed, 22 Oct 2014 15:34:07 -0700 Mario Smarduch m.smard...@samsung.com wrote: This patch defines

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

2014-11-02 Thread Takuya Yoshikawa
On Thu, 30 Oct 2014 12:19:00 -0700 Mario Smarduch m.smard...@samsung.com wrote: On 10/30/2014 05:14 AM, Cornelia Huck wrote: On Wed, 22 Oct 2014 15:34:07 -0700 Mario Smarduch m.smard...@samsung.com wrote: This patch defines KVM_GENERIC_DIRTYLOG, and moves dirty log read function to

[PATCH 1/5] KVM: PPC: Book3S HV: Fix computation of tlbie operand

2014-11-02 Thread Paul Mackerras
The B (segment size) field in the RB operand for the tlbie instruction is two bits, which we get from the top two bits of the first doubleword of the HPT entry to be invalidated. These bits go in bits 8 and 9 of the RB operand (bits 54 and 55 in IBM bit numbering). The compute_tlbie_rb()

[PATCH 0/5] Some fixes for HV KVM on PPC

2014-11-02 Thread Paul Mackerras
Here are fixes for five bugs which were found in the testing of our PowerKVM product. The bugs range from guest performance issues to guest crashes and memory corruption. Please apply. Paul. --- arch/powerpc/include/asm/kvm_book3s_64.h | 2 +- arch/powerpc/kvm/book3s_hv.c | 22

[PATCH 4/5] KVM: PPC: Book3S HV: Fix inaccuracies in ICP emulation for H_IPI

2014-11-02 Thread Paul Mackerras
From: Suresh E. Warrier warr...@linux.vnet.ibm.com This fixes some inaccuracies in the state machine for the virtualized ICP when implementing the H_IPI hcall (Set_MFFR and related states): 1. The old code wipes out any pending interrupts when the new MFRR is more favored than the CPPR but

[PATCH 3/5] KVM: PPC: Book3S HV: Fix KSM memory corruption

2014-11-02 Thread Paul Mackerras
Testing with KSM active in the host showed occasional corruption of guest memory. Typically a page that should have contained zeroes would contain values that look like the contents of a user process stack (values such as 0x_3fff__xxx). Code inspection in kvmppc_h_protect revealed that

[PATCH 2/5] KVM: PPC: Book3S HV: Fix an issue where guest is paused on receiving HMI

2014-11-02 Thread Paul Mackerras
From: Mahesh Salgaonkar mah...@linux.vnet.ibm.com When we get an HMI (hypervisor maintenance interrupt) while in a guest, we see that guest enters into paused state. The reason is, in kvmppc_handle_exit_hv it falls through default path and returns to host instead of resuming guest. This causes

Re: [PATCH 1/5] KVM: PPC: Book3S HV: Fix computation of tlbie operand

2014-11-02 Thread Aneesh Kumar K.V
Paul Mackerras pau...@samba.org writes: The B (segment size) field in the RB operand for the tlbie instruction is two bits, which we get from the top two bits of the first doubleword of the HPT entry to be invalidated. These bits go in bits 8 and 9 of the RB operand (bits 54 and 55 in IBM

Re: [PATCH 1/5] KVM: PPC: Book3S HV: Fix computation of tlbie operand

2014-11-02 Thread Aneesh Kumar K.V
Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com writes: Paul Mackerras pau...@samba.org writes: The B (segment size) field in the RB operand for the tlbie instruction is two bits, which we get from the top two bits of the first doubleword of the HPT entry to be invalidated. These bits go

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

2014-11-01 Thread James Hogan
Hi Mario, On Wed, Oct 22, 2014 at 03:34:07PM -0700, Mario Smarduch wrote: +/** + * kvm_vm_ioctl_get_dirty_log - get and clear the log of dirty pages in a slot + * @kvm: kvm instance + * @log: slot id and address to which we copy the log + * + * We need to keep it in mind that VCPU threads

Re: [PATCH v12 1/6] KVM: Add architecture-defined TLB flush support

2014-10-30 Thread Cornelia Huck
On Wed, 22 Oct 2014 15:34:06 -0700 Mario Smarduch m.smard...@samsung.com wrote: This patch adds support for architecture implemented VM TLB flush, currently ARMv7 defines HAVE_KVM_ARCH_TLB_FLUSH_ALL. This leaves other architectures unaffected using the generic version. In subsequent patch

Re: [PATCH v12 0/6] arm/KVM: dirty page logging support for ARMv7 (3.17.0-rc1)

2014-10-30 Thread Christian Borntraeger
Am 23.10.2014 00:34, schrieb Mario Smarduch: This patch series introduces dirty page logging for ARMv7 and adds some degree of generic dirty logging support for x86, armv7 and later armv8. I implemented Alex's suggestion after he took a look at the patches at kvm forum to simplify the

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

2014-10-30 Thread Cornelia Huck
On Wed, 22 Oct 2014 15:34:07 -0700 Mario Smarduch m.smard...@samsung.com wrote: This patch defines KVM_GENERIC_DIRTYLOG, and moves dirty log read function to it's own file virt/kvm/dirtylog.c. x86 is updated to use the generic dirty log interface, selecting KVM_GENERIC_DIRTYLOG in its Kconfig

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

2014-10-30 Thread Mario Smarduch
On 10/30/2014 05:14 AM, Cornelia Huck wrote: On Wed, 22 Oct 2014 15:34:07 -0700 Mario Smarduch m.smard...@samsung.com wrote: This patch defines KVM_GENERIC_DIRTYLOG, and moves dirty log read function to it's own file virt/kvm/dirtylog.c. x86 is updated to use the generic dirty log

Re: [PATCH v12 0/6] arm/KVM: dirty page logging support for ARMv7 (3.17.0-rc1)

2014-10-30 Thread Mario Smarduch
On 10/30/2014 05:11 AM, Christian Borntraeger wrote: Am 23.10.2014 00:34, schrieb Mario Smarduch: This patch series introduces dirty page logging for ARMv7 and adds some degree of generic dirty logging support for x86, armv7 and later armv8. I implemented Alex's suggestion after he took a

[RFC PATCH 3/4] vhost: byteswap virtqueue attributes

2014-10-29 Thread Cédric Le Goater
The virtqueue structure shares a few attributes with the guest OS which need to be byteswapped when the endian order of the host is different. This patch uses the vq-byteswap attribute to decide whether to byteswap or not data being accessed in the guest memory. Signed-off-by: Cédric Le Goater

[RFC PATCH 4/4] vhost_net: byteswap virtio_net header

2014-10-29 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- drivers/vhost/net.c | 39 ++- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 8dae2f724a35..f2d5f585dae9 100644 --- a/drivers/vhost/net.c +++

[RFC PATCH 2/4] vhost: add byteswap routines

2014-10-29 Thread Cédric Le Goater
This patch adds a few helper routines around get_user and put_user to ease byteswapping. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- I am not sure these routines belong to this file. There is room for improvement to remove the ugly switch (sizeof(*(ptr))). Please comment !

Re: lockdep warning with 2d65a9f48fcdf7866aab6457bc707ca233e0c791

2014-10-28 Thread Paolo Bonzini
On 10/15/2014 07:28 PM, Aneesh Kumar K.V wrote: = [ INFO: possible recursive locking detected ] 3.17.0+ #31 Not tainted - qemu-system-ppc/9112 is trying to acquire lock:

Re: [PATCH v12 0/6] arm/KVM: dirty page logging support for ARMv7 (3.17.0-rc1)

2014-10-28 Thread Mario Smarduch
On 10/27/2014 06:24 PM, Wanpeng Li wrote: On Mon, Oct 27, 2014 at 05:28:28PM -0700, Mario Smarduch wrote: Hi Wanpeng, On 10/27/2014 04:26 PM, Wanpeng Li wrote: [...] Testing: - Generally live migration + checksumming of source/destination memory regions is used validate correctness.

Re: [PATCH v12 0/6] 2nd-request for review comments: arm/KVM: dirty page logging support for ARMv7 (3.17.0-rc1)

2014-10-28 Thread Mario Smarduch
Architecture maintainers (the To: folks) please provide your comments. This patch series has gone through quite a few itterations it would be nice to see the light at the end of the tunnel. Thanks. Mario On 10/22/2014 03:34 PM, Mario Smarduch wrote: This patch series introduces dirty page

Re: lockdep warning with 2d65a9f48fcdf7866aab6457bc707ca233e0c791

2014-10-28 Thread Paul Mackerras
On Wed, Oct 15, 2014 at 10:58:45PM +0530, Aneesh Kumar K.V wrote: = [ INFO: possible recursive locking detected ] 3.17.0+ #31 Not tainted - qemu-system-ppc/9112 is trying to acquire lock:

Re: [RFC 07/11] powerpc: kvm: the stopper func to cease secondary hwthread

2014-10-27 Thread Preeti U Murthy
On 10/17/2014 12:59 AM, kernelf...@gmail.com wrote: To enter guest, primary hwtherad schedules the stopper func on secondary threads and force them into NAP mode. When exit to host,secondary threads hardcode to restore the stack, then switch back to the stopper func, i.e host.

Re: [RFC 08/11] powerpc: kvm: add a flag in vcore to sync primary with secondry hwthread

2014-10-27 Thread Preeti U Murthy
On 10/17/2014 12:59 AM, kernelf...@gmail.com wrote: The secondary thread can only jump back to host until primary has set up the env. Add host_ready field in kvm_vcore to sync this action. Do we need to do this? We already synchronize among the sibling threads when there is a need to enter the

Re: [RFC 09/11] powerpc: kvm: handle time base on secondary hwthread

2014-10-27 Thread Preeti U Murthy
On 10/17/2014 12:59 AM, kernelf...@gmail.com wrote: (This is a place holder patch.) We need to store the time base for host on secondary hwthread. Later when switching back, we need to reprogram it with elapse time. Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com ---

Re: [RFC 11/11] powerpc: kvm: Kconfig add an option for enabling secondary hwthread

2014-10-27 Thread Preeti U Murthy
On 10/17/2014 01:00 AM, kernelf...@gmail.com wrote: Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com --- arch/powerpc/kvm/Kconfig | 4 1 file changed, 4 insertions(+) diff --git a/arch/powerpc/kvm/Kconfig b/arch/powerpc/kvm/Kconfig index 602eb51..de38566 100644 ---

Re: [PATCH v12 0/6] arm/KVM: dirty page logging support for ARMv7 (3.17.0-rc1)

2014-10-27 Thread Wanpeng Li
Hi Mario, On Wed, Oct 22, 2014 at 03:34:05PM -0700, Mario Smarduch wrote: This patch series introduces dirty page logging for ARMv7 and adds some degree of generic dirty logging support for x86, armv7 and later armv8. I implemented Alex's suggestion after he took a look at the patches at kvm

Re: [PATCH v12 0/6] arm/KVM: dirty page logging support for ARMv7 (3.17.0-rc1)

2014-10-27 Thread Mario Smarduch
Hi Wanpeng, On 10/27/2014 04:26 PM, Wanpeng Li wrote: [...] Testing: - Generally live migration + checksumming of source/destination memory regions is used validate correctness. Could you tell me where to get the checksum you are using? In addition, checksum should be used at which

Re: [PATCH v12 0/6] arm/KVM: dirty page logging support for ARMv7 (3.17.0-rc1)

2014-10-27 Thread Wanpeng Li
On Mon, Oct 27, 2014 at 05:28:28PM -0700, Mario Smarduch wrote: Hi Wanpeng, On 10/27/2014 04:26 PM, Wanpeng Li wrote: [...] Testing: - Generally live migration + checksumming of source/destination memory regions is used validate correctness. Could you tell me where to get the checksum

<    3   4   5   6   7   8   9   10   11   12   >