linux-stable/arch/x86/kvm
Dave Hansen 71ef453355 x86/kvm: Avoid looking up PKRU in XSAVE buffer
PKRU is being removed from the kernel XSAVE/FPU buffers.  This removal
will probably include warnings for code that look up PKRU in those
buffers.

KVM currently looks up the location of PKRU but doesn't even use the
pointer that it gets back.  Rework the code to avoid calling
get_xsave_addr() except in cases where its result is actually used.

This makes the code more clear and also avoids the inevitable PKRU
warnings.

This is probably a good cleanup and could go upstream idependently
of any PKRU rework.

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20210623121453.541037562@linutronix.de
2021-06-23 17:49:47 +02:00
..
mmu KVM: x86/mmu: Calculate and check "full" mmu_role for nested MMU 2021-06-11 11:54:49 -04:00
svm Miscellaneous bugfixes. The main interesting one is a NULL pointer dereference 2021-06-17 13:14:53 -07:00
vmx KVM: x86: Fix fall-through warnings for Clang 2021-06-10 07:48:45 -04:00
cpuid.c KVM: x86: Fix fall-through warnings for Clang 2021-06-10 07:48:45 -04:00
cpuid.h KVM: x86: Move reverse CPUID helpers to separate header file 2021-04-26 05:27:13 -04:00
debugfs.c KVM: let kvm_destroy_vm_debugfs clean up vCPU debugfs directories 2020-06-04 11:00:54 -04:00
emulate.c KVM: X86: Kill off ctxt->ud 2021-05-28 12:59:10 -04:00
hyperv.c KVM: X86: hyper-v: Task srcu lock when accessing kvm_memslots() 2021-05-27 07:45:53 -04:00
hyperv.h KVM: x86: hyper-v: Prevent using not-yet-updated TSC page by secondary CPUs 2021-03-17 04:03:22 -04:00
i8254.c kvm: i8254: remove redundant assignment to pointer s 2020-06-11 12:35:18 -04:00
i8254.h
i8259.c
ioapic.c KVM: ioapic: break infinite recursion on lazy EOI 2020-10-24 04:42:06 -04:00
ioapic.h
irq.c KVM: x86/xen: Add event channel interrupt vector upcall 2021-02-04 14:19:39 +00:00
irq.h
irq_comm.c x86: Fix various typos in comments 2021-03-18 15:31:53 +01:00
Kconfig x86/sgx: Introduce virtual EPC for use by KVM guests 2021-04-06 09:43:17 +02:00
kvm_cache_regs.h KVM: x86: Rename GPR accessors to make mode-aware variants the defaults 2021-04-26 05:27:13 -04:00
kvm_emulate.h KVM: X86: Kill off ctxt->ud 2021-05-28 12:59:10 -04:00
lapic.c kvm: LAPIC: Restore guard to prevent illegal APIC register access 2021-06-09 17:25:37 -04:00
lapic.h KVM: x86: hyper-v: Always use to_hv_vcpu() accessor to get to 'struct kvm_vcpu_hv' 2021-02-09 08:17:13 -05:00
Makefile Merge branch 'kvm-sev-cgroup' into HEAD 2021-04-22 13:19:01 -04:00
mmu.h KVM: x86: Get active PCID only when writing a CR3 value 2021-03-15 04:43:56 -04:00
mtrr.c KVM: x86: Add helper to consolidate "raw" reserved GPA mask calculations 2021-02-04 09:27:30 -05:00
pmu.c KVM: x86: use static calls to reduce kvm_x86_ops overhead 2021-02-04 05:27:30 -05:00
pmu.h x86: Fix various typos in comments 2021-03-18 15:31:53 +01:00
reverse_cpuid.h KVM: SEV: Mask CPUID[0x8000001F].eax according to supported features 2021-04-26 05:27:15 -04:00
trace.h KVM: x86: Ensure liveliness of nested VM-Enter fail tracepoint message 2021-06-08 13:30:49 -04:00
tss.h
x86.c x86/kvm: Avoid looking up PKRU in XSAVE buffer 2021-06-23 17:49:47 +02:00
x86.h KVM: x86: Consolidate guest enter/exit logic to common helpers 2021-05-05 22:54:12 +02:00
xen.c KVM: x86: Rename GPR accessors to make mode-aware variants the defaults 2021-04-26 05:27:13 -04:00
xen.h KVM: x86/xen: Add support for vCPU runstate information 2021-03-02 14:30:54 -05:00