Re: [PATCH v11 2/6] KVM: Add generic implementation of kvm_vm_ioctl_get_dirty_log

2014-09-29 Thread Mario Smarduch
On 09/29/2014 10:18 AM, Cornelia Huck wrote: On Mon, 22 Sep 2014 17:54:46 -0700 Mario Smarduch m.smard...@samsung.com wrote: Add support for generic implementation of dirty log read function. For now x86_64 and ARMv7 share generic dirty log read. Other architectures call their architecture

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

2014-09-29 Thread Mario Smarduch
On 09/29/2014 06:35 AM, Christoffer Dall wrote: On Mon, Sep 22, 2014 at 05:54:50PM -0700, 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

[PATCH v11 0/6] arm: dirty page logging support for ARMv7

2014-09-22 Thread Mario Smarduch
specific variants for TLB Flushing and dirty log read (patches 1,2 3,4,5,6) - rebased to 3.16.0-rc1 - Applied Christoffers comments. Mario Smarduch (6): KVM: Add architecture-specific TLB flush implementations KVM: Add generic implementation of kvm_vm_ioctl_get_dirty_log arm: KVM: Add ARMv7 API

[PATCH v11 1/6] KVM: Add architecture-specific TLB flush implementations

2014-09-22 Thread Mario Smarduch
Add support to declare architecture specific TLB flush function, for now ARMv7. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- include/linux/kvm_host.h |1 + virt/kvm/Kconfig |3 +++ virt/kvm/kvm_main.c |4 3 files changed, 8 insertions(+) diff --git

[PATCH v11 2/6] KVM: Add generic implementation of kvm_vm_ioctl_get_dirty_log

2014-09-22 Thread Mario Smarduch
Add support for generic implementation of dirty log read function. For now x86_64 and ARMv7 share generic dirty log read. Other architectures call their architecture specific functions. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/kvm/Kconfig |1 + arch/arm/kvm

[PATCH v11 3/6] arm: KVM: Add ARMv7 API to flush TLBs

2014-09-22 Thread Mario Smarduch
This patch adds ARMv7 architecture TLB Flush function. 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|1 + arch/arm/kvm/interrupts.S | 12

[PATCH v11 4/6] arm: KVM: Add initial dirty page locking infrastructure

2014-09-22 Thread Mario Smarduch
Patch adds 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 + arch/arm/include

[PATCH v11 5/6] arm: KVM: dirty log read write protect support

2014-09-22 Thread Mario Smarduch
This patch adds support to track VM dirty pages, between dirty log reads. Pages that have been dirtied since last log read are write protected again, in preparation of next dirty log read. In addition ARMv7 dirty log read function is pushed up to generic layer. Signed-off-by: Mario Smarduch

[PATCH v11 6/6] arm: KVM: ARMv7 dirty page logging 2nd stage page fault

2014-09-22 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 may be used again. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/kvm/mmu.c

Re: [PATCH v10 0/6] arm: dirty page logging support for ARMv7

2014-08-28 Thread Mario Smarduch
On 08/28/2014 12:26 PM, Joel Schopp wrote: On 08/26/2014 06:51 PM, Mario Smarduch wrote: This patch adds support for ARMv7 dirty page logging. Some functions of dirty page logging have been split to generic and arch specific implementations, details below. Dirty page logging is one

[PATCH v10 4/6] arm: KVM: Add initial dirty page locking infrastructure

2014-08-26 Thread Mario Smarduch
Patch adds 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 | 1 + arch/arm/include

[PATCH v10 1/6] KVM: Add architecture-specific TLB flush implementations

2014-08-26 Thread Mario Smarduch
Add support to declare architecture specific TLB flush function, for now only ARMv7. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- virt/kvm/Kconfig| 3 +++ virt/kvm/kvm_main.c | 4 2 files changed, 7 insertions(+) diff --git a/virt/kvm/Kconfig b/virt/kvm/Kconfig index

[PATCH v10 3/6] arm: KVM: Add ARMv7 API to flush TLBs

2014-08-26 Thread Mario Smarduch
This patch adds ARMv7 architecture TLB Flush function. 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| 1 + arch/arm/kvm/interrupts.S | 12 4

[PATCH v10 0/6] arm: dirty page logging support for ARMv7

2014-08-26 Thread Mario Smarduch
. Mario Smarduch (6): KVM: Add architecture-specific TLB flush implementations KVM: Add generic implementation of kvm_vm_ioctl_get_dirty_log arm: KVM: Add ARMv7 API to flush TLBs arm: KVM: Add initial dirty page locking infrastructure arm: KVM: dirty log read write protect support arm: KVM

[PATCH v10 2/6] KVM: Add generic implementation of kvm_vm_ioctl_get_dirty_log

2014-08-26 Thread Mario Smarduch
Add support for generic implementation of dirty log read function. For now both x86_64 and ARMv7 share generic dirty log read. Other architectures call their architecture specific functions. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/include/asm/kvm_host.h | 2 + arch

[PATCH v10 5/6] arm: KVM: dirty log read write protect support

