From: Greg Kroah-Hartman Date: Thu, 10 Dec 2020 12:53:55 +0000 (+0100) Subject: 5.4-stable patches X-Git-Tag: v5.9.14~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=88dc42dcdb337bde962cef1b8b7d78c3e87e16de;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches added patches: iommu-amd-set-dte-to-represent-512-irtes.patch tracing-fix-userstacktrace-option-for-instances.patch --- diff --git a/queue-5.4/iommu-amd-set-dte-to-represent-512-irtes.patch b/queue-5.4/iommu-amd-set-dte-to-represent-512-irtes.patch new file mode 100644 index 00000000000..22b245f9366 --- /dev/null +++ b/queue-5.4/iommu-amd-set-dte-to-represent-512-irtes.patch @@ -0,0 +1,37 @@ +From 4165bf015ba9454f45beaad621d16c516d5c5afe Mon Sep 17 00:00:00 2001 +From: Suravee Suthikulpanit +Date: Mon, 7 Dec 2020 03:19:20 -0600 +Subject: iommu/amd: Set DTE[IntTabLen] to represent 512 IRTEs + +From: Suravee Suthikulpanit + +commit 4165bf015ba9454f45beaad621d16c516d5c5afe upstream. + +According to the AMD IOMMU spec, the commit 73db2fc595f3 +("iommu/amd: Increase interrupt remapping table limit to 512 entries") +also requires the interrupt table length (IntTabLen) to be set to 9 +(power of 2) in the device table mapping entry (DTE). + +Fixes: 73db2fc595f3 ("iommu/amd: Increase interrupt remapping table limit to 512 entries") +Reported-by: Jerry Snitselaar +Signed-off-by: Suravee Suthikulpanit +Reviewed-by: Jerry Snitselaar +Link: https://lore.kernel.org/r/20201207091920.3052-1-suravee.suthikulpanit@amd.com +Signed-off-by: Will Deacon +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/iommu/amd_iommu_types.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/iommu/amd_iommu_types.h ++++ b/drivers/iommu/amd_iommu_types.h +@@ -254,7 +254,7 @@ + #define DTE_IRQ_REMAP_INTCTL_MASK (0x3ULL << 60) + #define DTE_IRQ_TABLE_LEN_MASK (0xfULL << 1) + #define DTE_IRQ_REMAP_INTCTL (2ULL << 60) +-#define DTE_IRQ_TABLE_LEN (8ULL << 1) ++#define DTE_IRQ_TABLE_LEN (9ULL << 1) + #define DTE_IRQ_REMAP_ENABLE 1ULL + + #define PAGE_MODE_NONE 0x00 diff --git a/queue-5.4/series b/queue-5.4/series index 958f282b55b..4e7f7686420 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -37,3 +37,5 @@ speakup-reject-setting-the-speakup-line-discipline-outside-of-speakup.patch i2c-imx-fix-reset-of-i2sr_ial-flag.patch i2c-imx-check-for-i2sr_ial-after-every-byte.patch spi-bcm2835-release-the-dma-channel-if-probe-fails-after-dma_init.patch +iommu-amd-set-dte-to-represent-512-irtes.patch +tracing-fix-userstacktrace-option-for-instances.patch diff --git a/queue-5.4/tracing-fix-userstacktrace-option-for-instances.patch b/queue-5.4/tracing-fix-userstacktrace-option-for-instances.patch new file mode 100644 index 00000000000..7e0053ee482 --- /dev/null +++ b/queue-5.4/tracing-fix-userstacktrace-option-for-instances.patch @@ -0,0 +1,71 @@ +From bcee5278958802b40ee8b26679155a6d9231783e Mon Sep 17 00:00:00 2001 +From: "Steven Rostedt (VMware)" +Date: Fri, 4 Dec 2020 16:36:16 -0500 +Subject: tracing: Fix userstacktrace option for instances + +From: Steven Rostedt (VMware) + +commit bcee5278958802b40ee8b26679155a6d9231783e upstream. + +When the instances were able to use their own options, the userstacktrace +option was left hardcoded for the top level. This made the instance +userstacktrace option bascially into a nop, and will confuse users that set +it, but nothing happens (I was confused when it happened to me!) + +Cc: stable@vger.kernel.org +Fixes: 16270145ce6b ("tracing: Add trace options for core options to instances") +Signed-off-by: Steven Rostedt (VMware) +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/trace/trace.c | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) + +--- a/kernel/trace/trace.c ++++ b/kernel/trace/trace.c +@@ -160,7 +160,8 @@ static union trace_eval_map_item *trace_ + #endif /* CONFIG_TRACE_EVAL_MAP_FILE */ + + static int tracing_set_tracer(struct trace_array *tr, const char *buf); +-static void ftrace_trace_userstack(struct ring_buffer *buffer, ++static void ftrace_trace_userstack(struct trace_array *tr, ++ struct ring_buffer *buffer, + unsigned long flags, int pc); + + #define MAX_TRACER_SIZE 100 +@@ -2621,7 +2622,7 @@ void trace_buffer_unlock_commit_regs(str + * two. They are not that meaningful. + */ + ftrace_trace_stack(tr, buffer, flags, regs ? 0 : STACK_SKIP, pc, regs); +- ftrace_trace_userstack(buffer, flags, pc); ++ ftrace_trace_userstack(tr, buffer, flags, pc); + } + + /* +@@ -2936,13 +2937,14 @@ EXPORT_SYMBOL_GPL(trace_dump_stack); + static DEFINE_PER_CPU(int, user_stack_count); + + static void +-ftrace_trace_userstack(struct ring_buffer *buffer, unsigned long flags, int pc) ++ftrace_trace_userstack(struct trace_array *tr, ++ struct ring_buffer *buffer, unsigned long flags, int pc) + { + struct trace_event_call *call = &event_user_stack; + struct ring_buffer_event *event; + struct userstack_entry *entry; + +- if (!(global_trace.trace_flags & TRACE_ITER_USERSTACKTRACE)) ++ if (!(tr->trace_flags & TRACE_ITER_USERSTACKTRACE)) + return; + + /* +@@ -2981,7 +2983,8 @@ ftrace_trace_userstack(struct ring_buffe + preempt_enable(); + } + #else /* CONFIG_USER_STACKTRACE_SUPPORT */ +-static void ftrace_trace_userstack(struct ring_buffer *buffer, ++static void ftrace_trace_userstack(struct trace_array *tr, ++ struct ring_buffer *buffer, + unsigned long flags, int pc) + { + }