Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this organization
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mariux64
/
linux
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
1
Pull requests
0
Actions
Projects
0
Wiki
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Files
9a22bf6
Documentation
LICENSES
arch
alpha
arc
arm
arm64
csky
h8300
hexagon
ia64
m68k
microblaze
mips
nios2
openrisc
parisc
powerpc
riscv
s390
sh
sparc
um
x86
boot
coco
configs
crypto
entry
events
hyperv
ia32
include
asm
e820
fpu
numachip
trace
uv
vdso
xen
GEN-for-each-reg.h
Kbuild
acenv.h
acpi.h
acrn.h
agp.h
alternative.h
amd-ibs.h
amd_hsmp.h
amd_nb.h
apic.h
apicdef.h
apm.h
arch_hweight.h
archrandom.h
asm-offsets.h
asm-prototypes.h
asm.h
atomic.h
atomic64_32.h
atomic64_64.h
audit.h
barrier.h
bios_ebda.h
bitops.h
boot.h
bootparam_utils.h
bug.h
bugs.h
cache.h
cacheflush.h
cacheinfo.h
ce4100.h
checksum.h
checksum_32.h
checksum_64.h
clocksource.h
cmdline.h
cmpxchg.h
cmpxchg_32.h
cmpxchg_64.h
coco.h
compat.h
cpu.h
cpu_device_id.h
cpu_entry_area.h
cpufeature.h
cpufeatures.h
cpuidle_haltpoll.h
cpumask.h
crash.h
current.h
debugreg.h
delay.h
desc.h
desc_defs.h
device.h
disabled-features.h
div64.h
dma-mapping.h
dma.h
dmi.h
doublefault.h
dwarf2.h
edac.h
efi.h
elf.h
elfcore-compat.h
emergency-restart.h
emulate_prefix.h
enclu.h
entry-common.h
espfix.h
exec.h
extable.h
extable_fixup_types.h
fb.h
fixmap.h
floppy.h
frame.h
fsgsbase.h
ftrace.h
futex.h
gart.h
genapic.h
geode.h
hardirq.h
highmem.h
hpet.h
hugetlb.h
hw_breakpoint.h
hw_irq.h
hyperv-tlfs.h
hypervisor.h
i8259.h
ia32.h
ia32_unistd.h
ibt.h
idtentry.h
imr.h
inat.h
inat_types.h
init.h
insn-eval.h
insn.h
inst.h
intel-family.h
intel-mid.h
intel_ds.h
intel_pconfig.h
intel_pt.h
intel_punit_ipc.h
intel_scu_ipc.h
intel_telemetry.h
invpcid.h
io.h
io_apic.h
io_bitmap.h
iomap.h
iommu.h
iommu_table.h
iosf_mbi.h
irq.h
irq_remapping.h
irq_stack.h
irq_vectors.h
irq_work.h
irqdomain.h
irqflags.h
ist.h
jailhouse_para.h
jump_label.h
kasan.h
kaslr.h
kbdleds.h
kdebug.h
kexec-bzimage64.h
kexec.h
kfence.h
kgdb.h
kprobes.h
kvm-x86-ops.h
kvm_host.h
kvm_page_track.h
kvm_para.h
kvm_types.h
kvm_vcpu_regs.h
kvmclock.h
linkage.h
livepatch.h
local.h
mach_timer.h
mach_traps.h
math_emu.h
mc146818rtc.h
mce.h
mem_encrypt.h
memtype.h
microcode.h
microcode_amd.h
microcode_intel.h
misc.h
mmconfig.h
mmu.h
mmu_context.h
mmx.h
mmzone.h
mmzone_32.h
mmzone_64.h
module.h
mpspec.h
mpspec_def.h
mshyperv.h
msi.h
msr-index.h
msr-trace.h
msr.h
mtrr.h
mwait.h
nmi.h
nops.h
nospec-branch.h
numa.h
numa_32.h
olpc.h
olpc_ofw.h
orc_lookup.h
orc_types.h
page.h
page_32.h
page_32_types.h
page_64.h
page_64_types.h
page_types.h
paravirt.h
paravirt_api_clock.h
paravirt_types.h
parport.h
pc-conf-reg.h
pci-direct.h
pci-functions.h
pci.h
pci_x86.h
percpu.h
perf_event.h
perf_event_p4.h
pgalloc.h
pgtable-2level.h
pgtable-2level_types.h
pgtable-3level.h
pgtable-3level_types.h
pgtable-invert.h
pgtable.h
pgtable_32.h
pgtable_32_areas.h
pgtable_32_types.h
pgtable_64.h
pgtable_64_types.h
pgtable_areas.h
pgtable_types.h
pkeys.h
pkru.h
platform_sst_audio.h
pm-trace.h
posix_types.h
preempt.h
probe_roms.h
processor-cyrix.h
processor-flags.h
processor.h
prom.h
proto.h
pti.h
ptrace.h
purgatory.h
pvclock-abi.h
pvclock.h
qrwlock.h
qspinlock.h
qspinlock_paravirt.h
realmode.h
reboot.h
reboot_fixups.h
required-features.h
resctrl.h
rmwcc.h
seccomp.h
sections.h
segment.h
serial.h
set_memory.h
setup.h
setup_arch.h
sev-common.h
sev.h
sgx.h
shmparam.h
sigcontext.h
sigframe.h
sighandling.h
signal.h
simd.h
smap.h
smp.h
softirq_stack.h
sparsemem.h
spec-ctrl.h
special_insns.h
spinlock.h
spinlock_types.h
sta2x11.h
stackprotector.h
stacktrace.h
static_call.h
string.h
string_32.h
string_64.h
suspend.h
suspend_32.h
suspend_64.h
svm.h
swiotlb.h
switch_to.h
sync_bitops.h
sync_core.h
syscall.h
syscall_wrapper.h
syscalls.h
tdx.h
text-patching.h
thermal.h
thread_info.h
time.h
timer.h
timex.h
tlb.h
tlbbatch.h
tlbflush.h
topology.h
trace_clock.h
trap_pf.h
trapnr.h
traps.h
tsc.h
uaccess.h
uaccess_32.h
uaccess_64.h
umip.h
unistd.h
unwind.h
unwind_hints.h
uprobes.h
user.h
user32.h
user_32.h
user_64.h
vdso.h
vermagic.h
vga.h
vgtod.h
virtext.h
vm86.h
vmalloc.h
vmware.h
vmx.h
vmxfeatures.h
vsyscall.h
vvar.h
word-at-a-time.h
x86_init.h
xor.h
xor_32.h
xor_64.h
xor_avx.h
uapi
kernel
kvm
lib
math-emu
mm
net
pci
platform
power
purgatory
ras
realmode
tools
um
video
virt
xen
.gitignore
Kbuild
Kconfig
Kconfig.assembler
Kconfig.cpu
Kconfig.debug
Makefile
Makefile.um
Makefile_32.cpu
xtensa
.gitignore
Kconfig
block
certs
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
Breadcrumbs
linux
/
arch
/
x86
/
include
/
asm
/
tdx.h
Blame
Blame
Latest commit
History
History
101 lines (81 loc) · 2.3 KB
Breadcrumbs
linux
/
arch
/
x86
/
include
/
asm
/
tdx.h
Top
File metadata and controls
Code
Blame
101 lines (81 loc) · 2.3 KB
Raw
/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (C) 2021-2022 Intel Corporation */ #ifndef _ASM_X86_TDX_H #define _ASM_X86_TDX_H #include <linux/bits.h> #include <linux/init.h> #include <linux/bits.h> #include <asm/ptrace.h> #define TDX_CPUID_LEAF_ID 0x21 #define TDX_IDENT "IntelTDX " #define TDX_HYPERCALL_STANDARD 0 #define TDX_HCALL_HAS_OUTPUT BIT(0) /* * SW-defined error codes. * * Bits 47:40 == 0xFF indicate Reserved status code class that never used by * TDX module. */ #define TDX_ERROR _BITUL(63) #define TDX_SW_ERROR (TDX_ERROR | GENMASK_ULL(47, 40)) #define TDX_SEAMCALL_VMFAILINVALID (TDX_SW_ERROR | _UL(0xFFFF0000)) #ifndef __ASSEMBLY__ /* * Used to gather the output registers values of the TDCALL and SEAMCALL * instructions when requesting services from the TDX module. * * This is a software only structure and not part of the TDX module/VMM ABI. */ struct tdx_module_output { u64 rcx; u64 rdx; u64 r8; u64 r9; u64 r10; u64 r11; }; /* * Used in __tdx_hypercall() to pass down and get back registers' values of * the TDCALL instruction when requesting services from the VMM. * * This is a software only structure and not part of the TDX module/VMM ABI. */ struct tdx_hypercall_args { u64 r10; u64 r11; u64 r12; u64 r13; u64 r14; u64 r15; }; /* * Used by the #VE exception handler to gather the #VE exception * info from the TDX module. This is a software only structure * and not part of the TDX module/VMM ABI. */ struct ve_info { u64 exit_reason; u64 exit_qual; /* Guest Linear (virtual) Address */ u64 gla; /* Guest Physical Address */ u64 gpa; u32 instr_len; u32 instr_info; }; #ifdef CONFIG_INTEL_TDX_GUEST void __init tdx_early_init(void); /* Used to communicate with the TDX module */ u64 __tdx_module_call(u64 fn, u64 rcx, u64 rdx, u64 r8, u64 r9, struct tdx_module_output *out); /* Used to request services from the VMM */ u64 __tdx_hypercall(struct tdx_hypercall_args *args, unsigned long flags); /* Called from __tdx_hypercall() for unrecoverable failure */ void __tdx_hypercall_failed(void); void tdx_get_ve_info(struct ve_info *ve); bool tdx_handle_virt_exception(struct pt_regs *regs, struct ve_info *ve); #else static inline void tdx_early_init(void) { }; #endif /* CONFIG_INTEL_TDX_GUEST */ #endif /* !__ASSEMBLY__ */ #endif /* _ASM_X86_TDX_H */
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
You can’t perform that action at this time.
While the code is focused, press Alt+F1 for a menu of operations.