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
Hi Christoffer, Just back from holiday - a short plan to resume work. - move VM tlb flush and kvm log functions to generic, per Paolo's comments use Kconfig approach - update other architectures make sure they compile - Keep it ARMv7 for now Get maintainers to test the branch. In parallel

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

2014-07-04 Thread Paolo Bonzini
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 that's actually configurable or some generic

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

2014-07-03 Thread Christoffer Dall
On Tue, Jun 17, 2014 at 06:41:52PM -0700, Mario Smarduch wrote: 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

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: [RESEND PATCH v7 3/4] arm: dirty log write protect management support

2014-06-11 Thread Christoffer Dall
On Tue, Jun 10, 2014 at 11:08:24AM -0700, Mario Smarduch wrote: 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:

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 Christoffer Dall
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 patch changed this function, this patch picks

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: [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

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

2014-06-08 Thread Christoffer Dall
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 with other patches. This patch adds support for

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

2014-06-06 Thread Mario Smarduch
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 with other patches. This patch adds support for keeping track of VM dirty pages. As dirty page log is retrieved, the

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 Xiao Guangrong
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]) + continue; + + is_dirty =

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]) +

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

2014-06-05 Thread Xiao Guangrong
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; + gfn_t offset; + + if

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

2014-06-04 Thread Mario Smarduch
Resending patch, noticed I forgot to adjust start_ipa properly in stage2_wp_mask_range() and then noticed that pte's can be indexed directly. The patch applies cleanly after 2/4 and 4/4 applies cleanly after this patch. This patch adds support for keeping track of VM dirty pages. As dirty page

[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 ++