Skip to content

Commit d37421e

Browse files
committed
Merge tag 'x86-urgent-2024-09-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Ingo Molnar: "Fix TDX MMIO #VE fault handling, and add two new Intel model numbers for 'Pantherlake' and 'Diamond Rapids'" * tag 'x86-urgent-2024-09-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/cpu: Add two Intel CPU model numbers x86/tdx: Fix "in-kernel MMIO" check
2 parents ec03de7 + d1fb034 commit d37421e

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

arch/x86/coco/tdx/tdx.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <asm/insn-eval.h>
1717
#include <asm/pgtable.h>
1818
#include <asm/set_memory.h>
19+
#include <asm/traps.h>
1920

2021
/* MMIO direction */
2122
#define EPT_READ 0
@@ -433,6 +434,11 @@ static int handle_mmio(struct pt_regs *regs, struct ve_info *ve)
433434
return -EINVAL;
434435
}
435436

437+
if (!fault_in_kernel_space(ve->gla)) {
438+
WARN_ONCE(1, "Access to userspace address is not supported");
439+
return -EINVAL;
440+
}
441+
436442
/*
437443
* Reject EPT violation #VEs that split pages.
438444
*

arch/x86/include/asm/intel-family.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@
135135

136136
#define INTEL_LUNARLAKE_M IFM(6, 0xBD)
137137

138+
#define INTEL_PANTHERLAKE_L IFM(6, 0xCC)
139+
138140
/* "Small Core" Processors (Atom/E-Core) */
139141

140142
#define INTEL_ATOM_BONNELL IFM(6, 0x1C) /* Diamondville, Pineview */
@@ -178,4 +180,7 @@
178180
#define INTEL_FAM5_QUARK_X1000 0x09 /* Quark X1000 SoC */
179181
#define INTEL_QUARK_X1000 IFM(5, 0x09) /* Quark X1000 SoC */
180182

183+
/* Family 19 */
184+
#define INTEL_PANTHERCOVE_X IFM(19, 0x01) /* Diamond Rapids */
185+
181186
#endif /* _ASM_X86_INTEL_FAMILY_H */

0 commit comments

Comments
 (0)