2014-08-26 Thread Mario Smarduch
This patch adds support to track VM dirty pages, between dirty log reads. Pages that have been dirtied since last log read are write protected again, in preparation of next dirty log read. In addition ARMv7 dirty log read function is pushed up to generic layer. Signed-off-by: Mario Smarduch

[PATCH v10 6/6] arm: KVM: ARMv7 dirty page logging 2nd stage page fault handling support

2014-08-26 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 may be used again. Signed-off-by: Mario Smaduch m.smard...@samsung.com --- arch/arm/kvm/mmu.c | 45

Re: [PATCH v9 4/4] arm: ARMv7 dirty page logging 2nd stage page fault handling support

2014-08-18 Thread Mario Smarduch
On 08/18/2014 05:51 AM, Christoffer Dall wrote: On Wed, Aug 13, 2014 at 06:20:19PM -0700, Mario Smarduch wrote: On 08/13/2014 12:30 AM, Christoffer Dall wrote: On Tue, Aug 12, 2014 at 06:27:11PM -0700, Mario Smarduch wrote: On 08/12/2014 02:50 AM, Christoffer Dall wrote: On Mon, Aug 11, 2014

Re: [PATCH v9 4/4] arm: ARMv7 dirty page logging 2nd stage page fault handling support

2014-08-14 Thread Mario Smarduch
On 08/13/2014 06:20 PM, Mario Smarduch wrote: On 08/13/2014 12:30 AM, Christoffer Dall wrote: On Tue, Aug 12, 2014 at 06:27:11PM -0700, Mario Smarduch wrote: On 08/12/2014 02:50 AM, Christoffer Dall wrote: On Mon, Aug 11, 2014 at 06:25:05PM -0700, Mario Smarduch wrote: On 08/11/2014 12:13 PM

Re: [PATCH v9 4/4] arm: ARMv7 dirty page logging 2nd stage page fault handling support

2014-08-13 Thread Mario Smarduch
On 08/13/2014 12:30 AM, Christoffer Dall wrote: On Tue, Aug 12, 2014 at 06:27:11PM -0700, Mario Smarduch wrote: On 08/12/2014 02:50 AM, Christoffer Dall wrote: On Mon, Aug 11, 2014 at 06:25:05PM -0700, Mario Smarduch wrote: On 08/11/2014 12:13 PM, Christoffer Dall wrote: On Thu, Jul 24, 2014

Re: [PATCH v9 2/4] arm: ARMv7 dirty page logging inital mem region write protect (w/no huge PUD support)

