[PATCH v16 05/10] KVM: arm: Add initial dirty page locking support

2015-01-15 Thread Mario Smarduch
Add support for initial write protection of VM memslots. This patch series assumes that huge PUDs will not be used in 2nd stage tables, which is always valid on ARMv7 Acked-by: Christoffer Dall christoffer.d...@linaro.org Signed-off-by: Mario Smarduch m.smard...@samsung.com ---

[PATCH v16 00/10] KVM/arm/arm64/x86: dirty page logging for ARMv7/8 (3.18.0-rc2)

2015-01-15 Thread Mario Smarduch
Patch series adds support for armv7/8 dirty page logging. As we move towards generic dirty page logging interface we move some common code to generic layer shared by x86, armv7 and armv8. armv7/8 Dirty page logging implementation overivew- - initially write protects memory region 2nd stage page

[PATCH v16 01/10] KVM: Add architecture-defined TLB flush support

2015-01-15 Thread Mario Smarduch
Allow architectures to override the generic kvm_flush_remote_tlbs() function via HAVE_KVM_ARCH_TLB_FLUSH_ALL. ARMv7 will need this to provide its own TLB flush interface. Reviewed-by: Christoffer Dall christoffer.d...@linaro.org Reviewed-by: Marc Zyngier marc.zyng...@arm.com Reviewed-by: Paolo

[PATCH v16 10/10] KVM: arm/arm64: Enable Dirty Page logging for ARMv8

2015-01-15 Thread Mario Smarduch
This patch enables ARMv8 ditry page logging support. Plugs ARMv8 into generic layer through Kconfig symbol, and drops earlier ARM64 constraints to enable logging at architecture layer. Reviewed-by: Christoffer Dall christoffer.d...@linaro.org Signed-off-by: Mario Smarduch m.smard...@samsung.com

[PATCH v16 03/10] KVM: x86: switch to kvm_get_dirty_log_protect

2015-01-15 Thread Mario Smarduch
From: Paolo Bonzini pbonz...@redhat.com We now have a generic function that does most of the work of kvm_vm_ioctl_get_dirty_log, now use it. Acked-by: Christoffer Dall christoffer.d...@linaro.org Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/x86/include/asm/kvm_host.h |3 --

[PATCH v16 02/10] KVM: Add generic support for dirty page logging

2015-01-15 Thread Mario Smarduch
kvm_get_dirty_log() provides generic handling of dirty bitmap, currently reused by several architectures. Building on that we intrdoduce kvm_get_dirty_log_protect() adding write protection to mark these pages dirty for future write access, before next KVM_GET_DIRTY_LOG ioctl call from user space.

Re: [PATCH 4/8] x86/spinlock: Leftover conversion ACCESS_ONCE-READ_ONCE

