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 4/7] arm: KVM: Add ARMv7 API to flush TLBs

2014-11-07 Thread Marc Zyngier
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 |1 + arch/arm/include/asm/kvm_host.h |

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

[GIT PULL 0/4] KVM: s390: Fixes for kvm/next (3.19) and stable

2014-11-07 Thread Christian Borntraeger
repository at: git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git tags/kvm-s390-next-20141107 for you to fetch changes up to 365dc1633521a32d55d839f56b41bb9a531d957a: KVM: s390: Fixes for kvm/next (3.19) and stable 1

[GIT PULL 2/4] KVM: s390: flush CPU on load control

2014-11-07 Thread Christian Borntraeger
some control register changes will flush some aspects of the CPU, e.g. POP explicitely mentions that for CR9-CR11 TLBs may be cleared. Instead of trying to be clever and only flush on specific CRs, let play safe and flush on all lctl(g) as future machines might define new bits in CRs. Load control

[GIT PULL 1/4] KVM: s390: Fix ipte locking

2014-11-07 Thread Christian Borntraeger
ipte_unlock_siif uses cmpxchg to replace the in-memory data of the ipte lock together with ACCESS_ONCE for the intial read. union ipte_control { unsigned long val; struct { unsigned long k : 1; unsigned long kh : 31; unsigned long

[GIT PULL 4/4] KVM: fix vm device attribute documentation

2014-11-07 Thread Christian Borntraeger
From: Dominik Dingel din...@linux.vnet.ibm.com Documentation uses incorrect attribute names for some vm device attributes: fix this. Signed-off-by: Dominik Dingel din...@linux.vnet.ibm.com Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com --- Documentation/virtual/kvm/devices/vm.txt |

[GIT PULL 3/4] KVM: s390: fix handling of lctl[g]/stctl[g]

2014-11-07 Thread Christian Borntraeger
From: Heiko Carstens heiko.carst...@de.ibm.com According to the architecture all instructions are suppressing if memory access is prohibited due to DAT protection, unless stated otherwise for an instruction. The lctl[g]/stctl[g] implementations handled this incorrectly since control register

Re: [GIT PULL 0/4] KVM: s390: Fixes for kvm/next (3.19) and stable

2014-11-07 Thread Paolo Bonzini
-rc3 (2014-11-02 15:01:51 -0800) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git tags/kvm-s390-next-20141107 for you to fetch changes up to 365dc1633521a32d55d839f56b41bb9a531d957a

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

2014-11-07 Thread Jason J. Herne
From: Jason J. Herne jjhe...@linux.vnet.ibm.com As discussed, v2 moves TOD set/get functions to the setone/getone interface. A high byte is also provided to account for future expansion. Jason J. Herne (1): kvm-s390: Provide guest TOD Clock Get/Set Controls arch/s390/include/uapi/asm/kvm.h |

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

2014-11-07 Thread Jason J. Herne
From: Jason J. Herne jjhe...@linux.vnet.ibm.com Provide KVM_REG_S390_TOD and KVM_REG_S390_TOD_HIGH registers on s390 for managing guest Time Of Day clock value. KVM_REG_S390_TOD_HIGH is presently always set to 0. In the future it will contain a high order expansion of the tod clock value after

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

2014-11-07 Thread Paolo Bonzini
On 07/11/2014 15:55, Jason J. Herne wrote: From: Jason J. Herne jjhe...@linux.vnet.ibm.com Provide KVM_REG_S390_TOD and KVM_REG_S390_TOD_HIGH registers on s390 for managing guest Time Of Day clock value. KVM_REG_S390_TOD_HIGH is presently always set to 0. In the future it will contain a

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

2014-11-07 Thread Christian Borntraeger
Am 07.11.2014 um 16:06 schrieb Paolo Bonzini: On 07/11/2014 15:55, Jason J. Herne wrote: From: Jason J. Herne jjhe...@linux.vnet.ibm.com Provide KVM_REG_S390_TOD and KVM_REG_S390_TOD_HIGH registers on s390 for managing guest Time Of Day clock value. KVM_REG_S390_TOD_HIGH is presently

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

2014-11-07 Thread Alexander Graf
On 07.11.14 16:10, Christian Borntraeger wrote: Am 07.11.2014 um 16:06 schrieb Paolo Bonzini: On 07/11/2014 15:55, Jason J. Herne wrote: From: Jason J. Herne jjhe...@linux.vnet.ibm.com Provide KVM_REG_S390_TOD and KVM_REG_S390_TOD_HIGH registers on s390 for managing guest Time Of Day

Hello could you help me on running kvm on my via nano u2250 processor stepping 3?

2014-11-07 Thread Timothy McDaniel
here is my /proc/cpuinfo processor : 0 vendor_id : CentaurHauls cpu family : 6 model : 15 model name : VIA Nano processor U2250 (1.6GHz Capable) stepping: 3 cpu MHz : 800.000 cache size : 1024 KB fpu : yes fpu_exception : yes

Re: Hello could you help me on running kvm on my via nano u2250 processor stepping 3?

2014-11-07 Thread Alex Williamson
On Fri, 2014-11-07 at 10:47 -0500, Timothy McDaniel wrote: here is my /proc/cpuinfo processor : 0 vendor_id : CentaurHauls cpu family : 6 model : 15 model name : VIA Nano processor U2250 (1.6GHz Capable) stepping: 3 cpu MHz : 800.000 cache

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

2014-11-07 Thread Radim Krčmář
2014-11-06 18:46+0100, Paolo Bonzini: AVX instructions are just tweaks of the operand length and the alignment restrictions of SSE instructions, and in fact the Avx bit is just a duplicate of Unaligned. Drop it. Suggested-by: Nadav Amit na...@cs.technion.ac.il Signed-off-by: Paolo Bonzini

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

2014-11-07 Thread Paolo Bonzini
On 07/11/2014 17:43, Radim Krčmář wrote: I think this forces our future AVX implementation to be very hacky, we couldn't tell explicitly (un)aligned SSE2/AVX apart. Ok, I'll apply Nadav's patch them. Paolo -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a

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

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

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

2014-11-07 Thread Paolo Bonzini
On 07/11/2014 18:37, Radim Krčmář wrote: 2014-11-06 11:15+0200, Nadav Amit: As we run out of bits in the KVM emulator instruction flags, we can merge together the Mmx/Sse/Avx bits. These bits are mutual exclusive (i.e., each instruction is either MMX, SSE, AVX, or none), so we can save one

[PATCH] KVM: x86: switch to kvm_get_dirty_log_protect

2014-11-07 Thread Paolo Bonzini
We now have a generic function that does most of the work of kvm_vm_ioctl_get_dirty_log, now use it. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- Mario/Christoffer, please include this in the ARM series too arch/x86/include/asm/kvm_host.h | 3 --- arch/x86/kvm/mmu.c

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

2014-11-07 Thread Radim Krčmář
2014-11-07 18:39+0100, Paolo Bonzini: I think we have no clear idea of what Avx would do (I have one---same as Sse but make VEX prefix mandatory, see VBROADCASTSS---but I'm not sure it's the right one either). Let's keep these patches on hold. Implementing Avx first makes sense, we don't want

Re: Seeking a KVM benchmark

2014-11-07 Thread Andy Lutomirski
On Thu, Nov 6, 2014 at 11:17 PM, Paolo Bonzini pbonz...@redhat.com wrote: On 07/11/2014 07:27, Andy Lutomirski wrote: Is there an easy benchmark that's sensitive to the time it takes to round-trip from userspace to guest and back to userspace? I think I may have a big speedup. The

Re: Seeking a KVM benchmark

2014-11-07 Thread Andy Lutomirski
On Fri, Nov 7, 2014 at 9:59 AM, Andy Lutomirski l...@amacapital.net wrote: On Thu, Nov 6, 2014 at 11:17 PM, Paolo Bonzini pbonz...@redhat.com wrote: On 07/11/2014 07:27, Andy Lutomirski wrote: Is there an easy benchmark that's sensitive to the time it takes to round-trip from userspace to

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 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 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 to generic code; leave the arch-specific

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 2/3] arm64: Add HYP interface to flush VM Stage 1/2 TLB entires

2014-11-07 Thread Christoffer Dall
On Thu, Oct 09, 2014 at 07:34:06PM -0700, Mario Smarduch wrote: This patch adds HYP VM TLB FLush function. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm64/kvm/hyp.S | 22 ++ 1 file changed, 22 insertions(+) diff --git a/arch/arm64/kvm/hyp.S

Re: [PATCH 1/3] arm64: ARMv8 headers changes for dirty page logging

2014-11-07 Thread Christoffer Dall
On Thu, Oct 09, 2014 at 07:34:05PM -0700, Mario Smarduch wrote: This patch introduces header updates for ARMv8 dirty page logging. hm, header updates, it introduces functions to write protect pages on arm64 and adds a prototype for blah blah blah. Perhaps you can be just slightly more

Re: [PATCH 3/3] arm/arm64: Enable Dirty Page logging for ARMv8 move log read, tlb flush to generic code

2014-11-07 Thread Christoffer Dall
On Thu, Oct 09, 2014 at 07:34:07PM -0700, Mario Smarduch wrote: This patch enables ARMv8 dirty page logging and unifies ARMv7/ARMv8 code. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/include/asm/kvm_host.h | 12 arch/arm/kvm/arm.c | 9

Re: [RFC PATCH 0/6] ARM64: KVM: PMU infrastructure support

2014-11-07 Thread Christoffer Dall
Hi Anup, What are your plans in terms of follow-up on this one? Should we review these patches and reply to anup _at_ brainfaul.org or are you looking for someone else to pick them up? Thanks, -Christoffer On Tue, Aug 05, 2014 at 02:54:09PM +0530, Anup Patel wrote: This patchset enables PMU

Re: [RFC PATCH 0/6] ARM64: KVM: PMU infrastructure support

2014-11-07 Thread Christoffer Dall
Hi Anup, [This time to the new email] What are your plans in terms of follow-up on this one? Should we review these patches and reply to anup _at_ brainfaul.org or are you looking for someone else to pick them up? Thanks, -Christoffer On Tue, Aug 05, 2014 at 02:54:09PM +0530, Anup Patel

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 1/3] arm64: ARMv8 headers changes for dirty page logging