2014-08-12 Thread Mario Smarduch
On 08/12/2014 02:36 AM, Christoffer Dall wrote: On Mon, Aug 11, 2014 at 06:36:14PM -0700, Mario Smarduch wrote: On 08/11/2014 12:12 PM, Christoffer Dall wrote: [...] +/** + * stage2_wp_range() - write protect stage2 memory region range + * @kvm: The KVM pointer + * @start:Start

Re: [PATCH v9 2/4] arm: ARMv7 dirty page logging inital mem region write protect (w/no huge PUD support)

2014-08-12 Thread Mario Smarduch
On 08/12/2014 02:32 AM, Christoffer Dall wrote: On Mon, Aug 11, 2014 at 05:16:21PM -0700, Mario Smarduch wrote: On 08/11/2014 12:12 PM, Christoffer Dall wrote: Remove the parenthesis from the subject line. I just prefer not having the (w/no huge PUD support) part in the patch title. Ah ok

Re: [PATCH v9 4/4] arm: ARMv7 dirty page logging 2nd stage page fault handling support

2014-08-12 Thread Mario Smarduch
On 08/12/2014 02:50 AM, Christoffer Dall wrote: On Mon, Aug 11, 2014 at 06:25:05PM -0700, Mario Smarduch wrote: On 08/11/2014 12:13 PM, Christoffer Dall wrote: On Thu, Jul 24, 2014 at 05:56:08PM -0700, Mario Smarduch wrote: This patch adds support for handling 2nd stage page faults during

Re: [PATCH v9 1/4] arm: add ARMv7 HYP API to flush VM TLBs, change generic TLB flush to support arch flush

2014-08-11 Thread Mario Smarduch
On 08/11/2014 12:12 PM, Christoffer Dall wrote: On Thu, Jul 24, 2014 at 05:56:05PM -0700, Mario Smarduch wrote: Patch adds HYP interface for global VM TLB invalidation without address parameter. Generic VM TLB flush calls ARMv7 arch defined TLB flush function. Signed-off-by: Mario Smarduch

Re: [PATCH v9 2/4] arm: ARMv7 dirty page logging inital mem region write protect (w/no huge PUD support)

2014-08-11 Thread Mario Smarduch
On 08/11/2014 12:12 PM, Christoffer Dall wrote: Remove the parenthesis from the subject line. Hmmm have to check this don't see it my patch file. On Thu, Jul 24, 2014 at 05:56:06PM -0700, Mario Smarduch wrote: Patch adds support for initial write protection VM memlsot. This patch series

Re: [PATCH v9 3/4] arm: dirty log write protect mgmt. Moved x86, armv7 to generic, set armv8 ia64 mips powerpc s390 arch specific

2014-08-11 Thread Mario Smarduch
On 08/11/2014 12:13 PM, Christoffer Dall wrote: On Thu, Jul 24, 2014 at 05:56:07PM -0700, Mario Smarduch wrote: This patch adds support for keeping track of VM dirty pages. As dirty page log is retrieved, the pages that have been written are write protected again for next write and log read

Re: [PATCH v9 4/4] arm: ARMv7 dirty page logging 2nd stage page fault handling support

2014-08-11 Thread Mario Smarduch
On 08/11/2014 12:13 PM, Christoffer Dall wrote: On Thu, Jul 24, 2014 at 05:56:08PM -0700, 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

Re: [PATCH v9 2/4] arm: ARMv7 dirty page logging inital mem region write protect (w/no huge PUD support)

2014-08-11 Thread Mario Smarduch
On 08/11/2014 12:12 PM, Christoffer Dall wrote: Remove the parenthesis from the subject line. On Thu, Jul 24, 2014 at 05:56:06PM -0700, Mario Smarduch wrote: Patch adds support for initial write protection VM memlsot. This patch series

Re: [PATCH v9 1/4] arm: add ARMv7 HYP API to flush VM TLBs ... - looking for comments

2014-08-08 Thread Mario Smarduch
192.168.2.100 gw 192.168.10.100 ssh should resume after route switch. ping as well should work seamlessly. Mario Smarduch (4): add ARMv7 HYP API to flush VM TLBs, change generic TLB flush to support arch flush ARMv7 dirty page logging inital mem region write protect (w/no huge PUD support

Re: [PATCH v9 1/4] arm: add ARMv7 HYP API to flush VM TLBs, change generic TLB flush to support arch flush

2014-07-25 Thread Mario Smarduch
On 07/24/2014 11:12 PM, Alexander Graf wrote: On 25.07.14 02:56, Mario Smarduch wrote: Patch adds HYP interface for global VM TLB invalidation without address parameter. Generic VM TLB flush calls ARMv7 arch defined TLB flush function. Signed-off-by: Mario Smarduch m.smard...@samsung.com

Re: [PATCH v9 2/4] arm: ARMv7 dirty page logging inital mem region write protect (w/no huge PUD support)

2014-07-25 Thread Mario Smarduch
On 07/24/2014 11:16 PM, Alexander Graf wrote: On 25.07.14 02:56, Mario Smarduch wrote: Patch adds support for initial write protection VM memlsot. This patch series assumes that huge PUDs will not be used in 2nd stage tables. Is this a valid assumption? Right now it's unclear if PUDs

[PATCH v9 1/4] arm: add ARMv7 HYP API to flush VM TLBs, change generic TLB flush to support arch flush

2014-07-24 Thread Mario Smarduch
Patch adds HYP interface for global VM TLB invalidation without address parameter. Generic VM TLB flush calls ARMv7 arch defined TLB flush function. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/include/asm/kvm_asm.h |1 + arch/arm/include/asm/kvm_host.h |1 + arch

[PATCH v9 0/4] arm: dirty page logging support for ARMv7

2014-07-24 Thread Mario Smarduch
seamlessly. Mario Smarduch (4): add ARMv7 HYP API to flush VM TLBs, change generic TLB flush to support arch flush ARMv7 dirty page logging inital mem region write protect (w/no huge PUD support) dirty log write protect mgmt. Moved x86, armv7 to generic, set armv8 ia64 mips powerpc

[PATCH v9 3/4] arm: dirty log write protect mgmt. Moved x86, armv7 to generic, set armv8 ia64 mips powerpc s390 arch specific

2014-07-24 Thread Mario Smarduch
. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/kvm/arm.c |8 +++- arch/arm/kvm/mmu.c | 22 + arch/arm64/include/asm/kvm_host.h |2 + arch/arm64/kvm/Kconfig |1 + arch/ia64/include/asm/kvm_host.h|1

[PATCH v9 2/4] arm: ARMv7 dirty page logging inital mem region write protect (w/no huge PUD support)

2014-07-24 Thread Mario Smarduch
Patch adds support for initial write protection VM memlsot. This patch series assumes that huge PUDs will not be used in 2nd stage tables. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/include/asm/kvm_host.h |1 + arch/arm/include/asm/kvm_mmu.h| 20

[PATCH v9 4/4] arm: ARMv7 dirty page logging 2nd stage page fault handling support

2014-07-24 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 will be used again. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/kvm/mmu.c

Re: [RESEND PATCH v7 3/4] arm: dirty log write protect management support

2014-07-17 Thread Mario Smarduch
On 07/04/2014 09:29 AM, Paolo Bonzini wrote: Il 03/07/2014 17:04, Christoffer Dall ha scritto: Hmmm, I'm really not an expert in the 'established procedures' for what to put in config files etc., but here's my basic take: a) you wouldn't put a config option in Kconfig unless it's comething

Re: [RESEND PATCH v7 3/4] arm: dirty log write protect management support

2014-07-17 Thread Mario Smarduch
add dirty log support to ARMv8, to test I would add a QEMU monitor function to validate general operation. Your thoughts? Thanks, Mario On 07/03/2014 08:04 AM, Christoffer Dall wrote: On Tue, Jun 17, 2014 at 06:41:52PM -0700, Mario Smarduch wrote: On 06/11/2014 12:03 AM, Christoffer Dall wrote

[PATCH v8 3/4] arm: dirty log write protect management support

2014-06-18 Thread Mario Smarduch
This patch adds support for keeping track of VM dirty pages. As dirty page log is retrieved, the pages that have been written are write protected again for next write and log read. For ARMv8 read of dirty log returns invalid operation. Signed-off-by: Mario Smarduch m.smard...@samsung.com

[PATCH v8 4/4] arm: dirty page logging 2nd stage page fault handling support

2014-06-18 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 will be used again. For ARMv8 logging is hardcoded to false. Signed-off-by: Mario Smarduch m.smard

[PATCH v8 2/4] arm: dirty page logging inital mem region write protect (w/no huge PUD support)

2014-06-18 Thread Mario Smarduch
Patch adds support for initial write protection VM memlsot. This patch series assumes that huge PUDs will not be used in 2nd stage tables. For ARMv8 nothing happens here. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/include/asm/kvm_host.h |1 + arch/arm/include

[PATCH v8 1/4] arm: add ARMv7 HYP API to flush VM TLBs without address param

2014-06-18 Thread Mario Smarduch
Patch adds HYP interface for global VM TLB invalidation without address parameter. Moved VM TLB flushing back to architecture layer. This patch depends on the unmap_range() patch, it needs to be applied first. No changes to ARMv8. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm

[PATCH v8 0/4] arm: dirty page logging support for ARMv7

2014-06-18 Thread Mario Smarduch
protection of dirty page mask - Moved generic code back to architecture layer, keep it there for time being, until a KVM framework for architecture functions to override genric ones is defined. - Fixed conditon bug for marking pages dirty Mario Smarduch (4): add ARMv7 HYP API to flush VM TLBs

Re: [RESEND PATCH v7 3/4] arm: dirty log write protect management support

2014-06-17 Thread Mario Smarduch
On 06/11/2014 12:03 AM, Christoffer Dall wrote: There is also the issue of kvm_flush_remote_tlbs(), that's also weak, the generic one is using IPIs. Since it's only used in mmu.c maybe make this one static. So I don't see a lot of use of weak symbols in kvm_main.c (actually on kvmarm/next

Re: [PATCH v7 4/4] arm: dirty page logging 2nd stage page fault handling support

2014-06-11 Thread Mario Smarduch
On 06/10/2014 11:58 PM, Christoffer Dall wrote: On Tue, Jun 10, 2014 at 11:23:17AM -0700, Mario Smarduch wrote: On 06/08/2014 05:05 AM, Christoffer Dall wrote: On Tue, Jun 03, 2014 at 04:19:27PM -0700, Mario Smarduch wrote: This patch adds support for handling 2nd stage page faults during

Re: [RESEND PATCH v7 3/4] arm: dirty log write protect management support

2014-06-11 Thread Mario Smarduch
Hi Paolo, for ARM dirty page logging we have couple functions that are generic. - kvm_vm_ioctl_get_dirty_log - is identical to x86 version - kvm_flush_remote_tlbs - ARM version does hardware broadcast it's different from the generic one in kvm_main.c How to proceed to make these generic?

Re: [RESEND PATCH v7 3/4] arm: dirty log write protect management support

2014-06-10 Thread Mario Smarduch
On 06/10/2014 02:22 AM, Christoffer Dall wrote: On Mon, Jun 09, 2014 at 06:47:12PM -0700, Mario Smarduch wrote: On 06/08/2014 05:05 AM, Christoffer Dall wrote: On Fri, Jun 06, 2014 at 10:33:41AM -0700, Mario Smarduch wrote: kvm_vm_ioctl_get_dirty_log() is generic used by x86, ARM. x86 recent

Re: [PATCH v7 4/4] arm: dirty page logging 2nd stage page fault handling support

2014-06-10 Thread Mario Smarduch
On 06/08/2014 05:05 AM, Christoffer Dall wrote: On Tue, Jun 03, 2014 at 04:19:27PM -0700, Mario Smarduch wrote: This patch adds support for handling 2nd stage page faults during migration, it disables faulting in huge pages, and disolves huge pages to page tables. s/disolves/dissolves/g

Re: [PATCH v7 0/4] arm: dirty page logging support for ARMv7

2014-06-09 Thread Mario Smarduch
On 06/08/2014 03:45 AM, Christoffer Dall wrote: On Tue, Jun 03, 2014 at 04:19:23PM -0700, Mario Smarduch wrote: This patch adds support for dirty page logging so far tested only on ARMv7. With dirty page logging, GICv2 vGIC and arch timer save/restore support, live migration is supported

Re: [PATCH v7 1/4] arm: add ARMv7 HYP API to flush VM TLBs without address param

2014-06-09 Thread Mario Smarduch
On 06/08/2014 05:05 AM, Christoffer Dall wrote: On Tue, Jun 03, 2014 at 04:19:24PM -0700, Mario Smarduch wrote: Patch adds HYP interface for global VM TLB invalidation without address parameter. Added ARM version of kvm_flush_remote_tlbs(), made the generic implementation a weak symbol

Re: [PATCH v7 2/4] arm: dirty page logging inital mem region write protect (w/no huge PUD support)

2014-06-09 Thread Mario Smarduch
On 06/08/2014 05:05 AM, Christoffer Dall wrote: On Tue, Jun 03, 2014 at 04:19:25PM -0700, Mario Smarduch wrote: Patch adds memslot support for initial write protection and split up of huge pages. This patch series assumes that huge PUDs will not be used to map VM memory. This patch depends

Re: [PATCH v7 2/4] arm: dirty page logging inital mem region write protect (w/no huge PUD support)

2014-06-09 Thread Mario Smarduch
On 06/09/2014 11:09 AM, Christoffer Dall wrote: On Mon, Jun 09, 2014 at 10:58:18AM -0700, Mario Smarduch wrote: On 06/08/2014 05:05 AM, Christoffer Dall wrote: On Tue, Jun 03, 2014 at 04:19:25PM -0700, Mario Smarduch wrote: Patch adds memslot support for initial write protection and split up

Re: [PATCH v7 1/4] arm: add ARMv7 HYP API to flush VM TLBs without address param

2014-06-09 Thread Mario Smarduch
On 06/09/2014 10:49 AM, Christoffer Dall wrote: On Mon, Jun 09, 2014 at 10:06:29AM -0700, Mario Smarduch wrote: On 06/08/2014 05:05 AM, Christoffer Dall wrote: On Tue, Jun 03, 2014 at 04:19:24PM -0700, Mario Smarduch wrote: Patch adds HYP interface for global VM TLB invalidation without

Re: [RESEND PATCH v7 3/4] arm: dirty log write protect management support

2014-06-09 Thread Mario Smarduch
On 06/08/2014 05:05 AM, Christoffer Dall wrote: On Fri, Jun 06, 2014 at 10:33:41AM -0700, Mario Smarduch wrote: kvm_vm_ioctl_get_dirty_log() is generic used by x86, ARM. x86 recent patch changed this function, this patch picks up those changes, re-tested everything works. Applies cleanly

[RESEND PATCH v7 3/4] arm: dirty log write protect management support

2014-06-06 Thread Mario Smarduch
, the pages that have been written are write protected again for next write and log read. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/include/asm/kvm_host.h |3 ++ arch/arm/kvm/arm.c |5 --- arch/arm/kvm/mmu.c | 79

Re: [RESEND PATCH v7 3/4] arm: dirty log write protect management support

2014-06-06 Thread Mario Smarduch
On 06/05/2014 10:52 PM, Xiao Guangrong wrote: On 06/06/2014 03:09 AM, Mario Smarduch wrote: On 06/04/2014 11:55 PM, Xiao Guangrong wrote: On 06/05/2014 05:11 AM, Mario Smarduch wrote: + spin_lock(kvm-mmu_lock); + + for (i = 0; i n / sizeof(long); i++) { + unsigned long mask

Re: [RESEND PATCH v7 3/4] arm: dirty log write protect management support

2014-06-05 Thread Mario Smarduch
On 06/04/2014 11:55 PM, Xiao Guangrong wrote: On 06/05/2014 05:11 AM, Mario Smarduch wrote: +spin_lock(kvm-mmu_lock); + +for (i = 0; i n / sizeof(long); i++) { +unsigned long mask; +gfn_t offset; + +if (!dirty_bitmap[i

[RESEND PATCH v7 3/4] arm: dirty log write protect management support

2014-06-04 Thread Mario Smarduch
log is retrieved, the pages that have been written are write protected again for next write and log read. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/include/asm/kvm_host.h |3 ++ arch/arm/kvm/arm.c |5 --- arch/arm/kvm/mmu.c | 79

[PATCH v7 4/4] arm: dirty page logging 2nd stage page fault handling support

2014-06-03 Thread Mario Smarduch
This patch adds support for handling 2nd stage page faults during migration, it disables faulting in huge pages, and disolves huge pages to page tables. In case migration is canceled huge pages will be used again. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/kvm/mmu.c | 36

[PATCH v7 0/4] arm: dirty page logging support for ARMv7

2014-06-03 Thread Mario Smarduch
on logging request - Only code logic change, disolve huge pages to page tables in page fault handler - Made many many changes based on Christoffers comments. Mario Smarduch (4): add ARMv7 HYP API to flush VM TLBs without address param dirty page logging inital mem region write protect (w

[PATCH v7 1/4] arm: add ARMv7 HYP API to flush VM TLBs without address param

2014-06-03 Thread Mario Smarduch
Patch adds HYP interface for global VM TLB invalidation without address parameter. Added ARM version of kvm_flush_remote_tlbs(), made the generic implementation a weak symbol. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/include/asm/kvm_asm.h |1 + arch/arm/kvm

[PATCH v7 2/4] arm: dirty page logging inital mem region write protect (w/no huge PUD support)

2014-06-03 Thread Mario Smarduch
Patch adds memslot support for initial write protection and split up of huge pages. This patch series assumes that huge PUDs will not be used to map VM memory. This patch depends on the unmap_range() patch, it needs to be applied first. Signed-off-by: Mario Smarduch m.smard...@samsung.com

[PATCH v7 3/4] arm: dirty log write protect management support

2014-06-03 Thread Mario Smarduch
This patch adds support for keeping track of VM dirty pages. As dirty page log is retrieved, the pages that have been written are write protected again for next write and log read. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/include/asm/kvm_host.h |3 ++ arch/arm/kvm

Re: [PATCH v5 2/4] live migration support for initial write protect of VM

2014-05-30 Thread Mario Smarduch
+static inline void kvm_set_s2pte_readonly(pte_t *pte) +{ +pte_val(*pte) = ~(L_PTE_S2_RDONLY ^ L_PTE_S2_RDWR); This relies on the pte already having been set as RDONLY or RDWR, if you are creating a new pte and calling this function it could be easy to miss that distinction, I

Re: [PATCH v6 4/4] add 2nd stage page fault handling during live migration

2014-05-29 Thread Mario Smarduch
So this needs to be cleared up given this is key to logging. Cases this code handles during migration - 1. huge page fault described above - write protect fault so you breakup the huge page. 2. All other faults - first time access, pte write protect you again wind up in

Re: [PATCH v6 4/4] add 2nd stage page fault handling during live migration

2014-05-29 Thread Mario Smarduch
On 05/29/2014 10:57 AM, Christoffer Dall wrote: On Thu, May 29, 2014 at 10:08:07AM -0700, Mario Smarduch wrote: So this needs to be cleared up given this is key to logging. Cases this code handles during migration - 1. huge page fault described above - write protect fault so you breakup

Re: [PATCH v6 3/4] live migration support for VM dirty log management

2014-05-28 Thread Mario Smarduch
On 05/28/2014 02:08 AM, Christoffer Dall wrote: On Tue, May 27, 2014 at 02:55:21PM -0700, Mario Smarduch wrote: On 05/27/2014 01:12 PM, Christoffer Dall wrote: On Thu, May 15, 2014 at 11:27:30AM -0700, Mario Smarduch wrote: [...] + + /* If pgd, pud, pmd not present and you cross pmd

Re: [PATCH v6 4/4] add 2nd stage page fault handling during live migration

2014-05-28 Thread Mario Smarduch
emslot dirty_bitmap during and after write protect. -Christoffer Regarding huge pud that's causing some design problems, should huge PUD pages be considered at all? Thanks, Mario ___ kvmarm mailing list kvm...@lists.cs.columbia.edu

Re: [PATCH v6 4/4] add 2nd stage page fault handling during live migration

2014-05-28 Thread Mario Smarduch
-level table at this time. I think until PUD Blocks are actually used it's maybe better to ignore them. - Mario On 05/28/2014 11:42 AM, Mario Smarduch wrote: emslot dirty_bitmap during and after write protect. -Christoffer Regarding huge pud that's causing some design problems, should

Re: [PATCH v6 2/4] live migration support for initial write protect of VM

2014-05-27 Thread Mario Smarduch
(but may windup with a github link). Thanks, Mario On 05/27/2014 12:58 PM, Christoffer Dall wrote: On Thu, May 15, 2014 at 11:27:29AM -0700, Mario Smarduch wrote: Patch adds memslot support for initial write protection and split up of huge pages I lost track of where we

Re: [PATCH v6 3/4] live migration support for VM dirty log management

2014-05-27 Thread Mario Smarduch
On 05/27/2014 01:12 PM, Christoffer Dall wrote: On Thu, May 15, 2014 at 11:27:30AM -0700, Mario Smarduch wrote: This patch adds support for keeping track of VM dirty pages, by updating per memslot dirty bitmap and write protecting the page again. Signed-off-by: Mario Smarduch m.smard

Re: [PATCH v6 4/4] add 2nd stage page fault handling during live migration

2014-05-27 Thread Mario Smarduch
On 05/27/2014 01:19 PM, Christoffer Dall wrote: On Thu, May 15, 2014 at 11:27:31AM -0700, Mario Smarduch wrote: This patch adds support for handling 2nd stage page faults during migration, it disables faulting in huge pages, and splits up existing huge pages. Signed-off-by: Mario Smarduch

Re: [PATCH v5 2/4] live migration support for initial write protect of VM

2014-05-16 Thread Mario Smarduch
Hi Christoffer, few more comments struct vgic_distvgic; + /* Marks start of migration, used to handle 2nd stage page faults +* during migration, prevent installing huge pages and split huge pages +* to small pages. +*/ commenting style this is a bit verbose for

