From: Mario Smarduch <m.smarduch@samsung.com>
To: kvm-ia64@vger.kernel.org
Subject: Re: [PATCH v15 10/11] KVM: arm/arm64: Enable Dirty Page logging for ARMv8
Date: Thu, 08 Jan 2015 01:51:15 +0000 [thread overview]
Message-ID: <54ADE293.1040901@samsung.com> (raw)
In-Reply-To: <1418628488-3696-11-git-send-email-m.smarduch@samsung.com>
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 constraints to enable
>> logging at architecture layer.
>>
>> Signed-off-by: Mario Smarduch <m.smarduch@samsung.com>
>> ---
>> arch/arm/include/asm/kvm_host.h | 12 ------------
>> arch/arm/kvm/arm.c | 4 ----
>> arch/arm/kvm/mmu.c | 19 +++++++++++--------
>> arch/arm64/kvm/Kconfig | 2 ++
>> 4 files changed, 13 insertions(+), 24 deletions(-)
>>
>> diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h
>> index b138431..088ea87 100644
>> --- a/arch/arm/include/asm/kvm_host.h
>> +++ b/arch/arm/include/asm/kvm_host.h
>> @@ -223,18 +223,6 @@ static inline void __cpu_init_hyp_mode(phys_addr_t boot_pgd_ptr,
>> kvm_call_hyp((void*)hyp_stack_ptr, vector_ptr, pgd_ptr);
>> }
>>
>> -/**
>> - * kvm_flush_remote_tlbs() - flush all VM TLB entries
>> - * @kvm: pointer to kvm structure.
>> - *
>> - * Interface to HYP function to flush all VM TLB entries without address
>> - * parameter.
>> - */
>> -static inline void kvm_flush_remote_tlbs(struct kvm *kvm)
>> -{
>> - kvm_call_hyp(__kvm_tlb_flush_vmid, kvm);
>> -}
>> -
>> static inline int kvm_arch_dev_ioctl_check_extension(long ext)
>> {
>> return 0;
>> diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
>> index 6e4290c..1b6577c 100644
>> --- a/arch/arm/kvm/arm.c
>> +++ b/arch/arm/kvm/arm.c
>> @@ -740,7 +740,6 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
>> */
>> int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm, struct kvm_dirty_log *log)
>> {
>> -#ifdef CONFIG_ARM
>> bool is_dirty = false;
>> int r;
>>
>> @@ -753,9 +752,6 @@ int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm, struct kvm_dirty_log *log)
>>
>> mutex_unlock(&kvm->slots_lock);
>> return r;
>> -#else /* arm64 */
>> - return -EINVAL;
>> -#endif
>> }
>>
>> static int kvm_vm_ioctl_set_device_addr(struct kvm *kvm,
>> diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c
>> index dc763bb..59003df 100644
>> --- a/arch/arm/kvm/mmu.c
>> +++ b/arch/arm/kvm/mmu.c
>> @@ -52,11 +52,18 @@ static phys_addr_t hyp_idmap_vector;
>>
>> static bool kvm_get_logging_state(struct kvm_memory_slot *memslot)
>> {
>> -#ifdef CONFIG_ARM
>> return !!memslot->dirty_bitmap;
>> -#else
>> - return false;
>> -#endif
>> +}
>> +
>> +/**
>> + * kvm_flush_remote_tlbs() - flush all VM TLB entries for v7/8
>> + * @kvm: pointer to kvm structure.
>> + *
>> + * Interface to HYP function to flush all VM TLB entries
>> + */
>> +inline void kvm_flush_remote_tlbs(struct kvm *kvm)
>
> did you intend for a non-staic inline here?
Yes it's used in arm.c and mmu.c
>
>> +{
>> + kvm_call_hyp(__kvm_tlb_flush_vmid, kvm);
>> }
>>
>> static void kvm_tlb_flush_vmid_ipa(struct kvm *kvm, phys_addr_t ipa)
>> @@ -895,7 +902,6 @@ static bool kvm_is_device_pfn(unsigned long pfn)
>> return !pfn_valid(pfn);
>> }
>>
>> -#ifdef CONFIG_ARM
>> /**
>> * stage2_wp_ptes - write protect PMD range
>> * @pmd: pointer to pmd entry
>> @@ -1040,7 +1046,6 @@ void kvm_arch_mmu_write_protect_pt_masked(struct kvm *kvm,
>>
>> stage2_wp_range(kvm, start, end);
>> }
>> -#endif
>>
>> static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
>> struct kvm_memory_slot *memslot, unsigned long hva,
>> @@ -1445,7 +1450,6 @@ void kvm_arch_commit_memory_region(struct kvm *kvm,
>> const struct kvm_memory_slot *old,
>> enum kvm_mr_change change)
>> {
>> -#ifdef CONFIG_ARM
>> /*
>> * At this point memslot has been committed and there is an
>> * allocated dirty_bitmap[], dirty pages will be be tracked while the
>> @@ -1453,7 +1457,6 @@ void kvm_arch_commit_memory_region(struct kvm *kvm,
>> */
>> if (change != KVM_MR_DELETE && mem->flags & KVM_MEM_LOG_DIRTY_PAGES)
>> kvm_mmu_wp_memory_region(kvm, mem->slot);
>> -#endif
>> }
>>
>> int kvm_arch_prepare_memory_region(struct kvm *kvm,
>> diff --git a/arch/arm64/kvm/Kconfig b/arch/arm64/kvm/Kconfig
>> index 8ba85e9..3ce389b 100644
>> --- a/arch/arm64/kvm/Kconfig
>> +++ b/arch/arm64/kvm/Kconfig
>> @@ -22,10 +22,12 @@ config KVM
>> select PREEMPT_NOTIFIERS
>> select ANON_INODES
>> select HAVE_KVM_CPU_RELAX_INTERCEPT
>> + select HAVE_KVM_ARCH_TLB_FLUSH_ALL
>> select KVM_MMIO
>> select KVM_ARM_HOST
>> select KVM_ARM_VGIC
>> select KVM_ARM_TIMER
>> + select KVM_GENERIC_DIRTYLOG_READ_PROTECT
>> ---help---
>> Support hosting virtualized guest machines.
>>
>> --
>> 1.9.1
>>
WARNING: multiple messages have this Message-ID (diff)
From: Mario Smarduch <m.smarduch@samsung.com>
To: Christoffer Dall <christoffer.dall@linaro.org>
Cc: pbonzini@redhat.com, james.hogan@imgtec.com, agraf@suse.de,
marc.zyngier@arm.com, cornelia.huck@de.ibm.com,
borntraeger@de.ibm.com, catalin.marinas@arm.com,
kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org,
kvm-ppc@vger.kernel.org, kvm-ia64@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, steve.capper@arm.com,
peter.maydell@linaro.org
Subject: Re: [PATCH v15 10/11] KVM: arm/arm64: Enable Dirty Page logging for ARMv8
Date: Thu, 08 Jan 2015 01:51:15 +0000 [thread overview]
Message-ID: <54ADE293.1040901@samsung.com> (raw)
In-Reply-To: <20150107124744.GC21092@cbox>
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 constraints to enable
>> logging at architecture layer.
>>
>> Signed-off-by: Mario Smarduch <m.smarduch@samsung.com>
>> ---
>> arch/arm/include/asm/kvm_host.h | 12 ------------
>> arch/arm/kvm/arm.c | 4 ----
>> arch/arm/kvm/mmu.c | 19 +++++++++++--------
>> arch/arm64/kvm/Kconfig | 2 ++
>> 4 files changed, 13 insertions(+), 24 deletions(-)
>>
>> diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h
>> index b138431..088ea87 100644
>> --- a/arch/arm/include/asm/kvm_host.h
>> +++ b/arch/arm/include/asm/kvm_host.h
>> @@ -223,18 +223,6 @@ static inline void __cpu_init_hyp_mode(phys_addr_t boot_pgd_ptr,
>> kvm_call_hyp((void*)hyp_stack_ptr, vector_ptr, pgd_ptr);
>> }
>>
>> -/**
>> - * kvm_flush_remote_tlbs() - flush all VM TLB entries
>> - * @kvm: pointer to kvm structure.
>> - *
>> - * Interface to HYP function to flush all VM TLB entries without address
>> - * parameter.
>> - */
>> -static inline void kvm_flush_remote_tlbs(struct kvm *kvm)
>> -{
>> - kvm_call_hyp(__kvm_tlb_flush_vmid, kvm);
>> -}
>> -
>> static inline int kvm_arch_dev_ioctl_check_extension(long ext)
>> {
>> return 0;
>> diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
>> index 6e4290c..1b6577c 100644
>> --- a/arch/arm/kvm/arm.c
>> +++ b/arch/arm/kvm/arm.c
>> @@ -740,7 +740,6 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
>> */
>> int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm, struct kvm_dirty_log *log)
>> {
>> -#ifdef CONFIG_ARM
>> bool is_dirty = false;
>> int r;
>>
>> @@ -753,9 +752,6 @@ int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm, struct kvm_dirty_log *log)
>>
>> mutex_unlock(&kvm->slots_lock);
>> return r;
>> -#else /* arm64 */
>> - return -EINVAL;
>> -#endif
>> }
>>
>> static int kvm_vm_ioctl_set_device_addr(struct kvm *kvm,
>> diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c
>> index dc763bb..59003df 100644
>> --- a/arch/arm/kvm/mmu.c
>> +++ b/arch/arm/kvm/mmu.c
>> @@ -52,11 +52,18 @@ static phys_addr_t hyp_idmap_vector;
>>
>> static bool kvm_get_logging_state(struct kvm_memory_slot *memslot)
>> {
>> -#ifdef CONFIG_ARM
>> return !!memslot->dirty_bitmap;
>> -#else
>> - return false;
>> -#endif
>> +}
>> +
>> +/**
>> + * kvm_flush_remote_tlbs() - flush all VM TLB entries for v7/8
>> + * @kvm: pointer to kvm structure.
>> + *
>> + * Interface to HYP function to flush all VM TLB entries
>> + */
>> +inline void kvm_flush_remote_tlbs(struct kvm *kvm)
>
> did you intend for a non-staic inline here?
Yes it's used in arm.c and mmu.c
>
>> +{
>> + kvm_call_hyp(__kvm_tlb_flush_vmid, kvm);
>> }
>>
>> static void kvm_tlb_flush_vmid_ipa(struct kvm *kvm, phys_addr_t ipa)
>> @@ -895,7 +902,6 @@ static bool kvm_is_device_pfn(unsigned long pfn)
>> return !pfn_valid(pfn);
>> }
>>
>> -#ifdef CONFIG_ARM
>> /**
>> * stage2_wp_ptes - write protect PMD range
>> * @pmd: pointer to pmd entry
>> @@ -1040,7 +1046,6 @@ void kvm_arch_mmu_write_protect_pt_masked(struct kvm *kvm,
>>
>> stage2_wp_range(kvm, start, end);
>> }
>> -#endif
>>
>> static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
>> struct kvm_memory_slot *memslot, unsigned long hva,
>> @@ -1445,7 +1450,6 @@ void kvm_arch_commit_memory_region(struct kvm *kvm,
>> const struct kvm_memory_slot *old,
>> enum kvm_mr_change change)
>> {
>> -#ifdef CONFIG_ARM
>> /*
>> * At this point memslot has been committed and there is an
>> * allocated dirty_bitmap[], dirty pages will be be tracked while the
>> @@ -1453,7 +1457,6 @@ void kvm_arch_commit_memory_region(struct kvm *kvm,
>> */
>> if (change != KVM_MR_DELETE && mem->flags & KVM_MEM_LOG_DIRTY_PAGES)
>> kvm_mmu_wp_memory_region(kvm, mem->slot);
>> -#endif
>> }
>>
>> int kvm_arch_prepare_memory_region(struct kvm *kvm,
>> diff --git a/arch/arm64/kvm/Kconfig b/arch/arm64/kvm/Kconfig
>> index 8ba85e9..3ce389b 100644
>> --- a/arch/arm64/kvm/Kconfig
>> +++ b/arch/arm64/kvm/Kconfig
>> @@ -22,10 +22,12 @@ config KVM
>> select PREEMPT_NOTIFIERS
>> select ANON_INODES
>> select HAVE_KVM_CPU_RELAX_INTERCEPT
>> + select HAVE_KVM_ARCH_TLB_FLUSH_ALL
>> select KVM_MMIO
>> select KVM_ARM_HOST
>> select KVM_ARM_VGIC
>> select KVM_ARM_TIMER
>> + select KVM_GENERIC_DIRTYLOG_READ_PROTECT
>> ---help---
>> Support hosting virtualized guest machines.
>>
>> --
>> 1.9.1
>>
WARNING: multiple messages have this Message-ID (diff)
From: m.smarduch@samsung.com (Mario Smarduch)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v15 10/11] KVM: arm/arm64: Enable Dirty Page logging for ARMv8
Date: Wed, 07 Jan 2015 17:51:15 -0800 [thread overview]
Message-ID: <54ADE293.1040901@samsung.com> (raw)
In-Reply-To: <20150107124744.GC21092@cbox>
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 constraints to enable
>> logging at architecture layer.
>>
>> Signed-off-by: Mario Smarduch <m.smarduch@samsung.com>
>> ---
>> arch/arm/include/asm/kvm_host.h | 12 ------------
>> arch/arm/kvm/arm.c | 4 ----
>> arch/arm/kvm/mmu.c | 19 +++++++++++--------
>> arch/arm64/kvm/Kconfig | 2 ++
>> 4 files changed, 13 insertions(+), 24 deletions(-)
>>
>> diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h
>> index b138431..088ea87 100644
>> --- a/arch/arm/include/asm/kvm_host.h
>> +++ b/arch/arm/include/asm/kvm_host.h
>> @@ -223,18 +223,6 @@ static inline void __cpu_init_hyp_mode(phys_addr_t boot_pgd_ptr,
>> kvm_call_hyp((void*)hyp_stack_ptr, vector_ptr, pgd_ptr);
>> }
>>
>> -/**
>> - * kvm_flush_remote_tlbs() - flush all VM TLB entries
>> - * @kvm: pointer to kvm structure.
>> - *
>> - * Interface to HYP function to flush all VM TLB entries without address
>> - * parameter.
>> - */
>> -static inline void kvm_flush_remote_tlbs(struct kvm *kvm)
>> -{
>> - kvm_call_hyp(__kvm_tlb_flush_vmid, kvm);
>> -}
>> -
>> static inline int kvm_arch_dev_ioctl_check_extension(long ext)
>> {
>> return 0;
>> diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
>> index 6e4290c..1b6577c 100644
>> --- a/arch/arm/kvm/arm.c
>> +++ b/arch/arm/kvm/arm.c
>> @@ -740,7 +740,6 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
>> */
>> int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm, struct kvm_dirty_log *log)
>> {
>> -#ifdef CONFIG_ARM
>> bool is_dirty = false;
>> int r;
>>
>> @@ -753,9 +752,6 @@ int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm, struct kvm_dirty_log *log)
>>
>> mutex_unlock(&kvm->slots_lock);
>> return r;
>> -#else /* arm64 */
>> - return -EINVAL;
>> -#endif
>> }
>>
>> static int kvm_vm_ioctl_set_device_addr(struct kvm *kvm,
>> diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c
>> index dc763bb..59003df 100644
>> --- a/arch/arm/kvm/mmu.c
>> +++ b/arch/arm/kvm/mmu.c
>> @@ -52,11 +52,18 @@ static phys_addr_t hyp_idmap_vector;
>>
>> static bool kvm_get_logging_state(struct kvm_memory_slot *memslot)
>> {
>> -#ifdef CONFIG_ARM
>> return !!memslot->dirty_bitmap;
>> -#else
>> - return false;
>> -#endif
>> +}
>> +
>> +/**
>> + * kvm_flush_remote_tlbs() - flush all VM TLB entries for v7/8
>> + * @kvm: pointer to kvm structure.
>> + *
>> + * Interface to HYP function to flush all VM TLB entries
>> + */
>> +inline void kvm_flush_remote_tlbs(struct kvm *kvm)
>
> did you intend for a non-staic inline here?
Yes it's used in arm.c and mmu.c
>
>> +{
>> + kvm_call_hyp(__kvm_tlb_flush_vmid, kvm);
>> }
>>
>> static void kvm_tlb_flush_vmid_ipa(struct kvm *kvm, phys_addr_t ipa)
>> @@ -895,7 +902,6 @@ static bool kvm_is_device_pfn(unsigned long pfn)
>> return !pfn_valid(pfn);
>> }
>>
>> -#ifdef CONFIG_ARM
>> /**
>> * stage2_wp_ptes - write protect PMD range
>> * @pmd: pointer to pmd entry
>> @@ -1040,7 +1046,6 @@ void kvm_arch_mmu_write_protect_pt_masked(struct kvm *kvm,
>>
>> stage2_wp_range(kvm, start, end);
>> }
>> -#endif
>>
>> static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
>> struct kvm_memory_slot *memslot, unsigned long hva,
>> @@ -1445,7 +1450,6 @@ void kvm_arch_commit_memory_region(struct kvm *kvm,
>> const struct kvm_memory_slot *old,
>> enum kvm_mr_change change)
>> {
>> -#ifdef CONFIG_ARM
>> /*
>> * At this point memslot has been committed and there is an
>> * allocated dirty_bitmap[], dirty pages will be be tracked while the
>> @@ -1453,7 +1457,6 @@ void kvm_arch_commit_memory_region(struct kvm *kvm,
>> */
>> if (change != KVM_MR_DELETE && mem->flags & KVM_MEM_LOG_DIRTY_PAGES)
>> kvm_mmu_wp_memory_region(kvm, mem->slot);
>> -#endif
>> }
>>
>> int kvm_arch_prepare_memory_region(struct kvm *kvm,
>> diff --git a/arch/arm64/kvm/Kconfig b/arch/arm64/kvm/Kconfig
>> index 8ba85e9..3ce389b 100644
>> --- a/arch/arm64/kvm/Kconfig
>> +++ b/arch/arm64/kvm/Kconfig
>> @@ -22,10 +22,12 @@ config KVM
>> select PREEMPT_NOTIFIERS
>> select ANON_INODES
>> select HAVE_KVM_CPU_RELAX_INTERCEPT
>> + select HAVE_KVM_ARCH_TLB_FLUSH_ALL
>> select KVM_MMIO
>> select KVM_ARM_HOST
>> select KVM_ARM_VGIC
>> select KVM_ARM_TIMER
>> + select KVM_GENERIC_DIRTYLOG_READ_PROTECT
>> ---help---
>> Support hosting virtualized guest machines.
>>
>> --
>> 1.9.1
>>
WARNING: multiple messages have this Message-ID (diff)
From: Mario Smarduch <m.smarduch@samsung.com>
To: Christoffer Dall <christoffer.dall@linaro.org>
Cc: pbonzini@redhat.com, james.hogan@imgtec.com, agraf@suse.de,
marc.zyngier@arm.com, cornelia.huck@de.ibm.com,
borntraeger@de.ibm.com, catalin.marinas@arm.com,
kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org,
kvm-ppc@vger.kernel.org, kvm-ia64@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, steve.capper@arm.com,
peter.maydell@linaro.org
Subject: Re: [PATCH v15 10/11] KVM: arm/arm64: Enable Dirty Page logging for ARMv8
Date: Wed, 07 Jan 2015 17:51:15 -0800 [thread overview]
Message-ID: <54ADE293.1040901@samsung.com> (raw)
In-Reply-To: <20150107124744.GC21092@cbox>
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 constraints to enable
>> logging at architecture layer.
>>
>> Signed-off-by: Mario Smarduch <m.smarduch@samsung.com>
>> ---
>> arch/arm/include/asm/kvm_host.h | 12 ------------
>> arch/arm/kvm/arm.c | 4 ----
>> arch/arm/kvm/mmu.c | 19 +++++++++++--------
>> arch/arm64/kvm/Kconfig | 2 ++
>> 4 files changed, 13 insertions(+), 24 deletions(-)
>>
>> diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h
>> index b138431..088ea87 100644
>> --- a/arch/arm/include/asm/kvm_host.h
>> +++ b/arch/arm/include/asm/kvm_host.h
>> @@ -223,18 +223,6 @@ static inline void __cpu_init_hyp_mode(phys_addr_t boot_pgd_ptr,
>> kvm_call_hyp((void*)hyp_stack_ptr, vector_ptr, pgd_ptr);
>> }
>>
>> -/**
>> - * kvm_flush_remote_tlbs() - flush all VM TLB entries
>> - * @kvm: pointer to kvm structure.
>> - *
>> - * Interface to HYP function to flush all VM TLB entries without address
>> - * parameter.
>> - */
>> -static inline void kvm_flush_remote_tlbs(struct kvm *kvm)
>> -{
>> - kvm_call_hyp(__kvm_tlb_flush_vmid, kvm);
>> -}
>> -
>> static inline int kvm_arch_dev_ioctl_check_extension(long ext)
>> {
>> return 0;
>> diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
>> index 6e4290c..1b6577c 100644
>> --- a/arch/arm/kvm/arm.c
>> +++ b/arch/arm/kvm/arm.c
>> @@ -740,7 +740,6 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
>> */
>> int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm, struct kvm_dirty_log *log)
>> {
>> -#ifdef CONFIG_ARM
>> bool is_dirty = false;
>> int r;
>>
>> @@ -753,9 +752,6 @@ int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm, struct kvm_dirty_log *log)
>>
>> mutex_unlock(&kvm->slots_lock);
>> return r;
>> -#else /* arm64 */
>> - return -EINVAL;
>> -#endif
>> }
>>
>> static int kvm_vm_ioctl_set_device_addr(struct kvm *kvm,
>> diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c
>> index dc763bb..59003df 100644
>> --- a/arch/arm/kvm/mmu.c
>> +++ b/arch/arm/kvm/mmu.c
>> @@ -52,11 +52,18 @@ static phys_addr_t hyp_idmap_vector;
>>
>> static bool kvm_get_logging_state(struct kvm_memory_slot *memslot)
>> {
>> -#ifdef CONFIG_ARM
>> return !!memslot->dirty_bitmap;
>> -#else
>> - return false;
>> -#endif
>> +}
>> +
>> +/**
>> + * kvm_flush_remote_tlbs() - flush all VM TLB entries for v7/8
>> + * @kvm: pointer to kvm structure.
>> + *
>> + * Interface to HYP function to flush all VM TLB entries
>> + */
>> +inline void kvm_flush_remote_tlbs(struct kvm *kvm)
>
> did you intend for a non-staic inline here?
Yes it's used in arm.c and mmu.c
>
>> +{
>> + kvm_call_hyp(__kvm_tlb_flush_vmid, kvm);
>> }
>>
>> static void kvm_tlb_flush_vmid_ipa(struct kvm *kvm, phys_addr_t ipa)
>> @@ -895,7 +902,6 @@ static bool kvm_is_device_pfn(unsigned long pfn)
>> return !pfn_valid(pfn);
>> }
>>
>> -#ifdef CONFIG_ARM
>> /**
>> * stage2_wp_ptes - write protect PMD range
>> * @pmd: pointer to pmd entry
>> @@ -1040,7 +1046,6 @@ void kvm_arch_mmu_write_protect_pt_masked(struct kvm *kvm,
>>
>> stage2_wp_range(kvm, start, end);
>> }
>> -#endif
>>
>> static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
>> struct kvm_memory_slot *memslot, unsigned long hva,
>> @@ -1445,7 +1450,6 @@ void kvm_arch_commit_memory_region(struct kvm *kvm,
>> const struct kvm_memory_slot *old,
>> enum kvm_mr_change change)
>> {
>> -#ifdef CONFIG_ARM
>> /*
>> * At this point memslot has been committed and there is an
>> * allocated dirty_bitmap[], dirty pages will be be tracked while the
>> @@ -1453,7 +1457,6 @@ void kvm_arch_commit_memory_region(struct kvm *kvm,
>> */
>> if (change != KVM_MR_DELETE && mem->flags & KVM_MEM_LOG_DIRTY_PAGES)
>> kvm_mmu_wp_memory_region(kvm, mem->slot);
>> -#endif
>> }
>>
>> int kvm_arch_prepare_memory_region(struct kvm *kvm,
>> diff --git a/arch/arm64/kvm/Kconfig b/arch/arm64/kvm/Kconfig
>> index 8ba85e9..3ce389b 100644
>> --- a/arch/arm64/kvm/Kconfig
>> +++ b/arch/arm64/kvm/Kconfig
>> @@ -22,10 +22,12 @@ config KVM
>> select PREEMPT_NOTIFIERS
>> select ANON_INODES
>> select HAVE_KVM_CPU_RELAX_INTERCEPT
>> + select HAVE_KVM_ARCH_TLB_FLUSH_ALL
>> select KVM_MMIO
>> select KVM_ARM_HOST
>> select KVM_ARM_VGIC
>> select KVM_ARM_TIMER
>> + select KVM_GENERIC_DIRTYLOG_READ_PROTECT
>> ---help---
>> Support hosting virtualized guest machines.
>>
>> --
>> 1.9.1
>>
next prev parent reply other threads:[~2015-01-08 1:51 UTC|newest]
Thread overview: 110+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-15 7:28 [PATCH v15 10/11] KVM: arm/arm64: Enable Dirty Page logging for ARMv8 Mario Smarduch
2014-12-15 7:28 ` Mario Smarduch
2014-12-15 7:28 ` Mario Smarduch
2014-12-15 7:28 ` Mario Smarduch
2015-01-07 12:47 ` Christoffer Dall
2015-01-07 12:47 ` Christoffer Dall
2015-01-07 12:47 ` Christoffer Dall
2015-01-07 12:47 ` Christoffer Dall
2015-01-08 1:51 ` Mario Smarduch [this message]
2015-01-08 1:51 ` Mario Smarduch
2015-01-08 1:51 ` Mario Smarduch
2015-01-08 1:51 ` Mario Smarduch
2015-01-08 10:56 ` Christoffer Dall
2015-01-08 10:56 ` Christoffer Dall
2015-01-08 10:56 ` Christoffer Dall
2015-01-08 10:56 ` Christoffer Dall
2015-01-08 16:30 ` Mario Smarduch
2015-01-08 16:30 ` Mario Smarduch
2015-01-08 16:30 ` Mario Smarduch
2015-01-08 16:30 ` Mario Smarduch
-- strict thread matches above, loose matches on Subject: below --
2015-01-07 13:05 [PATCH v15 06/11] KVM: arm: dirty logging write protect support Christoffer Dall
2015-01-07 13:05 ` Christoffer Dall
2015-01-07 13:05 ` Christoffer Dall
2015-01-07 13:05 ` Christoffer Dall
2015-01-07 13:05 [PATCH v15 05/11] KVM: arm: Add initial dirty page locking support Christoffer Dall
2015-01-07 13:05 ` Christoffer Dall
2015-01-07 13:05 ` Christoffer Dall
2015-01-07 13:05 ` Christoffer Dall
2014-12-15 7:28 [PATCH v15 11/11] KVM: arm/arm64: Add support to dissolve huge PUD Mario Smarduch
2014-12-15 7:28 ` Mario Smarduch
2014-12-15 7:28 ` Mario Smarduch
2014-12-15 7:28 ` Mario Smarduch
2015-01-07 13:05 ` Christoffer Dall
2015-01-07 13:05 ` Christoffer Dall
2015-01-07 13:05 ` Christoffer Dall
2015-01-07 13:05 ` Christoffer Dall
2015-01-08 3:01 ` Mario Smarduch
2015-01-08 3:01 ` Mario Smarduch
2015-01-08 3:01 ` Mario Smarduch
2015-01-08 3:01 ` Mario Smarduch
2015-01-08 11:32 ` Christoffer Dall
2015-01-08 11:32 ` Christoffer Dall
2015-01-08 11:32 ` Christoffer Dall
2015-01-08 11:32 ` Christoffer Dall
2015-01-08 16:41 ` Mario Smarduch
2015-01-08 16:41 ` Mario Smarduch
2015-01-08 16:41 ` Mario Smarduch
2015-01-08 16:41 ` Mario Smarduch
2015-01-08 16:42 ` Mario Smarduch
2015-01-08 16:42 ` Mario Smarduch
2015-01-08 16:42 ` Mario Smarduch
2015-01-08 16:42 ` Mario Smarduch
2015-01-09 10:23 ` Christoffer Dall
2015-01-09 10:23 ` Christoffer Dall
2015-01-09 10:23 ` Christoffer Dall
2015-01-09 10:23 ` Christoffer Dall
2014-12-15 7:28 [PATCH v15 09/11] KVM: arm64: Add HYP interface to flush VM Stage 1/2 TLB entires Mario Smarduch
2014-12-15 7:28 ` Mario Smarduch
2014-12-15 7:28 ` Mario Smarduch
2014-12-15 7:28 ` Mario Smarduch
2014-12-15 7:28 [PATCH v15 08/11] KVM: arm64: ARMv8 header changes for page logging Mario Smarduch
2014-12-15 7:28 ` Mario Smarduch
2014-12-15 7:28 ` Mario Smarduch
2014-12-15 7:28 ` Mario Smarduch
2014-12-15 7:28 [PATCH v15 07/11] KVM: arm: page logging 2nd stage fault handling Mario Smarduch
2014-12-15 7:28 ` Mario Smarduch
2014-12-15 7:28 ` Mario Smarduch
2014-12-15 7:28 ` Mario Smarduch
2014-12-15 7:28 [PATCH v15 06/11] KVM: arm: dirty logging write protect support Mario Smarduch
2014-12-15 7:28 ` Mario Smarduch
2014-12-15 7:28 ` Mario Smarduch
2014-12-15 7:28 ` Mario Smarduch
2014-12-15 7:28 [PATCH v15 05/11] KVM: arm: Add initial dirty page locking support Mario Smarduch
2014-12-15 7:28 ` Mario Smarduch
2014-12-15 7:28 ` Mario Smarduch
2014-12-15 7:28 ` Mario Smarduch
2014-12-15 7:28 [PATCH v15 04/11] KVM: arm: Add ARMv7 API to flush TLBs Mario Smarduch
2014-12-15 7:28 ` Mario Smarduch
2014-12-15 7:28 ` Mario Smarduch
2014-12-15 7:28 ` Mario Smarduch
2014-12-15 7:28 [PATCH v15 03/11] KVM: x86: switch to kvm_get_dirty_log_protect Mario Smarduch
2014-12-15 7:28 ` Mario Smarduch
2014-12-15 7:28 ` Mario Smarduch
2014-12-15 7:28 ` Mario Smarduch
2014-12-15 7:27 [PATCH v15 02/11] KVM: Add generic support for dirty page logging Mario Smarduch
2014-12-15 7:27 ` Mario Smarduch
2014-12-15 7:27 ` Mario Smarduch
2014-12-15 7:27 ` Mario Smarduch
2014-12-15 7:27 [PATCH v15 01/11] KVM: Add architecture-defined TLB flush support Mario Smarduch
2014-12-15 7:27 ` Mario Smarduch
2014-12-15 7:27 ` Mario Smarduch
2014-12-15 7:27 ` Mario Smarduch
2014-12-15 7:27 [PATCH v15 00/11] KVM//x86/arm/arm64: dirty page logging for ARMv7/8 (3.18.0-rc2) Mario Smarduch
2014-12-15 7:27 ` Mario Smarduch
2014-12-15 7:27 ` Mario Smarduch
2014-12-15 7:27 ` Mario Smarduch
2014-12-18 2:07 ` [RESEND PATCH v15 07/11] KVM: arm: page logging 2nd stage fault handling Mario Smarduch
2014-12-18 2:07 ` Mario Smarduch
2015-01-07 12:38 ` Christoffer Dall
2015-01-07 12:38 ` Christoffer Dall
2015-01-08 1:43 ` Mario Smarduch
2015-01-08 1:43 ` Mario Smarduch
2015-01-08 10:45 ` Christoffer Dall
2015-01-08 10:45 ` Christoffer Dall
2015-01-08 16:28 ` Mario Smarduch
2015-01-08 16:28 ` Mario Smarduch
2015-01-09 10:24 ` Christoffer Dall
2015-01-09 10:24 ` Christoffer Dall
2015-01-10 4:38 ` Mario Smarduch
2015-01-10 4:38 ` Mario Smarduch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54ADE293.1040901@samsung.com \
--to=m.smarduch@samsung.com \
--cc=kvm-ia64@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.