xref: /illumos-gate/usr/src/uts/intel/io/vmm/amd/offsets.in (revision 0ccfe5834c3b867c1b6c273cae02ec8922bc0fd2)
1/*
2 * This file and its contents are supplied under the terms of the
3 * Common Development and Distribution License ("CDDL"), version 1.0.
4 * You may only use this file in accordance with the terms of version
5 * 1.0 of the CDDL.
6 *
7 * A full copy of the text of the CDDL should have accompanied this
8 * source.  A copy of the CDDL is also available via the Internet at
9 * http://www.illumos.org/license/CDDL.
10 */
11/* This file is dual-licensed; see usr/src/contrib/bhyve/LICENSE */
12
13/*
14 * Copyright 2017 Joyent, Inc.
15 * Copyright 2020 Oxide Computer Company
16 */
17#include <sys/types.h>
18#include <sys/cpuvar.h>
19
20#include "amd/svm.h"
21
22svm_regctx
23	sctx_rbx	SCTX_RBX
24	sctx_rcx	SCTX_RCX
25	sctx_rbp	SCTX_RBP
26	sctx_rdx	SCTX_RDX
27	sctx_rdi	SCTX_RDI
28	sctx_rsi	SCTX_RSI
29	sctx_r8		SCTX_R8
30	sctx_r9		SCTX_R9
31	sctx_r10	SCTX_R10
32	sctx_r11	SCTX_R11
33	sctx_r12	SCTX_R12
34	sctx_r13	SCTX_R13
35	sctx_r14	SCTX_R14
36	sctx_r15	SCTX_R15
37
38/* Need access to GDT to restore TSS */
39cpu
40	cpu_m.mcpu_gdt		CPU_GDT
41
42user_desc	USER_DESC_SZ
43
44system_desc
45	ssd_type	SSD_TYPE
46
47\#define	GDT_KTSS_OFF	_MUL(USER_DESC_SZ, GDT_KTSS)
48
49/* Necessary for TSS-related data */
50\#include <sys/segments.h>
51
52/* Pull in definition for MSR_GSBASE */
53\#include <machine/specialreg.h>
54