From: m.smarduch@samsung.com (Mario Smarduch)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/2] KVM/arm: add hooks for armv7 fp/simd lazy switch support
Date: Mon, 19 Oct 2015 16:16:53 -0700 [thread overview]
Message-ID: <562579E5.6040008@samsung.com> (raw)
In-Reply-To: <20151019085332.GA24104@cbox>
On 10/19/2015 1:53 AM, Christoffer Dall wrote:
> On Sat, Sep 26, 2015 at 04:43:28PM -0700, Mario Smarduch wrote:
>> This patch adds vcpu fields to track lazy state, save host FPEXC, and
>> offsets to fields.
>>
>> Signed-off-by: Mario Smarduch <m.smarduch@samsung.com>
>> ---
>> arch/arm/include/asm/kvm_host.h | 6 ++++++
>> arch/arm/kernel/asm-offsets.c | 2 ++
>> 2 files changed, 8 insertions(+)
>>
>> diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h
>> index dcba0fa..194a8ef 100644
>> --- a/arch/arm/include/asm/kvm_host.h
>> +++ b/arch/arm/include/asm/kvm_host.h
>> @@ -111,6 +111,12 @@ struct kvm_vcpu_arch {
>> /* Interrupt related fields */
>> u32 irq_lines; /* IRQ and FIQ levels */
>>
>> + /* Track fp/simd lazy switch state */
>> + u32 vfp_lazy;
>
> so is this a flags field or basically a boolean? If the latter, what is
> does it mean when the field is true vs. false?
Yes it's a bool will update, and clarify comments.
>
>> +
>> + /* Save host FPEXC register to restore on vcpu put */
>> + u32 saved_fpexc;
>
> is this only the host's state? If so, why not name it host_fpexc?
That's right itis host state, will change.
>
> Thanks,
> -Christoffer
>
>> +
>> /* Exception Information */
>> struct kvm_vcpu_fault_info fault;
>>
>> diff --git a/arch/arm/kernel/asm-offsets.c b/arch/arm/kernel/asm-offsets.c
>> index 871b826..e1c3a41 100644
>> --- a/arch/arm/kernel/asm-offsets.c
>> +++ b/arch/arm/kernel/asm-offsets.c
>> @@ -186,6 +186,8 @@ int main(void)
>> DEFINE(VCPU_CPSR, offsetof(struct kvm_vcpu, arch.regs.usr_regs.ARM_cpsr));
>> DEFINE(VCPU_HCR, offsetof(struct kvm_vcpu, arch.hcr));
>> DEFINE(VCPU_IRQ_LINES, offsetof(struct kvm_vcpu, arch.irq_lines));
>> + DEFINE(VCPU_VFP_LAZY, offsetof(struct kvm_vcpu, arch.vfp_lazy));
>> + DEFINE(VCPU_VFP_FPEXC, offsetof(struct kvm_vcpu, arch.saved_fpexc));
>> DEFINE(VCPU_HSR, offsetof(struct kvm_vcpu, arch.fault.hsr));
>> DEFINE(VCPU_HxFAR, offsetof(struct kvm_vcpu, arch.fault.hxfar));
>> DEFINE(VCPU_HPFAR, offsetof(struct kvm_vcpu, arch.fault.hpfar));
>> --
>> 1.9.1
>>
next prev parent reply other threads:[~2015-10-19 23:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-26 23:43 [PATCH v2 0/2] KVM/arm: enhance arvm7 vfp/simd lazy switch support Mario Smarduch
2015-09-26 23:43 ` [PATCH v2 1/2] KVM/arm: add hooks for armv7 fp/simd " Mario Smarduch
2015-10-19 8:53 ` Christoffer Dall
2015-10-19 23:16 ` Mario Smarduch [this message]
2015-09-26 23:43 ` [PATCH v2 2/2] KVM/arm: enable enhanced armv7 fp/simd lazy switch Mario Smarduch
2015-10-19 10:14 ` Christoffer Dall
2015-10-19 23:25 ` Mario Smarduch
2015-10-20 7:24 ` Christoffer Dall
2015-10-21 1:10 ` Mario Smarduch
2015-10-22 21:20 ` 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=562579E5.6040008@samsung.com \
--to=m.smarduch@samsung.com \
--cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).