2015-01-15 Thread Oleg Nesterov
On 01/15, Christian Borntraeger wrote: --- a/arch/x86/include/asm/spinlock.h +++ b/arch/x86/include/asm/spinlock.h @@ -186,7 +186,7 @@ static inline void arch_spin_unlock_wait(arch_spinlock_t *lock) __ticket_t head = ACCESS_ONCE(lock-tickets.head); for (;;) { -

[PATCH 0/8] current ACCESS_ONCE patch queue

2015-01-15 Thread Christian Borntraeger
Folks, fyi, this is my current patch queue for the next merge window. It does contain a patch that will disallow ACCESS_ONCE on non-scalar types. The tree is part of linux-next and can be found at git://git.kernel.org/pub/scm/linux/kernel/git/borntraeger/linux.git linux-next Christian

Re: [PATCH 3/8] x86/xen/p2m: Replace ACCESS_ONCE with READ_ONCE

2015-01-15 Thread Jürgen Groß
On 01/15/2015 09:58 AM, Christian Borntraeger wrote: ACCESS_ONCE does not work reliably on non-scalar types. For example gcc 4.6 and 4.7 might remove the volatile tag for such accesses during the SRA (scalar replacement of aggregates) step (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58145)

Re: [Xen-devel] [PATCH 3/8] x86/xen/p2m: Replace ACCESS_ONCE with READ_ONCE

2015-01-15 Thread David Vrabel
On 15/01/15 08:58, Christian Borntraeger wrote: ACCESS_ONCE does not work reliably on non-scalar types. For example gcc 4.6 and 4.7 might remove the volatile tag for such accesses during the SRA (scalar replacement of aggregates) step (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58145)

Re: [Xen-devel] [PATCH 3/8] x86/xen/p2m: Replace ACCESS_ONCE with READ_ONCE

2015-01-15 Thread Christian Borntraeger
Am 15.01.2015 um 11:43 schrieb David Vrabel: On 15/01/15 08:58, Christian Borntraeger wrote: ACCESS_ONCE does not work reliably on non-scalar types. For example gcc 4.6 and 4.7 might remove the volatile tag for such accesses during the SRA (scalar replacement of aggregates) step

[PATCH 1/8] ppc/kvm: Replace ACCESS_ONCE with READ_ONCE

2015-01-15 Thread Christian Borntraeger
ACCESS_ONCE does not work reliably on non-scalar types. For example gcc 4.6 and 4.7 might remove the volatile tag for such accesses during the SRA (scalar replacement of aggregates) step (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58145) Change the ppc/kvm code to replace ACCESS_ONCE with

[PATCH 3/8] x86/xen/p2m: Replace ACCESS_ONCE with READ_ONCE

2015-01-15 Thread Christian Borntraeger
ACCESS_ONCE does not work reliably on non-scalar types. For example gcc 4.6 and 4.7 might remove the volatile tag for such accesses during the SRA (scalar replacement of aggregates) step (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58145) Change the p2m code to replace ACCESS_ONCE with

[PATCH 8/8] kernel: Fix sparse warning for ACCESS_ONCE

2015-01-15 Thread Christian Borntraeger
Commit a91ed664749c (kernel: tighten rules for ACCESS ONCE) results in sparse warnings like Using plain integer as NULL pointer - Let's add a type cast to the dummy assignment. To avoid warnings lik sparse: warning: cast to restricted __hc32 we also use __force on that cast. Fixes: a91ed664749c

[PATCH 2/8] ppc/hugetlbfs: Replace ACCESS_ONCE with READ_ONCE

2015-01-15 Thread Christian Borntraeger
ACCESS_ONCE does not work reliably on non-scalar types. For example gcc 4.6 and 4.7 might remove the volatile tag for such accesses during the SRA (scalar replacement of aggregates) step (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58145) Change the ppc/hugetlbfs code to replace ACCESS_ONCE with

[PATCH 5/8] mm/gup: Replace ACCESS_ONCE with READ_ONCE

2015-01-15 Thread Christian Borntraeger
ACCESS_ONCE does not work reliably on non-scalar types. For example gcc 4.6 and 4.7 might remove the volatile tag for such accesses during the SRA (scalar replacement of aggregates) step (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58145) Fixup gup_pmd_range. Signed-off-by: Christian

[PATCH 6/8] kernel: tighten rules for ACCESS ONCE

2015-01-15 Thread Christian Borntraeger
Now that all non-scalar users of ACCESS_ONCE have been converted to READ_ONCE or ASSIGN once, lets tighten ACCESS_ONCE to only work on scalar types. This variant was proposed by Alexei Starovoitov. Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com Reviewed-by: Paul E. McKenney

[PATCH 7/8] next: sh: Fix compile error

2015-01-15 Thread Christian Borntraeger
From: Guenter Roeck li...@roeck-us.net Commit a91ed664749c (kernel: tighten rules for ACCESS ONCE) results in a compile failure for sh builds with CONFIG_X2TLB enabled. arch/sh/mm/gup.c: In function 'gup_get_pte': arch/sh/mm/gup.c:20:2: error: invalid initializer make[1]: *** [arch/sh/mm/gup.o]

[PATCH 4/8] x86/spinlock: Leftover conversion ACCESS_ONCE-READ_ONCE

2015-01-15 Thread Christian Borntraeger
commit 78bff1c8684f (x86/ticketlock: Fix spin_unlock_wait() livelock) introduced another ACCESS_ONCE case in x86 spinlock.h. Change that as well. Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com Cc: Oleg Nesterov o...@redhat.com --- arch/x86/include/asm/spinlock.h | 2 +- 1 file

Re: [PATCH 1/3] KVM: PPC: BOOK3S: HV: Add helpers for lock/unlock hpte

2015-01-12 Thread Aneesh Kumar K.V
Hi, Any update on this patch. We could drop patch 3. Any feedback on 1 and 2 ?. -aneesh Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com writes: This patch adds helper routine for lock and unlock hpte and use the same for rest of the code. We don't change any locking rules in this patch.

Re: [PATCH v15 11/11] KVM: arm/arm64: Add support to dissolve huge PUD

2015-01-08 Thread Christoffer Dall
On Wed, Jan 07, 2015 at 07:01:10PM -0800, Mario Smarduch wrote: On 01/07/2015 05:05 AM, Christoffer Dall wrote: On Sun, Dec 14, 2014 at 11:28:08PM -0800, Mario Smarduch wrote: This patch adds the same support for PUD huge page as for PMD. Huge PUD is write protected for initial memory

Re: [PATCH v15 11/11] KVM: arm/arm64: Add support to dissolve huge PUD

2015-01-08 Thread Mario Smarduch
On 01/08/2015 03:32 AM, Christoffer Dall wrote: On Wed, Jan 07, 2015 at 07:01:10PM -0800, Mario Smarduch wrote: On 01/07/2015 05:05 AM, Christoffer Dall wrote: On Sun, Dec 14, 2014 at 11:28:08PM -0800, Mario Smarduch wrote: This patch adds the same support for PUD huge page as for PMD. Huge

Re: [PATCH v15 10/11] KVM: arm/arm64: Enable Dirty Page logging for ARMv8

2015-01-07 Thread Christoffer Dall
On Sun, Dec 14, 2014 at 11:28:07PM -0800, Mario Smarduch wrote: This patch enables ARMv8 ditry page logging support. Plugs ARMv8 into generic dirty layer through Kconfig symbol, and drops earlier ARM64 constraints to enable logging at architecture layer.

Re: [PATCH v15 11/11] KVM: arm/arm64: Add support to dissolve huge PUD

2015-01-07 Thread Mario Smarduch
On 01/07/2015 05:05 AM, Christoffer Dall wrote: On Sun, Dec 14, 2014 at 11:28:08PM -0800, Mario Smarduch wrote: This patch adds the same support for PUD huge page as for PMD. Huge PUD is write protected for initial memory region write protection. Code to dissolve huge PUD is supported in

Re: [PATCH v15 10/11] KVM: arm/arm64: Enable Dirty Page logging for ARMv8

2015-01-07 Thread Mario Smarduch
On 01/07/2015 04:47 AM, Christoffer Dall wrote: On Sun, Dec 14, 2014 at 11:28:07PM -0800, Mario Smarduch wrote: This patch enables ARMv8 ditry page logging support. Plugs ARMv8 into generic dirty yeah. layer through Kconfig symbol, and drops earlier ARM64

Re: [PATCH v15 06/11] KVM: arm: dirty logging write protect support

2015-01-07 Thread Christoffer Dall
On Sun, Dec 14, 2014 at 11:28:03PM -0800, 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. Reviewed-by: Marc Zyngier marc.zyng...@arm.com Signed-off-by: Mario Smarduch

Re: [PATCH v15 11/11] KVM: arm/arm64: Add support to dissolve huge PUD

2015-01-07 Thread Christoffer Dall
On Sun, Dec 14, 2014 at 11:28:08PM -0800, Mario Smarduch wrote: This patch adds the same support for PUD huge page as for PMD. Huge PUD is write protected for initial memory region write protection. Code to dissolve huge PUD is supported in user_mem_abort(). At this time this code has not

Re: [PATCH v15 05/11] KVM: arm: Add initial dirty page locking support

2015-01-07 Thread Christoffer Dall
On Sun, Dec 14, 2014 at 11:28:02PM -0800, Mario Smarduch wrote: Add support for initial write protection of VM memslots. This patch series assumes that huge PUDs will not be used in 2nd stage tables, which is always valid on ARMv7 Signed-off-by: Mario Smarduch m.smard...@samsung.com

Re: [PATCH] powerpc: powernv: Return to cpu offline loop when finished in KVM guest

2014-12-21 Thread Andreas Schwab
arch/powerpc/kvm/built-in.o: In function `kvm_no_guest': arch/powerpc/kvm/book3s_hv_rmhandlers.o:(.text+0x724): undefined reference to `power7_wakeup_loss' Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 And now for

Re: [PATCH] powerpc: powernv: Return to cpu offline loop when finished in KVM guest

2014-12-21 Thread Michael Ellerman
On Sun, 2014-12-21 at 23:56 +0100, Alexander Graf wrote: On 21.12.14 15:13, Andreas Schwab wrote: arch/powerpc/kvm/built-in.o: In function `kvm_no_guest': arch/powerpc/kvm/book3s_hv_rmhandlers.o:(.text+0x724): undefined reference to `power7_wakeup_loss' Ugh. We just removed support for

Re: [PULL 00/18] ppc patch queue 2014-12-18

2014-12-18 Thread Paolo Bonzini
On 18/12/2014 01:46, Alexander Graf wrote: Hi Paolo, This is my current patch queue for ppc. Please pull. After the merge with Linus' tree, e500v2 compilation will be broken because commit 69111bac42f5 broke it upstream. Could you please take care to apply the fix I CC'ed you on for

Re: [PATCH] arch: powerpc: kvm: book3s_paired_singles.c: Remove unused function

2014-12-17 Thread Alexander Graf
On 07.12.14 23:29, Rickard Strandqvist wrote: Remove the function inst_set_field() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se Thanks, applied all

Re: [PATCH] KVM: PPC: Book3S HV: Simplify locking around stolen time calculations

2014-12-17 Thread Alexander Graf
On 04.12.14 06:43, Paul Mackerras wrote: Currently the calculations of stolen time for PPC Book3S HV guests uses fields in both the vcpu struct and the kvmppc_vcore struct. The fields in the kvmppc_vcore struct are protected by the vcpu-arch.tbacct_lock of the vcpu that has taken

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

2014-12-17 Thread Alexander Graf
On 04.12.14 01:48, Suresh E. Warrier wrote: This patch adds trace points in the guest entry and exit code and also for exceptions handled by the host in kernel mode - hypercalls and page faults. The new events are added to /sys/kernel/debug/tracing/events under a new subsystem called kvm_hv.

Re: [PATCH] powerpc: powernv: Return to cpu offline loop when finished in KVM guest

2014-12-17 Thread Alexander Graf
On 03.12.14 04:48, Paul Mackerras wrote: When a secondary hardware thread has finished running a KVM guest, we currently put that thread into nap mode using a nap instruction in the KVM code. This changes the code so that instead of doing a nap instruction directly, we instead cause the

Re: [PATCH 0/5] Fixes and improvements for HV KVM on PPC

2014-12-17 Thread Alexander Graf
On 03.12.14 03:30, Paul Mackerras wrote: This series of patches is based on Alex Graf's kvm-ppc-queue branch and is intended for the 3.19 merge window. It starts by removing the code to support HV KVM on PPC970 processors. This code is hardly used now since there are not many HV-capable

Re: [PATCH 4/5] KVM: PPC: Book3S HV: Add fast real-mode H_RANDOM implementation.

2014-12-17 Thread Alexander Graf
On 03.12.14 03:30, Paul Mackerras wrote: From: Michael Ellerman mich...@ellerman.id.au Some PowerNV systems include a hardware random-number generator. This HWRNG is present on POWER7+ and POWER8 chips and is capable of generating one 64-bit random number every microsecond. The random

[PULL 01/18] KVM: PPC: BookE: Improve irq inject tracepoint

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

[PULL 03/18] KVM: PPC: Book3S HV: Fix computation of tlbie operand

2014-12-17 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org The B (segment size) field in the RB operand for the tlbie instruction is two bits, which we get from the top two bits of the first doubleword of the HPT entry to be invalidated. These bits go in bits 8 and 9 of the RB operand (bits 54 and 55 in IBM bit

[PULL 06/18] KVM: PPC: Book3S HV: Fix inaccuracies in ICP emulation for H_IPI

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

[PULL 07/18] KVM: PPC: Book3S HV: ptes are big endian

2014-12-17 Thread Alexander Graf
From: Cédric Le Goater c...@fr.ibm.com When being restored from qemu, the kvm_get_htab_header are in native endian, but the ptes are big endian. This patch fixes restore on a KVM LE host. Qemu also needs a fix for this : http://lists.nongnu.org/archive/html/qemu-ppc/2014-11/msg8.html

[PULL 08/18] KVM: PPC: Book3S HV: Check wait conditions before sleeping in kvmppc_vcore_blocked

2014-12-17 Thread Alexander Graf
From: Suresh E. Warrier warr...@linux.vnet.ibm.com The kvmppc_vcore_blocked() code does not check for the wait condition after putting the process on the wait queue. This means that it is possible for an external interrupt to become pending, but the vcpu to remain asleep until the next

[PULL 10/18] arch: powerpc: kvm: book3s.c: Remove some unused functions

2014-12-17 Thread Alexander Graf
From: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se Removes some functions that are not used anywhere: kvmppc_core_load_guest_debugstate() kvmppc_core_load_host_debugstate() This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard

[PULL 18/18] KVM: PPC: Book3S: Enable in-kernel XICS emulation by default

2014-12-17 Thread Alexander Graf
From: Anton Blanchard an...@samba.org The in-kernel XICS emulation is faster than doing it all in QEMU and it has got a lot of testing, so enable it by default. Signed-off-by: Anton Blanchard an...@samba.org Signed-off-by: Paul Mackerras pau...@samba.org Signed-off-by: Alexander Graf

[PULL 12/18] arch: powerpc: kvm: book3s_paired_singles.c: Remove unused function

2014-12-17 Thread Alexander Graf
From: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se Remove the function inst_set_field() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se

[PULL 02/18] KVM: PPC: Book3S HV: Add missing HPTE unlock

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

[PULL 04/18] KVM: PPC: Book3S HV: Fix an issue where guest is paused on receiving HMI

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

[PULL 13/18] KVM: PPC: Book3S HV: Simplify locking around stolen time calculations

2014-12-17 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org Currently the calculations of stolen time for PPC Book3S HV guests uses fields in both the vcpu struct and the kvmppc_vcore struct. The fields in the kvmppc_vcore struct are protected by the vcpu-arch.tbacct_lock of the vcpu that has taken responsibility for

[PULL 05/18] KVM: PPC: Book3S HV: Fix KSM memory corruption

2014-12-17 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org Testing with KSM active in the host showed occasional corruption of guest memory. Typically a page that should have contained zeroes would contain values that look like the contents of a user process stack (values such as 0x_3fff__xxx). Code

[PULL 17/18] KVM: PPC: Book3S HV: Improve H_CONFER implementation

2014-12-17 Thread Alexander Graf
From: Sam Bobroff sam.bobr...@au1.ibm.com Currently the H_CONFER hcall is implemented in kernel virtual mode, meaning that whenever a guest thread does an H_CONFER, all the threads in that virtual core have to exit the guest. This is bad for performance because it interrupts the other threads

[PULL 11/18] arch: powerpc: kvm: book3s_pr.c: Remove unused function

2014-12-17 Thread Alexander Graf
From: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se Remove the function get_fpr_index() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se

[PULL 09/18] arch: powerpc: kvm: book3s_32_mmu.c: Remove unused function

2014-12-17 Thread Alexander Graf
From: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se Remove the function sr_nx() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se Signed-off-by:

[PULL 15/18] KVM: PPC: Book3S HV: Remove code for PPC970 processors

2014-12-17 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org This removes the code that was added to enable HV KVM to work on PPC970 processors. The PPC970 is an old CPU that doesn't support virtualizing guest memory. Removing PPC970 support also lets us remove the code for allocating and managing contiguous

[PULL 16/18] KVM: PPC: Book3S HV: Fix endianness of instruction obtained from HEIR register

2014-12-17 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org There are two ways in which a guest instruction can be obtained from the guest in the guest exit code in book3s_hv_rmhandlers.S. If the exit was caused by a Hypervisor Emulation interrupt (i.e. an illegal instruction), the offending instruction is in the

[PULL 00/18] ppc patch queue 2014-12-18

2014-12-17 Thread Alexander Graf
Hi Paolo, This is my current patch queue for ppc. Please pull. After the merge with Linus' tree, e500v2 compilation will be broken because commit 69111bac42f5 broke it upstream. Could you please take care to apply the fix I CC'ed you on for it? Thanks! Alex The following changes since

[PULL 14/18] KVM: PPC: Book3S HV: Tracepoints for KVM HV guest interactions

2014-12-17 Thread Alexander Graf
From: Suresh E. Warrier warr...@linux.vnet.ibm.com This patch adds trace points in the guest entry and exit code and also for exceptions handled by the host in kernel mode - hypercalls and page faults. The new events are added to /sys/kernel/debug/tracing/events under a new subsystem called

[PATCH v15 01/11] KVM: Add architecture-defined TLB flush support

2014-12-14 Thread Mario Smarduch
Allow architectures to override the generic kvm_flush_remote_tlbs() function via HAVE_KVM_ARCH_TLB_FLUSH_ALL. ARMv7 will need this to provide its own TLB flush interface. Reviewed-by: Christoffer Dall christoffer.d...@linaro.org Reviewed-by: Marc Zyngier marc.zyng...@arm.com Reviewed-by: Paolo

[PATCH v15 00/11] KVM//x86/arm/arm64: dirty page logging for ARMv7/8 (3.18.0-rc2)

2014-12-14 Thread Mario Smarduch
Patch series adds support for armv7/8 dirty page logging. Also we move towards generic dirty page logging interface and move some common code to generic layer currently shared by x86, armv7 and armv8. armv7/8 Dirty page logging implementation overivew- - initially write protects memory region

[PATCH v15 03/11] KVM: x86: switch to kvm_get_dirty_log_protect

2014-12-14 Thread Mario Smarduch
From: Paolo Bonzini pbonz...@redhat.com We now have a generic function that does most of the work of kvm_vm_ioctl_get_dirty_log, now use it. Acked-by: Christoffer Dall christoffer.d...@linaro.org Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/x86/include/asm/kvm_host.h | 3 --

[PATCH v15 02/11] KVM: Add generic support for dirty page logging

2014-12-14 Thread Mario Smarduch
kvm_get_dirty_log() provides generic handling of dirty bitmap, currently reused by several architectures. Building on that we intrdoduce kvm_get_dirty_log_protect() adding write protection to mark these pages dirty for future write access, before next KVM_GET_DIRTY_LOG ioctl call from user space.

[PATCH v15 04/11] KVM: arm: Add ARMv7 API to flush TLBs

2014-12-14 Thread Mario Smarduch
This patch adds ARMv7 architecture TLB Flush function. Acked-by: Marc Zyngier marc.zyng...@arm.com Acked-by: Christoffer Dall christoffer.d...@linaro.org Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/include/asm/kvm_asm.h | 1 + arch/arm/include/asm/kvm_host.h | 12

[PATCH v15 05/11] KVM: arm: Add initial dirty page locking support

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

[PATCH v15 06/11] KVM: arm: dirty logging write protect support

2014-12-14 Thread Mario Smarduch
Add support to track dirty pages between user space KVM_GET_DIRTY_LOG ioctl calls. We call kvm_get_dirty_log_protect() function to do most of the work. Reviewed-by: Marc Zyngier marc.zyng...@arm.com Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/kvm/Kconfig | 1 +

[PATCH v15 07/11] KVM: arm: page logging 2nd stage fault handling

2014-12-14 Thread Mario Smarduch
This patch adds support for handling 2nd stage page faults during migration, it disables faulting in huge pages, and dissolves huge pages to page tables. In case migration is canceled huge pages are used again. Also since last version an issues was found on SMP host running SMP Guest and

[PATCH v15 08/11] KVM: arm64: ARMv8 header changes for page logging

2014-12-14 Thread Mario Smarduch
This patch adds arm64 helpers to write protect pmds/ptes and retrieve permissions while logging dirty pages. Also adds prototype to write protect a memory slot and adds a pmd define to check for read-only pmds. Reviewed-by: Christoffer Dall christoffer.d...@linaro.org Signed-off-by: Mario

[PATCH v15 09/11] KVM: arm64: Add HYP interface to flush VM Stage 1/2 TLB entires

2014-12-14 Thread Mario Smarduch
This patch adds support for arm64 hyp interface to flush all TLBs associated with VMID. Reviewed-by: Christoffer Dall christoffer.d...@linaro.org Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm64/kvm/hyp.S | 22 ++ 1 file changed, 22 insertions(+) diff

[PATCH v15 10/11] KVM: arm/arm64: Enable Dirty Page logging for ARMv8

2014-12-14 Thread Mario Smarduch
This patch enables ARMv8 ditry page logging support. Plugs ARMv8 into generic layer through Kconfig symbol, and drops earlier ARM64 constraints to enable logging at architecture layer. Signed-off-by: Mario Smarduch m.smard...@samsung.com --- arch/arm/include/asm/kvm_host.h | 12

[PATCH v15 11/11] KVM: arm/arm64: Add support to dissolve huge PUD

2014-12-14 Thread Mario Smarduch
This patch adds the same support for PUD huge page as for PMD. Huge PUD is write protected for initial memory region write protection. Code to dissolve huge PUD is supported in user_mem_abort(). At this time this code has not been tested, but similar approach to current ARMv8 page logging test

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

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

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

2014-12-09 Thread Paolo Bonzini
On 09/12/2014 00:12, Mario Smarduch wrote: Hi Paolo, I took a closer look at Christoffers comment, the _log description in x86.c is a repeat of the _protect description in kvm_main.c. I'm wondering if description below would be acceptable, or perhaps you had a reason leaving it as is.

[PATCH] arch: powerpc: kvm: book3s_32_mmu.c: Remove unused function

2014-12-07 Thread Rickard Strandqvist
Remove the function sr_nx() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- arch/powerpc/kvm/book3s_32_mmu.c |5 - 1 file changed, 5 deletions(-)

[PATCH] arch: powerpc: kvm: book3s.c: Remove some unused functions

2014-12-07 Thread Rickard Strandqvist
Removes some functions that are not used anywhere: kvmppc_core_load_guest_debugstate() kvmppc_core_load_host_debugstate() This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se ---

[PATCH] arch: powerpc: kvm: book3s_pr.c: Remove unused function

2014-12-07 Thread Rickard Strandqvist
Remove the function get_fpr_index() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- arch/powerpc/kvm/book3s_pr.c |5 - 1 file changed, 5

[PATCH] arch: powerpc: kvm: book3s_paired_singles.c: Remove unused function

2014-12-07 Thread Rickard Strandqvist
Remove the function inst_set_field() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se --- arch/powerpc/kvm/book3s_paired_singles.c |8 1 file

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

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

[PATCH 0/5] Fixes and improvements for HV KVM on PPC

2014-12-02 Thread Paul Mackerras
This series of patches is based on Alex Graf's kvm-ppc-queue branch and is intended for the 3.19 merge window. It starts by removing the code to support HV KVM on PPC970 processors. This code is hardly used now since there are not many HV-capable PPC970 machines (Apple G5 machines are not

[PATCH 2/5] KVM: PPC: Book3S HV: Fix endianness of instruction obtained from HEIR register

2014-12-02 Thread Paul Mackerras
There are two ways in which a guest instruction can be obtained from the guest in the guest exit code in book3s_hv_rmhandlers.S. If the exit was caused by a Hypervisor Emulation interrupt (i.e. an illegal instruction), the offending instruction is in the HEIR register (Hypervisor Emulation

[PATCH 1/5] KVM: PPC: Book3S HV: Remove code for PPC970 processors

2014-12-02 Thread Paul Mackerras
This removes the code that was added to enable HV KVM to work on PPC970 processors. The PPC970 is an old CPU that doesn't support virtualizing guest memory. Removing PPC970 support also lets us remove the code for allocating and managing contiguous real-mode areas, the code for the

[PATCH 5/5] KVM: PPC: Book3S: Enable in-kernel XICS emulation by default

2014-12-02 Thread Paul Mackerras
From: Anton Blanchard an...@samba.org The in-kernel XICS emulation is faster than doing it all in QEMU and it has got a lot of testing, so enable it by default. Signed-off-by: Anton Blanchard an...@samba.org Signed-off-by: Paul Mackerras pau...@samba.org --- arch/powerpc/kvm/Kconfig | 1 + 1

[PATCH 3/5] KVM: PPC: Book3S HV: Improve H_CONFER implementation

2014-12-02 Thread Paul Mackerras
From: Sam Bobroff sam.bobr...@au1.ibm.com Currently the H_CONFER hcall is implemented in kernel virtual mode, meaning that whenever a guest thread does an H_CONFER, all the threads in that virtual core have to exit the guest. This is bad for performance because it interrupts the other threads

[PATCH 4/5] KVM: PPC: Book3S HV: Add fast real-mode H_RANDOM implementation.

2014-12-02 Thread Paul Mackerras
From: Michael Ellerman mich...@ellerman.id.au Some PowerNV systems include a hardware random-number generator. This HWRNG is present on POWER7+ and POWER8 chips and is capable of generating one 64-bit random number every microsecond. The random numbers are produced by sampling a set of 64

[PATCH] powerpc: powernv: Return to cpu offline loop when finished in KVM guest

2014-12-02 Thread Paul Mackerras
When a secondary hardware thread has finished running a KVM guest, we currently put that thread into nap mode using a nap instruction in the KVM code. This changes the code so that instead of doing a nap instruction directly, we instead cause the call to power7_nap() that put the thread into nap

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

2014-12-01 Thread Suresh E. Warrier
On 11/20/2014 08:01 AM, Steven Rostedt wrote: On Thu, 20 Nov 2014 13:10:12 +0100 Alexander Graf ag...@suse.de wrote: On 20.11.14 11:40, Aneesh Kumar K.V wrote: Suresh E. Warrier warr...@linux.vnet.ibm.com writes: This patch adds trace points in the guest entry and exit code and also

Re: [PATCH 3/3] KVM: PPC: BOOK3S: HV: Rename variable for better readability

2014-11-26 Thread Paul Mackerras
On Mon, Oct 20, 2014 at 07:59:00PM +0530, Aneesh Kumar K.V wrote: Minor cleanup Signed-off-by: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com --- arch/powerpc/kvm/book3s_hv_rm_mmu.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git

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

2014-11-25 Thread Christoffer Dall
Hi Mario, On Thu, Nov 13, 2014 at 05:57:41PM -0800, Mario Smarduch wrote: Patch series adds support for ARMv7 and generic dirty page logging support. As we try to move towards generic dirty page logging additional logic is moved to generic code. Initially x86, armv7 KVM_GET_DIRTY_LOG

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

2014-11-25 Thread Mario Smarduch
On 11/25/2014 02:22 AM, Christoffer Dall wrote: Hi Mario, On Thu, Nov 13, 2014 at 05:57:41PM -0800, Mario Smarduch wrote: Patch series adds support for ARMv7 and generic dirty page logging support. As we try to move towards generic dirty page logging additional logic is moved to generic

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

2014-11-24 Thread Mario Smarduch
On 11/22/2014 11:19 AM, Christoffer Dall wrote: On Thu, Nov 13, 2014 at 05:57:44PM -0800, Mario Smarduch wrote: From: Paolo Bonzini pbonz...@redhat.com We now have a generic function that does most of the work of kvm_vm_ioctl_get_dirty_log, now use it. Signed-off-by: Mario Smarduch

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

2014-11-24 Thread Mario Smarduch
On 11/22/2014 11:40 AM, Christoffer Dall wrote: On Thu, Nov 13, 2014 at 05:57:47PM -0800, 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. Reviewed-by: Marc Zyngier

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

2014-11-24 Thread Mario Smarduch
On 11/22/2014 11:33 AM, Christoffer Dall wrote: On Thu, Nov 13, 2014 at 05:57:46PM -0800, Mario Smarduch wrote: Add support for initial write protection of VM memslots. This patch series assumes that huge PUDs will not be used in 2nd stage tables, which is always valid on ARMv7.

Re: Mac-On-Linux / KVM

2014-11-23 Thread Alexander Graf
On 23.11.14 10:03, Martin Kukac wrote: Thanks for reply. Yes, module kvm-pr is loaded by modprobe, so that should not be the problem. Interesting. With MOL, 3.14 should already work IIRC. You only need 3.17 and above if you want to run Mac OS X in QEMU with KVM. However if kernel version

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

2014-11-22 Thread Christoffer Dall
On Thu, Nov 13, 2014 at 05:57:42PM -0800, 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: Marc Zyngier marc.zyng...@arm.com

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

2014-11-22 Thread Christoffer Dall
On Thu, Nov 13, 2014 at 05:57:43PM -0800, Mario Smarduch 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 dirty for future

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

2014-11-22 Thread Christoffer Dall
On Thu, Nov 13, 2014 at 05:57:44PM -0800, Mario Smarduch wrote: From: Paolo Bonzini pbonz...@redhat.com We now have a generic function that does most of the work of kvm_vm_ioctl_get_dirty_log, now use it. Signed-off-by: Mario Smarduch m.smard...@samsung.com ---

Mac-On-Linux / KVM

2014-11-22 Thread Martin Kukac
Hello, I'm new here, so I hope my question is not offtopic. I found out that M-o-L now works with KVM-PR, so I wanted to try it myself. I have PowerMac G5 (dual 970 CPU), Debian Wheezy and kernel 3.14.24 with kvm-pr. When I load the module and try to start M-o-L 0.9.73 build from SVN all I

Re: Mac-On-Linux / KVM

2014-11-22 Thread chzigot...@xenosoft.de
Hello Martin, Do you load the kernel module PR KVM with modprobe kvm-pr? By the way, MoL/PR KVM needs the kernel 3.17 or higher. Rgds, Christian On 22.11.2014, you wrote: Hello, I'm new here, so I hope my question is not offtopic. I found out that M-o-L now works with KVM-PR, so I wanted

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

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

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

2014-11-22 Thread Alexander Graf
On 20.11.14 20:31, Suresh E. Warrier wrote: On 11/20/2014 11:36 AM, Alexander Graf wrote: On 03.11.14 05:52, Paul Mackerras wrote: From: Suresh E. Warrier warr...@linux.vnet.ibm.com The kvmppc_vcore_blocked() code does not check for the wait condition after putting the process on the

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

2014-11-20 Thread Aneesh Kumar K.V
Suresh E. Warrier warr...@linux.vnet.ibm.com writes: This patch adds trace points in the guest entry and exit code and also for exceptions handled by the host in kernel mode - hypercalls and page faults. The new events are added to /sys/kernel/debug/tracing/events under a new subsystem called

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

2014-11-20 Thread Alexander Graf
On 20.11.14 11:40, Aneesh Kumar K.V wrote: Suresh E. Warrier warr...@linux.vnet.ibm.com writes: This patch adds trace points in the guest entry and exit code and also for exceptions handled by the host in kernel mode - hypercalls and page faults. The new events are added to

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

2014-11-20 Thread Steven Rostedt
On Thu, 20 Nov 2014 13:10:12 +0100 Alexander Graf ag...@suse.de wrote: On 20.11.14 11:40, Aneesh Kumar K.V wrote: Suresh E. Warrier warr...@linux.vnet.ibm.com writes: This patch adds trace points in the guest entry and exit code and also for exceptions handled by the host in kernel

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