Skip to content

Commit bee14bc

Browse files
author
Marc Zyngier
committed
KVM: arm64: Stop mapping current thread_info at EL2
Now that we can track an equivalent of TIF_FOREIGN_FPSTATE, drop the mapping of current's thread_info at EL2. Signed-off-by: Marc Zyngier <[email protected]>
1 parent af9a0e2 commit bee14bc

File tree

5 files changed

+1
-16
lines changed

5 files changed

+1
-16
lines changed

arch/arm64/include/asm/kvm_host.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
#include <asm/fpsimd.h>
2727
#include <asm/kvm.h>
2828
#include <asm/kvm_asm.h>
29-
#include <asm/thread_info.h>
3029

3130
#define __KVM_HAVE_ARCH_INTC_INITIALIZED
3231

@@ -321,7 +320,6 @@ struct kvm_vcpu_arch {
321320
struct kvm_guest_debug_arch vcpu_debug_state;
322321
struct kvm_guest_debug_arch external_debug_state;
323322

324-
struct thread_info *host_thread_info; /* hyp VA */
325323
struct user_fpsimd_state *host_fpsimd_state; /* hyp VA */
326324

327325
struct {

arch/arm64/kvm/fpsimd.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
*/
88
#include <linux/irqflags.h>
99
#include <linux/sched.h>
10-
#include <linux/thread_info.h>
1110
#include <linux/kvm_host.h>
1211
#include <asm/fpsimd.h>
1312
#include <asm/kvm_asm.h>
@@ -28,17 +27,9 @@ int kvm_arch_vcpu_run_map_fp(struct kvm_vcpu *vcpu)
2827
{
2928
int ret;
3029

31-
struct thread_info *ti = &current->thread_info;
3230
struct user_fpsimd_state *fpsimd = &current->thread.uw.fpsimd_state;
3331

34-
/*
35-
* Make sure the host task thread flags and fpsimd state are
36-
* visible to hyp:
37-
*/
38-
ret = create_hyp_mappings(ti, ti + 1, PAGE_HYP);
39-
if (ret)
40-
goto error;
41-
32+
/* Make sure the host task fpsimd state is visible to hyp: */
4233
ret = create_hyp_mappings(fpsimd, fpsimd + 1, PAGE_HYP);
4334
if (ret)
4435
goto error;
@@ -54,7 +45,6 @@ int kvm_arch_vcpu_run_map_fp(struct kvm_vcpu *vcpu)
5445
goto error;
5546
}
5647

57-
vcpu->arch.host_thread_info = kern_hyp_va(ti);
5848
vcpu->arch.host_fpsimd_state = kern_hyp_va(fpsimd);
5949
error:
6050
return ret;

arch/arm64/kvm/hyp/include/hyp/switch.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#include <asm/fpsimd.h>
3030
#include <asm/debug-monitors.h>
3131
#include <asm/processor.h>
32-
#include <asm/thread_info.h>
3332

3433
struct kvm_exception_table_entry {
3534
int insn, fixup;

arch/arm64/kvm/hyp/nvhe/switch.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
#include <asm/fpsimd.h>
2626
#include <asm/debug-monitors.h>
2727
#include <asm/processor.h>
28-
#include <asm/thread_info.h>
2928

3029
#include <nvhe/fixed_config.h>
3130
#include <nvhe/mem_protect.h>

arch/arm64/kvm/hyp/vhe/switch.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include <asm/fpsimd.h>
2525
#include <asm/debug-monitors.h>
2626
#include <asm/processor.h>
27-
#include <asm/thread_info.h>
2827

2928
/* VHE specific context */
3029
DEFINE_PER_CPU(struct kvm_host_data, kvm_host_data);

0 commit comments

Comments
 (0)