From: Christoffer Dall <christoffer.dall@linaro.org>
To: Mario Smarduch <m.smarduch@samsung.com>
Cc: kvmarm@lists.cs.columbia.edu, marc.zyngier@arm.com,
antonios.motakis@huawei.com, kvm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 1/2] add hooks for armv8 fp/simd lazy switch
Date: Mon, 26 Oct 2015 15:32:45 +0100 [thread overview]
Message-ID: <20151026143245.GC20298@cbox> (raw)
In-Reply-To: <1444098794-19244-2-git-send-email-m.smarduch@samsung.com>
On Mon, Oct 05, 2015 at 07:33:13PM -0700, Mario Smarduch wrote:
> This patch adds hooks to support fp/simd lazy switch. A vcpu flag to track
> fp/simd state, and flag offset in vcpu structure.
>
> Signed-off-by: Mario Smarduch <m.smarduch@samsung.com>
> ---
> arch/arm64/include/asm/kvm_host.h | 3 +++
> arch/arm64/kernel/asm-offsets.c | 1 +
> 2 files changed, 4 insertions(+)
>
> diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
> index 4562459..03f25d0 100644
> --- a/arch/arm64/include/asm/kvm_host.h
> +++ b/arch/arm64/include/asm/kvm_host.h
> @@ -157,6 +157,9 @@ struct kvm_vcpu_arch {
> /* Interrupt related fields */
> u64 irq_lines; /* IRQ and FIQ levels */
>
> + /* Track fp/simd lazy switch */
> + u32 vfp_lazy;
> +
like for the 32-bit patch set I think this could have a more meaningful
name with more clearly defined semantics, e.g. vfp_host_dirty. You
could also call it vfp_flags like the debug flags and define a specific
flag for your use...
Thanks,
-Christoffer
> /* Cache some mmu pages needed inside spinlock regions */
> struct kvm_mmu_memory_cache mmu_page_cache;
>
> diff --git a/arch/arm64/kernel/asm-offsets.c b/arch/arm64/kernel/asm-offsets.c
> index 8d89cf8..8311da4 100644
> --- a/arch/arm64/kernel/asm-offsets.c
> +++ b/arch/arm64/kernel/asm-offsets.c
> @@ -124,6 +124,7 @@ int main(void)
> DEFINE(VCPU_HCR_EL2, offsetof(struct kvm_vcpu, arch.hcr_el2));
> DEFINE(VCPU_MDCR_EL2, offsetof(struct kvm_vcpu, arch.mdcr_el2));
> DEFINE(VCPU_IRQ_LINES, offsetof(struct kvm_vcpu, arch.irq_lines));
> + DEFINE(VCPU_VFP_LAZY, offsetof(struct kvm_vcpu, arch.vfp_lazy));
> DEFINE(VCPU_HOST_CONTEXT, offsetof(struct kvm_vcpu, arch.host_cpu_context));
> DEFINE(VCPU_HOST_DEBUG_STATE, offsetof(struct kvm_vcpu, arch.host_debug_state));
> DEFINE(VCPU_TIMER_CNTV_CTL, offsetof(struct kvm_vcpu, arch.timer_cpu.cntv_ctl));
> --
> 1.9.1
>
WARNING: multiple messages have this Message-ID (diff)
From: christoffer.dall@linaro.org (Christoffer Dall)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/2] add hooks for armv8 fp/simd lazy switch
Date: Mon, 26 Oct 2015 15:32:45 +0100 [thread overview]
Message-ID: <20151026143245.GC20298@cbox> (raw)
In-Reply-To: <1444098794-19244-2-git-send-email-m.smarduch@samsung.com>
On Mon, Oct 05, 2015 at 07:33:13PM -0700, Mario Smarduch wrote:
> This patch adds hooks to support fp/simd lazy switch. A vcpu flag to track
> fp/simd state, and flag offset in vcpu structure.
>
> Signed-off-by: Mario Smarduch <m.smarduch@samsung.com>
> ---
> arch/arm64/include/asm/kvm_host.h | 3 +++
> arch/arm64/kernel/asm-offsets.c | 1 +
> 2 files changed, 4 insertions(+)
>
> diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
> index 4562459..03f25d0 100644
> --- a/arch/arm64/include/asm/kvm_host.h
> +++ b/arch/arm64/include/asm/kvm_host.h
> @@ -157,6 +157,9 @@ struct kvm_vcpu_arch {
> /* Interrupt related fields */
> u64 irq_lines; /* IRQ and FIQ levels */
>
> + /* Track fp/simd lazy switch */
> + u32 vfp_lazy;
> +
like for the 32-bit patch set I think this could have a more meaningful
name with more clearly defined semantics, e.g. vfp_host_dirty. You
could also call it vfp_flags like the debug flags and define a specific
flag for your use...
Thanks,
-Christoffer
> /* Cache some mmu pages needed inside spinlock regions */
> struct kvm_mmu_memory_cache mmu_page_cache;
>
> diff --git a/arch/arm64/kernel/asm-offsets.c b/arch/arm64/kernel/asm-offsets.c
> index 8d89cf8..8311da4 100644
> --- a/arch/arm64/kernel/asm-offsets.c
> +++ b/arch/arm64/kernel/asm-offsets.c
> @@ -124,6 +124,7 @@ int main(void)
> DEFINE(VCPU_HCR_EL2, offsetof(struct kvm_vcpu, arch.hcr_el2));
> DEFINE(VCPU_MDCR_EL2, offsetof(struct kvm_vcpu, arch.mdcr_el2));
> DEFINE(VCPU_IRQ_LINES, offsetof(struct kvm_vcpu, arch.irq_lines));
> + DEFINE(VCPU_VFP_LAZY, offsetof(struct kvm_vcpu, arch.vfp_lazy));
> DEFINE(VCPU_HOST_CONTEXT, offsetof(struct kvm_vcpu, arch.host_cpu_context));
> DEFINE(VCPU_HOST_DEBUG_STATE, offsetof(struct kvm_vcpu, arch.host_debug_state));
> DEFINE(VCPU_TIMER_CNTV_CTL, offsetof(struct kvm_vcpu, arch.timer_cpu.cntv_ctl));
> --
> 1.9.1
>
next prev parent reply other threads:[~2015-10-26 14:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-06 2:33 [PATCH v2 0/2] KVM/arm64: add fp/simd lazy switch support Mario Smarduch
2015-10-06 2:33 ` Mario Smarduch
2015-10-06 2:33 ` [PATCH v2 1/2] add hooks for armv8 fp/simd lazy switch Mario Smarduch
2015-10-06 2:33 ` Mario Smarduch
2015-10-26 14:32 ` Christoffer Dall [this message]
2015-10-26 14:32 ` Christoffer Dall
2015-10-06 2:33 ` [PATCH v2 2/2] enable " Mario Smarduch
2015-10-06 2:33 ` Mario Smarduch
2015-10-26 14:32 ` Christoffer Dall
2015-10-26 14:32 ` Christoffer Dall
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=20151026143245.GC20298@cbox \
--to=christoffer.dall@linaro.org \
--cc=antonios.motakis@huawei.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=m.smarduch@samsung.com \
--cc=marc.zyngier@arm.com \
/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.