2014-11-07 Thread Mario Smarduch
On 11/07/2014 12:20 PM, Christoffer Dall wrote: On Thu, Oct 09, 2014 at 07:34:05PM -0700, Mario Smarduch wrote: This patch introduces header updates for ARMv8 dirty page logging. hm, header updates, it introduces functions to write protect pages on arm64 and adds a prototype for blah blah

Re: [PATCH 2/3] arm64: Add HYP interface to flush VM Stage 1/2 TLB entires

2014-11-07 Thread Mario Smarduch
On 11/07/2014 12:20 PM, Christoffer Dall wrote: On Thu, Oct 09, 2014 at 07:34:06PM -0700, Mario Smarduch wrote: This patch adds HYP VM TLB FLush function. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm64/kvm/hyp.S | 22 ++ 1 file changed, 22

Re: [PATCH 3/3] arm/arm64: Enable Dirty Page logging for ARMv8 move log read, tlb flush to generic code

2014-11-07 Thread Mario Smarduch
On 11/07/2014 12:20 PM, Christoffer Dall wrote: On Thu, Oct 09, 2014 at 07:34:07PM -0700, Mario Smarduch wrote: This patch enables ARMv8 dirty page logging and unifies ARMv7/ARMv8 code. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/include/asm/kvm_host.h | 12

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,

