[PATCH 1/2] add irq priodrop support

2013-06-11 Thread Mario Smarduch
Host: Prio Drop Guest: Prio Drop - Mario Signed-off-by: Mario Smarduch mario.smard...@huawei.com --- arch/arm/kvm/Kconfig|8 +++ drivers/irqchip/irq-gic.c | 145 ++- include/linux/irqchip/arm-gic.h |6 ++ 3 files changed, 156

[PATCH 2/2] add initial kvm dev passhtrough support

2013-06-11 Thread Mario Smarduch
to '/proc/irq/sp804 irq/smp_affinity' confirm dynamic CPU affinity. - IRQ rates (maybe not that important give its emulated env) reached excess of 500. There is a QEMU piece very simple for now that I will email later, in case someone would like to test. - Mario Signed-off-by: Mario Smarduch

Dev Passthrough QEMU patch

2013-06-11 Thread Mario Smarduch
This patch is for testing only and goes along with other two patches for priodrop and dev passthrough, it should apply against 1.4.5. diff --git a/cpus.c b/cpus.c index c15ff6c..0c19214 100644 --- a/cpus.c +++ b/cpus.c @@ -737,6 +737,26 @@ static void *qemu_kvm_cpu_thread_fn(void *arg)

Re: [PATCH 2/2] add initial kvm dev passhtrough support

2013-06-11 Thread Mario Smarduch
On 6/11/2013 10:28 AM, Alexander Graf wrote: Is there any particular reason you're not going down that path for your ARM implementation? We see this as a good starting point to build on, we need baseline numbers for performance, latency, interrupt throughput on real hardware ASAP to build

Re: [PATCH 2/2] add initial kvm dev passhtrough support

2013-06-11 Thread Mario Smarduch
I know Antonios very well. Yes our intent is definitely to use VFIO. - Mario On 6/11/2013 4:52 PM, Alex Williamson wrote: On Tue, 2013-06-11 at 16:13 +0200, Mario Smarduch wrote: On 6/11/2013 10:28 AM, Alexander Graf wrote: Is there any particular reason you're not going down that path

Re: [PATCH 1/2] add irq priodrop support

2013-06-11 Thread Mario Smarduch
Hi Grant, appreciate the strong feedback, I agree with all the coding observations will make the changes. I have few inline responses. +static u32 gic_irq_prio_drop[DIV_ROUND_UP(1020, 32)] __read_mostly; I believe it is possible to have more than one GIC in a

Re: [PATCH 2/2] add initial kvm dev passhtrough support

2013-06-12 Thread Mario Smarduch
Resending, initial email from my exchange client got rejected due to HTML content On 6/12/2013 8:45 AM, Mario Smarduch wrote: Hi Antonios, thanks for your feedback, initially we’ll work with static binding gain performance data given latency/throughput is key, later add dynamic

[PATCH 2/2] armv7 initial device passthrough support

2013-06-13 Thread Mario Smarduch
performance latency issue (some ARM related) for device passthrough while we migrate towards VFIO. - Mario Signed-off-by: Mario Smarduch mario.smard...@huawei.com --- arch/arm/include/asm/kvm_host.h | 31 + arch/arm/include/asm/kvm_vgic.h | 10 ++ arch/arm/kvm/Makefile |1 + arch

Re: [PATCH 2/2] armv7 initial device passthrough support

2013-06-24 Thread Mario Smarduch
On 6/15/2013 5:47 PM, Paolo Bonzini wrote: Il 13/06/2013 11:19, Mario Smarduch ha scritto: Updated Device Passthrough Patch. - optimized IRQ-CPU-vCPU binding, irq is installed once - added dynamic IRQ affinity on schedule in - added documentation and few other coding recommendations. Per

Re: [PATCH 2/2] armv7 initial device passthrough support

2013-06-25 Thread Mario Smarduch
On 6/24/2013 10:01 PM, Christoffer Dall wrote: There are many other latency/perf. reqs for NFV related to RT, essentially Guest must run near native. In the end it may turn out this may need to be outside of main tree we'll see. It doesn't sound like this will be the end result. Everything

Re: [PATCH 2/2] armv7 initial device passthrough support

2013-06-25 Thread Mario Smarduch
On 6/25/2013 12:27 AM, Stuart Yoder wrote: We should avoid creating an environment with important functionality outside of the main tree, if at all possible. Also, as we architect that generic infrastructure we need to keep in mind that there are important use cases for doing I/O in user