[PATCH v6 1/4] add ARMv7 HYP API to flush VM TLBs without address param

2014-05-15 Thread Mario Smarduch
Patch adds HYP interface for global VM TLB invalidation without address parameter. Added ARM version of kvm_flush_remote_tlbs(), made generic one weak. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/include/asm/kvm_asm.h |1 + arch/arm/kvm/interrupts.S | 11

[PATCH v6 0/4] live migration dirty bitmap support for ARMv7

2014-05-15 Thread Mario Smarduch
, and use current code to fault in small pages. Removed kvm_split_pmd(). Mario Smarduch (4): add ARMv7 HYP API to flush VM TLBs without address param live migration support for initial write protect of VM live migration support for VM dirty log management add 2nd stage page fault handling

[PATCH v6 4/4] add 2nd stage page fault handling during live migration

2014-05-15 Thread Mario Smarduch
This patch adds support for handling 2nd stage page faults during migration, it disables faulting in huge pages, and splits up existing huge pages. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/kvm/mmu.c | 36 ++-- 1 file changed, 34

[PATCH v6 2/4] live migration support for initial write protect of VM

2014-05-15 Thread Mario Smarduch
Patch adds memslot support for initial write protection and split up of huge pages Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/include/asm/kvm_host.h |8 +++ arch/arm/include/asm/kvm_mmu.h | 10 +++ arch/arm/kvm/arm.c |3 + arch/arm/kvm/mmu.c

