mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 11:06:41 -05:00
Merge tag 'x86-urgent-2025-12-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Ingo Molnar: - Fix FPU core dumps on certain CPU models - Fix htmldocs build warning - Export TLB tracing event name via header - Remove unused constant from <linux/mm_types.h> - Fix comments - Fix whitespace noise in documentation - Fix variadic structure's definition to un-confuse UBSAN - Fix posted MSI interrupts irq_retrigger() bug - Fix asm build failure with older GCC builds * tag 'x86-urgent-2025-12-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/bug: Fix old GCC compile fails x86/msi: Make irq_retrigger() functional for posted MSI x86/platform/uv: Fix UBSAN array-index-out-of-bounds mm: Remove tlb_flush_reason::NR_TLB_FLUSH_REASONS from <linux/mm_types.h> x86/mm/tlb/trace: Export the TLB_REMOTE_WRONG_CPU enum in <trace/events/tlb.h> x86/sgx: Remove unmatched quote in __sgx_encl_extend function comment x86/boot/Documentation: Fix whitespace noise in boot.rst x86/fpu: Fix FPU state core dump truncation on CPUs with no extended xfeatures x86/boot/Documentation: Fix htmldocs build warning due to malformed table in boot.rst
This commit is contained in:
@@ -433,7 +433,7 @@ Protocol: 2.00+
|
|||||||
|
|
||||||
Assigned boot loader IDs:
|
Assigned boot loader IDs:
|
||||||
|
|
||||||
== =======================================
|
==== =======================================
|
||||||
0x0 LILO
|
0x0 LILO
|
||||||
(0x00 reserved for pre-2.00 bootloader)
|
(0x00 reserved for pre-2.00 bootloader)
|
||||||
0x1 Loadlin
|
0x1 Loadlin
|
||||||
@@ -456,7 +456,7 @@ Protocol: 2.00+
|
|||||||
<http://sebastian-plotz.blogspot.de>
|
<http://sebastian-plotz.blogspot.de>
|
||||||
0x12 OVMF UEFI virtualization stack
|
0x12 OVMF UEFI virtualization stack
|
||||||
0x13 barebox
|
0x13 barebox
|
||||||
== =======================================
|
==== =======================================
|
||||||
|
|
||||||
Please contact <hpa@zytor.com> if you need a bootloader ID value assigned.
|
Please contact <hpa@zytor.com> if you need a bootloader ID value assigned.
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ extern void __WARN_trap(struct bug_entry *bug, ...);
|
|||||||
/*
|
/*
|
||||||
* Despite that some emulators terminate on UD2, we use it for WARN().
|
* Despite that some emulators terminate on UD2, we use it for WARN().
|
||||||
*/
|
*/
|
||||||
#define ASM_UD2 _ASM_BYTES(0x0f, 0x0b)
|
#define ASM_UD2 __ASM_FORM(ud2)
|
||||||
#define INSN_UD2 0x0b0f
|
#define INSN_UD2 0x0b0f
|
||||||
#define LEN_UD2 2
|
#define LEN_UD2 2
|
||||||
|
|
||||||
|
|||||||
@@ -87,4 +87,11 @@ static inline void panic_if_irq_remap(const char *msg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_IRQ_REMAP */
|
#endif /* CONFIG_IRQ_REMAP */
|
||||||
|
|
||||||
|
#ifdef CONFIG_X86_POSTED_MSI
|
||||||
|
void intel_ack_posted_msi_irq(struct irq_data *irqd);
|
||||||
|
#else
|
||||||
|
#define intel_ack_posted_msi_irq NULL
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* __X86_IRQ_REMAPPING_H */
|
#endif /* __X86_IRQ_REMAPPING_H */
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ struct uv_systab {
|
|||||||
struct {
|
struct {
|
||||||
u32 type:8; /* type of entry */
|
u32 type:8; /* type of entry */
|
||||||
u32 offset:24; /* byte offset from struct start to entry */
|
u32 offset:24; /* byte offset from struct start to entry */
|
||||||
} entry[1]; /* additional entries follow */
|
} entry[]; /* additional entries follow */
|
||||||
};
|
};
|
||||||
extern struct uv_systab *uv_systab;
|
extern struct uv_systab *uv_systab;
|
||||||
|
|
||||||
|
|||||||
@@ -242,7 +242,7 @@ static int __sgx_encl_add_page(struct sgx_encl *encl,
|
|||||||
/*
|
/*
|
||||||
* If the caller requires measurement of the page as a proof for the content,
|
* If the caller requires measurement of the page as a proof for the content,
|
||||||
* use EEXTEND to add a measurement for 256 bytes of the page. Repeat this
|
* use EEXTEND to add a measurement for 256 bytes of the page. Repeat this
|
||||||
* operation until the entire page is measured."
|
* operation until the entire page is measured.
|
||||||
*/
|
*/
|
||||||
static int __sgx_encl_extend(struct sgx_encl *encl,
|
static int __sgx_encl_extend(struct sgx_encl *encl,
|
||||||
struct sgx_epc_page *epc_page)
|
struct sgx_epc_page *epc_page)
|
||||||
|
|||||||
@@ -1946,7 +1946,7 @@ static int dump_xsave_layout_desc(struct coredump_params *cprm)
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (!dump_emit(cprm, &xc, sizeof(xc)))
|
if (!dump_emit(cprm, &xc, sizeof(xc)))
|
||||||
return 0;
|
return -1;
|
||||||
|
|
||||||
num_records++;
|
num_records++;
|
||||||
}
|
}
|
||||||
@@ -1984,7 +1984,7 @@ int elf_coredump_extra_notes_write(struct coredump_params *cprm)
|
|||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
num_records = dump_xsave_layout_desc(cprm);
|
num_records = dump_xsave_layout_desc(cprm);
|
||||||
if (!num_records)
|
if (num_records < 0)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
/* Total size should be equal to the number of records */
|
/* Total size should be equal to the number of records */
|
||||||
|
|||||||
@@ -397,6 +397,7 @@ DEFINE_IDTENTRY_SYSVEC_SIMPLE(sysvec_kvm_posted_intr_nested_ipi)
|
|||||||
|
|
||||||
/* Posted Interrupt Descriptors for coalesced MSIs to be posted */
|
/* Posted Interrupt Descriptors for coalesced MSIs to be posted */
|
||||||
DEFINE_PER_CPU_ALIGNED(struct pi_desc, posted_msi_pi_desc);
|
DEFINE_PER_CPU_ALIGNED(struct pi_desc, posted_msi_pi_desc);
|
||||||
|
static DEFINE_PER_CPU_CACHE_HOT(bool, posted_msi_handler_active);
|
||||||
|
|
||||||
void intel_posted_msi_init(void)
|
void intel_posted_msi_init(void)
|
||||||
{
|
{
|
||||||
@@ -414,6 +415,25 @@ void intel_posted_msi_init(void)
|
|||||||
this_cpu_write(posted_msi_pi_desc.ndst, destination);
|
this_cpu_write(posted_msi_pi_desc.ndst, destination);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void intel_ack_posted_msi_irq(struct irq_data *irqd)
|
||||||
|
{
|
||||||
|
irq_move_irq(irqd);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Handle the rare case that irq_retrigger() raised the actual
|
||||||
|
* assigned vector on the target CPU, which means that it was not
|
||||||
|
* invoked via the posted MSI handler below. In that case APIC EOI
|
||||||
|
* is required as otherwise the ISR entry becomes stale and lower
|
||||||
|
* priority interrupts are never going to be delivered after that.
|
||||||
|
*
|
||||||
|
* If the posted handler invoked the device interrupt handler then
|
||||||
|
* the EOI would be premature because it would acknowledge the
|
||||||
|
* posted vector.
|
||||||
|
*/
|
||||||
|
if (unlikely(!__this_cpu_read(posted_msi_handler_active)))
|
||||||
|
apic_eoi();
|
||||||
|
}
|
||||||
|
|
||||||
static __always_inline bool handle_pending_pir(unsigned long *pir, struct pt_regs *regs)
|
static __always_inline bool handle_pending_pir(unsigned long *pir, struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
unsigned long pir_copy[NR_PIR_WORDS];
|
unsigned long pir_copy[NR_PIR_WORDS];
|
||||||
@@ -446,6 +466,8 @@ DEFINE_IDTENTRY_SYSVEC(sysvec_posted_msi_notification)
|
|||||||
|
|
||||||
pid = this_cpu_ptr(&posted_msi_pi_desc);
|
pid = this_cpu_ptr(&posted_msi_pi_desc);
|
||||||
|
|
||||||
|
/* Mark the handler active for intel_ack_posted_msi_irq() */
|
||||||
|
__this_cpu_write(posted_msi_handler_active, true);
|
||||||
inc_irq_stat(posted_msi_notification_count);
|
inc_irq_stat(posted_msi_notification_count);
|
||||||
irq_enter();
|
irq_enter();
|
||||||
|
|
||||||
@@ -474,6 +496,7 @@ DEFINE_IDTENTRY_SYSVEC(sysvec_posted_msi_notification)
|
|||||||
|
|
||||||
apic_eoi();
|
apic_eoi();
|
||||||
irq_exit();
|
irq_exit();
|
||||||
|
__this_cpu_write(posted_msi_handler_active, false);
|
||||||
set_irq_regs(old_regs);
|
set_irq_regs(old_regs);
|
||||||
}
|
}
|
||||||
#endif /* X86_POSTED_MSI */
|
#endif /* X86_POSTED_MSI */
|
||||||
|
|||||||
@@ -1303,17 +1303,17 @@ static struct irq_chip intel_ir_chip = {
|
|||||||
* irq_enter();
|
* irq_enter();
|
||||||
* handle_edge_irq()
|
* handle_edge_irq()
|
||||||
* irq_chip_ack_parent()
|
* irq_chip_ack_parent()
|
||||||
* irq_move_irq(); // No EOI
|
* intel_ack_posted_msi_irq(); // No EOI
|
||||||
* handle_irq_event()
|
* handle_irq_event()
|
||||||
* driver_handler()
|
* driver_handler()
|
||||||
* handle_edge_irq()
|
* handle_edge_irq()
|
||||||
* irq_chip_ack_parent()
|
* irq_chip_ack_parent()
|
||||||
* irq_move_irq(); // No EOI
|
* intel_ack_posted_msi_irq(); // No EOI
|
||||||
* handle_irq_event()
|
* handle_irq_event()
|
||||||
* driver_handler()
|
* driver_handler()
|
||||||
* handle_edge_irq()
|
* handle_edge_irq()
|
||||||
* irq_chip_ack_parent()
|
* irq_chip_ack_parent()
|
||||||
* irq_move_irq(); // No EOI
|
* intel_ack_posted_msi_irq(); // No EOI
|
||||||
* handle_irq_event()
|
* handle_irq_event()
|
||||||
* driver_handler()
|
* driver_handler()
|
||||||
* apic_eoi()
|
* apic_eoi()
|
||||||
@@ -1322,7 +1322,7 @@ static struct irq_chip intel_ir_chip = {
|
|||||||
*/
|
*/
|
||||||
static struct irq_chip intel_ir_chip_post_msi = {
|
static struct irq_chip intel_ir_chip_post_msi = {
|
||||||
.name = "INTEL-IR-POST",
|
.name = "INTEL-IR-POST",
|
||||||
.irq_ack = irq_move_irq,
|
.irq_ack = intel_ack_posted_msi_irq,
|
||||||
.irq_set_affinity = intel_ir_set_affinity,
|
.irq_set_affinity = intel_ir_set_affinity,
|
||||||
.irq_compose_msi_msg = intel_ir_compose_msi_msg,
|
.irq_compose_msi_msg = intel_ir_compose_msi_msg,
|
||||||
.irq_set_vcpu_affinity = intel_ir_set_vcpu_affinity,
|
.irq_set_vcpu_affinity = intel_ir_set_vcpu_affinity,
|
||||||
|
|||||||
@@ -1631,7 +1631,6 @@ enum tlb_flush_reason {
|
|||||||
TLB_LOCAL_MM_SHOOTDOWN,
|
TLB_LOCAL_MM_SHOOTDOWN,
|
||||||
TLB_REMOTE_SEND_IPI,
|
TLB_REMOTE_SEND_IPI,
|
||||||
TLB_REMOTE_WRONG_CPU,
|
TLB_REMOTE_WRONG_CPU,
|
||||||
NR_TLB_FLUSH_REASONS,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -12,8 +12,9 @@
|
|||||||
EM( TLB_FLUSH_ON_TASK_SWITCH, "flush on task switch" ) \
|
EM( TLB_FLUSH_ON_TASK_SWITCH, "flush on task switch" ) \
|
||||||
EM( TLB_REMOTE_SHOOTDOWN, "remote shootdown" ) \
|
EM( TLB_REMOTE_SHOOTDOWN, "remote shootdown" ) \
|
||||||
EM( TLB_LOCAL_SHOOTDOWN, "local shootdown" ) \
|
EM( TLB_LOCAL_SHOOTDOWN, "local shootdown" ) \
|
||||||
EM( TLB_LOCAL_MM_SHOOTDOWN, "local mm shootdown" ) \
|
EM( TLB_LOCAL_MM_SHOOTDOWN, "local MM shootdown" ) \
|
||||||
EMe( TLB_REMOTE_SEND_IPI, "remote ipi send" )
|
EM( TLB_REMOTE_SEND_IPI, "remote IPI send" ) \
|
||||||
|
EMe( TLB_REMOTE_WRONG_CPU, "remote wrong CPU" )
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* First define the enums in TLB_FLUSH_REASON to be exported to userspace
|
* First define the enums in TLB_FLUSH_REASON to be exported to userspace
|
||||||
|
|||||||
Reference in New Issue
Block a user