Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Thomas Gleixner: "A set of x86 specific fixes and updates: - The CR2 corruption fixes which store CR2 early in the entry code and hand the stored address to the fault handlers. - Revert a forgotten leftover of the dropped FSGSBASE series. - Plug a memory leak in the boot code. - Make the Hyper-V assist functionality robust by zeroing the shadow page. - Remove a useless check for dead processes with LDT - Update paravirt and VMware maintainers entries. - A few cleanup patches addressing various compiler warnings" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/entry/64: Prevent clobbering of saved CR2 value x86/hyper-v: Zero out the VP ASSIST PAGE on allocation x86, boot: Remove multiple copy of static function sanitize_boot_params() x86/boot/compressed/64: Remove unused variable x86/boot/efi: Remove unused variables x86/mm, tracing: Fix CR2 corruption x86/entry/64: Update comments and sanity tests for create_gap x86/entry/64: Simplify idtentry a little x86/entry/32: Simplify common_exception x86/paravirt: Make read_cr2() CALLEE_SAVE MAINTAINERS: Update PARAVIRT_OPS_INTERFACE and VMWARE_HYPERVISOR_INTERFACE x86/process: Delete useless check for dead process with LDT x86: math-emu: Hide clang warnings for 16-bit overflow x86/e820: Use proper booleans instead of 0/1 x86/apic: Silence -Wtype-limits compiler warnings x86/mm: Free sme_early_buffer after init x86/boot: Fix memory leak in default_get_smp_config() Revert "x86/ptrace: Prevent ptrace from clearing the FS/GS selector" and fix the test
This commit is contained in:
@@ -998,7 +998,8 @@ void __init xen_setup_vcpu_info_placement(void)
|
||||
__PV_IS_CALLEE_SAVE(xen_irq_disable_direct);
|
||||
pv_ops.irq.irq_enable =
|
||||
__PV_IS_CALLEE_SAVE(xen_irq_enable_direct);
|
||||
pv_ops.mmu.read_cr2 = xen_read_cr2_direct;
|
||||
pv_ops.mmu.read_cr2 =
|
||||
__PV_IS_CALLEE_SAVE(xen_read_cr2_direct);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1307,16 +1307,6 @@ static void xen_write_cr2(unsigned long cr2)
|
||||
this_cpu_read(xen_vcpu)->arch.cr2 = cr2;
|
||||
}
|
||||
|
||||
static unsigned long xen_read_cr2(void)
|
||||
{
|
||||
return this_cpu_read(xen_vcpu)->arch.cr2;
|
||||
}
|
||||
|
||||
unsigned long xen_read_cr2_direct(void)
|
||||
{
|
||||
return this_cpu_read(xen_vcpu_info.arch.cr2);
|
||||
}
|
||||
|
||||
static noinline void xen_flush_tlb(void)
|
||||
{
|
||||
struct mmuext_op *op;
|
||||
@@ -2397,7 +2387,7 @@ static void xen_leave_lazy_mmu(void)
|
||||
}
|
||||
|
||||
static const struct pv_mmu_ops xen_mmu_ops __initconst = {
|
||||
.read_cr2 = xen_read_cr2,
|
||||
.read_cr2 = __PV_IS_CALLEE_SAVE(xen_read_cr2),
|
||||
.write_cr2 = xen_write_cr2,
|
||||
|
||||
.read_cr3 = xen_read_cr3,
|
||||
|
@@ -10,6 +10,7 @@
|
||||
#include <asm/percpu.h>
|
||||
#include <asm/processor-flags.h>
|
||||
#include <asm/frame.h>
|
||||
#include <asm/asm.h>
|
||||
|
||||
#include <linux/linkage.h>
|
||||
|
||||
@@ -135,3 +136,18 @@ ENTRY(check_events)
|
||||
FRAME_END
|
||||
ret
|
||||
ENDPROC(check_events)
|
||||
|
||||
ENTRY(xen_read_cr2)
|
||||
FRAME_BEGIN
|
||||
_ASM_MOV PER_CPU_VAR(xen_vcpu), %_ASM_AX
|
||||
_ASM_MOV XEN_vcpu_info_arch_cr2(%_ASM_AX), %_ASM_AX
|
||||
FRAME_END
|
||||
ret
|
||||
ENDPROC(xen_read_cr2);
|
||||
|
||||
ENTRY(xen_read_cr2_direct)
|
||||
FRAME_BEGIN
|
||||
_ASM_MOV PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_arch_cr2, %_ASM_AX
|
||||
FRAME_END
|
||||
ret
|
||||
ENDPROC(xen_read_cr2_direct);
|
||||
|
@@ -134,6 +134,9 @@ __visible void xen_irq_disable_direct(void);
|
||||
__visible unsigned long xen_save_fl_direct(void);
|
||||
__visible void xen_restore_fl_direct(unsigned long);
|
||||
|
||||
__visible unsigned long xen_read_cr2(void);
|
||||
__visible unsigned long xen_read_cr2_direct(void);
|
||||
|
||||
/* These are not functions, and cannot be called normally */
|
||||
__visible void xen_iret(void);
|
||||
__visible void xen_sysret32(void);
|
||||
|
Reference in New Issue
Block a user