summaryrefslogtreecommitdiff
path: root/arch/x86
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-07-11 10:09:23 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2026-07-11 10:09:23 -0700
commitb37fa0d0a3cd39413355d4f748d2caf8002635f2 (patch)
tree45aa3d512197ca58600e23a1e220b4741ca93cc0 /arch/x86
parent767707a53ef7d7cfe7d1b1f22c37fe4af17efc5e (diff)
parent4c2509f3b79756679a02bea649c6a7501b58f52c (diff)
Merge tag 'x86-urgent-2026-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Ingo Molnar: - Fix resctrl resource leak (Tony Luck) - Fix resctrl umount race (Tony Luck) - Fix resctrl double-free (Reinette Chatre) - Fix x86 VGA display fallback logic during bootup on certain multi-GPU systems (Mario Limonciello) - Re-add a WBINVD call to the SNP bootstrap path to fix an SNP regression (Tycho Andersen) * tag 'x86-urgent-2026-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/virt/sev: Revert "Drop WBINVD before setting MSR_AMD64_SYSCFG_SNP_EN" x86/video: Only fall back to vga_default_device() without screen info fs/resctrl: Fix double-add of pseudo-locked region's RMID to free list fs/resctrl: Fix use-after-free during unmount fs/resctrl: Free mon_data structures on rdt_get_tree() failure
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/video/video-common.c23
-rw-r--r--arch/x86/virt/svm/sev.c2
2 files changed, 16 insertions, 9 deletions
diff --git a/arch/x86/video/video-common.c b/arch/x86/video/video-common.c
index 152789f00fcd..8ed82fff7638 100644
--- a/arch/x86/video/video-common.c
+++ b/arch/x86/video/video-common.c
@@ -43,21 +43,26 @@ bool video_is_primary_device(struct device *dev)
if (!pci_is_display(pdev))
return false;
- if (pdev == vga_default_device())
- return true;
-
#ifdef CONFIG_SCREEN_INFO
numres = screen_info_resources(si, res, ARRAY_SIZE(res));
- for (i = 0; i < numres; ++i) {
- if (!(res[i].flags & IORESOURCE_MEM))
- continue;
+ if (numres > 0) {
+ for (i = 0; i < numres; ++i) {
+ if (!(res[i].flags & IORESOURCE_MEM))
+ continue;
+
+ if (pci_find_resource(pdev, &res[i]))
+ return true;
+ }
- if (pci_find_resource(pdev, &res[i]))
- return true;
+ return false;
}
#endif
- return false;
+ /*
+ * No framebuffer was set up by the firmware/bootloader, so fall back
+ * to the default VGA device.
+ */
+ return pdev == vga_default_device();
}
EXPORT_SYMBOL(video_is_primary_device);
diff --git a/arch/x86/virt/svm/sev.c b/arch/x86/virt/svm/sev.c
index 8bcdce98f6dc..cff285d8ad8e 100644
--- a/arch/x86/virt/svm/sev.c
+++ b/arch/x86/virt/svm/sev.c
@@ -536,6 +536,8 @@ int snp_prepare(void)
goto unlock;
}
+ wbinvd_on_all_cpus();
+
/*
* MtrrFixDramModEn is not shared between threads on a core,
* therefore it must be set on all CPUs prior to enabling SNP.