Re: RFC: vfio interface for platform devices (v2)

2013-07-04 Thread Mario Smarduch
I'm having trouble understanding how this works where the Guest Device Model != Host. How do you inform the guest where the device is mapped in its physical address space, and handle GPA faults? - Mario On 7/3/2013 11:40 PM, Yoder Stuart-B08248 wrote: Version 2 -VFIO_GROUP_GET_DEVICE_FD--

huge 2nd stage pages and live migration

2014-03-28 Thread Mario Smarduch
Hello I've been working on live migration for ARM-KVM, and noticed problem completing migration with huge 2nd stage tables. Aafter write protecting the VM, for write fault 512 page bits are set in dirty_bitmap[] to take into account future writes to huge page.The pmd is write protected again

[PATCH 0/3] migration dirty bitmap support ARMv7

2014-04-14 Thread Mario Smarduch
fast update rates 16Mb/5mS. Next course of action would be rmap support which scales much better on bigger systems. Although one think that confused me, x86 migrations were sometimes 10 to 15 times slower, I think it must be something wrong with my configuration. Mario Smarduch (3): headers

[PATCH 3/3] migration dirtybitmap support ARMv7

2014-04-14 Thread Mario Smarduch
- support QEMU interface for initial VM Write Protect - QEMU Dirty bit map log retrieval Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/kvm/arm.c | 62 +++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/arch

[PATCH 2/3] migration dirtybitmap support ARMv7

2014-04-14 Thread Mario Smarduch
- Support write protection of entire VM address space - Split pmds section in migration mode - Write protect dirty pages on Dirty log read Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/kvm/mmu.c | 158 +++- 1 file changed

[PATCH 1/3] migration dirtybitmap support ARMv7

2014-04-14 Thread Mario Smarduch
Headers for migration, prototypes Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/include/asm/kvm_host.h |9 + 1 file changed, 9 insertions(+) diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h index 098f7dd..9b71f13 100644 --- a/arch

RE: [PATCH 0/3] migration dirty bitmap support ARMv7

2014-04-15 Thread Mario Smarduch
. - Mario -Original Message- From: Marc Zyngier [mailto:marc.zyng...@arm.com] Sent: Tuesday, April 15, 2014 2:13 AM To: Mario Smarduch Cc: kvm...@lists.cs.columbia.edu; christoffer.d...@linaro.org; 이정석; 정성진; kvm@vger.kernel.org Subject: Re: [PATCH 0/3] migration dirty bitmap support ARMv7

Re: [PATCH 2/3] migration dirtybitmap support ARMv7

2014-04-15 Thread Mario Smarduch
On 04/15/2014 01:58 AM, Marc Zyngier wrote: Why do you nuke the whole TLBs for this VM? I assume you're going to repeatedly call this for all the huge pages, aren't you? Can you delay this flush to do it only once? +get_page(virt_to_page(pte)); +return true; +} + +/* + *

Re: [PATCH 3/3] migration dirtybitmap support ARMv7

2014-04-15 Thread Mario Smarduch
Hi Eric, Mark - what repository should I use to pick up Eric patches? For kvm_vm_ioctl_get_dirty_log() not sure what to make generic it appears generic enough and it does what it needs to do? Thanks, Mario On 04/15/2014 02:06 AM, Marc Zyngier wrote: On 15/04/14 02:24, Mario Smarduch wrote

[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

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

2014-04-16 Thread Mario Smarduch
Add support for dirty bitmap management. Wanted to make it generic but function does a couple things different then the x86 version. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/include/asm/kvm_host.h |3 ++ arch/arm/kvm/arm.c | 71

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

2014-04-16 Thread Mario Smarduch
Additional logic to handle second stage page faults during migration. Primarily page faults are prevented from creating huge pages. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/kvm/mmu.c | 33 +++-- 1 file changed, 31 insertions(+), 2

[PATCH 5/5] add kvm_arch global live migration variable

2014-04-16 Thread Mario Smarduch
This should be in an earlier patch, omitted by mistake. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/include/asm/kvm_host.h |1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h index 16ed4e4..d77c425 100644

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

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);?

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

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

[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

[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

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

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

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

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

  1   2   3   4   5   >