[PATCH] kvm: Fix memory slot page alignment logic

2014-11-07 Thread Alexander Graf
Memory slots have to be page aligned to get entered into KVM. There is existing logic that tries to ensure that we pad memory slots that are not page aligned to the biggest region that would still fit in the alignment requirements. Unfortunately, that logic is broken. It tries to calculate the

Re: [Qemu-ppc] [PATCH] kvm: Fix memory slot page alignment logic

2014-11-07 Thread Alexander Graf
On 07.11.14 22:18, Alexander Graf wrote: Memory slots have to be page aligned to get entered into KVM. There is existing logic that tries to ensure that we pad memory slots that are not page aligned to the biggest region that would still fit in the alignment requirements. Unfortunately,

[PATCH 0/3] x86_64,entry: Rearrange the syscall exit optimizations

2014-11-07 Thread Andy Lutomirski
The syscall exit asm is a big mess. There's a really fast path, some kind of fast path code (with a hard-coded optimization for audit), and the really slow path. The result is that it's very hard to work with this code. There are some asm paths that are much slower than they should be (context

[PATCH 3/3] x86_64,entry: Remove the syscall exit audit and schedule optimizations

2014-11-07 Thread Andy Lutomirski
We used to optimize rescheduling and audit on syscall exit. Now that the full slow path is reasonably fast, remove these optimizations. This adds something like 10ns to the previously optimized paths on my computer, presumably due mostly to SAVE_REST / RESTORE_REST. I think that we should

[PATCH 2/3] x86_64,entry: Use sysret to return to userspace when possible

2014-11-07 Thread Andy Lutomirski
The x86_64 entry code currently jumps through complex and inconsisnent hoops to try to minimize the impact of syscall exit work. For a true fast-path syscall, almost nothing needs to be done, so returning is just a check for exit work and sysret. For a full slow-path return from a syscall, the C

[PATCH 1/3] x86_64,entry: Fix RCX for traced syscalls

2014-11-07 Thread Andy Lutomirski
The int_ret_from_sys_call and syscall tracing code disagrees with the sysret path as to the value of RCX. The Intel SDM, the AMD APM, and my laptop all agree that sysret returns with RCX == RIP. The syscall tracing code does not respect this property. For example, this program: int main() {

[PATCH] x86, kvm, vmx: Always use LOAD_IA32_EFER if available

2014-11-07 Thread Andy Lutomirski
At least on Sandy Bridge, letting the CPU switch IA32_EFER is much faster than switching it manually. I benchmarked this using the vmexit kvm-unit-test (single run, but GOAL multiplied by 5 to do more iterations): Test Before AfterChange cpuid

typo of the comment

2014-11-07 Thread john_gong
hi Paolo, i find a typo of the comment. From 09d5df31f0930e8e3eb10ad60a3debc53d6ce992 Mon Sep 17 00:00:00 2001 From: john_gong john_g...@yeah.net Date: Fri, 7 Nov 2014 07:32:17 +0800 Subject: [PATCH] modify a typo of the comment Signed-off-by: john_gong john_g...@yeah.net ---

Re: [PATCH 18/21] KVM: x86: Emulator mis-decodes VEX instructions on real-mode

2014-11-07 Thread Paolo Bonzini
On 02/11/2014 10:54, Nadav Amit wrote: Commit 7fe864dc942c (KVM: x86: Emulator considers imm as memory operand) marked VEX instructions as such in protected mode. VEX-prefix instructions are not supported relevant on real-mode and VM86, but should cause #UD instead of being decoded as

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

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