xref: /illumos-gate/usr/src/uts/intel/io/vmm/amd/offsets.in (revision 7c8c0b82)
1bf21cd93STycho Nightingale/*
2bf21cd93STycho Nightingale * This file and its contents are supplied under the terms of the
3bf21cd93STycho Nightingale * Common Development and Distribution License ("CDDL"), version 1.0.
4bf21cd93STycho Nightingale * You may only use this file in accordance with the terms of version
5bf21cd93STycho Nightingale * 1.0 of the CDDL.
6bf21cd93STycho Nightingale *
7bf21cd93STycho Nightingale * A full copy of the text of the CDDL should have accompanied this
8bf21cd93STycho Nightingale * source.  A copy of the CDDL is also available via the Internet at
9bf21cd93STycho Nightingale * http://www.illumos.org/license/CDDL.
10bf21cd93STycho Nightingale */
111fa07ac7SMike Zeller/* This file is dual-licensed; see usr/src/contrib/bhyve/LICENSE */
12bf21cd93STycho Nightingale
13bf21cd93STycho Nightingale/*
144c87aefeSPatrick Mooney * Copyright 2017 Joyent, Inc.
154d3fdeb1SPatrick Mooney * Copyright 2020 Oxide Computer Company
16bf21cd93STycho Nightingale */
174c87aefeSPatrick Mooney#include <sys/types.h>
184d3fdeb1SPatrick Mooney#include <sys/cpuvar.h>
19bf21cd93STycho Nightingale
204c87aefeSPatrick Mooney#include "amd/svm.h"
21bf21cd93STycho Nightingale
224c87aefeSPatrick Mooneysvm_regctx
234c87aefeSPatrick Mooney	sctx_rbx	SCTX_RBX
244c87aefeSPatrick Mooney	sctx_rcx	SCTX_RCX
254c87aefeSPatrick Mooney	sctx_rbp	SCTX_RBP
264c87aefeSPatrick Mooney	sctx_rdx	SCTX_RDX
274c87aefeSPatrick Mooney	sctx_rdi	SCTX_RDI
284c87aefeSPatrick Mooney	sctx_rsi	SCTX_RSI
294c87aefeSPatrick Mooney	sctx_r8		SCTX_R8
304c87aefeSPatrick Mooney	sctx_r9		SCTX_R9
314c87aefeSPatrick Mooney	sctx_r10	SCTX_R10
324c87aefeSPatrick Mooney	sctx_r11	SCTX_R11
334c87aefeSPatrick Mooney	sctx_r12	SCTX_R12
344c87aefeSPatrick Mooney	sctx_r13	SCTX_R13
354c87aefeSPatrick Mooney	sctx_r14	SCTX_R14
364c87aefeSPatrick Mooney	sctx_r15	SCTX_R15
37bf21cd93STycho Nightingale
384d3fdeb1SPatrick Mooney/* Need access to GDT to restore TSS */
394d3fdeb1SPatrick Mooneycpu
404d3fdeb1SPatrick Mooney	cpu_m.mcpu_gdt		CPU_GDT
414d3fdeb1SPatrick Mooney
424d3fdeb1SPatrick Mooneyuser_desc	USER_DESC_SZ
434d3fdeb1SPatrick Mooney
444d3fdeb1SPatrick Mooneysystem_desc
454d3fdeb1SPatrick Mooney	ssd_type	SSD_TYPE
464d3fdeb1SPatrick Mooney
474d3fdeb1SPatrick Mooney\#define	GDT_KTSS_OFF	_MUL(USER_DESC_SZ, GDT_KTSS)
484d3fdeb1SPatrick Mooney
494d3fdeb1SPatrick Mooney/* Necessary for TSS-related data */
504d3fdeb1SPatrick Mooney\#include <sys/segments.h>
514d3fdeb1SPatrick Mooney
524c87aefeSPatrick Mooney/* Pull in definition for MSR_GSBASE */
534c87aefeSPatrick Mooney\#include <machine/specialreg.h>
54