[PATCH v6 3/4] live migration support for VM dirty log management

2014-05-15 Thread Mario Smarduch
This patch adds support for keeping track of VM dirty pages, by updating per memslot dirty bitmap and write protecting the page again. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/include/asm/kvm_host.h |3 ++ arch/arm/kvm/arm.c |5 -- arch/arm/kvm/mmu.c

Re: [PATCH v5 2/4] live migration support for initial write protect of VM

2014-05-15 Thread Mario Smarduch
On 05/15/2014 11:53 AM, Christoffer Dall wrote: [I know you sent out a newer version but I already reviewed some of this patch on the plane today but couldn't send it out before I got home. Anyway, here it is:] On Wed, May 07, 2014 at 05:40:14PM -0700, Mario Smarduch wrote: Patch adds

Re: [PATCH v6 0/4] live migration dirty bitmap support for ARMv7

2014-05-15 Thread Mario Smarduch
Will do that, I'm sure there will be another iteration :). On 05/15/2014 11:51 AM, Christoffer Dall wrote: On Thu, May 15, 2014 at 11:27:27AM -0700, Mario Smarduch wrote: This is v6 patcheset of live mgiration support for ARMv7. migration This is an extremely terse cover letter. It would

Re: [PATCH v5 1/4] add ARMv7 HYP API to flush VM TLBs without address param

2014-05-14 Thread Mario Smarduch
On 05/14/2014 09:47 AM, Christoffer Dall wrote: On Wed, May 07, 2014 at 05:40:13PM -0700, Mario Smarduch wrote: Patch adds HYP interface for global VM TLB invalidation without address parameter. - Added ARM version of kvm_flush_remote_tlbs() Signed-off-by: Mario Smarduch m.smard

[PATCH v5 1/4] add ARMv7 HYP API to flush VM TLBs without address param

2014-05-07 Thread Mario Smarduch
Patch adds HYP interface for global VM TLB invalidation without address parameter. - Added ARM version of kvm_flush_remote_tlbs() Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/include/asm/kvm_asm.h |1 + arch/arm/include/asm/kvm_host.h |2 ++ arch/arm/kvm

[PATCH v5 4/4] add 2nd stage page fault handling during live migration

2014-05-07 Thread Mario Smarduch
This patch adds support for handling 2nd stage page faults during migration, it disables faulting in huge pages, and splits up existing huge pages. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/kvm/mmu.c | 30 -- 1 file changed, 28 insertions

Re: [PATCH v4 5/5] change update_range to handle 4GB 2nd stage range for ARMv7

2014-05-05 Thread Mario Smarduch
Hi Gavin, thanks, didn't catch that, I'll remove these calls. - Mario On 05/05/2014 04:34 PM, Gavin Guo wrote: Hi Mario, On Tue, Apr 29, 2014 at 9:06 AM, Mario Smarduch m.smard...@samsung.com wrote: This patch adds support for unmapping 2nd stage page tables for addresses 4GB

[PATCH v4 2/5] live migration support for initial write protect of VM

2014-04-28 Thread Mario Smarduch
Patch adds support for live migration initial split up of huge pages in memory slot and write protection of all pages in memory slot. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/include/asm/kvm_host.h |8 ++ arch/arm/include/asm/kvm_mmu.h | 11 ++ arch/arm/kvm/arm.c

[PATCH v4 3/5] live migration support for VM dirty log management

2014-04-28 Thread Mario Smarduch
This patch adds support for keeping track of VM dirty pages, by updating per memslot dirty bitmap and write protecting the page again. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/include/asm/kvm_host.h |3 ++ arch/arm/kvm/arm.c |5 -- arch/arm/kvm

[PATCH v4 0/5] live migration dirty bitmap support for ARMv7

2014-04-28 Thread Mario Smarduch
- Marc's comment - changed Data Abort handler pte index handling - Marc's comment Mario Smarduch (5): add ARMv7 HYP API to flush VM TLBs without address param live migration support for initial write protect of VM live migration support for VM dirty log management add 2nd stage page fault

[PATCH v4 4/5] add 2nd stage page fault handling during live migration

2014-04-28 Thread Mario Smarduch
This patch add support for handling 2nd stage page faults during migration, it disables faulting in huge pages, and splits up existing huge pages. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/kvm/mmu.c | 31 +-- 1 file changed, 29 insertions

[PATCH v4 5/5] change update_range to handle 4GB 2nd stage range for ARMv7

2014-04-28 Thread Mario Smarduch
This patch adds support for unmapping 2nd stage page tables for addresses 4GB on ARMv7. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/kvm/mmu.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c

Re: [PATCH v3 2/4] live migration support for initial write protect of VM

2014-04-24 Thread Mario Smarduch
On 04/24/2014 09:39 AM, Steve Capper wrote: On Wed, Apr 23, 2014 at 12:18:07AM +0100, Mario Smarduch wrote: Support for live migration initial write protect. - moved write protect to architecture memory region prepare function. This way you can fail, abort migration without keep track

[PATCH v3 0/4] live migration dirty bitmap support for ARMv7

2014-04-22 Thread Mario Smarduch
- changed Data Abort handler pte index handling - Marc's comment Mario Smarduch (4): add ARMv7 HYP API to flush VM TLBs without address param live migration support for initial write protect of VM to track dirty pages live migration support for VM dirty log management add 2nd stage page

[PATCH v3 1/4] add ARMv7 HYP API to flush VM TLBs without address param

2014-04-22 Thread Mario Smarduch
Add HYP interface for global VM TLB invalidation without address parameter. - Added ARM version of kvm_flush_remote_tlbs() Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/include/asm/kvm_asm.h |1 + arch/arm/include/asm/kvm_host.h |2 ++ arch/arm/kvm/interrupts.S

[PATCH v3 2/4] live migration support for initial write protect of VM

2014-04-22 Thread Mario Smarduch
() - optimized initial write protect, skip upper table lookups - added stage2pmd_addr_end() to do generic 4 level table walk - changed kvm_flush_remote_tlbs() to weak function Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/include/asm/kvm_host.h |8 ++ arch/arm/kvm/arm.c

[PATCH v3 4/4] add 2nd stage page fault handling during live migration

2014-04-22 Thread Mario Smarduch
- added pte_index() to add to pmd pfn Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/kvm/mmu.c | 31 +-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c index 52d4dd6..61ee812 100644

[PATCH v3 3/4] live migration support for VM dirty log management

2014-04-22 Thread Mario Smarduch
- made kvm_vm_ioctl_get_dirty_log() generic moved to kvm_main.c, deleted arm,x86 versions - optimized kvm_mmu_write_protected_pt_masked() to skip upper table lookups Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/include/asm/kvm_host.h |3 ++ arch/arm/kvm/arm.c

RE: [PATCH 4/5] add 2nd stage page fault handling during live migration

2014-04-18 Thread Mario Smarduch
Hi Marc, + if (migration_active hugetlb) { + pmd_t *pmd; + pfn += (fault_ipa PAGE_SHIFT) + (PTRS_PER_PMD-1); MZ Shouldn't that be pfn += pte_index(fault_addr);?

RE: [PATCH 3/5] live migration support for VM dirty log management

2014-04-17 Thread Mario Smarduch
MZ So let's play the difference game with x86: int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm, struct kvm_dirty_log kvm_vm_ioctl_get_dirty_log() is identical now to x86 version moved it to kvm_main.c, to make it generic, it's declared weak. Do I go into x86 and remove that function? Or

[PATCH 0/5] live migration dirty bitmap support for ARMv7

2014-04-16 Thread Mario Smarduch
pages are broken up into small pages to support migration on loaded systems. Mario Smarduch (5): add ARMv7 HYP API to flush VM TLBs without address param live migration support for initial write protect of VM to manage dirty pages live migration support for VM dirty log management add

[PATCH 2/5] live migration support for initial write protect of VM

2014-04-16 Thread Mario Smarduch
. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/include/asm/kvm_host.h |1 + arch/arm/kvm/arm.c |4 ++ arch/arm/kvm/mmu.c | 125 +++ 3 files changed, 130 insertions(+) diff --git a/arch/arm/include/asm

[PATCH 1/5] add ARMv7 HYP API to flush VM TLBs without address param

2014-04-16 Thread Mario Smarduch
Add HYP API to invalidate all VM TLBs without passing address parameter, that kvm_tlb_flush_vmid_ipa() uses. Hopefully this is a valid way to do it. Tests show nothing is broken. The address parameter is confusing since whole VM is being invalidated. Signed-off-by: Mario Smarduch m.smard

<    1   2   3   4   5   >