running on hardware that supports SVE, this enables runtime
kernel support for SVE, and allows user tasks to execute SVE
instructions and make of the of the SVE-specific user/kernel
interface extensions implemented by this series.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Reviewed-by:
vector length: this
determines the maximum size of SVE context block that can be
observed in any signal frame for the lifetime of the process.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Cc: Ard Biesheuvel <ard.biesheu...@linaro.org>
Cc: Alex Bennée <alex.ben...@linaro.org&g
This patch adds basic documentation of the user/kernel interface
provided by the for SVE.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Reviewed-by: Catalin Marinas <catalin.mari...@arm.com>
Cc: Alan Hayward <alan.hayw...@arm.com>
Cc: Alex Bennée <alex.ben...@linaro.
must be saved and restored too.
No attempt is made to restore the restore the vector length after
a call, for now. It is deemed rather insane for EFI to change it,
and contemporary EFI implementations certainly won't.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Reviewed-by: Alex
as
reading as zero, which is consistent with SVE not being
implemented.
This is a temporary measure, and will be removed in a later series
when full KVM support for SVE is implemented.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Reviewed-by: Alex Bennée <alex.ben...@linaro.org>
Ac
length, it is not possible
to define a fixed C struct to describe all the registers. Instead,
Macros are defined in sigcontext.h to facilitate access to the
parts of the structure.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Reviewed-by: Catalin Marinas <catalin.mari...@arm.com>
Cc:
* fork and clone
Code is added to sync data between thread.fpsimd_state and
thread.sve_state whenever enabling/disabling SVE, in a manner
consistent with the SVE architectural programmer's model.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Reviewed-by: Catalin Marinas <catalin.mari...@ar
fpsimd_signal_preserve_current_state() is added to update _both_
the FPSIMD and SVE views in the task struct, to make it easier to
populate this information into the signal frame. Because of the
redundancy between the two views of the state, only one is updated
otherwise.
Signed-off-by: Dave Martin <dave.mar...@arm.com&
that are not a power of two. To handle
this, logic is added to check a requested vector length against a
possibly sparse bitmap of available vector lengths at runtime, so
that the best supported value can be chosen.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Reviewed-by: Catalin Marinas <cat
. This
should have no impact on behaviour.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Reviewed-by: Alex Bennée <alex.ben...@linaro.org>
Reviewed-by: Catalin Marinas <catalin.mari...@arm.com>
Acked-by: Ard Biesheuvel <ard.biesheu...@linaro.org>
---
arch/arm64/kerne
TIF_SVE_VL_INHERIT to control whether to inherit or reset the
vector length. Currently these are inactive. Subsequent patches
will provide the capability to configure them.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Reviewed-by: Alex Bennée <alex.ben...@linaro.org>
Reviewed-by: Cat
the vector length.
Setting of the vector length is done as part of register restore.
Since people building kernels may not all get an SVE-enabled
toolchain for a while, this patch uses macros that generate
explicit opcodes in place of assembler mnemonics.
Signed-off-by: Dave Martin <dave.mar...@arm.
, which the recipient can use to
figure out the content, size and layout of the reset of the regset.
Accessor macros are defined to allow the vector-length-dependent
parts of the regset to be manipulated.
Signed-off-by: Alan Hayward <alan.hayw...@arm.com>
Signed-off-by: Dave Martin <dave.mar..
instructions.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Reviewed-by: Catalin Marinas <catalin.mari...@arm.com>
Cc: Alex Bennée <alex.ben...@linaro.org>
---
**Dropped at v3** Reviewed-by: Alex Bennée <alex.ben...@linaro.org>
See v3 posting for history.
---
arch/arm64/incl
The SVE architecture adds some system registers, ID register fields
and a dedicated ESR exception class.
This patch adds the appropriate definitions that will be needed by
the kernel.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Reviewed-by: Alex Bennée <alex.ben...@linaro.org&
booting a
CPU, so that it can be updated appropriately.
This patch simply moves the sys_caps_initialised stuff to the top
of the file so that it can be used more widely. There doesn't seem
to be a more obvious place to put it.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Reviewed-by: Alex
.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheu...@linaro.org>
Reviewed-by: Alex Bennée <alex.ben...@linaro.org>
Reviewed-by: Catalin Marinas <catalin.mari...@arm.com>
---
arch/arm64/kernel/fpsimd.c | 6 --
1 file changed, 4 in
in a later patch, once
SVE support is complete enough to be enabled safely.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Reviewed-by: Alex Bennée <alex.ben...@linaro.org>
Reviewed-by: Catalin Marinas <catalin.mari...@arm.com>
---
arch/arm64/Kconfig | 11 +
the limit set by ZCR_EL2.)
This patch makes the appropriate changes to the EL2 early setup
code.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Reviewed-by: Catalin Marinas <catalin.mari...@arm.com>
Cc: Alex Bennée <alex.ben...@linaro.org>
---
**Dropped at v3** Reviewed-by: Ale
the potential for future surprises, this patch does an
explicit access_ok() check on the extra data space when parsing an
extra_context record.
Fixes: 33f082614c34 ("arm64: signal: Allow expansion of the signal frame")
Signed-off-by: Dave Martin <dave.mar...@arm.com>
---
a
a get_size() implementation.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Reviewed-by: Alex Bennée <alex.ben...@linaro.org>
Reviewed-by: Catalin Marinas <catalin.mari...@arm.com>
Cc: Oleg Nesterov <o...@redhat.com>
Cc: Alexander Viro <v...@zeniv.linux.org.uk>
Cc: Thoma
dependency.
This will aid bisection of the patches implementing support for the
ARM Scalable Vector Extension (SVE).
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Reviewed-by: Alex Bennée <alex.ben...@linaro.org>
Acked-by: Catalin Marinas <catalin.mari...@arm.com>
Cc: Ard Biesh
for AArch32: however,
these could be handled in a similar way in future, as necessary.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Reviewed-by: Marc Zyngier <marc.zyng...@arm.com>
Acked-by: Catalin Marinas <catalin.mari...@arm.com>
Cc: Christoffer Dall <christoffer.d...@linaro
rectories explicitly, which
is ideal here.
This patch ports register_insn_emulation_sysctl() over to the
register_sysctl() interface and removes the redundant ctl_table for
"abi".
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Reviewed-by: Alex Bennée <alex.ben...@l
git://linux-arm.org/linux-dm.git sve/v4+fixes
Dave Martin (30):
regset: Add support for dynamically sized regsets
arm64: fpsimd: Correctly annotate exception helpers called from asm
arm64: signal: Verify extra data is user-readable in sys_rt_sigreturn
arm64: KVM: Hide unsupported AA
asmlinkage annotations for
do_fpsimd_acc() and do_fpsimd_exc().
Signed-off-by: Dave Martin <dave.mar...@arm.com>
---
arch/arm64/kernel/fpsimd.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c
index 5d547de..e85
On Fri, Oct 27, 2017 at 06:52:50PM +0100, Alex Bennée wrote:
>
> Dave Martin <dave.mar...@arm.com> writes:
>
> > This patch adds two arm64-specific prctls, to permit userspace to
> > control its vector length:
> >
> > * PR_SVE_SET_VL: set the thread's SVE
kvm_arch_vcpu_run_pid_change
Dave Martin (13):
thread_info: Add update_thread_flag() helpers
arm64: Use update{,_tsk}_thread_flag()
KVM: arm64: Convert lazy FPSIMD context switch trap to C
arm64: fpsimd: Generalise context saving for non-task contexts
KVM: arm64: Optimise FPSIMD handling
.
No functional change.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Acked-by: Catalin Marinas <catalin.mari...@arm.com>
---
arch/arm64/include/asm/cpufeature.h | 29 -
arch/arm64/include/asm/fpsimd.h | 2 ++
arch/arm64/include/asm/processor.h
t's system registers. To
avoid ABI churn, the redundant storage space in host_cpu_context is
not removed for now.
arch/arm is not addressed by this patch and continues to use its
current save/restore logic. It could provide implementations of
the helpers later if desired.
Signed-off-by: Dave Martin
definitions.
No functional change.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Acked-by: Catalin Marinas <catalin.mari...@arm.com>
---
arch/arm64/include/asm/fpsimd.h| 13 +
arch/arm64/include/asm/processor.h | 3 ++-
arch/arm64/kernel/fpsimd.c | 12 -
and refuses to create a
VM. Doing this check at VM creation time avoids race issues
between KVM and SVE initialisation.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Reviewed-by: Christoffer Dall <christoffer.d...@arm.com>
---
arch/arm64/Kconfig | 7 +++
arch/arm64/
if-
nesting that becomes trivial as a result.
No functional change.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
---
arch/arm64/kvm/hyp/switch.c | 16
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/arch/arm64/kvm/hyp/switch.c b/arch/arm64/kvm/hyp/switch.c
uif_trap and vgic_v3_cpuif_trap true simultaneously
unless we have a GICv3 and GICv2 on the host: that sounds stupid,
but I haven't satisfied myself that it can't happen.
No functional change.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
---
arch/arm64/kvm/hyp/switch.c | 11 +++
1 file changed
, but this allows it to be tail-called with a single
return statement.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
---
arch/arm64/kvm/hyp/entry.S | 30 --
arch/arm64/kvm/hyp/hyp-entry.S | 19 ---
arch/arm64/kvm/hyp/switch.c| 15 +--
3
, the function and its dependencies are also deleted.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Acked-by: Christoffer Dall <christoffer.d...@arm.com>
---
arch/arm/include/asm/kvm_host.h | 3 ---
arch/arm64/include/asm/kvm_host.h | 10 --
arch/arm64/kernel/fpsimd.c
storage for the
loaded context.
No functional change.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
---
New patch since RFC v4:
(Split from KVM: arm64: Optimise FPSIMD handling to reduce guest/host
thrashing, with no functional change.)
Changes since RFC v4:
* task_fpsimd_save() r
This patch uses the new update_thread_flag() helpers to simplify a
couple of if () set; else clear; constructs.
No functional change.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Cc: Catalin Marinas <catalin.mari...@arm.com>
Cc: Will Deacon <will.dea...@arm.com>
---
To make the lazy FPSIMD context switch trap code easier to hack on,
this patch converts it to C.
This is not amazingly efficient, but the trap should typically only
be taken once per host context switch.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
---
Changes since RFCv4:
;
Signed-off-by: Dave Martin <dave.mar...@arm.com>
---
Changes since RFCv4:
Back out the arm64 implementation of the new hook, which is
replaced by a subsequent patch (and not useful before that patch).
---
include/linux/kvm_host.h | 9 +
virt/kvm/Kconfig | 3 +++
virt/kvm/k
, cond)
which do the equivalent of:
if (cond)
set*_thread_flag([...,] flag);
else
clear*_thread_flag([...,] flag);
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Cc: Ingo Molnar <mi...@redhat.com>
Cc: Peter Zijlstra <pet...@infradead.
in
preparation for moving this function to a header, where we do not
want to have to include due to the consequent
circular #include problems.
No functional change.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Acked-by: Catalin Marinas <catalin.mari...@arm.com>
---
arch/arm64/kernel/f
On Wed, May 09, 2018 at 10:46:11AM +0100, Marc Zyngier wrote:
> On 09/05/18 10:17, Dave Martin wrote:
> > On Wed, May 09, 2018 at 09:24:36AM +0100, Marc Zyngier wrote:
> >> On 08/05/18 17:44, Dave Martin wrote:
> >>> This patch refactors KVM to align the host and g
On Wed, May 09, 2018 at 09:50:26AM +0100, Marc Zyngier wrote:
> On 08/05/18 17:44, Dave Martin wrote:
> > This patch adds SVE context saving to the hyp FPSIMD context switch
> > path. This means that it is no longer necessary to save the host
> > SVE state in advance of ent
On Wed, May 09, 2018 at 09:24:36AM +0100, Marc Zyngier wrote:
> On 08/05/18 17:44, Dave Martin wrote:
> > This patch refactors KVM to align the host and guest FPSIMD
> > save/restore logic with each other for arm64. This reduces the
[...]
> > diff --git a/arch/arm64/include
On Tue, May 08, 2018 at 10:58:04AM +0100, Marc Zyngier wrote:
> On 04/05/18 17:05, Dave Martin wrote:
> > This patch refactors KVM to align the host and guest FPSIMD
> > save/restore logic with each other for arm64. This reduces the
> > number of redundant save/restore opera
t's system registers. To
avoid ABI churn, the redundant storage space in host_cpu_context is
not removed for now.
arch/arm is not addressed by this patch and continues to use its
current save/restore logic. It could provide implementations of
the helpers later if desired.
Signed-off-by: D
I consider this a reasonable price to pay for
a slightly cleaner interface.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
---
arch/arm64/kernel/fpsimd.c | 28 ++--
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kerne
gets rid of that too.
No functional change.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Reviewed-by: Marc Zyngier <marc.zyng...@arm.com>
---
Changes since v6:
* Move vcpu_arch flags definitions to kvm_host.h.
These are not used from asm any more, so it makes sense for them to be
.
No functional change.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Acked-by: Catalin Marinas <catalin.mari...@arm.com>
Acked-by: Marc Zyngier <marc.zyng...@arm.com>
---
arch/arm64/include/asm/cpufeature.h | 29 -
arch/arm64/include/asm/fpsimd.h
in
preparation for moving this function to a header, where we do not
want to have to include due to the consequent
circular #include problems.
No functional change.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Acked-by: Catalin Marinas <catalin.mari...@arm.com>
Acked-by: Marc Zyngier <marc.
definitions.
No functional change.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Acked-by: Catalin Marinas <catalin.mari...@arm.com>
Acked-by: Marc Zyngier <marc.zyng...@arm.com>
---
arch/arm64/include/asm/fpsimd.h| 13 +
arch/arm64/include/asm/processor.h | 3 ++-
then KVM will be
disabled.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Reviewed-by: Christoffer Dall <christoffer.d...@arm.com>
Acked-by: Marc Zyngier <marc.zyng...@arm.com>
---
arch/arm64/Kconfig | 7 +++
arch/arm64/kvm/fpsimd.c | 1 -
arch/arm64/kvm
uif_trap and vgic_v3_cpuif_trap true simultaneously
unless we have a GICv3 and GICv2 on the host: that sounds stupid,
but I haven't satisfied myself that it can't happen.
No functional change.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Reviewed-by: Marc Zyngier <marc.zyng...@arm.com>
---
arch/ar
/2018-May/thread.html
Christoffer Dall (1):
KVM: arm/arm64: Introduce kvm_arch_vcpu_run_pid_change
Dave Martin (15):
thread_info: Add update_thread_flag() helpers
arm64: Use update{,_tsk}_thread_flag()
KVM: arm64: Convert lazy FPSIMD context switch trap to C
arm64: fpsimd: Generalise
storage for the
loaded context.
No functional change.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Acked-by: Marc Zyngier <marc.zyng...@arm.com>
---
arch/arm64/kernel/fpsimd.c | 25 +
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/arch/arm64/ker
To make the lazy FPSIMD context switch trap code easier to hack on,
this patch converts it to C.
This is not amazingly efficient, but the trap should typically only
be taken once per host context switch.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Reviewed-by: Marc Zyngier <
, cond)
which do the equivalent of:
if (cond)
set*_thread_flag([...,] flag);
else
clear*_thread_flag([...,] flag);
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Acked-by: Steven Rostedt (VMware) <rost...@goodmis.org>
Acked-by:
;
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Reviewed-by: Marc Zyngier <marc.zyng...@arm.com>
---
include/linux/kvm_host.h | 9 +
virt/kvm/Kconfig | 3 +++
virt/kvm/kvm_main.c | 7 ++-
3 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/include/li
This patch uses the new update_thread_flag() helpers to simplify a
couple of if () set; else clear; constructs.
No functional change.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Acked-by: Marc Zyngier <marc.zyng...@arm.com>
Cc: Catalin Marinas <catalin.mari...@arm.com&g
, the function and its dependencies are also deleted.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Acked-by: Christoffer Dall <christoffer.d...@arm.com>
Acked-by: Marc Zyngier <marc.zyng...@arm.com>
---
arch/arm/include/asm/kvm_host.h | 3 ---
arch/arm64/include/a
if-nesting that becomes trivial as a result.
No functional change.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Acked-by: Marc Zyngier <marc.zyng...@arm.com>
---
arch/arm64/kvm/hyp/switch.c | 16
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/arch/a
, but this allows it to be tail-called with a single
return statement.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Reviewed-by: Marc Zyngier <marc.zyng...@arm.com>
---
arch/arm64/kvm/hyp/entry.S | 30 --
arch/arm64/kvm/hyp/hyp-entry.S | 19 ---
ar
On Wed, May 09, 2018 at 05:36:30PM +0100, Marc Zyngier wrote:
> On 09/05/18 17:12, Dave Martin wrote:
> > In preparation for optimising the way KVM manages switching the
> > guest and host FPSIMD state, it is necessary to provide a means for
> > code outside arch/arm64/kerne
On Wed, May 09, 2018 at 05:17:28PM +0100, Will Deacon wrote:
> Hi Dave,
>
> On Wed, May 09, 2018 at 05:12:51PM +0100, Dave Martin wrote:
> > This patch uses the new update_thread_flag() helpers to simplify a
> > couple of if () set; else clear; constructs.
> >
On Wed, May 09, 2018 at 05:54:25PM +0100, Marc Zyngier wrote:
> On 09/05/18 17:12, Dave Martin wrote:
> > This patch refactors KVM to align the host and guest FPSIMD
> > save/restore logic with each other for arm64. This reduces the
> > number of redundant save/restore opera
On Wed, May 09, 2018 at 05:55:51PM +0100, Marc Zyngier wrote:
> On 09/05/18 17:27, Dave Martin wrote:
> > On Wed, May 09, 2018 at 05:17:28PM +0100, Will Deacon wrote:
> >> Hi Dave,
> >>
> >> On Wed, May 09, 2018 at 05:12:51PM +0100, Dave Martin
On Tue, May 08, 2018 at 11:59:25AM +0100, Marc Zyngier wrote:
> On 04/05/18 17:05, Dave Martin wrote:
> > The entire tail of fixup_guest_exit() is contained in if statements
> > of the form if (x && *exit_code == ARM_EXCEPTION_TRAP). As a result,
> > we can
On Tue, May 08, 2018 at 11:38:05AM +0100, Marc Zyngier wrote:
> On 04/05/18 17:05, Dave Martin wrote:
> > This patch adds SVE context saving to the hyp FPSIMD context switch
> > path. This means that it is no longer necessary to save the host
> > SVE state in advance of ent
On Tue, May 08, 2018 at 12:59:39PM +0100, Marc Zyngier wrote:
> On 08/05/18 12:30, Dave Martin wrote:
> > On Tue, May 08, 2018 at 11:59:25AM +0100, Marc Zyngier wrote:
> >> On 04/05/18 17:05, Dave Martin wrote:
[...]
> >>> diff --git a/arch/arm64/kvm/hyp/switch.c
On Tue, May 08, 2018 at 12:57:56PM +0100, Marc Zyngier wrote:
> On 08/05/18 12:25, Dave Martin wrote:
> > On Tue, May 08, 2018 at 11:38:05AM +0100, Marc Zyngier wrote:
> >> On 04/05/18 17:05, Dave Martin wrote:
> >>> This patch adds SVE context saving to the hyp FP
] [RFC PATCH 0/6] Simplify setting thread flags to a particular value
https://lkml.org/lkml/2018/4/19/225
[3] linux-arm-kernel archive
http://lists.infradead.org/pipermail/linux-arm-kernel/2018-May/thread.html
Christoffer Dall (1):
KVM: arm/arm64: Introduce kvm_arch_vcpu_run_pid_change
Dave
t's system registers. To
avoid ABI churn, the redundant storage space in host_cpu_context is
not removed for now.
arch/arm is not addressed by this patch and continues to use its
current save/restore logic. It could provide implementations of
the helpers later if desired.
Signed-off-by: D
.
No functional change.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Acked-by: Catalin Marinas <catalin.mari...@arm.com>
---
arch/arm64/include/asm/cpufeature.h | 29 -
arch/arm64/include/asm/fpsimd.h | 2 ++
arch/arm64/include/asm/processor.h
definitions.
No functional change.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Acked-by: Catalin Marinas <catalin.mari...@arm.com>
---
arch/arm64/include/asm/fpsimd.h| 13 +
arch/arm64/include/asm/processor.h | 3 ++-
arch/arm64/kernel/fpsimd.c | 12 -
in
preparation for moving this function to a header, where we do not
want to have to include due to the consequent
circular #include problems.
No functional change.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Acked-by: Catalin Marinas <catalin.mari...@arm.com>
---
arch/arm64/kernel/f
This patch uses the new update_thread_flag() helpers to simplify a
couple of if () set; else clear; constructs.
No functional change.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Cc: Catalin Marinas <catalin.mari...@arm.com>
Cc: Will Deacon <will.dea...@arm.com>
---
To make the lazy FPSIMD context switch trap code easier to hack on,
this patch converts it to C.
This is not amazingly efficient, but the trap should typically only
be taken once per host context switch.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Reviewed-by: Marc Zyngier <
;
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Reviewed-by: Marc Zyngier <marc.zyng...@arm.com>
---
include/linux/kvm_host.h | 9 +
virt/kvm/Kconfig | 3 +++
virt/kvm/kvm_main.c | 7 ++-
3 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/include/li
, cond)
which do the equivalent of:
if (cond)
set*_thread_flag([...,] flag);
else
clear*_thread_flag([...,] flag);
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Cc: Ingo Molnar <mi...@redhat.com>
Cc: Peter Zijlstra <pet...@infradead.
uif_trap and vgic_v3_cpuif_trap true simultaneously
unless we have a GICv3 and GICv2 on the host: that sounds stupid,
but I haven't satisfied myself that it can't happen.
No functional change.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
---
Changes since v5:
Requested by Marc Zyngier:
* M
, but this allows it to be tail-called with a single
return statement.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Reviewed-by: Marc Zyngier <marc.zyng...@arm.com>
---
arch/arm64/kvm/hyp/entry.S | 30 --
arch/arm64/kvm/hyp/hyp-entry.S | 19 ---
ar
storage for the
loaded context.
No functional change.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Acked-by: Marc Zyngier <marc.zyng...@arm.com>
---
arch/arm64/kernel/fpsimd.c | 25 +
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/arch/arm64/ker
flag
defined so far, there is plenty of free space for expansion.
In preparation for adding more flags, this patch renames the
debug_flags field to simply "flags", and updates comments
appropriately.
No functional change.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
---
arch/a
and refuses to create a
VM. Doing this check at VM creation time avoids race issues
between KVM and SVE initialisation.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Reviewed-by: Christoffer Dall <christoffer.d...@arm.com>
---
Changes since v5:
Requested by Marc Zyngier:
* Migrate
if-
nesting that becomes trivial as a result.
No functional change.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Acked-by: Marc Zyngier <marc.zyng...@arm.com>
---
arch/arm64/kvm/hyp/switch.c | 16
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/arch/a
, the function and its dependencies are also deleted.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Acked-by: Christoffer Dall <christoffer.d...@arm.com>
---
arch/arm/include/asm/kvm_host.h | 3 ---
arch/arm64/include/asm/kvm_host.h | 10 --
arch/arm64/kernel/fpsimd.c
On Tue, May 15, 2018 at 12:55:23PM +0200, Christoffer Dall wrote:
> On Wed, May 09, 2018 at 05:12:57PM +0100, Dave Martin wrote:
> > This patch refactors KVM to align the host and guest FPSIMD
> > save/restore logic with each other for arm64. This reduces the
> > number of r
):
KVM: arm/arm64: Introduce kvm_arch_vcpu_run_pid_change
Dave Martin (15):
thread_info: Add update_thread_flag() helpers
arm64: Use update{,_tsk}_thread_flag()
KVM: arm64: Convert lazy FPSIMD context switch trap to C
arm64: fpsimd: Generalise context saving for non-task
On Wed, May 16, 2018 at 10:25:40AM +0100, Marc Zyngier wrote:
> [+Dave]
>
> Hi Nianyao,
>
> On 16/05/18 10:08, Tangnianyao (ICT) wrote:
> > Add last_fpsimd_trap to notify if guest last exit reason is handling
> > fpsimd. If guest is using fpsimd frequently, save host's fpsimd state and
> >
;
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Reviewed-by: Marc Zyngier <marc.zyng...@arm.com>
---
include/linux/kvm_host.h | 9 +
virt/kvm/Kconfig | 3 +++
virt/kvm/kvm_main.c | 7 ++-
3 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/include/li
To make the lazy FPSIMD context switch trap code easier to hack on,
this patch converts it to C.
This is not amazingly efficient, but the trap should typically only
be taken once per host context switch.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Reviewed-by: Marc Zyngier <
This patch uses the new update_thread_flag() helpers to simplify a
couple of if () set; else clear; constructs.
No functional change.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Acked-by: Marc Zyngier <marc.zyng...@arm.com>
Acked-by: Catalin Marinas <catalin.mari...@arm.com&g
in
preparation for moving this function to a header, where we do not
want to have to include due to the consequent
circular #include problems.
No functional change.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Acked-by: Catalin Marinas <catalin.mari...@arm.com>
Acked-by: Marc Zyngier <marc.
definitions.
No functional change.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Acked-by: Catalin Marinas <catalin.mari...@arm.com>
Acked-by: Marc Zyngier <marc.zyng...@arm.com>
---
arch/arm64/include/asm/fpsimd.h| 13 +
arch/arm64/include/asm/processor.h | 3 ++-
.
No functional change.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Acked-by: Catalin Marinas <catalin.mari...@arm.com>
Acked-by: Marc Zyngier <marc.zyng...@arm.com>
---
arch/arm64/include/asm/cpufeature.h | 29 -
arch/arm64/include/asm/fpsimd.h
context switching
http://lists.infradead.org/pipermail/linux-arm-kernel/2018-May/579353.html
Christoffer Dall (1):
KVM: arm/arm64: Introduce kvm_arch_vcpu_run_pid_change
Dave Martin (15):
thread_info: Add update_thread_flag() helpers
arm64: Use update{,_tsk}_thread_flag()
KVM: arm64: Convert
uif_trap and vgic_v3_cpuif_trap true simultaneously
unless we have a GICv3 and GICv2 on the host: that sounds stupid,
but I haven't satisfied myself that it can't happen.
No functional change.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Reviewed-by: Marc Zyngier <marc.zyng...@arm.com>
---
arch/ar
, but this allows it to be tail-called with a single
return statement.
Signed-off-by: Dave Martin <dave.mar...@arm.com>
Reviewed-by: Marc Zyngier <marc.zyng...@arm.com>
Reviewed-by: Christoffer Dall <christoffer.d...@arm.com>
---
arch/arm64/kvm/hyp/entry.S | 30
On Mon, May 21, 2018 at 03:40:02PM +0100, Marc Zyngier wrote:
> On 21/05/18 15:17, Dave Martin wrote:
> > This patch adds SVE context saving to the hyp FPSIMD context switch
> > path. This means that it is no longer necessary to save the host
> > SVE state in advance of ent
201 - 300 of 976 matches
Mail list logo